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

Liu, Lucy lucy.liu at intel.com
Thu Dec 10 22:59:35 UTC 2009


Joe,

Info function is still in fcoeadm, not changed. 
Reset command's functionality is same as before, but moved to fcoemon with this patch set, because only fcoemon could write to the reset path(Before this change, both fcoeadm and fcoemon could write to reset path). When fcoeadm receives the command to reset ethx, it will validate ethX, then send request to fcoemon, fcoemon will find the host and write to the path. I didn't test with fnic or libfc, I believe they should work as before.

Thanks,

Lucy


-----Original Message-----
From: Joe Eykholt [mailto:jeykholt at cisco.com] 
Sent: Thursday, December 10, 2009 10:47 AM
To: Liu, Lucy
Cc: devel at open-fcoe.org
Subject: Re: [Open-FCoE] [PATCH 0/4] Create socket interface



Lucy Liu wrote:
> 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

Is it intended that the reset and info functions of fcoeadm will
still work for the fnic driver and other libfc LLDs, which use
libhbalinux but don't need DCBX?

The create/delete functions don't apply, of course.

	Thanks,
	Joe




More information about the devel mailing list