[v5] doc: announce API change in ethdev offload flags

Message ID 20190809095559.1900-1-pbhagavatula@marvell.com
State Accepted, archived
Headers show
Series
  • [v5] doc: announce API change in ethdev offload flags
Related show

Checks

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

Commit Message

Pavan Nikhilesh Bhagavatula Aug. 9, 2019, 9:55 a.m.
From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new offload flags ``DEV_RX_OFFLOAD_RSS_HASH`` and
``DEV_RX_OFFLOAD_FLOW_MARK``.
Add new function ``rte_eth_dev_set_supported_ptypes`` to allow application
to set specific ptypes to be updated in ``rte_mbuf::packet_type``

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 v5 Changes:
 - Reword for clarity.

 v4 Changes:
 - Remove DEV_RX_OFFLOAD_PTYPE proposition and replace it with
 rte_eth_dev_set_supported_ptypes (Konstantin).

 v3 Changes:
 - DEV_RX_OFFLOAD_RSS -> DEV_RX_OFFLOAD_RSS_HASH (andrew).

 v2 Changes:
 - Reword for clarity.

 doc/guides/rel_notes/deprecation.rst | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

--
2.17.1

Comments

Ananyev, Konstantin Aug. 9, 2019, 10:13 a.m. | #1
> Add new offload flags ``DEV_RX_OFFLOAD_RSS_HASH`` and
> ``DEV_RX_OFFLOAD_FLOW_MARK``.
> Add new function ``rte_eth_dev_set_supported_ptypes`` to allow application
> to set specific ptypes to be updated in ``rte_mbuf::packet_type``
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Acked-by: Jerin Jacob <jerinj@marvell.com>
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>  v5 Changes:
>  - Reword for clarity.
> 
>  v4 Changes:
>  - Remove DEV_RX_OFFLOAD_PTYPE proposition and replace it with
>  rte_eth_dev_set_supported_ptypes (Konstantin).
> 
>  v3 Changes:
>  - DEV_RX_OFFLOAD_RSS -> DEV_RX_OFFLOAD_RSS_HASH (andrew).
> 
>  v2 Changes:
>  - Reword for clarity.
> 
>  doc/guides/rel_notes/deprecation.rst | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 37b8592b6..b0391366c 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -78,3 +78,27 @@ Deprecation Notices
>    to set new power environment if power environment was already initialized.
>    In this case the function will return -1 unless the environment is unset first
>    (using ``rte_power_unset_env``). Other function usage scenarios will not change.
> +
> +* ethdev: New offload flags ``DEV_RX_OFFLOAD_RSS_HASH`` and ``DEV_RX_OFFLOAD_FLOW_MARK``
> +  will be added in 19.11.
> +  This will allow application to enable or disable PMDs from updating
> +  ``rte_mbuf::hash::rss`` and ``rte_mbuf::hash::fdir`` respectively.
> +  This scheme will allow PMDs to avoid writes to ``rte_mbuf`` fields on Rx and
> +  thereby improve Rx performance if application wishes do so.
> +  In 19.11 PMDs will still update the fields even when the offloads are not
> +  enabled.
> +
> +* ethdev: New function ``rte_eth_dev_set_supported_ptypes`` will be added in
> +  19.11.
> +  This will allow application to request PMD to set specific ptypes defined
> +  through ``rte_eth_dev_set_supported_ptypes`` in ``rte_mbuf::packet_type``.
> +  If application doesn't want any ptype information it can call
> +  ``rte_eth_dev_set_supported_ptypes(ethdev_id, RTE_PTYPE_UNKNOWN)`` and PMD
> +  will set ``rte_mbuf::packet_type`` to ``0``.
> +  If application doesn't call ``rte_eth_dev_set_supported_ptypes`` PMD can
> +  return ``rte_mbuf::packet_type`` with ``rte_eth_dev_get_supported_ptypes``.
> +  If application is interested only in L2/L3 layer, it can inform the PMD to update
> + ``rte_mbuf::packet_type`` with L2/L3 ptype by calling
> + ``rte_eth_dev_set_supported_ptypes(ethdev_id, RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK)``.
> +  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx and
> +  thereby improve Rx performance if application wishes do so.
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.17.1
Thomas Monjalon Aug. 10, 2019, 9:10 p.m. | #2
> > Add new offload flags ``DEV_RX_OFFLOAD_RSS_HASH`` and
> > ``DEV_RX_OFFLOAD_FLOW_MARK``.
> > Add new function ``rte_eth_dev_set_supported_ptypes`` to allow application
> > to set specific ptypes to be updated in ``rte_mbuf::packet_type``
> > 
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > Acked-by: Jerin Jacob <jerinj@marvell.com>
> > Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

We'll probably have to discuss more the details of these new APIs,
but the overall idea looks good.
I am not sure there is any API or ABI breakage here,
so the announce may not be required.

Anyway applied, thanks.

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 37b8592b6..b0391366c 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -78,3 +78,27 @@  Deprecation Notices
   to set new power environment if power environment was already initialized.
   In this case the function will return -1 unless the environment is unset first
   (using ``rte_power_unset_env``). Other function usage scenarios will not change.
+
+* ethdev: New offload flags ``DEV_RX_OFFLOAD_RSS_HASH`` and ``DEV_RX_OFFLOAD_FLOW_MARK``
+  will be added in 19.11.
+  This will allow application to enable or disable PMDs from updating
+  ``rte_mbuf::hash::rss`` and ``rte_mbuf::hash::fdir`` respectively.
+  This scheme will allow PMDs to avoid writes to ``rte_mbuf`` fields on Rx and
+  thereby improve Rx performance if application wishes do so.
+  In 19.11 PMDs will still update the fields even when the offloads are not
+  enabled.
+
+* ethdev: New function ``rte_eth_dev_set_supported_ptypes`` will be added in
+  19.11.
+  This will allow application to request PMD to set specific ptypes defined
+  through ``rte_eth_dev_set_supported_ptypes`` in ``rte_mbuf::packet_type``.
+  If application doesn't want any ptype information it can call
+  ``rte_eth_dev_set_supported_ptypes(ethdev_id, RTE_PTYPE_UNKNOWN)`` and PMD
+  will set ``rte_mbuf::packet_type`` to ``0``.
+  If application doesn't call ``rte_eth_dev_set_supported_ptypes`` PMD can
+  return ``rte_mbuf::packet_type`` with ``rte_eth_dev_get_supported_ptypes``.
+  If application is interested only in L2/L3 layer, it can inform the PMD to update
+ ``rte_mbuf::packet_type`` with L2/L3 ptype by calling
+ ``rte_eth_dev_set_supported_ptypes(ethdev_id, RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK)``.
+  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx and
+  thereby improve Rx performance if application wishes do so.