DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Thomas Monjalon <thomas@monjalon.net>,
	Matan Azrad <matan@nvidia.com>,
	Olivier Matz <olivier.matz@6wind.com>,
	Jerin Jacob <jerinj@marvell.com>
Subject: Re: [dpdk-dev] [RFC] doc: announce max Rx packet len field deprecation
Date: Wed, 21 Oct 2020 18:10:25 +0300	[thread overview]
Message-ID: <89fdc248-2d3b-69ac-e08d-a15a043f23d5@oktetlabs.ru> (raw)
In-Reply-To: <BYAPR11MB33012DB5D22D190129AFA2C99A1C0@BYAPR11MB3301.namprd11.prod.outlook.com>

On 10/21/20 1:18 PM, Ananyev, Konstantin wrote:
>
>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>> Cc: Thomas Monjalon <thomas@monjalon.net>
>> Cc: Andrew Rybchenko <arybchenko@solarflare.com>
>> Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
>> Cc: Matan Azrad <matan@nvidia.com>
>> Cc: Olivier Matz <olivier.matz@6wind.com>
>> Cc: Jerin Jacob <jerinj@marvell.com>
>> ---
>>   doc/guides/rel_notes/deprecation.rst | 25 +++++++++++++++++++++++++
>>   1 file changed, 25 insertions(+)
>>
>> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
>> index 8ceb385141..d4a31392d3 100644
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> @@ -149,6 +149,31 @@ Deprecation Notices
>>     will be limited to maximum 256 queues.
>>     Also compile time flag ``RTE_ETHDEV_QUEUE_STAT_CNTRS`` will be removed.
>>
>> +* ethdev: In ``struct rte_eth_rxmode``, ``uint32_t max_rx_pkt_len`` will be
>> +  replaced by a new ``uint32_t mtu`` in v21.11.
> Probably no point to keep mtu value in rte_eth_rxmode.
> Better to move it to rte_eth_conf.
> Apart from that: +1 for this change.
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Do we really need the field in either rte_eth_rxmode or rte_eth_conf?
What's the point of duplication? We have dedicated API to get/set
which could be called in stopped state, set value saved in
data->mtu and used by the driver at start up and Rx queues setup
(to check scatter vs data room in mbuf consistency).

>> +  The new ``mtu`` field will be used to configure the initial device MTU via
>> +  ``rte_eth_dev_configure()`` API.
>> +  Later MTU can be changed by ``rte_eth_dev_set_mtu()`` API as done now.
>> +  The existing ``(struct rte_eth_dev)->data->mtu`` variable will be used to store
>> +  the configured ``mtu`` value,
>> +  and this new ``(struct rte_eth_dev)->data->dev_conf.rxmode.mtu`` variable will
>> +  be used to store the user configuration request.
>> +  Unlike ``max_rx_pkt_len``, which was valid only when ``JUMBO_FRAME`` enabled,
>> +  ``mtu`` field will be always valid.
>> +  When ``mtu`` config is not provided by the application, default ``RTE_ETHER_MTU``
>> +  value will be used.
>> +  Driver is responsible from updating ``(struct rte_eth_dev)->data->mtu`` after MTU
>> +  set successfully, either by ``rte_eth_dev_configure()`` or ``rte_eth_dev_set_mtu()``.
>> +
>> +  Application may need to configure device for a specific Rx packet size, like for
>> +  cases ``DEV_RX_OFFLOAD_SCATTER`` is not supported and device received packet size
>> +  can't be bigger than Rx buffer size.
>> +  To cover these cases application needs to know the device packet overhead to be
>> +  able to calculate the ``mtu`` corresponding to a Rx buffer size, for this
>> +  ``(struct rte_eth_dev_info).max_rx_pktlen`` will be kept,
>> +  the device packet overhead can be calculated as:
>> +  ``(struct rte_eth_dev_info).max_rx_pktlen - (struct rte_eth_dev_info).max_mtu``
>> +
>>   * cryptodev: support for using IV with all sizes is added, J0 still can
>>     be used but only when IV length in following structs ``rte_crypto_auth_xform``,
>>     ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal
>> --
>> 2.26.2


  reply	other threads:[~2020-10-21 15:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 12:03 Ferruh Yigit
2020-10-21 10:18 ` Ananyev, Konstantin
2020-10-21 15:10   ` Andrew Rybchenko [this message]
2020-10-21 16:28     ` Ferruh Yigit
2020-10-21 12:40 ` Kinsella, Ray
2020-11-24 17:36 ` [dpdk-dev] [RFC v2] " Ferruh Yigit
2020-11-24 17:47   ` Ajit Khaparde
2020-11-26 11:28   ` Andrew Rybchenko
2020-11-26 12:34     ` Ferruh Yigit
2020-11-27 18:38       ` Thomas Monjalon
2020-11-26 18:30   ` Matan Azrad
2020-11-27  9:37     ` [dpdk-dev] [RFC v2] doc: announce max Rx packet len fielddeprecation Morten Brørup

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=89fdc248-2d3b-69ac-e08d-a15a043f23d5@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerinj@marvell.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=matan@nvidia.com \
    --cc=mdr@ashroe.eu \
    --cc=nhorman@tuxdriver.com \
    --cc=olivier.matz@6wind.com \
    --cc=thomas@monjalon.net \
    /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).