Skip to contentSkip to conversation

net/ice: stop lldp by default

PATCH Superseded Qiming Yang 2 participants 5 messages Apr 3, 2019 – Apr 12, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice: stop lldp by default

This patch stopped lldp by default to avoid the statistics error.

Fixes f9cf4f864150 ("net/ice: support device initialization")
---
 drivers/net/ice/ice_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ice/ice_ethdev.c +5 -0
index 1482ced..b3df282 100644
@@ -11,6 +11,7 @@
 
 #include "base/ice_sched.h"
 #include "base/ice_flow.h"
+#include "base/ice_dcb.h"
 #include "ice_ethdev.h"
 #include "ice_rxtx.h"
 
@@ -1406,6 +1407,10 @@ ice_dev_init(struct rte_eth_dev *dev)
 	/* Disable double vlan by default */
 	ice_vsi_config_double_vlan(vsi, FALSE);
 
+	ret = ice_aq_stop_lldp(hw, TRUE, NULL);
+	if (ret != ICE_SUCCESS)
+		PMD_INIT_LOG(DEBUG, "Failed to stop lldp");
+
 	/* register callback func to eal lib */
 	rte_intr_callback_register(intr_handle,
 				   ice_interrupt_handler, dev);
Signature · 1 line
2.9.5
#1 lore raw
Quoted 32 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Qiming Yang
Sent: Wednesday, April 3, 2019 11:59 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/ice: stop lldp by default

This patch stopped lldp by default to avoid the statistics error.

Fixes f9cf4f864150 ("net/ice: support device initialization")
---
 drivers/net/ice/ice_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ice/ice_ethdev.c index renamed from drivers/net/ice/ice_ethdev.c +0 -0

1482ced..b3df282 100644

drivers/net/ice/ice_ethdev.c +1 -0
@@ -11,6 +11,7 @@
 
 #include "base/ice_sched.h"
 #include "base/ice_flow.h"
+#include "base/ice_dcb.h"
 #include "ice_ethdev.h"
 #include "ice_rxtx.h"
 

drivers/net/ice/ice_ethdev.c ice_dev_init(struct rte_eth_dev *dev) · line 1412

Quoted 6 lines
drivers/net/ice/ice_ethdev.c +3 -0
@@ -1406,6 +1407,10 @@ ice_dev_init(struct rte_eth_dev *dev)
 	/* Disable double vlan by default */
 	ice_vsi_config_double_vlan(vsi, FALSE);
 
+	ret = ice_aq_stop_lldp(hw, TRUE, NULL);
+	if (ret != ICE_SUCCESS)
+		PMD_INIT_LOG(DEBUG, "Failed to stop lldp");

I think we need to warning user here if LLDP can't be stopped.

Quoted 6 lines
drivers/net/ice/ice_ethdev.c +1 -1
+
 	/* register callback func to eal lib */
 	rte_intr_callback_register(intr_handle,
 				   ice_interrupt_handler, dev);
--

2.9.5

#2 lore raw

PATCH v2 1/1 net/ice: stop lldp by default

In reply to Qiming Yang

This patch stopped lldp by default to avoid the statistics error.

Fixes f9cf4f864150 ("net/ice: support device initialization")
---
 drivers/net/ice/ice_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ice/ice_ethdev.c +5 -0
index 1482ced..a4191e9 100644
@@ -11,6 +11,7 @@
 
 #include "base/ice_sched.h"
 #include "base/ice_flow.h"
+#include "base/ice_dcb.h"
 #include "ice_ethdev.h"
 #include "ice_rxtx.h"
 
@@ -1406,6 +1407,10 @@ ice_dev_init(struct rte_eth_dev *dev)
 	/* Disable double vlan by default */
 	ice_vsi_config_double_vlan(vsi, FALSE);
 
+	ret = ice_aq_start_lldp(hw, NULL);
+	if (ret != ICE_SUCCESS)
+		PMD_INIT_LOG(WARNING, "Failed to stop lldp");
+
 	/* register callback func to eal lib */
 	rte_intr_callback_register(intr_handle,
 				   ice_interrupt_handler, dev);
Signature · 1 line
2.9.5
#3 lore raw

PATCH v3 1/1 net/ice: stop lldp by default

This patch stopped lldp by default to avoid the statistics error.

---
 drivers/net/ice/ice_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ice/ice_ethdev.c +5 -0
index 9d01018..b106ee9 100644
@@ -12,6 +12,7 @@
 
 #include "base/ice_sched.h"
 #include "base/ice_flow.h"
+#include "base/ice_dcb.h"
 #include "ice_ethdev.h"
 #include "ice_rxtx.h"
 
@@ -1428,6 +1429,10 @@ ice_dev_init(struct rte_eth_dev *dev)
 	/* Disable double vlan by default */
 	ice_vsi_config_double_vlan(vsi, FALSE);
 
+	ret = ice_aq_stop_lldp(hw, TRUE, NULL);
+	if (ret != ICE_SUCCESS)
+		PMD_INIT_LOG(DEBUG, "lldp has already stopped\n");
+
 	/* register callback func to eal lib */
 	rte_intr_callback_register(intr_handle,
 				   ice_interrupt_handler, dev);
Signature · 1 line
2.9.5
Acked-by on v3 1/1 Applied
#4 lore raw
Quoted 9 lines

-----Original Message-----
From: Yang, Qiming
Sent: Friday, April 12, 2019 6:10 PM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Yang, Qiming <[email protected]>
Subject: [PATCH v3] net/ice: stop lldp by default

Quoted 3 lines

This patch stopped lldp by default to avoid the statistics error.

Applied to dpdk-next-net-intel.

Thanks
Qi