DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/sfc: improve tunnel TSO mask calculation
@ 2021-03-11 12:25 Andrew Rybchenko
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Rybchenko @ 2021-03-11 12:25 UTC (permalink / raw)
  To: dev

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-22 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 12:25 [dpdk-dev] [PATCH 1/2] net/sfc: improve tunnel TSO mask calculation Andrew Rybchenko
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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git