From: Feifei Wang <Feifei.Wang2@arm.com>
To: "lihuisong (C)" <lihuisong@huawei.com>,
Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, nd <nd@arm.com>,
Ruifeng Wang <Ruifeng.Wang@arm.com>,
Trevor Tao <Trevor.Tao@arm.com>, nd <nd@arm.com>
Subject: RE: [PATCH] app/test-pipeline: relax RSS hash requirement
Date: Fri, 14 Jul 2023 08:07:48 +0000 [thread overview]
Message-ID: <AS8PR08MB7718927B765837EB9354D4BBC834A@AS8PR08MB7718.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <890ef1a9-54c1-6e0a-1b1f-4292219e9a29@huawei.com>
> -----Original Message-----
> From: lihuisong (C) <lihuisong@huawei.com>
> Sent: Friday, July 14, 2023 3:50 PM
> To: Feifei Wang <Feifei.Wang2@arm.com>; Cristian Dumitrescu
> <cristian.dumitrescu@intel.com>
> Cc: dev@dpdk.org; nd <nd@arm.com>; Ruifeng Wang
> <Ruifeng.Wang@arm.com>; Trevor Tao <Trevor.Tao@arm.com>
> Subject: Re: [PATCH] app/test-pipeline: relax RSS hash requirement
>
>
> 在 2023/6/26 15:45, Feifei Wang 写道:
> > For some drivers which can not support the configured RSS hash
> > functions, the thread reports 'invalid rss_hf' when doing device configure.
> >
> > For example, i40e driver can not support 'RTE_ETH_RSS_IPV4',
> > 'RTE_ETH_RSS_IPV6' and 'RTE_ETH_RSS_NONFRAG_IPV6_OTHER', thus it
> can
> > not run successfully in test-pipeline with XL710 NIC and reports the issue:
> > -------------------------------------------------------------
> > Ethdev port_id=0 invalid rss_hf: 0xa38c, valid value: 0x7ef8 PANIC in
> > app_init_ports():
> > Cannot init NIC port 0 (-22)
> > -------------------------------------------------------------
> >
> > To fix this, referring to l3fwd operation, adjust the 'rss_hf' based
> > on device capability and just report a warning.
> >
> > Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
> > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > Reviewed-by: Trevor Tao <trevor.tao@arm.com>
> > ---
> > app/test-pipeline/init.c | 22 +++++++++++++++++++++-
> > 1 file changed, 21 insertions(+), 1 deletion(-)
> >
> > diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c index
> > d146c44be0..84a1734519 100644
> > --- a/app/test-pipeline/init.c
> > +++ b/app/test-pipeline/init.c
> > @@ -188,21 +188,41 @@ static void
> > app_init_ports(void)
> > {
> > uint32_t i;
> > + struct rte_eth_dev_info dev_info;
> > +
> please delete this blank line.
Thanks for the reviewing. I will change this and update a new version.
> >
> > /* Init NIC ports, then start the ports */
> > for (i = 0; i < app.n_ports; i++) {
> > uint16_t port;
> > int ret;
> > + struct rte_eth_conf local_port_conf = port_conf;
> >
> > port = app.ports[i];
> > RTE_LOG(INFO, USER1, "Initializing NIC port %u ...\n", port);
> >
> > + ret = rte_eth_dev_info_get(port, &dev_info);
> > + if (ret != 0)
> > + rte_panic("Error during getting device (port %u)
> info: %s\n",
> > + port, rte_strerror(-ret));
> > +
> > /* Init port */
> > + local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
> > + dev_info.flow_type_rss_offloads;
> > + if (local_port_conf.rx_adv_conf.rss_conf.rss_hf !=
> > + port_conf.rx_adv_conf.rss_conf.rss_hf) {
> > + printf("Warning:"
> > + "Port %u modified RSS hash function based
> on hardware support,"
> > + "requested:%#"PRIx64"
> configured:%#"PRIx64"\n",
> > + port,
> > + port_conf.rx_adv_conf.rss_conf.rss_hf,
> > + local_port_conf.rx_adv_conf.rss_conf.rss_hf);
> > + }
> > +
> > ret = rte_eth_dev_configure(
> > port,
> > 1,
> > 1,
> > - &port_conf);
> > + &local_port_conf);
> > if (ret < 0)
> > rte_panic("Cannot init NIC port %u (%d)\n", port,
> ret);
> >
> This treatment is very common.
> Acked-by: Huisong Li <lihuisong@huawei.com>
next prev parent reply other threads:[~2023-07-14 8:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 7:45 Feifei Wang
2023-07-12 14:51 ` Thomas Monjalon
2023-07-14 7:50 ` lihuisong (C)
2023-07-14 8:07 ` Feifei Wang [this message]
2023-07-14 8:27 ` [PATCH v2] " Feifei Wang
2023-09-12 6:39 ` [PATCH v3 0/3] fix test-pipeline issues Feifei Wang
2023-09-12 6:39 ` [PATCH v3 1/3] app/test-pipeline: relax RSS hash requirement Feifei Wang
2023-09-12 6:39 ` [PATCH v3 2/3] app/test-pipeline: fix SIGINT handling issue Feifei Wang
2023-09-12 6:39 ` [PATCH v3 3/3] app/test-pipeline: add dev close operation Feifei Wang
2023-10-17 20:01 ` [PATCH v3 0/3] fix test-pipeline issues Thomas Monjalon
2023-10-18 13:39 ` Dumitrescu, Cristian
2023-11-23 1:54 ` Thomas Monjalon
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=AS8PR08MB7718927B765837EB9354D4BBC834A@AS8PR08MB7718.eurprd08.prod.outlook.com \
--to=feifei.wang2@arm.com \
--cc=Ruifeng.Wang@arm.com \
--cc=Trevor.Tao@arm.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=lihuisong@huawei.com \
--cc=nd@arm.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).