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

Lucy Liu lucy.liu at intel.com
Thu Dec 10 17:47:03 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 
   fcoe_clif.h/c
b. In fcoemon.c/h, create socket interface and resiger 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".
c. 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;
d. in fcoeplumb, remove "create", "delete" and "reset" commands.

---

Lucy Liu (4):
      Update fcoeplumb script
      Add socket client interface in fcoeadm
      Add socket server interface in fcoemon
      Create library files for fcoesocket interfaces


 Makefile.am  |    4 -
 fcoe_clif.c  |  128 +++++++++++++++++
 fcoe_clif.h  |   53 +++++++
 fcoeadm.c    |  319 +++++++++++++++++++++++++-----------------
 fcoeadm.h    |   16 ++
 fcoemon.c    |  437 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 fcoemon.h    |   20 +++
 fcoeplumb.in |   89 +-----------
 8 files changed, 821 insertions(+), 245 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