From: "Li, Xiaoyun" <xiaoyun.li@intel.com>
To: Lance Richardson <lance.richardson@broadcom.com>,
"Yigit, Ferruh" <ferruh.yigit@intel.com>
Cc: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
"Iremonger, Bernard" <bernard.iremonger@intel.com>,
"Yang, SteveX" <stevex.yang@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"stable@dpdk.org" <stable@dpdk.org>,
"oulijun@huawei.com" <oulijun@huawei.com>,
"wisamm@mellanox.com" <wisamm@mellanox.com>,
"lihuisong@huawei.com" <lihuisong@huawei.com>
Subject: Re: [dpdk-stable] [PATCH v5] app/testpmd: fix setting maximum packet length
Date: Tue, 26 Jan 2021 07:54:53 +0000 [thread overview]
Message-ID: <CY4PR11MB175073F0C99E7385F4F5932299BC9@CY4PR11MB1750.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CADyeNEBUB3wth=TS7+X12+_WZf+eR-bVH1GROrtCuKWx6gyXEQ@mail.gmail.com>
> -----Original Message-----
> From: Lance Richardson <lance.richardson@broadcom.com>
> Sent: Tuesday, January 26, 2021 11:45
> To: Yigit, Ferruh <ferruh.yigit@intel.com>
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Li, Xiaoyun <xiaoyun.li@intel.com>;
> Iremonger, Bernard <bernard.iremonger@intel.com>; Yang, SteveX
> <stevex.yang@intel.com>; dev@dpdk.org; stable@dpdk.org;
> oulijun@huawei.com; wisamm@mellanox.com; lihuisong@huawei.com
> Subject: Re: [PATCH v5] app/testpmd: fix setting maximum packet length
>
> On Mon, Jan 25, 2021 at 7:44 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> >
> > >> + if (rx_offloads != port->dev_conf.rxmode.offloads) {
> > >> + uint16_t qid;
> > >> +
> > >> + port->dev_conf.rxmode.offloads = rx_offloads;
> > >> +
> > >> + /* Apply JUMBO_FRAME offload configuration to Rx queue(s) */
> > >> + for (qid = 0; qid < port->dev_info.nb_rx_queues; qid++) {
> > >> + if (on)
> > >> + port->rx_conf[qid].offloads |=
> DEV_RX_OFFLOAD_JUMBO_FRAME;
> > >> + else
> > >> + port->rx_conf[qid].offloads &=
> ~DEV_RX_OFFLOAD_JUMBO_FRAME;
> > >> + }
> > >
> > > Is it correct to set per-queue offloads that aren't advertised by the PMD
> > > as supported in rx_queue_offload_capa?
> > >
> >
> > 'port->rx_conf[]' is testpmd struct, and 'port->dev_conf.rxmode.offloads'
> values
> > are reflected to 'port->rx_conf[].offloads' for all queues.
> >
> > We should set the offload in 'port->rx_conf[].offloads' if it is set in
> > 'port->dev_conf.rxmode.offloads'.
> >
> > If a port has capability for 'JUMBO_FRAME', 'port->rx_conf[].offloads' can
> have
> > it. And the port level capability is already checked above.
> >
>
> I'm still not 100% clear about the per-queue offload question.
>
> With this patch, and jumbo max packet size configured (on the command
> line in this case), I see:
>
> testpmd> show port 0 rx_offload configuration
> Rx Offloading Configuration of port 0 :
> Port : JUMBO_FRAME
> Queue[ 0] : JUMBO_FRAME
>
> testpmd> show port 0 rx_offload capabilities
> Rx Offloading Capabilities of port 0 :
> Per Queue :
> Per Port : VLAN_STRIP IPV4_CKSUM UDP_CKSUM TCP_CKSUM TCP_LRO
> OUTER_IPV4_CKSUM VLAN_FILTER VLAN_EXTEND JUMBO_FRAME SCATTER
> TIMESTAMP
> KEEP_CRC OUTER_UDP_CKSUM RSS_HASH
>
> Yet if I configure a jumbo MTU starting with standard max packet size,
> jumbo is only enabled at the port level:
> testpmd> port config mtu 0 9000
> testpmd> port start all
>
> testpmd> show port 0 rx_offload configuration
> Rx Offloading Configuration of port 0 :
> Port : JUMBO_FRAME
> Queue[ 0] :
>
> It still seems odd for a per-queue offload to be enabled on a PMD that
> doesn't support per-queue receive offloads.
In struct rte_eth_dev_info, rx_offload_capa means All RX offload capabilities including all per-queue ones.
And rx_queue_offload_capa means Device per-queue RX offload capabilities.
The meaning of rx_queue_offload_capa is a bit of confusing between here and driver.
I think here rx_queue_offload_capa means whether a queue supports offloads.
But some drivers like i40e don't use rx_queue_offload_capa, set this as 0 and only use global rx_offload_capa.
I guess it's because the driver doesn't want to support different offloads settings for different queues?
Then rx_queue_offload_capa means differently.
Actually for i40e, it can support different offloads for different queues since there is 'offloads' in struct i40e_rx_queue.
I40e can just set rx_queue_offload_capa as the value for rx_offload_capa.
But maybe some drivers really don't want this? Not sure on this.
next prev parent reply other threads:[~2021-01-26 7:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210125083202.38267-1-stevex.yang@intel.com>
2021-01-25 18:15 ` Ferruh Yigit
2021-01-25 19:41 ` Lance Richardson
2021-01-26 0:44 ` Ferruh Yigit
2021-01-26 3:22 ` Lance Richardson
2021-01-26 3:45 ` Lance Richardson
2021-01-26 7:54 ` Li, Xiaoyun [this message]
2021-01-26 11:01 ` Ferruh Yigit
2021-01-28 21:36 ` Lance Richardson
2021-01-28 22:12 ` Ferruh Yigit
2021-01-26 9:02 ` Wisam Monther
2021-01-27 3:04 ` Li, Xiaoyun
2021-01-28 1:57 ` Chen, BoX C
2021-01-28 9:18 ` Wisam Monther
2021-01-28 9:26 ` Ferruh Yigit
2021-01-28 11:08 ` Wisam Monther
2021-01-28 12:07 ` [dpdk-stable] [PATCH v6] " Ferruh Yigit
2021-01-29 9:34 ` 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=CY4PR11MB175073F0C99E7385F4F5932299BC9@CY4PR11MB1750.namprd11.prod.outlook.com \
--to=xiaoyun.li@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=lance.richardson@broadcom.com \
--cc=lihuisong@huawei.com \
--cc=oulijun@huawei.com \
--cc=stable@dpdk.org \
--cc=stevex.yang@intel.com \
--cc=wenzhuo.lu@intel.com \
--cc=wisamm@mellanox.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).