diff mbox series

drivers/net: fix several Tx prepare functions

Message ID 20181211130028.10769-1-didier.pallard@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series drivers/net: fix several Tx prepare functions | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Didier Pallard Dec. 11, 2018, 1 p.m. UTC
Since below commit, several tx_prep functions are broken, they fail to
pass supported Tx offload features check:
PKT_TX_IPVx must be set when any PKT_TX_L4 checksum is requested,
but these values are not present in the mask of supported Tx offloads
of several drivers that advertise PKT_TX_L4_MASK.
So any packet sent to those drivers with a L4 checksum request and
one of PKT_TX_IPVx bit set is rejected by the tx prepare function.

Fixes: 1037ed842c37 ("mbuf: fix Tx offload mask")
Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
---
 drivers/net/atlantic/atl_rxtx.c    | 2 ++
 drivers/net/e1000/em_rxtx.c        | 2 ++
 drivers/net/ena/ena_ethdev.c       | 2 ++
 drivers/net/fm10k/fm10k_rxtx.c     | 2 ++
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 ++
 5 files changed, 10 insertions(+)

Comments

Ferruh Yigit Dec. 12, 2018, 12:24 p.m. UTC | #1
On 12/11/2018 1:00 PM, Didier Pallard wrote:
> Since below commit, several tx_prep functions are broken, they fail to
> pass supported Tx offload features check:
> PKT_TX_IPVx must be set when any PKT_TX_L4 checksum is requested,
> but these values are not present in the mask of supported Tx offloads
> of several drivers that advertise PKT_TX_L4_MASK.
> So any packet sent to those drivers with a L4 checksum request and
> one of PKT_TX_IPVx bit set is rejected by the tx prepare function.
> 
> Fixes: 1037ed842c37 ("mbuf: fix Tx offload mask")
> Cc: stable@dpdk.org
> Signed-off-by: Didier Pallard <didier.pallard@6wind.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.
diff mbox series

Patch

diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c
index fd909476c45f..40c913795c79 100644
--- a/drivers/net/atlantic/atl_rxtx.c
+++ b/drivers/net/atlantic/atl_rxtx.c
@@ -21,6 +21,8 @@ 
 
 #define ATL_TX_OFFLOAD_MASK (				 \
 	PKT_TX_VLAN |					 \
+	PKT_TX_IPV6 |					 \
+	PKT_TX_IPV4 |					 \
 	PKT_TX_IP_CKSUM |				 \
 	PKT_TX_L4_MASK |				 \
 	PKT_TX_TCP_SEG)
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index a9cd765186e4..005e1ea96397 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -50,6 +50,8 @@ 
 #define E1000_RXDCTL_GRAN	0x01000000 /* RXDCTL Granularity */
 
 #define E1000_TX_OFFLOAD_MASK ( \
+		PKT_TX_IPV6 |           \
+		PKT_TX_IPV4 |           \
 		PKT_TX_IP_CKSUM |       \
 		PKT_TX_L4_MASK |        \
 		PKT_TX_VLAN_PKT)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index a07bd2b4935d..709ad2edb43b 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -189,6 +189,8 @@  static const struct ena_stats ena_stats_ena_com_strings[] = {
 
 #define	ENA_TX_OFFLOAD_MASK	(\
 	PKT_TX_L4_MASK |         \
+	PKT_TX_IPV6 |            \
+	PKT_TX_IPV4 |            \
 	PKT_TX_IP_CKSUM |        \
 	PKT_TX_TCP_SEG)
 
diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
index 4a5b46ec830a..1d0f09d25825 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -39,6 +39,8 @@  static inline void dump_rxd(union fm10k_rx_desc *rxd)
 
 #define FM10K_TX_OFFLOAD_MASK (  \
 		PKT_TX_VLAN_PKT |        \
+		PKT_TX_IPV6 |            \
+		PKT_TX_IPV4 |            \
 		PKT_TX_IP_CKSUM |        \
 		PKT_TX_L4_MASK |         \
 		PKT_TX_TCP_SEG)
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index cf85f3d6181a..d30914a8a620 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -50,6 +50,8 @@ 
 
 #define	VMXNET3_TX_OFFLOAD_MASK	( \
 		PKT_TX_VLAN_PKT | \
+		PKT_TX_IPV6 |     \
+		PKT_TX_IPV4 |     \
 		PKT_TX_L4_MASK |  \
 		PKT_TX_TCP_SEG)