Hello,

Some of the FCoE capable adapters e.g. BCM57810 network interfaces
has DCBX/LLDP client on-chip, and kernel documentation recommends
to keep software based DCBX/LLDP clients (e.g. lldpad) disabled.
https://www.kernel.org/doc/Documentation/scsi/bnx2fc.txt

It was found that, if lldpad is disabled while using above interfaces,
then fcoemon shows following errors every 10 seconds:

fcoemon: error 111 Connection refused
fcoemon: Failed to connect to lldpad

Below patch checks each interface configuration in /etc/fcoe/cfg-ethX
file to verify if there is at least 1 interface with DCB_REQUIRED flag
set to yes and will try to initialize dcbd only if there is at least 1
interface with DCB_REQUIRED="yes", else fcoemon will not try to
initialize dcbd or connect to lldpad, thus eliminating above errors:

Signed-off-by: Milan P. Gandhi <[email protected]>
---

diff --git a/fcoemon.c b/fcoemon.c
index 91d12c7..d84d1e5 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -557,6 +557,9 @@ static int fcm_read_config_files(void)
                if (!strncasecmp(val, "yes", 3) && rc == 1)
                        next->dcb_required = 1;
 
+               if (next->dcb_required == 1 && fcoe_config.dcb_init == 0)
+                       fcoe_config.dcb_init = 1;
+
                /* AUTO_VLAN */
                rc = fcm_read_config_variable(file, val, sizeof(val),
                                              fp, CFG_IF_VAR_AUTOVLAN);
@@ -3768,7 +3771,9 @@ int main(int argc, char **argv)
        if (rc != 0)
                goto err_cleanup;
 
-       fcm_dcbd_init();
+       if (fcoe_config.dcb_init)
+               fcm_dcbd_init();
+
        rc = fcm_srv_create(&srv_info);
        if (rc != 0)
                goto err_cleanup;
diff --git a/fcoemon.h b/fcoemon.h
index 3869bae..0e0e6a2 100644
--- a/fcoemon.h
+++ b/fcoemon.h
@@ -25,6 +25,7 @@
 struct fcoe_config {
        int debug;
        int use_syslog;
+       int dcb_init;
        struct fcoe_port *port;
 } fcoe_config;
_______________________________________________
fcoe-devel mailing list
[email protected]
http://lists.open-fcoe.org/mailman/listinfo/fcoe-devel

Reply via email to