From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Kumar A S <kumaras@chelsio.com>,
Surendra Mobiya <surendra@chelsio.com>,
Nirranjan Kirubaharan <nirranjan@chelsio.com>,
Indranil Choudhury <indranil@chelsio.com>
Subject: Re: [PATCH v2 3/7] cxgbe: add support to update RSS hash configuration and key
Date: Sat, 10 Mar 2018 10:51:45 +0530 [thread overview]
Message-ID: <20180310052144.GA31923@chelsio.com> (raw)
In-Reply-To: <53646d44-eed1-e3f5-648a-cdd4fd48412b@intel.com>
On Thursday, March 03/08/18, 2018 at 19:04:31 +0530, Ferruh Yigit wrote:
> On 2/28/2018 6:04 PM, Rahul Lakkireddy wrote:
> > From: Kumar Sanghvi <kumaras@chelsio.com>
> >
> > Add firmware API for updating RSS hash configuration and key. Move
> > RSS hash configuration from cxgb4_write_rss() to a separate function
> > cxgbe_write_rss_conf().
> >
> > Also, rename cxgb4_write_rss() to cxgbe_write_rss() for consistency.
> >
> > Original work by Surendra Mobiya <surendra@chelsio.com>
> >
> > Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
> > Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
>
> <...>
>
> > @@ -985,6 +1016,7 @@ static const struct eth_dev_ops cxgbe_eth_dev_ops = {
> > .get_eeprom = cxgbe_get_eeprom,
> > .set_eeprom = cxgbe_set_eeprom,
> > .get_reg = cxgbe_get_regs,
> > + .rss_hash_update = cxgbe_dev_rss_hash_update,
>
> Also in cxgbe_dev_info_get(), rte_eth_dev_info->flow_type_rss_offloads should be
> updated with supported RSS hash functions.
>
> I don't see any usage of "flow_type_rss_offloads" in sample apps except testpmd
> is using it to print the log, but that is the way to notify applications about
> support.
>
> You don't need to send a new version of patchset for this, please send an
> incremental patch and I can squash it into this set.
>
> <...>
>
Ok, will update supported RSS hash functions in flow_type_rss_offloads.
Will send a fix.
> > +int cxgbe_write_rss_conf(const struct port_info *pi, uint64_t rss_hf)
> > +{
> > + struct adapter *adapter = pi->adapter;
> > + const struct sge_eth_rxq *rxq;
> > + u64 flags = 0;
> > + u16 rss;
> > + int err;
> > +
> > + /* Should never be called before setting up sge eth rx queues */
> > + if (!(adapter->flags & FULL_INIT_DONE)) {
> > + dev_err(adap, "%s No RXQs available on port %d\n",
> > + __func__, pi->port_id);
> > + return -EINVAL;
> > + }
> > +
> > + if (rss_hf & ETH_RSS_IPV4)
> > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN;
> > +
> > + if (rss_hf & ETH_RSS_NONFRAG_IPV4_TCP)
> > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN;
> > +
> > + if (rss_hf & ETH_RSS_NONFRAG_IPV4_UDP)
> > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN |
> > + F_FW_RSS_VI_CONFIG_CMD_UDPEN;
> > +
> > + if (rss_hf & ETH_RSS_IPV6)
> > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN;
> > +
> > + if (rss_hf & ETH_RSS_NONFRAG_IPV6_TCP)
> > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN;
> > +
> > + if (rss_hf & ETH_RSS_NONFRAG_IPV6_UDP)
> > + flags |= F_FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN |
> > + F_FW_RSS_VI_CONFIG_CMD_UDPEN;
> > +
> > + rxq = &adapter->sge.ethrxq[pi->first_qset];
> > + rss = rxq[0].rspq.abs_id;
>
> What if driver gets a rss_hf that is not supported, will the API report back an
> error to the application?
>
Good catch! Will send a fix.
Thanks,
Rahul
next prev parent reply other threads:[~2018-03-10 5:22 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-04 6:06 [PATCH 0/7] cxgbe: bug fixes and updates Rahul Lakkireddy
2018-02-04 6:06 ` [PATCH 1/7] cxgbe: fix secondary process initialization Rahul Lakkireddy
2018-02-05 17:23 ` Ferruh Yigit
2018-02-06 9:20 ` Rahul Lakkireddy
2018-02-04 6:06 ` [PATCH 2/7] cxgbe: update link state when link speed changes Rahul Lakkireddy
2018-02-05 17:05 ` Ferruh Yigit
2018-02-04 6:06 ` [PATCH 3/7] cxgbe: add support to update RSS hash configuration and key Rahul Lakkireddy
2018-02-05 17:09 ` Ferruh Yigit
2018-02-06 9:22 ` Rahul Lakkireddy
2018-02-06 10:11 ` Ferruh Yigit
2018-02-06 10:38 ` Thomas Monjalon
2018-02-07 7:01 ` Rahul Lakkireddy
2018-02-04 6:06 ` [PATCH 4/7] cxgbe: add support to get programmed " Rahul Lakkireddy
2018-02-04 6:06 ` [PATCH 5/7] cxgbe: update link Forward Error Correction (FEC) Rahul Lakkireddy
2018-02-04 6:06 ` [PATCH 6/7] cxgbe: update link configuration for 32-bit port capability Rahul Lakkireddy
2018-02-04 6:06 ` [PATCH 7/7] cxgbe: rework and use " Rahul Lakkireddy
2018-02-28 18:04 ` [PATCH v2 0/7] cxgbe: bug fixes and updates Rahul Lakkireddy
2018-02-28 18:04 ` [PATCH v2 1/7] cxgbe: rework rte_eth_dev allocation Rahul Lakkireddy
2018-02-28 18:04 ` [PATCH v2 2/7] cxgbe: fix secondary process initialization Rahul Lakkireddy
2018-02-28 18:04 ` [PATCH v2 3/7] cxgbe: add support to update RSS hash configuration and key Rahul Lakkireddy
2018-03-08 13:34 ` Ferruh Yigit
2018-03-10 5:21 ` Rahul Lakkireddy [this message]
2018-02-28 18:04 ` [PATCH v2 4/7] cxgbe: add support to get programmed " Rahul Lakkireddy
2018-02-28 18:04 ` [PATCH v2 5/7] cxgbe: update link Forward Error Correction (FEC) Rahul Lakkireddy
2018-02-28 18:04 ` [PATCH v2 6/7] cxgbe: update link configuration for 32-bit port capability Rahul Lakkireddy
2018-02-28 18:04 ` [PATCH v2 7/7] cxgbe: rework and use " Rahul Lakkireddy
2018-03-08 13:44 ` [PATCH v2 0/7] cxgbe: bug fixes and updates Ferruh Yigit
2018-03-08 13:50 ` Ferruh Yigit
2018-03-10 5:24 ` Rahul Lakkireddy
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=20180310052144.GA31923@chelsio.com \
--to=rahul.lakkireddy@chelsio.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=indranil@chelsio.com \
--cc=kumaras@chelsio.com \
--cc=nirranjan@chelsio.com \
--cc=surendra@chelsio.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.