fcoe-utils/0009-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch
Hannes Reinecke 94ae7e973d Accepting request 408431 from home:hreinecke:branches:network:fcoe
- fcoemon cannot start FIP responder (bsc#988887)
  * 0010-fcoemon-fixup-log_nlmsg_error.patch
  * 0011-fcoemon-Add-debugging-message-for-recv.patch
  * 0012-fcoemon-Retry-fcm_link_getlink-on-EBUSY.patch
  * 0013-Fallback-to-default-MAC-address-for-FIP.patch
- Rediff patch
  * 0006-fipvlan-fixup-return-value-on-error.patch
- Rename patch
  * old: 0009-fcoemon-c-add-a-check-to-verify-if-dcbd-is-to-be-initialized-else-do-not-try-to-connect-to-dcbd-lldpad.patch
  * new: 0009-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch
- Fixup spec file to correctly refer to service_del_postun

- Don't activate DCB on adapters which do DCB in Hardware (bsc#985816)
  + 0009-fcoemon-c-add-a-check-to-verify-if-dcbd-is-to-be-initialized-else-do-not-try-to-connect-to-dcbd-lldpad.patch

- Update to version 1.0.31 (FATE#320515)
    + 0009-fcoe-utils-Add-sysfs_hba-to-to-fcoemon_utils.patch
    + 0010-fcoeadm-Use-internal-sysfs-based-hba-lib-for-informa.patch
    + 0011-fcoeadm-Use-internal-sysfs-lib-to-display-target-and.patch
    + 0012-fcoeadm-Use-internal-sysfs-lib-to-display-port-stati.patch
    + 0013-fcoeadm-Get-rid-of-some-includes.patch
    + 0014-fcoemon-Use-internal-sysfs_hba-library.patch
    + 0015-libutil-remove-definition-of-sa_hex_format.patch
    + 0016-fcping-Convert-fcping-to-internal-sysfs-based-implem.patch
    + 0017-configure.ac-Remove-libHBAAPIv2-and-libhbalinux2.patch
    + 0018-support-multiple-connections.patch
    + 0019-fcoeadm_display-Fix-display-of-NPIV-ports.patch

- Fix display of NPIV ports (bsc#951859)
  + 0019-fcoeadm_display-Fix-display-of-NPIV-ports.patch

OBS-URL: https://build.opensuse.org/request/show/408431
OBS-URL: https://build.opensuse.org/package/show/network:fcoe/fcoe-utils?expand=0&rev=27
2016-07-14 08:34:25 +00:00

76 lines
2.4 KiB
Diff

From 0b4e0a99af9e0103c7b25cc3c7997c18bdc46bf4 Mon Sep 17 00:00:00 2001
From: "Milan P. Gandhi" <mgandhi@redhat.com>
Date: Mon, 28 Mar 2016 12:52:12 +0000
Subject: fcoemon.c: Add a check to verify if dcbd is to be initialized, else
do not try to connect to dcbd/lldpad
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:
X-Git-commit: 0231b0c71464af17a0cf392e55174c97a5986640
Signed-off-by: Milan P. Gandhi <mgandhi@redhat.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
---
fcoemon.c | 7 ++++++-
fcoemon.h | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/fcoemon.c b/fcoemon.c
index b5f4d71..6fe50a2 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);
@@ -3774,7 +3777,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;
--
2.6.6