summaryrefslogtreecommitdiff
path: root/drivers/net/qede/qede_rxtx.c
diff options
context:
space:
mode:
authorShahed Shaikh <shahed.shaikh@cavium.com>2018-11-12 18:19:38 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2018-11-14 00:35:53 +0100
commit49d3978d5723a3a71c348e1623cd10d489c0d4c0 (patch)
treed443a06ebfa497e63649372cace5afd3affe4067 /drivers/net/qede/qede_rxtx.c
parent679dfdc96ef9ae0b1a54098fc19986f93621c8cb (diff)
downloaddpdk-49d3978d5723a3a71c348e1623cd10d489c0d4c0.zip
dpdk-49d3978d5723a3a71c348e1623cd10d489c0d4c0.tar.gz
dpdk-49d3978d5723a3a71c348e1623cd10d489c0d4c0.tar.xz
net/qede: fix Tx tunnel offload support mask
Tunneling offloads are represented by multi-bit values. So, feature wise tunneling offload can only be entirely supported/unsupported using PKT_TX_TUNNEL_MASK. Its upon PMDs to further isolate which of the tunneling offload types are supported by respective PMD. Using subset of bits from PKT_TX_TUNNEL_MASK to indicate supported vs unsupported offloads can lead to undesired result. Use PKT_TX_TUNNEL_MASK in QEDE_TX_OFFLOAD_MASK and use independent value of supported PKT_TX_TUNNEL_* in .tx_pkt_prepare() to mark supported tunnel offloads. Fixes: 44346c24b790 ("net/qede: fix VXLAN tunnel Tx offload flag setting") Cc: stable@dpdk.org Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com> Reviewed-by: Rasesh Mody <rasesh.mody@cavium.com>
Diffstat (limited to 'drivers/net/qede/qede_rxtx.c')
-rw-r--r--drivers/net/qede/qede_rxtx.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 2961891..0e33be1 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -1761,6 +1761,18 @@ qede_xmit_prep_pkts(__rte_unused void *p_txq, struct rte_mbuf **tx_pkts,
}
}
if (ol_flags & QEDE_TX_OFFLOAD_NOTSUP_MASK) {
+ /* We support only limited tunnel protocols */
+ if (ol_flags & PKT_TX_TUNNEL_MASK) {
+ uint64_t temp;
+
+ temp = ol_flags & PKT_TX_TUNNEL_MASK;
+ if (temp == PKT_TX_TUNNEL_VXLAN ||
+ temp == PKT_TX_TUNNEL_GENEVE ||
+ temp == PKT_TX_TUNNEL_MPLSINUDP ||
+ temp == PKT_TX_TUNNEL_GRE)
+ break;
+ }
+
rte_errno = -ENOTSUP;
break;
}