DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 3/3] net/sfc: correct RSS hash availability condition
Date: Tue, 18 Apr 2017 14:03:08 +0100	[thread overview]
Message-ID: <1492520588-10050-3-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1492520588-10050-1-git-send-email-arybchenko@solarflare.com>

RSS hash is computed by hardware if corresponding Rx filter (for
example, default Rx filters) has RSS flag set which is set if
the number of RSS channels is greater than zero.

Fixes: 4ec1fc3ba881 ("net/sfc: add basic stubs for RSS support on driver attach")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
---
 drivers/net/sfc/sfc_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 664b38d..2ecd6f2 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -930,7 +930,7 @@ sfc_rx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
 	info.prefix_size = encp->enc_rx_prefix_size;
 
 #if EFSYS_OPT_RX_SCALE
-	if (sa->hash_support == EFX_RX_HASH_AVAILABLE)
+	if (sa->hash_support == EFX_RX_HASH_AVAILABLE && sa->rss_channels > 0)
 		info.flags |= SFC_RXQ_FLAG_RSS_HASH;
 #endif
 
-- 
2.7.4

  parent reply	other threads:[~2017-04-18 13:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 13:03 [dpdk-dev] [PATCH 1/3] net/sfc: reset RSS channels back to 0 on close Andrew Rybchenko
2017-04-18 13:03 ` [dpdk-dev] [PATCH 2/3] net/sfc: use zero RSS channels as disabled RSS indicator Andrew Rybchenko
2017-04-18 13:03 ` Andrew Rybchenko [this message]
2017-04-18 16:32 ` [dpdk-dev] [PATCH 1/3] net/sfc: reset RSS channels back to 0 on close 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=1492520588-10050-3-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).