DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Lance Richardson <lance.richardson@broadcom.com>
Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Xiaoyun Li <xiaoyun.li@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>,
	Steve Yang <stevex.yang@intel.com>,
	dev@dpdk.org, stable@dpdk.org, oulijun@huawei.com,
	wisamm@mellanox.com, lihuisong@huawei.com
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v5] app/testpmd: fix setting maximum packet length
Date: Thu, 28 Jan 2021 22:12:22 +0000	[thread overview]
Message-ID: <13d91e6a-9b9d-3f02-c6e0-6827264ea7b9@intel.com> (raw)
In-Reply-To: <CADyeNEDMOXJMus400zXWoVLzXz99R1WeNscSxheqAdL2V9bpPg@mail.gmail.com>

On 1/28/2021 9:36 PM, Lance Richardson wrote:
> On Tue, Jan 26, 2021 at 6:01 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> On 1/26/2021 3:45 AM, Lance Richardson wrote:
>>> 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
>>>
>>
>> The port level offload is applied to all queues on the port, testpmd config
>> structure reflects this logic in implementation.
>> If Rx offload X is set for a port, it is set for all Rx queue offloads, this is
>> not new behavior and not related to this patch.
>>
> OK, is this purely for display purposes within testpmd? I ask because
> it appears that all PMDs supporting per-queue offload configuration already
> take care of combining port-level and per-queue offloads within their
> tx_queue_setup()/rx_queue_setup() functions and then track the combined
> set of offloads within a per-queue field, e.g. this line is common to
> e1000/i40e/ionic/ixgbe/octeontx2/thunderx/txgbe rx_queue_setup()
> implementations:
>      offloads = rx_conf->offloads | dev->data->dev_conf.rxmode.offloads;
> 
> And rte_ethdev.h says:
>     No need to repeat any bit in rx_conf->offloads which has already been
>     enabled in rte_eth_dev_configure() at port level. An offloading enabled
>    at port level can't be disabled at queue level.
> 
> Which I suppose confirms that if testpmd is combining per-port and per-
> queue offloads, it's just for the purposes of testpmd.
> 

Yes it is just for purposed of testpmd (application), but doesn't need to be 
just limited to display purpose, testpmd keeps the config locally for any need.

> Apologies for worrying at this even more, I just wanted to be sure that
> I understand what the PMD is expected to do.
> 

PMDs should not be getting these offloads in queue setup, since ethdev layer 
strips the port level offloads, I mean:

if port level offloads: X, Y

And applications provide following for queue_setup():
a) X
b) Y
c) X, Y

For all three PMD receives empty queue offload request.

d) X, Y, Z

PMD gets Z if it is in drivers queue specific capabilities.

  reply	other threads:[~2021-01-28 22:12 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22  8:13 [dpdk-dev] [PATCH v1] app/testpmd: fix dynamic config error for max-pkt-len Steve Yang
2020-12-23  2:27 ` Li, Xiaoyun
2020-12-23  8:51 ` [dpdk-dev] [PATCH v2] app/testpmd: fix dynamic config error Steve Yang
2020-12-23  9:00   ` Li, Xiaoyun
2021-01-13  8:13   ` Chen, BoX C
2021-01-19 15:44   ` Ferruh Yigit
2021-01-22  9:01   ` [dpdk-dev] [PATCH v3 0/3] fix 'max-pkt-len' errors Steve Yang
2021-01-22  9:01     ` [dpdk-dev] [PATCH v3 1/3] ethdev: fix MTU doesn't update when jumbo frame disabled Steve Yang
2021-01-25  7:12       ` Huisong Li
     [not found]         ` <DM6PR11MB43628A600BAAEC75FFF1343BF9BD9@DM6PR11MB4362.namprd11.prod.outlook.com>
2021-01-25 12:38           ` Ferruh Yigit
2021-01-22  9:01     ` [dpdk-dev] [PATCH v3 2/3] app/testpmd: fix max-pkt-len option invalid Steve Yang
2021-01-22  9:01     ` [dpdk-dev] [PATCH v3 3/3] app/testpmd: fix dynamic config error Steve Yang
2021-01-22 17:04       ` Ferruh Yigit
2021-01-22 17:15         ` Ferruh Yigit
2021-01-25  8:32     ` [dpdk-dev] [PATCH v4 0/2] fix 'max-pkt-len' errors Steve Yang
2021-01-25  8:32       ` [dpdk-dev] [PATCH v4 1/2] ethdev: fix MTU doesn't update when jumbo frame disabled Steve Yang
2021-01-25 12:41         ` Ferruh Yigit
2021-01-25  8:32       ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: fix max-pkt-len option invalid Steve Yang
2021-01-25 14:45         ` Ferruh Yigit
2021-01-25 15:46         ` Lance Richardson
2021-01-25 17:57           ` Ferruh Yigit
2021-01-25 18:15       ` [dpdk-dev] [PATCH v5] app/testpmd: fix setting maximum packet length 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
2021-01-26 11:01               ` Ferruh Yigit
2021-01-28 21:36                 ` Lance Richardson
2021-01-28 22:12                   ` Ferruh Yigit [this message]
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-dev] [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=13d91e6a-9b9d-3f02-c6e0-6827264ea7b9@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --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 \
    --cc=xiaoyun.li@intel.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).