[lldpad/f15] Include Jens' patch for the resource consumption issue

Petr Sabata psabata at fedoraproject.org
Thu Sep 8 10:28:55 UTC 2011


commit b355825750a8e1079c56332a3a80281f656dd76a
Author: Petr Sabata <contyk at redhat.com>
Date:   Thu Sep 8 12:27:39 2011 +0200

    Include Jens' patch for the resource consumption issue

 ...d-0.9.41-vdp-must-be-enabled-on-interface.patch |   59 ++++++++++++++++++++
 lldpad.spec                                        |    7 ++-
 2 files changed, 65 insertions(+), 1 deletions(-)
---
diff --git a/lldpad-0.9.41-vdp-must-be-enabled-on-interface.patch b/lldpad-0.9.41-vdp-must-be-enabled-on-interface.patch
new file mode 100644
index 0000000..8263d30
--- /dev/null
+++ b/lldpad-0.9.41-vdp-must-be-enabled-on-interface.patch
@@ -0,0 +1,59 @@
+From a2cb34aa259a7ef73322c2279d0d5cf5e8bb239e Mon Sep 17 00:00:00 2001
+From: Jens Osterkamp <jens at linux.vnet.ibm.com>
+Date: Fri, 13 May 2011 15:26:17 +0200
+Subject: [PATCH] bugfix: vdp must be enabled on interface
+
+For vdp to be usable, enableTx must be set to true.
+
+Signed-off-by: Jens Osterkamp <jens at linux.vnet.ibm.com>
+---
+ lldp_vdp.c |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+Index: lldpad-0.9.41/lldp_vdp.c
+===================================================================
+--- lldpad-0.9.41.orig/lldp_vdp.c
++++ lldpad-0.9.41/lldp_vdp.c
+@@ -1347,6 +1347,21 @@ void vdp_ifup(char *ifname)
+ 	struct vdp_user_data *ud;
+ 	struct port *port;
+ 	struct vsi_profile *p;
++	int enabletx = false;
++
++	port = port_find_by_name(ifname);
++
++	if (!port) {
++		LLDPAD_ERR("%s(%i): could not find port for %s!\n",
++			   __func__, __LINE__, ifname);
++		goto out_err;
++	}
++
++	if (port->adminStatus != enabledRxTx) {
++		LLDPAD_WARN("%s(%i): port %s not enabled for RxTx (%i) !\n",
++			    __func__, __LINE__, ifname, port->adminStatus);
++		return;
++	}
+ 
+ 	LLDPAD_DBG("%s(%i): starting VDP for if %s !\n", __func__, __LINE__, ifname);
+ 
+@@ -1382,20 +1397,6 @@ void vdp_ifup(char *ifname)
+ 	ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_VDP);
+ 	LIST_INSERT_HEAD(&ud->head, vd, entry);
+ 
+-	port = port_find_by_name(ifname);
+-
+-	if (!port) {
+-		LLDPAD_ERR("%s(%i): could not find port for %s!\n",
+-			   __func__, __LINE__, ifname);
+-		goto out_err;
+-	}
+-
+-	if (port->adminStatus != enabledRxTx) {
+-		LLDPAD_WARN("%s(%i): port %s not enabled for RxTx (%i) !\n",
+-			    __func__, __LINE__, ifname, port->adminStatus);
+-		return;
+-	}
+-
+ out_start_again:
+ 	if (ecp_init(ifname)) {
+ 		LLDPAD_ERR("%s:%s unable to init ecp !\n", __func__, ifname);
diff --git a/lldpad.spec b/lldpad.spec
index 3f0661d..20dda27 100644
--- a/lldpad.spec
+++ b/lldpad.spec
@@ -1,6 +1,6 @@
 Name:           lldpad
 Version:        0.9.41
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Intel LLDP Agent
 
 Group:          System Environment/Daemons
@@ -67,6 +67,7 @@ Patch151:       lldpad-0.9.41-lldpad-make-debug-messages-from-netlink-path-helpf
 Patch152:       lldpad-0.9.41-support-disabling-of-LLDP-on-switch-side.patch
 Patch153:       lldpad-0.9.41-reduce-number-of-select-timeouts-for-ECP.patch
 Patch154:       lldpad-0.9.41-reduce-number-of-select-timeouts-for-VDP.patch
+Patch155:       lldpad-0.9.41-vdp-must-be-enabled-on-interface.patch
 
 Requires:         kernel >= 2.6.32
 BuildRequires:    libconfig-devel >= 1.3.2 kernel-headers >= 2.6.32
@@ -151,6 +152,7 @@ that use %{name}.
 %patch152 -p1
 %patch153 -p1
 %patch154 -p1
+%patch155 -p1
 # Fedora patches on top of that...
 %patch0 -p1 -b .make
 %patch1 -p1 -b .init
@@ -217,6 +219,9 @@ fi
 
 
 %changelog
+* Thu Sep 08 2011 Petr Sabata <contyk at redhat.com> - 0.9.41-4
+- Include Jens' patch for the same issue (rhbz#701943)
+
 * Wed May  4 2011 Petr Sabata <psabata at redhat.com> - 0.9.41-3
 - Fix the frequent, power consuming lldpad wake-ups (rhbz#701943)
 


More information about the scm-commits mailing list