Hello community,

here is the log from the commit of package fcoe-utils for openSUSE:Factory 
checked in at 2016-07-21 07:52:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fcoe-utils (Old)
 and      /work/SRC/openSUSE:Factory/.fcoe-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fcoe-utils"

Changes:
--------
--- /work/SRC/openSUSE:Factory/fcoe-utils/fcoe-utils.changes    2016-02-23 
16:53:07.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.fcoe-utils.new/fcoe-utils.changes       
2016-07-21 07:52:02.000000000 +0200
@@ -2 +2 @@
-Thu Feb 18 11:34:47 UTC 2016 - jthumsh...@suse.com
+Thu Jul 14 10:08:53 CEST 2016 - h...@suse.de
@@ -4 +4,21 @@
-- Update to version 1.0.31
+- 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
+
+-------------------------------------------------------------------
+Tue Jun 21 07:59:59 UTC 2016 - jthumsh...@suse.com
+
+- 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
+-------------------------------------------------------------------
+Mon Feb  8 11:15:43 UTC 2016 - jthumsh...@suse.com
+
+- Update to version 1.0.31 (FATE#320515)
@@ -8 +28,40 @@
-    + 0006-fipvlan-fixup-return-value-on-error.patch
+    + 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
+
+-------------------------------------------------------------------
+Mon Nov  2 12:11:41 UTC 2015 - jthumsh...@suse.com
+
+- Fix display of NPIV ports (bsc#951859)
+  + 0019-fcoeadm_display-Fix-display-of-NPIV-ports.patch
+
+-------------------------------------------------------------------
+Fri Oct 16 07:49:37 UTC 2015 - jthumsh...@suse.com
+
+- Fix erroneous memory free corruption (bsc#950696)
+  + 0019-fcping-fix-erroneous-memory-free.patch
+
+-------------------------------------------------------------------
+Thu Oct  1 09:14:15 UTC 2015 - jthumsh...@suse.com
+
+- Fix enumeration of FCoE connections (bsc#947587)
+  + 0018-support-multiple-connections.patch
+
+-------------------------------------------------------------------
+Thu Aug 13 09:06:02 UTC 2015 - jthumsh...@suse.com
+
+- Fix segmentation fault (bsc#941577)
+- Fix display of driver name and version (bsc#941566)
+
+-------------------------------------------------------------------
+Wed Aug 12 10:32:41 UTC 2015 - jthumsh...@suse.com
+
+- Replace libHBAAPI and libhbalinux by new internal implementation 
(FATE#319021)
@@ -48,14 +107,7 @@
-    + Rename 0031-fcoemon-Fix-IEEE-state-machine.patch to
-      0002-fcoemon-fix-IEEE-state-machine.patch
-    + Rename 0028-systemctl-cannot-start-fcoemon.socket.patch to
-      0003-systemctl-cannot-start-fcoemon.socket.patch
-    + Rename 0029-fcoemon-Correctly-handle-options-in-the-service-file.patch to
-      0004-fcoemon-Correctly-handle-options-in-the-service-file.patch
-    + Rename 0030-fcoe.service-Add-foreground-to-prevent-fcoemon-to-be.patch to
-      0005-fcoe.service-Add-foreground-to-prevent-fcoemon-to-be.patch
-    + Rename 0035-fipvlan-fixup-return-value-on-error.patch to
-      0006-fipvlan-fixup-return-value-on-error.patch
-    + Rename 0036-fipvlan-clean-up-state-machine-for-pfd_add.patch to
-      0007-fipvlan-clean-up-state-machine-for-pfd_add.patch
-    + Rename 0037-Use-correct-socket-for-fcoemon.socket.patch to
-      0008-Use-correct-socket-for-fcoemon.socket.patch
+    + 0002-fcoemon-fix-IEEE-state-machine.patch
+    + 0003-systemctl-cannot-start-fcoemon.socket.patch
+    + 0004-fcoemon-Correctly-handle-options-in-the-service-file.patch
+    + 0005-fcoe.service-Add-foreground-to-prevent-fcoemon-to-be.patch
+    + 0006-fipvlan-fixup-return-value-on-error.patch
+    + 0007-fipvlan-clean-up-state-machine-for-pfd_add.patch
+    + 0008-Use-correct-socket-for-fcoemon.socket.patch

New:
----
  0006-fipvlan-fixup-return-value-on-error.patch
  0009-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch
  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

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fcoe-utils.spec ++++++
--- /var/tmp/diff_new_pack.pNWC9n/_old  2016-07-21 07:52:03.000000000 +0200
+++ /var/tmp/diff_new_pack.pNWC9n/_new  2016-07-21 07:52:03.000000000 +0200
@@ -41,8 +41,14 @@
 Patch3:         0003-systemctl-cannot-start-fcoemon.socket.patch
 Patch4:         0004-fcoemon-Correctly-handle-options-in-the-service-file.patch
 Patch5:         0005-fcoe.service-Add-foreground-to-prevent-fcoemon-to-be.patch
+Patch6:         0006-fipvlan-fixup-return-value-on-error.patch
 Patch7:         0007-fipvlan-clean-up-state-machine-for-pfd_add.patch
 Patch8:         0008-Use-correct-socket-for-fcoemon.socket.patch
+Patch9:         0009-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch
+Patch10:        0010-fcoemon-fixup-log_nlmsg_error.patch
+Patch11:        0011-fcoemon-Add-debugging-message-for-recv.patch
+Patch12:        0012-fcoemon-Retry-fcm_link_getlink-on-EBUSY.patch
+Patch13:        0013-Fallback-to-default-MAC-address-for-FIP.patch
 
 # Patches from Fedora
 Patch101:       fcoe-utils-1.0.29-make.patch
@@ -58,8 +64,14 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
 %patch101 -p1
 
 %build
@@ -97,7 +109,7 @@
 exit 0
 
 %postun
-%service_del_preun fcoe.service
+%service_del_postun fcoe.service
 exit 0
 
 %files

++++++ 0006-fipvlan-fixup-return-value-on-error.patch ++++++
>From 28c841380880fb95f3096c42dc89fa0487504a45 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <h...@suse.de>
Date: Tue, 13 May 2014 09:44:17 +0200
Subject: fipvlan: fixup return value on error

fipvlan should return 1 on error or ENODEV (=19) if no interfaces
were found.

Signed-off-by: Hannes Reinecke <h...@suse.de>
---
 fipvlan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fipvlan.c b/fipvlan.c
index 2059276..a8d18b7 100644
--- a/fipvlan.c
+++ b/fipvlan.c
@@ -981,7 +981,7 @@ int main(int argc, char **argv)
 
        ns = rtnl_socket(RTMGRP_LINK);
        if (ns < 0) {
-               rc = ns;
+               rc = 1;
                goto ns_err;
        }
        pfd_add(ns);
@@ -1001,7 +1001,7 @@ int main(int argc, char **argv)
                                    "no interfaces to perform discovery on");
                else
                        FIP_LOG("no interfaces to perform discovery on");
-               exit(1);
+               exit(ENODEV);
        }
 
        do_vlan_discovery();
-- 
2.6.6

++++++ 0009-fcoemon.c-Add-a-check-to-verify-if-dcbd-is-to-be-ini.patch ++++++
>From 0b4e0a99af9e0103c7b25cc3c7997c18bdc46bf4 Mon Sep 17 00:00:00 2001
From: "Milan P. Gandhi" <mgan...@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 <mgan...@redhat.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
Reviewed-by: Laurence Oberman <lober...@redhat.com>
Tested-by: Laurence Oberman <lober...@redhat.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
Signed-off-by: Vasu Dev <vasu....@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

++++++ 0010-fcoemon-fixup-log_nlmsg_error.patch ++++++
>From 7eb80f89a3f4a2d4697b2879b6c6a87618b8aa8b Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <h...@suse.de>
Date: Tue, 28 Jun 2016 13:46:03 +0200
Subject: fcoemon: fixup log_nlmsg_error()

The error message is in the data, no the next message.

Signed-off-by: Hannes Reinecke <h...@suse.com>
---
 fcoemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fcoemon.c b/fcoemon.c
index 6fe50a2..1f95c95 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -755,7 +755,7 @@ static void log_nlmsg_error(struct nlmsghdr *hp, size_t 
rlen, const char *str)
        struct nlmsgerr *ep;
 
        if (NLMSG_OK(hp, rlen)) {
-               ep = (struct nlmsgerr *)NLMSG_NEXT(hp, rlen);
+               ep = (struct nlmsgerr *)NLMSG_DATA(hp);
                FCM_LOG_DBG("%s, err=%d, type=%d\n",
                            str, ep->error, ep->msg.nlmsg_type);
        } else {
-- 
2.6.6

++++++ 0011-fcoemon-Add-debugging-message-for-recv.patch ++++++
>From b470ddf5122c38d6b9e878ca1c9f33c101896931 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <h...@suse.de>
Date: Tue, 28 Jun 2016 13:47:16 +0200
Subject: fcoemon: Add debugging message for 'recv'

We already have a debugging message for 'send', so add the
corresponding 'recv' debugging message, too.

Signed-off-by: Hannes Reinecke <h...@suse.com>
---
 fcoemon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fcoemon.c b/fcoemon.c
index 1f95c95..58137df 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -2204,6 +2204,7 @@ static void fcm_dcbd_rx(void *arg)
                len = strlen(buf);
                ASSERT(len <= rc);
 
+               FCM_LOG_DBG("recv '%s', len=%d bytes succeeded", buf, (int)len);
                switch (buf[CLIF_RSP_MSG_OFF]) {
                case CMD_RESPONSE:
                        st = fcm_get_hex(buf + CLIF_STAT_OFF, CLIF_STAT_LEN,
-- 
2.6.6

++++++ 0012-fcoemon-Retry-fcm_link_getlink-on-EBUSY.patch ++++++
>From e21f1ac46b9672824e00ad907ee0443af2dbad66 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <h...@suse.de>
Date: Tue, 28 Jun 2016 14:10:38 +0200
Subject: fcoemon: Retry fcm_link_getlink() on EBUSY

If netlink returns -EBUSY as NLMSG_ERROR code there was another
callback running on that socket. So we can simply retry here.

Signed-off-by: Hannes Reinecke <h...@suse.com>
---
 fcoemon.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/fcoemon.c b/fcoemon.c
index 58137df..32ba30c 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -750,7 +750,7 @@ static void fcm_fc_event_handler(struct fc_nl_event 
*fc_event)
        }
 }
 
-static void log_nlmsg_error(struct nlmsghdr *hp, size_t rlen, const char *str)
+static int log_nlmsg_error(struct nlmsghdr *hp, size_t rlen, const char *str)
 {
        struct nlmsgerr *ep;
 
@@ -758,8 +758,10 @@ static void log_nlmsg_error(struct nlmsghdr *hp, size_t 
rlen, const char *str)
                ep = (struct nlmsgerr *)NLMSG_DATA(hp);
                FCM_LOG_DBG("%s, err=%d, type=%d\n",
                            str, ep->error, ep->msg.nlmsg_type);
+               return ep->error;
        } else {
                FCM_LOG("%s", str);
+               return 0;
        }
 }
 
@@ -1873,7 +1875,7 @@ static void fcm_link_recv(UNUSED void *arg)
                        break;
 
                if (hp->nlmsg_type == NLMSG_ERROR) {
-                       log_nlmsg_error(hp, rlen, "nlmsg error");
+                       rc = log_nlmsg_error(hp, rlen, "nlmsg error");
                        break;
                }
 
@@ -1904,6 +1906,11 @@ static void fcm_link_recv(UNUSED void *arg)
                        break;
                }
        }
+       if (rc == -EBUSY) {
+               FCM_LOG_DBG("%s: netlink returned -EBUSY, retry\n",
+                             __func__);
+               fcm_link_getlink();
+       }
 }
 
 /*
-- 
2.6.6

++++++ 0013-Fallback-to-default-MAC-address-for-FIP.patch ++++++
>From f36193036751f88c6208e7f0feda36116978a1af Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <h...@suse.de>
Date: Thu, 30 Jun 2016 07:48:38 +0200
Subject: Fallback to default MAC address for FIP

FIP is a normal ethernet protocol, and doesn't rely on DCB to
be active or supported. So we should default to the NIC MAC
if no SAN MAC is present.

Signed-off-by: Hannes Reinecke <h...@suse.com>
---
 fcoemon.c     | 4 ++--
 fipvlan.c     | 2 +-
 include/fip.h | 2 +-
 lib/fip.c     | 8 ++++----
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/fcoemon.c b/fcoemon.c
index 32ba30c..1df3d82 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -1057,7 +1057,7 @@ static int fcm_vlan_disc_socket(struct fcoe_port *p)
        int fd;
        int origdev = 1;
 
-       fd = fip_socket(p->ifindex, FIP_NONE);
+       fd = fip_socket(p->ifindex, p->mac, FIP_NONE);
        if (fd < 0) {
                FCM_LOG_ERR(errno, "socket error");
                return fd;
@@ -1496,7 +1496,7 @@ static void init_fip_vn2vn_responder(struct fcoe_port *p)
        if (p->fip_responder_socket >= 0)
                return;
 
-       s = fip_socket(p->ifindex, FIP_ALL_VN2VN);
+       s = fip_socket(p->ifindex, p->mac, FIP_ALL_VN2VN);
        if (s < 0) {
                FCM_LOG_ERR(errno, "%s: Failed to get fip socket\n", p->ifname);
                return;
diff --git a/fipvlan.c b/fipvlan.c
index 4acf3d1..3662885 100644
--- a/fipvlan.c
+++ b/fipvlan.c
@@ -824,7 +824,7 @@ static int probe_fip_interface(struct iff *iff)
 
        if (iff->ps < 0) {
                iff->fip_ready = false;
-               iff->ps = fip_socket(iff->ifindex, FIP_NONE);
+               iff->ps = fip_socket(iff->ifindex, iff->mac_addr, FIP_NONE);
                if (iff->ps < 0) {
                        FIP_LOG_DBG("if %d not ready\n", iff->ifindex);
                        return 0;
diff --git a/include/fip.h b/include/fip.h
index 443d3c4..0b6385c 100644
--- a/include/fip.h
+++ b/include/fip.h
@@ -144,7 +144,7 @@ struct fip_tlv_vlan {
 
 /* libutil / fip.c functionality */
 
-int fip_socket(int ifindex, enum fip_multi multi);
+int fip_socket(int ifindex, unsigned char *mac, enum fip_multi multi);
 
 /* FIP message handler, passed into fip_recv */
 typedef int fip_handler(struct fiphdr *fh, struct sockaddr_ll *sa, void *arg);
diff --git a/lib/fip.c b/lib/fip.c
index 6657b61..b7f687b 100644
--- a/lib/fip.c
+++ b/lib/fip.c
@@ -122,13 +122,13 @@ fip_socket_add_addr(int s, int ifindex, bool add, const 
__u8 *mac, bool multi)
  * @ifindex: network interface index to send on
  * @add: 1 to add 0 to del
  */
-static int fip_socket_sanmac(int s, int ifindex, int add)
+static int fip_socket_sanmac(int s, int ifindex, unsigned char *mac, int add)
 {
        unsigned char smac[ETHER_ADDR_LEN];
 
        if (fip_get_sanmac(ifindex, smac)) {
                FIP_LOG_DBG("%s: no sanmac, ifindex %d\n", __func__, ifindex);
-               return -ENXIO;
+               memcpy(smac, mac, ETHER_ADDR_LEN);
        }
 
        return fip_socket_add_addr(s, ifindex, add, smac, false);
@@ -200,7 +200,7 @@ static void drain_socket(int s)
  * @ifindex: ifindex of netdevice to bind to
  * @multi: Indication of any multicast address to bind to
  */
-int fip_socket(int ifindex, enum fip_multi multi)
+int fip_socket(int ifindex, unsigned char *mac, enum fip_multi multi)
 {
        struct sockaddr_ll sa = {
                .sll_family = AF_PACKET,
@@ -214,7 +214,7 @@ int fip_socket(int ifindex, enum fip_multi multi)
        if (s < 0)
                return s;
 
-       rc = fip_socket_sanmac(s, ifindex, 1);
+       rc = fip_socket_sanmac(s, ifindex, mac, 1);
        if (rc < 0) {
                close(s);
                return rc;
-- 
2.6.6

++++++ fcoe-utils-1.0.31.tar.xz ++++++


Reply via email to