summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyong Youb Kim <hyonkim@cisco.com>2018-10-20 01:32:48 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-26 22:14:05 +0200
commit59e657aa0b6adc8dfa591f35090e5faff328d579 (patch)
tree44a95027a99cc71c4f621113094a980ceae239b5
parent432ed10d817167007dee7ae81f0ee849dde5d7d2 (diff)
downloaddpdk-59e657aa0b6adc8dfa591f35090e5faff328d579.zip
dpdk-59e657aa0b6adc8dfa591f35090e5faff328d579.tar.gz
dpdk-59e657aa0b6adc8dfa591f35090e5faff328d579.tar.xz
net/enic: add missing Tx offload flags
The following commit has added a number of existing offload flags such as PKT_TX_IPV4 and PKT_TX_IPV6 to PKT_TX_OFFLOAD_MASK defined in rte_mbuf.h. That change breaks the enic driver's Tx prepare handler. commit ef28cfa73822 ("mbuf: fix Tx offload mask") The enic driver keeps the supported offload flags in a local variable (tx_offload_mask), which is strictly a subset of PKT_TX_OFFLOAD_MASK. This variable is then used to compute the unsupported flags (tx_offload_notsup_mask), and the Tx prepare handler (tx_pkt_prepare) uses it to reject packets with unsupported offload flags. As is, tx_offload_notsup_mask ends up containing flags like PKT_TX_IPV4 that are actually supported by the driver, which then breaks any application that uses checksum offloads and calls the Tx prepare handler. So add the flags to tx_offload_mask that the driver supports but were missing in PKT_TX_OFFLOAD_MASK. Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.com>
-rw-r--r--drivers/net/enic/enic_main.c6
-rw-r--r--drivers/net/enic/enic_res.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index b258132..e81c3f3 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1710,11 +1710,9 @@ static int enic_dev_init(struct enic *enic)
DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
DEV_TX_OFFLOAD_VXLAN_TNL_TSO;
- /*
- * Do not add PKT_TX_OUTER_{IPV4,IPV6} as they are not
- * 'offload' flags (i.e. not part of PKT_TX_OFFLOAD_MASK).
- */
enic->tx_offload_mask |=
+ PKT_TX_OUTER_IPV6 |
+ PKT_TX_OUTER_IPV4 |
PKT_TX_OUTER_IP_CKSUM |
PKT_TX_TUNNEL_MASK;
enic->overlay_offload = true;
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 28ae823..24b2844 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -202,6 +202,8 @@ int enic_get_vnic_config(struct enic *enic)
DEV_RX_OFFLOAD_UDP_CKSUM |
DEV_RX_OFFLOAD_TCP_CKSUM;
enic->tx_offload_mask =
+ PKT_TX_IPV6 |
+ PKT_TX_IPV4 |
PKT_TX_VLAN |
PKT_TX_IP_CKSUM |
PKT_TX_L4_MASK |