[Open-FCoE] [PATCH v2 0/4] Create socket interface

Lucy Liu lucy.liu at intel.com
Fri Dec 18 23:22:39 UTC 2009

In current fcoe utils, both fcoemon and fcoeadm could write to /sys/class/..
files by calling "create"/"destroy"/"reset" commands. Fcoemon has no way to
manage those files after startup. Fcoeadm bypasses fcoemon and accesses
those files.

So this patch create socket interface between fcoemon and fcoeadm. Fcoemon as
server provided an IPC interface for client applications(fcoeadm) to set
create/reset/destroy device interface. fcoeadm doesn't write to those files
anymore, instead, it connects to the client interface of
fcoemon to perform those operations.

The detail changes are as following:
a. Create new files fcoe_clif.h/c as a library used by fcoemon and
   fcoeadm. Clif stands for client interface. Change Makefile.am for new files 
b. In fcoeplumb, remove "create", "delete" and "reset" commands. In service
   script, remove destroy non-DCB interface functions. Also modify fcoemon.c to
   write to sysfs files for those commands.
c. In fcoemon.c/h, create socket interface and register receive function using
   sa_loop_select. The code has merged with fcoemon redesign. In fcoe_port 
   struct, add a new member as socket reply information. Fcoemon will save the
   socket reply info and wait to reply to fcoeadm at the end of select loop
   after the "action".
d. In fcoeadm.c/h, remove the code of access sysfs files, create socket to
   connect to fcoemon, send request, parse and print out the response;


Lucy Liu (4):
      Add socket client interface in fcoeadm
      Add socket server interface in fcoemon
      Use sysfs for create/delete/reset of FCoE interfaces by fcoemon
      Create library files for fcoesocket interfaces

 Makefile.am            |    4 
 etc/initd/initd.fedora |   16 --
 etc/initd/initd.suse   |   16 --
 fcoe_clif.c            |  146 ++++++++++++++++
 fcoe_clif.h            |   55 ++++++
 fcoeadm.c              |  346 ++++++++++++++++++++------------------
 fcoeadm.h              |   16 +-
 fcoemon.c              |  441 +++++++++++++++++++++++++++++++++++++++++++++---
 fcoemon.h              |   20 ++
 fcoeplumb.in           |   89 +---------
 10 files changed, 842 insertions(+), 307 deletions(-)
 create mode 100644 fcoe_clif.c
 create mode 100644 fcoe_clif.h

Signature Lucy Liu <lucy.liu at intel.com>

More information about the devel mailing list