[RFC] doc: announce max Rx packet len field deprecation
diff mbox series

Message ID 20201020120305.1516513-1-ferruh.yigit@intel.com
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • [RFC] doc: announce max Rx packet len field deprecation
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch warning coding style issues

Commit Message

Ferruh Yigit Oct. 20, 2020, 12:03 p.m. UTC
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(+)

Comments

Ananyev, Konstantin Oct. 21, 2020, 10:18 a.m. UTC | #1
> 
> 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>

> +  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
Kinsella, Ray Oct. 21, 2020, 12:40 p.m. UTC | #2
On 20/10/2020 13:03, Ferruh Yigit 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.
> +  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

An application ... 

> +  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

An application ... 

> +  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
>
Andrew Rybchenko Oct. 21, 2020, 3:10 p.m. UTC | #3
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
Ferruh Yigit Oct. 21, 2020, 4:28 p.m. UTC | #4
On 10/21/2020 4:10 PM, Andrew Rybchenko wrote:
> 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).
> 

Not sure if we really need it, I had same thought.

The benefit of having it is, user can configure the Rx packet size within the 
``rte_eth_dev_configure()`` API, without it user will need to call the 
``rte_eth_dev_set_mtu()`` API explicitly, which will add another mandatory call 
to the device initialization, so I think having this fields simplifies the 
initialization.

Having it has the duplication problem, same thing configured by two different APIs.

>>> +  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
>

Patch
diff mbox series

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.
+  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