On 2/14/2012 5:21 PM, Love, Robert W wrote:
On 02/14/2012 05:07 PM, Bhanu Prakash Gollapudi wrote:
On 2/13/2012 5:52 PM, Love, Robert W wrote:
On 02/13/2012 05:42 PM, Robert Love wrote:
This patch series adds a sysfs layer to libfcoe. It adds
a sysfs instance for FIP controllers (a SW entity) and
discovered Fibre Channel Forwarders (FCFs), which are
simply FCoE switches.

The new sysfs code is used by any driver that currently
uses libfcoe, namely fcoe.ko and bnx2fc_fcoe.ko. Any other
FCoE capable device that wishes to use the high-level APIs
defined in fcoe_syfs.h may, without having to use the
the protocol processing portions of libfcoe.

--

This series still needs validation and I'm working through
a remaining issue or two. It is stable though using ixgbe.

This RFC is to solicit comments and to notify Broadcom that
I am making changes to their driver. I will post this series
to linux-scsi@vger when it has passed validation.

Robert, thanks for making these changes to bnx2fc as well. Changes
look good to me. I did some basic tests, and seem to work fine, except
that a couple of functions are missing in bnx2fc -
get_fcoe_fcf_vlan_id&  get_fcoe_ctlr_mode. For vlan_id, bnx2fc needs a
similar function to fcoe_fcf_get_vlan_id(). For get_fcoe_ctlr_mode,
the common function fcoe_ctlr_get_fip_mode() can be used directly.


Great! Thanks! Especially for the quick turn-around. I'll make the
changes you mention here to complete bnx2fc. I don't remember if it was
obvious where I should get the bnx2fc vlan_id from. I probably just need
to take another look.

Robert, please use the following patch to fetch vlan_id and mode.

diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index e416b6d..c04d934 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -145,6 +145,16 @@ static void bnx2fc_ctlr_get_lesb(struct fcoe_ctlr_attrs *ctlr_attrs)
 }
 EXPORT_SYMBOL(bnx2fc_ctlr_get_lesb);

+static void bnx2fc_fcf_get_vlan_id(struct fcoe_fcf_attrs *fcf_attrs)
+{
+       struct fcoe_ctlr_attrs *ctlr_attrs =
+               fcoe_fcf_to_ctlr(fcf_attrs);
+       struct fcoe_ctlr *ctlr = fcoe_ctlr_attrs_priv(ctlr_attrs);
+       struct bnx2fc_interface *interface = bnx2fc_from_ctlr(ctlr);
+
+       fcf_attrs->vlan_id = vlan_dev_vlan_id(interface->netdev);
+}
+
 static void bnx2fc_clean_rx_queue(struct fc_lport *lp)
 {
        struct fcoe_percpu_s *bg;
@@ -2504,6 +2514,8 @@ static struct fcoe_sysfs_function_template bnx2fc_fcoe_sysfs_templ = {
        .get_fcoe_ctlr_symb_err = bnx2fc_ctlr_get_lesb,
        .get_fcoe_ctlr_err_block = bnx2fc_ctlr_get_lesb,
        .get_fcoe_ctlr_fcs_error = bnx2fc_ctlr_get_lesb,
+       .get_fcoe_ctlr_mode = fcoe_ctlr_get_fip_mode,
+       .get_fcoe_fcf_vlan_id = bnx2fc_fcf_get_vlan_id,
 };

 static struct fc_function_template bnx2fc_transport_function = {

Thanks,
Bhanu

I know that some of the changes Vasu and Neil have
been discussing will conflict, so I need to update this series on top of
that patch and I have a mysterious NULL pointer exception that I can't
pin down. As soon as I get those two tasks and your comments addressed
I'll re-post.

Thanks, //Rob



_______________________________________________
devel mailing list
devel@open-fcoe.org
https://lists.open-fcoe.org/mailman/listinfo/devel

Reply via email to