From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/2] net/sfc: improve tunnel TSO mask calculation
Date: Thu, 11 Mar 2021 15:25:38 +0300 [thread overview]
Message-ID: <20210311122539.3319497-1-andrew.rybchenko@oktetlabs.ru> (raw)
Corresponding tunnel TSO is not supported if the tunnel is not
supported.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/sfc/sfc_tx.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
index 4db39415de..28d696de61 100644
--- a/drivers/net/sfc/sfc_tx.c
+++ b/drivers/net/sfc/sfc_tx.c
@@ -49,9 +49,15 @@ sfc_tx_get_offload_mask(struct sfc_adapter *sa)
if (!sa->tso)
no_caps |= DEV_TX_OFFLOAD_TCP_TSO;
- if (!sa->tso_encap)
- no_caps |= (DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
- DEV_TX_OFFLOAD_GENEVE_TNL_TSO);
+ if (!sa->tso_encap ||
+ (encp->enc_tunnel_encapsulations_supported &
+ (1u << EFX_TUNNEL_PROTOCOL_VXLAN)) == 0)
+ no_caps |= DEV_TX_OFFLOAD_VXLAN_TNL_TSO;
+
+ if (!sa->tso_encap ||
+ (encp->enc_tunnel_encapsulations_supported &
+ (1u << EFX_TUNNEL_PROTOCOL_GENEVE)) == 0)
+ no_caps |= DEV_TX_OFFLOAD_GENEVE_TNL_TSO;
return ~no_caps;
}
--
2.30.1
next reply other threads:[~2021-03-11 12:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-11 12:25 Andrew Rybchenko [this message]
2021-03-11 12:25 ` [dpdk-dev] [PATCH 2/2] common/sfc_efx: remove GENEVE from list of supported tunnels Andrew Rybchenko
2021-03-22 17:06 ` [dpdk-dev] [PATCH 1/2] net/sfc: improve tunnel TSO mask calculation Ferruh Yigit
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=20210311122539.3319497-1-andrew.rybchenko@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
/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).