net/bonding: fix forward packets failed

Message ID 20230310044131.2052540-1-kaiwenx.deng@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series net/bonding: fix forward packets failed |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing fail Testing issues
ci/iol-testing fail Testing issues
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

Kaiwen Deng March 10, 2023, 4:41 a.m. UTC
  The bond port is failed to forward packets in Link Aggregation
802.3AD(4) mode. Because bond devices get LACP packets from 
rx_ring instead of tx_ring.

This commit will get LACP packets from tx_ring instead.

Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Cc: stable@dpdk.org

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jiale, SongX March 10, 2023, 9:59 a.m. UTC | #1
> -----Original Message-----
> From: Kaiwen Deng <kaiwenx.deng@intel.com>
> Sent: Friday, March 10, 2023 12:42 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Zhou, YidingX
> <yidingx.zhou@intel.com>; Deng, KaiwenX <kaiwenx.deng@intel.com>;
> Chas Williams <chas3@att.com>; Min Hu (Connor) <humin29@huawei.com>;
> Tomasz Kulasek <tomaszx.kulasek@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>
> Subject: [PATCH] net/bonding: fix forward packets failed
> 
> The bond port is failed to forward packets in Link Aggregation
> 802.3AD(4) mode. Because bond devices get LACP packets from rx_ring
> instead of tx_ring.
> 
> This commit will get LACP packets from tx_ring instead.
> 
> Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP
> control")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
> ---
Tested-by: Song Jiale <songx.jiale@intel.com>
  
Ferruh Yigit March 10, 2023, 9:11 p.m. UTC | #2
On 3/10/2023 4:41 AM, Kaiwen Deng wrote:
> The bond port is failed to forward packets in Link Aggregation
> 802.3AD(4) mode. Because bond devices get LACP packets from 
> rx_ring instead of tx_ring.
> 
> This commit will get LACP packets from tx_ring instead.
> 
> Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
> Cc: stable@dpdk.org
> 

Fixes commit is from 2017, was 802.3AD mode broken since that time?
Or is this for a specific use case?

> Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
> ---
>  drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
> index 4a266bb2ca..b585752b00 100644
> --- a/drivers/net/bonding/rte_eth_bond_8023ad.c
> +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
> @@ -941,7 +941,7 @@ bond_mode_8023ad_periodic_cb(void *arg)
>  			/* Find LACP packet to this port. Do not check subtype,
>  			 * it is done in function that queued packet
>  			 */
> -			int retval = rte_ring_dequeue(port->rx_ring,
> +			int retval = rte_ring_dequeue(port->tx_ring,
>  					(void **)&lacp_pkt);
>  
>  			if (retval != 0)
  

Patch

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 4a266bb2ca..b585752b00 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -941,7 +941,7 @@  bond_mode_8023ad_periodic_cb(void *arg)
 			/* Find LACP packet to this port. Do not check subtype,
 			 * it is done in function that queued packet
 			 */
-			int retval = rte_ring_dequeue(port->rx_ring,
+			int retval = rte_ring_dequeue(port->tx_ring,
 					(void **)&lacp_pkt);
 
 			if (retval != 0)