From: Saeed Mahameed <saeed@kernel.org>
To: Geetha sowjanya <gakula@marvell.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: sgoutham@marvell.com, davem@davemloft.net, kuba@kernel.org,
sbhatta@marvell.com
Subject: Re: [PATCHv3 net-next] octeontx2-pf: Add RSS multi group support
Date: Wed, 09 Dec 2020 11:08:24 -0800 [thread overview]
Message-ID: <f47444311bc7661c6482de11d570fb815f8e7941.camel@kernel.org> (raw)
In-Reply-To: <20201209170937.19548-1-gakula@marvell.com>
On Wed, 2020-12-09 at 22:39 +0530, Geetha sowjanya wrote:
> Hardware supports 8 RSS groups per interface. Currently we are using
> only group '0'. This patch allows user to create new RSS
> groups/contexts
> and use the same as destination for flow steering rules.
>
> usage:
> To steer the traffic to RQ 2,3
>
> ethtool -X eth0 weight 0 0 1 1 context new
> (It will print the allocated context id number)
> New RSS context is 1
>
> ethtool -N eth0 flow-type tcp4 dst-port 80 context 1 loc 1
>
> To delete the context
> ethtool -X eth0 context 1 delete
>
> When an RSS context is removed, the active classification
> rules using this context are also removed.
>
> Change-log:
> v2
> - Removed unrelated whitespace
> - Coverted otx2_get_rxfh() to use new function.
>
> v3
> - Coverted otx2_set_rxfh() to use new function.
>
> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
> Signed-off-by: Geetha sowjanya <gakula@marvell.com>
> ---
...
> -/* Configure RSS table and hash key */
> -static int otx2_set_rxfh(struct net_device *dev, const u32 *indir,
> - const u8 *hkey, const u8 hfunc)
> +static int otx2_get_rxfh_context(struct net_device *dev, u32 *indir,
> + u8 *hkey, u8 *hfunc, u32 rss_context)
> {
> struct otx2_nic *pfvf = netdev_priv(dev);
> + struct otx2_rss_ctx *rss_ctx;
> struct otx2_rss_info *rss;
> int idx;
>
> - if (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc !=
> ETH_RSS_HASH_TOP)
> - return -EOPNOTSUPP;
> -
> rss = &pfvf->hw.rss_info;
>
> if (!rss->enable) {
> - netdev_err(dev, "RSS is disabled, cannot change
> settings\n");
> + netdev_err(dev, "RSS is disabled\n");
> return -EIO;
> }
I see that you init/enable rss on open, is this is your way to block
getting rss info if device is not open ? why do you need to report an
error anyway, why not just report whatever default config you will be
setting up on next open ?
to me reporting errors to ethtool queries when device is down is a bad
user experience.
> + if (rss_context >= MAX_RSS_GROUPS)
> + return -EINVAL;
> +
-ENOENT
> + rss_ctx = rss->rss_ctx[rss_context];
> + if (!rss_ctx)
> + return -EINVAL;
>
-ENOENT
next prev parent reply other threads:[~2020-12-09 19:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 17:09 [PATCHv3 net-next] octeontx2-pf: Add RSS multi group support Geetha sowjanya
2020-12-09 19:08 ` Saeed Mahameed [this message]
2020-12-09 19:48 ` Jakub Kicinski
2020-12-10 16:12 ` [EXT] " Geethasowjanya Akula
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=f47444311bc7661c6482de11d570fb815f8e7941.camel@kernel.org \
--to=saeed@kernel.org \
--cc=davem@davemloft.net \
--cc=gakula@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.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 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).