DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH v2 2/2] net/sfc: do not drop TSO on device configure
Date: Wed, 29 Mar 2017 17:59:19 +0100	[thread overview]
Message-ID: <1490806759-17457-2-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1490806759-17457-1-git-send-email-arybchenko@solarflare.com>

If Tx datapath does not support TSO, TSO was dropped on device configure.
It is incorrect to change advertised offloads.

Fixes: 960b980fc712 ("net/sfc: make TSO a datapath-dependent feature")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc.c    | 9 ++++++---
 drivers/net/sfc/sfc_tx.c | 3 ---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
index eda426c..181d87a 100644
--- a/drivers/net/sfc/sfc.c
+++ b/drivers/net/sfc/sfc.c
@@ -588,9 +588,12 @@ sfc_attach(struct sfc_adapter *sa)
 
 	encp = efx_nic_cfg_get(sa->nic);
 
-	sa->tso = encp->enc_fw_assisted_tso_v2_enabled;
-	if (!sa->tso)
-		sfc_warn(sa, "TSO support isn't available on this adapter");
+	if (sa->dp_tx->features & SFC_DP_TX_FEAT_TSO) {
+		sa->tso = encp->enc_fw_assisted_tso_v2_enabled;
+		if (!sa->tso)
+			sfc_warn(sa,
+				 "TSO support isn't available on this adapter");
+	}
 
 	sfc_log_init(sa, "estimate resource limits");
 	rc = sfc_estimate_resource_limits(sa);
diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
index d1a064e..37f25a3 100644
--- a/drivers/net/sfc/sfc_tx.c
+++ b/drivers/net/sfc/sfc_tx.c
@@ -305,9 +305,6 @@ sfc_tx_init(struct sfc_adapter *sa)
 		goto fail_tx_dma_desc_boundary;
 	}
 
-	if (~sa->dp_tx->features & SFC_DP_TX_FEAT_TSO)
-		sa->tso = B_FALSE;
-
 	rc = sfc_tx_check_mode(sa, &dev_conf->txmode);
 	if (rc != 0)
 		goto fail_check_mode;
-- 
2.9.3

  reply	other threads:[~2017-03-29 16:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 15:23 [dpdk-dev] [PATCH 1/2] net/sfc: choose datapaths after probe and before attach Andrew Rybchenko
2017-03-29 15:23 ` [dpdk-dev] [PATCH 2/2] net/sfc: do not drop TSO on device configure Andrew Rybchenko
2017-03-29 16:59 ` [dpdk-dev] [PATCH v2 1/2] net/sfc: choose datapaths after probe and before attach Andrew Rybchenko
2017-03-29 16:59   ` Andrew Rybchenko [this message]
2017-03-31 15:17     ` [dpdk-dev] [PATCH v2 2/2] net/sfc: do not drop TSO on device configure Ferruh Yigit
2017-03-31 15:14   ` [dpdk-dev] [PATCH v2 1/2] net/sfc: choose datapaths after probe and before attach 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=1490806759-17457-2-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --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).