net/intel: use rte_validate_tx_offload function correctly for i40e/iavf/ice drivers
PATCH v2 1/1 net/intel: use rte_validate_tx_offload function correctly for i40e/iavf/ice drivers
rte_validate_tx_offload() returns 0 on success.
The i40e, iavf and ice drivers treat any non-zero
return as an error and drop the packet, causing valid packets to be dropped when Tx offload checking is enabled via EAL, e.g.:
-a 81:00.0,mbuf_check=offload
Only reject the packet when the return value is not 0.
---
v2:
- Fixed From/Signed-off-by email address mismatch
--- drivers/net/intel/i40e/i40e_rxtx.c | 2 +- drivers/net/intel/iavf/iavf_rxtx.c | 2 +- drivers/net/intel/ice/ice_rxtx.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/intel/i40e/i40e_rxtx.c +1 -1
@@ -1194,7 +1194,7 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pktsbreak ; } -if (!rte_validate_tx_offload (mb)) { +if (rte_validate_tx_offload (mb) !=0 ) {PMD_TX_LOG (ERR ,"INVALID mbuf: TX offload setup error" ); pkt_error = true;break ;
drivers/net/intel/iavf/iavf_rxtx.c +1 -1
@@ -3813,7 +3813,7 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,break ; } -if (!rte_validate_tx_offload (mb)) { +if (rte_validate_tx_offload (mb) !=0 ) {PMD_TX_LOG (ERR ,"INVALID mbuf: TX offload setup error" ); pkt_error = true;break ;
drivers/net/intel/ice/ice_rxtx.c +1 -1
@@ -3669,7 +3669,7 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)break ; } -if (!rte_validate_tx_offload (mb)) { +if (rte_validate_tx_offload (mb) !=0 ) {PMD_TX_LOG (ERR ,"INVALID mbuf: TX offload setup error" ); pkt_error = true;break ;
Signature · 1 line
2.54.0
Quoted 7 lines · Omar Munchaev
rte_validate_tx_offload()returns 0 on success.
The i40e, iavf and ice drivers treat any non-zero
return as an error and drop the packet, causing valid packets to be dropped when Tx offload checking is enabled via EAL, e.g.:-a 81:00.0,mbuf_check=offload
Quoted 7 lines
Only reject the packet when the return value is not 0.
Signed-off-by Omar Munchaev <[email protected]>---
v2:
- Fixed From/Signed-off-by email address mismatch
---
Quoted 47 lines
drivers/net/intel/i40e/i40e_rxtx.c | 2 +- drivers/net/intel/iavf/iavf_rxtx.c | 2 +- drivers/net/intel/ice/ice_rxtx.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)drivers/net/intel/i40e/i40e_rxtx.c +1
-1@@ -1194,7 +1194,7 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pktsbreak ; } -if (!rte_validate_tx_offload (mb)) { +if (rte_validate_tx_offload (mb) !=0 ) {PMD_TX_LOG (ERR ,"INVALID mbuf: TX offload setup error" ); pkt_error = true;break ;drivers/net/intel/iavf/iavf_rxtx.c +1
-1@@ -3813,7 +3813,7 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,break ; } -if (!rte_validate_tx_offload (mb)) { +if (rte_validate_tx_offload (mb) !=0 ) {PMD_TX_LOG (ERR ,"INVALID mbuf: TX offload setup error" ); pkt_error = true;break ;drivers/net/intel/ice/ice_rxtx.c +1
-1@@ -3669,7 +3669,7 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)break ; } -if (!rte_validate_tx_offload (mb)) { +if (rte_validate_tx_offload (mb) !=0 ) {PMD_TX_LOG (ERR ,"INVALID mbuf: TX offload setup error" ); pkt_error = true;break ;Signature · 1 line
2.54.0
Quoted 8 lines · Bruce Richardson
Quoted 7 lines · Omar Munchaev
rte_validate_tx_offload()returns 0 on success.
The i40e, iavf and ice drivers treat any non-zero
return as an error and drop the packet, causing valid packets to be dropped when Tx offload checking is enabled via EAL, e.g.:-a 81:00.0,mbuf_check=offload
Quoted 8 lines
Quoted 7 lines
Only reject the packet when the return value is not 0.
Signed-off-by Omar Munchaev <[email protected]>---
v2:
- Fixed From/Signed-off-by email address mismatch
---Acked-by Bruce Richardson <[email protected]>
Patch applied to dpdk-next-net-intel [with fixes lines to allow backport]
Thanks,
/Bruce