From: "Mody, Rasesh" <Rasesh.Mody@cavium.com>
To: "stable@dpdk.org" <stable@dpdk.org>
Cc: "Shaikh, Shahed" <Shahed.Shaikh@cavium.com>,
"yskoh@mellanox.com" <yskoh@mellanox.com>,
Dept-Eng DPDK Dev <Dept-EngDPDKDev@cavium.com>
Subject: [dpdk-stable] [PATCH 17.11 4/5] net/qede: fix Tx tunnel offload support mask
Date: Wed, 19 Dec 2018 00:42:42 +0000 [thread overview]
Message-ID: <1545180127-3202-4-git-send-email-rasesh.mody@cavium.com> (raw)
In-Reply-To: <1545180127-3202-1-git-send-email-rasesh.mody@cavium.com>
From: Shahed Shaikh <shahed.shaikh@cavium.com>
[ backported from upstream commit 49d3978d5723a3a71c348e1623cd10d489c0d4c0 ]
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")
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>
---
drivers/net/qede/qede_rxtx.c | 10 ++++++++++
drivers/net/qede/qede_rxtx.h | 3 +--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 32eae81..cdb85c2 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -1764,6 +1764,16 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags)
}
}
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_MPLSINUDP)
+ break;
+ }
+
rte_errno = -ENOTSUP;
break;
}
diff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h
index 3ab1894..fe80237 100644
--- a/drivers/net/qede/qede_rxtx.h
+++ b/drivers/net/qede/qede_rxtx.h
@@ -159,8 +159,7 @@
#define QEDE_TX_OFFLOAD_MASK (QEDE_TX_CSUM_OFFLOAD_MASK | \
PKT_TX_QINQ_PKT | \
PKT_TX_VLAN_PKT | \
- PKT_TX_TUNNEL_VXLAN | \
- PKT_TX_TUNNEL_MPLSINUDP)
+ PKT_TX_TUNNEL_MASK)
#define QEDE_TX_OFFLOAD_NOTSUP_MASK \
(PKT_TX_OFFLOAD_MASK ^ QEDE_TX_OFFLOAD_MASK)
--
1.7.10.3
next prev parent reply other threads:[~2018-12-19 0:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 0:42 [dpdk-stable] [PATCH 17.11 1/5] net/qede/base: fix MFW FLR flow Mody, Rasesh
2018-12-19 0:42 ` [dpdk-stable] [PATCH 17.11 2/5] net/qede: fix flow director for IPv6 filter Mody, Rasesh
2018-12-19 0:42 ` [dpdk-stable] [PATCH 17.11 3/5] net/qede: fix Rx buffer size calculation Mody, Rasesh
2018-12-19 0:42 ` Mody, Rasesh [this message]
2018-12-19 0:42 ` [dpdk-stable] [PATCH 17.11 5/5] net/qede/base: fix to handle stag update event Mody, Rasesh
2018-12-19 20:09 ` [dpdk-stable] [PATCH 17.11 1/5] net/qede/base: fix MFW FLR flow Yongseok Koh
2018-12-19 22:18 ` Rasesh Mody
2018-12-20 0:02 ` Yongseok Koh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1545180127-3202-4-git-send-email-rasesh.mody@cavium.com \
--to=rasesh.mody@cavium.com \
--cc=Dept-EngDPDKDev@cavium.com \
--cc=Shahed.Shaikh@cavium.com \
--cc=stable@dpdk.org \
--cc=yskoh@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).