[v3] net/axgbe: invoke correct API when offloads enabled

Message ID 20231115055604.583724-1-jesna.k.e@amd.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [v3] net/axgbe: invoke correct API when offloads enabled |

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-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS

Commit Message

Jesna K E Nov. 15, 2023, 5:56 a.m. UTC
  A bug was introduced with the recent fix that when
an offload feature is enabled axgbe_xmit_pkts_vec API is called
rather than axgbe_xmit_pkts API.This patch fixes it.

Fixes: 9963b5131af8 ("net/axgbe: support multi-process")

Signed-off-by: Jesna K E <jesna.k.e@amd.com>
---
 drivers/net/axgbe/axgbe_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Ferruh Yigit Nov. 15, 2023, 11:57 a.m. UTC | #1
On 11/15/2023 5:56 AM, Jesna K E wrote:
> A bug was introduced with the recent fix that when
> an offload feature is enabled axgbe_xmit_pkts_vec API is called
> rather than axgbe_xmit_pkts API.This patch fixes it.
> 
> Fixes: 9963b5131af8 ("net/axgbe: support multi-process")
> 
> Signed-off-by: Jesna K E <jesna.k.e@amd.com>
> 

Needs stable tag, can add while merging.

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
  
Sebastian, Selwin Nov. 15, 2023, 12:54 p.m. UTC | #2
[Public]

Acked-by: Selwin Sebastian<selwin.sebastian@amd.com>

-----Original Message-----
From: K.E., Jesna <Jesna.K.e@amd.com>
Sent: Wednesday, November 15, 2023 11:26 AM
To: dev@dpdk.org
Cc: Yigit, Ferruh <Ferruh.Yigit@amd.com>; Sebastian, Selwin <Selwin.Sebastian@amd.com>; K.E., Jesna <Jesna.K.e@amd.com>
Subject: [PATCH v3] net/axgbe: invoke correct API when offloads enabled

A bug was introduced with the recent fix that when an offload feature is enabled axgbe_xmit_pkts_vec API is called rather than axgbe_xmit_pkts API.This patch fixes it.

Fixes: 9963b5131af8 ("net/axgbe: support multi-process")

Signed-off-by: Jesna K E <jesna.k.e@amd.com>
---
 drivers/net/axgbe/axgbe_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 3717166384..f174d46143 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -12,6 +12,8 @@

 #include "eal_filesystem.h"

+#include <rte_vect.h>
+
 #ifdef RTE_ARCH_X86
 #include <cpuid.h>
 #else
@@ -2137,6 +2139,8 @@ axgbe_set_tx_function(struct rte_eth_dev *dev)  {
        struct axgbe_port *pdata = dev->data->dev_private;

+       dev->tx_pkt_burst = &axgbe_xmit_pkts;
+
        if (pdata->multi_segs_tx)
                dev->tx_pkt_burst = &axgbe_xmit_pkts_seg;  #ifdef RTE_ARCH_X86 @@ -2144,8 +2148,6 @@ axgbe_set_tx_function(struct rte_eth_dev *dev)
        if (!txq->vector_disable &&
                        rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128)
                dev->tx_pkt_burst = &axgbe_xmit_pkts_vec; -#else
-       dev->tx_pkt_burst = &axgbe_xmit_pkts;
 #endif
 }

--
2.34.1
  
Ferruh Yigit Nov. 15, 2023, 12:59 p.m. UTC | #3
On 11/15/2023 12:54 PM, Sebastian, Selwin wrote:

> -----Original Message-----
> From: K.E., Jesna <Jesna.K.e@amd.com>
> Sent: Wednesday, November 15, 2023 11:26 AM
> To: dev@dpdk.org
> Cc: Yigit, Ferruh <Ferruh.Yigit@amd.com>; Sebastian, Selwin <Selwin.Sebastian@amd.com>; K.E., Jesna <Jesna.K.e@amd.com>
> Subject: [PATCH v3] net/axgbe: invoke correct API when offloads enabled
> 
> A bug was introduced with the recent fix that when an offload feature is enabled axgbe_xmit_pkts_vec API is called rather than axgbe_xmit_pkts API.This patch fixes it.
> 
> Fixes: 9963b5131af8 ("net/axgbe: support multi-process")
> 
> Signed-off-by: Jesna K E <jesna.k.e@amd.com>
> 
> Acked-by: Selwin Sebastian<selwin.sebastian@amd.com>
> 
Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 3717166384..f174d46143 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -12,6 +12,8 @@ 
 
 #include "eal_filesystem.h"
 
+#include <rte_vect.h>
+
 #ifdef RTE_ARCH_X86
 #include <cpuid.h>
 #else
@@ -2137,6 +2139,8 @@  axgbe_set_tx_function(struct rte_eth_dev *dev)
 {
 	struct axgbe_port *pdata = dev->data->dev_private;
 
+	dev->tx_pkt_burst = &axgbe_xmit_pkts;
+
 	if (pdata->multi_segs_tx)
 		dev->tx_pkt_burst = &axgbe_xmit_pkts_seg;
 #ifdef RTE_ARCH_X86
@@ -2144,8 +2148,6 @@  axgbe_set_tx_function(struct rte_eth_dev *dev)
 	if (!txq->vector_disable &&
 			rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128)
 		dev->tx_pkt_burst = &axgbe_xmit_pkts_vec;
-#else
-	dev->tx_pkt_burst = &axgbe_xmit_pkts;
 #endif
 }