[v4] doc: announce API change in ethdev offload flags
Checks
Commit Message
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Add new offload flags ``DEV_RX_OFFLOAD_RSS`` 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>
---
doc/guides/rel_notes/deprecation.rst | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
--
2.17.1
Comments
Hi
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add new offload flags ``DEV_RX_OFFLOAD_RSS`` 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>
> ---
> doc/guides/rel_notes/deprecation.rst | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 37b8592b6..e4e2a85d7 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -78,3 +78,26 @@ 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.
As I said in my previous mail, I do support the idea, though few nits below.
> + 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)``
Probably worth to mention that in that case packet_type will be set to 0
(PMD still need to set the value).
> + 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 writes to ``rte_mbuf`` fields on Rx and
As I understand, PMD will still need to write ptype value.
Though it will help PMD to avoid figuring out ptype values, when user don't need that information.
> + thereby improve Rx performance if application wishes do so.
> --
> 2.17.1
Hi,
>-----Original Message-----
>From: Ananyev, Konstantin <konstantin.ananyev@intel.com>
>Sent: Friday, August 9, 2019 2:17 PM
>To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Jerin
>Jacob Kollanukkaran <jerinj@marvell.com>;
>stephen@networkplumber.org; arybchenko@solarflare.com;
>hemant.agrawal@nxp.com; thomas@monjalon.net; Yigit, Ferruh
><ferruh.yigit@intel.com>; Richardson, Bruce
><bruce.richardson@intel.com>; Neil Horman
><nhorman@tuxdriver.com>; Mcnamara, John
><john.mcnamara@intel.com>; Kovacevic, Marko
><marko.kovacevic@intel.com>
>Cc: dev@dpdk.org
>Subject: RE: [dpdk-dev] [patch v4] doc: announce API change in
>ethdev offload flags
>Hi
>
>>
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Add new offload flags ``DEV_RX_OFFLOAD_RSS`` 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>
>> ---
>> doc/guides/rel_notes/deprecation.rst | 23
>+++++++++++++++++++++++
>> 1 file changed, 23 insertions(+)
>>
>> diff --git a/doc/guides/rel_notes/deprecation.rst
>b/doc/guides/rel_notes/deprecation.rst
>> index 37b8592b6..e4e2a85d7 100644
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> @@ -78,3 +78,26 @@ 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.
>
>As I said in my previous mail, I do support the idea, though few nits
>below.
>
>> + 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)``
>
>Probably worth to mention that in that case packet_type will be set to 0
>(PMD still need to set the value).
Ack, will update in v5.
>
>> + 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 writes to ``rte_mbuf`` fields
>on Rx and
>
>As I understand, PMD will still need to write ptype value.
>Though it will help PMD to avoid figuring out ptype values, when user
>don't need that information.
I will reword to ``will allow PMDs to avoid lookup to internal ptype table``.
>
>> + thereby improve Rx performance if application wishes do so.
>> --
>> 2.17.1
Thanks,
Pavan.
I think the silent breaking is still not solved for
DEV_RX_OFFLOAD_RSS_HASH and DEV_RX_OFFLOAD_FLOW_MARK.
An old application will still compile without any problem, but the RSS
hash will not be written and the app will break... They should be
negative. Eg DEV_RX_OFFLOAD_NO_RSS_HASH and DEV_RX_OFFLOAD_NO_FLOW_MARK?
Then, regarding the idea, are we sure it's better to add a configuration
check/a branch than always copying a few bytes from a warm cache line to
a warm cache line? Or some HW could free some internal resources? But
drivers are free to ignore it so it is not a problem as opposed to
silent breaking.
Tom
On 2019-08-09 10:17, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add new offload flags ``DEV_RX_OFFLOAD_RSS`` 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>
> ---
> doc/guides/rel_notes/deprecation.rst | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 37b8592b6..e4e2a85d7 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -78,3 +78,26 @@ 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)``
> + 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 writes to ``rte_mbuf`` fields on Rx and
> + thereby improve Rx performance if application wishes do so.
> --
> 2.17.1
>
On 8/9/19 12:13 PM, Tom Barbette wrote:
> I think the silent breaking is still not solved for
> DEV_RX_OFFLOAD_RSS_HASH and DEV_RX_OFFLOAD_FLOW_MARK.
>
> An old application will still compile without any problem, but the RSS
> hash will not be written and the app will break... They should be
> negative. Eg DEV_RX_OFFLOAD_NO_RSS_HASH and DEV_RX_OFFLOAD_NO_FLOW_MARK?
>
> Then, regarding the idea, are we sure it's better to add a
> configuration check/a branch than always copying a few bytes from a
> warm cache line to a warm cache line? Or some HW could free some
> internal resources? But drivers are free to ignore it so it is not a
> problem as opposed to silent breaking.
It could be not delivered from NIC to host saving PCIe bandwidth. E.g.
flow mark plus RSS hash is 8 byte and it is more than 10% for small packet.
> Tom
>
> On 2019-08-09 10:17, pbhagavatula@marvell.com wrote:
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Add new offload flags ``DEV_RX_OFFLOAD_RSS`` 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>
>> ---
>> doc/guides/rel_notes/deprecation.rst | 23 +++++++++++++++++++++++
>> 1 file changed, 23 insertions(+)
>>
>> diff --git a/doc/guides/rel_notes/deprecation.rst
>> b/doc/guides/rel_notes/deprecation.rst
>> index 37b8592b6..e4e2a85d7 100644
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> @@ -78,3 +78,26 @@ 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)``
>> + 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 writes to ``rte_mbuf`` fields
>> on Rx and
>> + thereby improve Rx performance if application wishes do so.
>> --
>> 2.17.1
>>
> -----Original Message-----
> From: Tom Barbette <barbette@kth.se>
> Sent: Friday, August 9, 2019 2:44 PM
> To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Jerin Jacob
> Kollanukkaran <jerinj@marvell.com>; stephen@networkplumber.org;
> arybchenko@solarflare.com; hemant.agrawal@nxp.com;
> thomas@monjalon.net; ferruh.yigit@intel.com;
> bruce.richardson@intel.com; Neil Horman <nhorman@tuxdriver.com>; John
> McNamara <john.mcnamara@intel.com>; Marko Kovacevic
> <marko.kovacevic@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [patch v4] doc: announce API change in ethdev
> offload flags
>
> I think the silent breaking is still not solved for DEV_RX_OFFLOAD_RSS_HASH
> and DEV_RX_OFFLOAD_FLOW_MARK.
Unlike ptype, presence of rss hash and flow_mark will be marked in ol_flags
as PKT_RX_RSS_HASH and PKT_RX_FDIR_ID. So NO application contract breakage.
>
> An old application will still compile without any problem, but the RSS hash will
> not be written and the app will break... They should be negative. Eg
> DEV_RX_OFFLOAD_NO_RSS_HASH and
> DEV_RX_OFFLOAD_NO_FLOW_MARK?
>
> Then, regarding the idea, are we sure it's better to add a configuration
> check/a branch than always copying a few bytes from a warm cache line to a
> warm cache line? Or some HW could free some internal resources? But
> drivers are free to ignore it so it is not a problem as opposed to silent
> breaking.
>
> Tom
>
> On 2019-08-09 10:17, pbhagavatula@marvell.com wrote:
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> > Add new offload flags ``DEV_RX_OFFLOAD_RSS`` 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>
> > ---
> > doc/guides/rel_notes/deprecation.rst | 23 +++++++++++++++++++++++
> > 1 file changed, 23 insertions(+)
> >
> > diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> > index 37b8592b6..e4e2a85d7 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -78,3 +78,26 @@ 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)``
> > + 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 writes to ``rte_mbuf`` fields on Rx
> and
> > + thereby improve Rx performance if application wishes do so.
> > --
> > 2.17.1
> >
@@ -78,3 +78,26 @@ 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)``
+ 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 writes to ``rte_mbuf`` fields on Rx and
+ thereby improve Rx performance if application wishes do so.