All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: netdev@vger.kernel.org
Cc: oss-drivers@netronome.com, Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH net-next 4/9] nfp: don't assume RSS and IRQ moderation are always enabled
Date: Mon, 15 May 2017 17:55:18 -0700	[thread overview]
Message-ID: <20170516005523.26124-5-jakub.kicinski@netronome.com> (raw)
In-Reply-To: <20170516005523.26124-1-jakub.kicinski@netronome.com>

Even if capability for RSS and IRQ moderation are present we may
have not initialized them for control vNIC.  Depend on selected
features mask (ctrl) rather than capabilities (cap) to determine
which features should be enabled.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
---
 drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index 5e8049a84d16..ae32c0e8d6e6 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -2201,17 +2201,15 @@ static int nfp_net_set_config_and_enable(struct nfp_net *nn)
 
 	new_ctrl = nn->dp.ctrl;
 
-	if (nn->cap & NFP_NET_CFG_CTRL_RSS) {
+	if (nn->dp.ctrl & NFP_NET_CFG_CTRL_RSS) {
 		nfp_net_rss_write_key(nn);
 		nfp_net_rss_write_itbl(nn);
 		nn_writel(nn, NFP_NET_CFG_RSS_CTRL, nn->rss_cfg);
 		update |= NFP_NET_CFG_UPDATE_RSS;
 	}
 
-	if (nn->cap & NFP_NET_CFG_CTRL_IRQMOD) {
+	if (nn->dp.ctrl & NFP_NET_CFG_CTRL_IRQMOD) {
 		nfp_net_coalesce_write_cfg(nn);
-
-		new_ctrl |= NFP_NET_CFG_CTRL_IRQMOD;
 		update |= NFP_NET_CFG_UPDATE_IRQMOD;
 	}
 
-- 
2.11.0

  parent reply	other threads:[~2017-05-16  0:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-16  0:55 [PATCH net-next 0/9] nfp: LSO, checksum and XDP datapath updates Jakub Kicinski
2017-05-16  0:55 ` [PATCH net-next 1/9] nfp: don't enable TSO on the device when disabled Jakub Kicinski
2017-05-16  0:55 ` [PATCH net-next 2/9] nfp: rename l4_offset in struct nfp_net_tx_desc to lso_hdrlen Jakub Kicinski
2017-05-16  0:55 ` [PATCH net-next 3/9] nfp: support LSO2 capability Jakub Kicinski
2017-05-16  6:56   ` [oss-drivers] " Simon Horman
2017-05-16  0:55 ` Jakub Kicinski [this message]
2017-05-16  0:55 ` [PATCH net-next 5/9] nfp: version independent support for chained RSS metadata Jakub Kicinski
2017-05-16  0:55 ` [PATCH net-next 6/9] nfp: add CHECKSUM_COMPLETE support Jakub Kicinski
2017-05-16  0:55 ` [PATCH net-next 7/9] nfp: complete the XDP TX ring only when it's full Jakub Kicinski
2017-05-16  0:55 ` [PATCH net-next 8/9] nfp: add a helper for wrapping descriptor index Jakub Kicinski
2017-05-16  7:08   ` [oss-drivers] " Simon Horman
2017-05-16  7:38     ` Jakub Kicinski
2017-05-16  8:22       ` Simon Horman
2017-05-16  0:55 ` [PATCH net-next 9/9] nfp: eliminate an if statement in calculation of completed frames Jakub Kicinski
2017-05-16  6:57   ` [oss-drivers] " Simon Horman
2017-05-17 11:07   ` David Laight
2017-05-17 17:36     ` Jakub Kicinski
2017-05-19  9:18       ` David Laight
2017-05-16 16:59 ` [PATCH net-next 0/9] nfp: LSO, checksum and XDP datapath updates David Miller

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=20170516005523.26124-5-jakub.kicinski@netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.