DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] doc: announce ethdev ABI change for LRO fields
@ 2019-08-06 14:56 Matan Azrad
  2019-08-06 14:56 ` [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO Matan Azrad
  2019-08-06 15:27 ` [dpdk-dev] [PATCH 1/2] doc: announce ethdev ABI change for LRO fields Andrew Rybchenko
  0 siblings, 2 replies; 21+ messages in thread
From: Matan Azrad @ 2019-08-06 14:56 UTC (permalink / raw)
  To: dev
  Cc: Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko,
	Konstantin Ananyev, Olivier Matz

It may be needed by the user to limit the LRO session packet size.
In order to allow the above limitation, a new Rx configuration may be
added for the maximum LRO session size.

A new capability may be added too to expose the maximum LRO session size
supported by the port.

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 doc/guides/rel_notes/deprecation.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 37b8592..c0cd9bc 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -59,6 +59,10 @@ Deprecation Notices
   Target release for removal of the legacy API will be defined once most
   PMDs have switched to rte_flow.
 
+* ethdev: new 32-bit fields may be added for maximum LRO session size, in
+  struct ``rte_eth_dev_info`` for the port capability and in struct
+  ``rte_eth_rxmode`` for the port configuration.
+  
 * 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
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-06 14:56 [dpdk-dev] [PATCH 1/2] doc: announce ethdev ABI change for LRO fields Matan Azrad
@ 2019-08-06 14:56 ` Matan Azrad
  2019-08-06 15:58   ` Ananyev, Konstantin
                     ` (2 more replies)
  2019-08-06 15:27 ` [dpdk-dev] [PATCH 1/2] doc: announce ethdev ABI change for LRO fields Andrew Rybchenko
  1 sibling, 3 replies; 21+ messages in thread
From: Matan Azrad @ 2019-08-06 14:56 UTC (permalink / raw)
  To: dev
  Cc: Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko,
	Konstantin Ananyev, Olivier Matz

The API breakage is because the ``tso_segsz`` field was documented for
LRO.

The ``tso_segsz`` field in mbuf indicates the size of each segment in
the LRO packet in Rx path and should be provided by the LRO packet
port.

While the generic LRO packet may aggregate different segments sizes in
one packet, it is impossible to expose this information for each segment
by one field and it doesn't make sense to expose all the segments sizes
in the mbuf.

A new field may be added as union with the above field to expose the
number of segments aggregated in the LRO packet.

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 doc/guides/rel_notes/deprecation.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index c0cd9bc..e826b69 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -45,6 +45,10 @@ Deprecation Notices
   - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
   - ``rte_eal_compare_pci_addr`` replaced by ``rte_pci_addr_cmp``
 
+* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO support. Use union
+  block for the field memory to be shared with a new field ``lro_segs_n``
+  indicates the number of segments aggregated in the LRO packet.
+
 * dpaa2: removal of ``rte_dpaa2_memsegs`` structure which has been replaced
   by a pa-va search library. This structure was earlier being used for holding
   memory segments used by dpaa2 driver for faster pa->va translation. This
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] doc: announce ethdev ABI change for LRO fields
  2019-08-06 14:56 [dpdk-dev] [PATCH 1/2] doc: announce ethdev ABI change for LRO fields Matan Azrad
  2019-08-06 14:56 ` [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO Matan Azrad
@ 2019-08-06 15:27 ` Andrew Rybchenko
  2019-08-10 21:40   ` Thomas Monjalon
  1 sibling, 1 reply; 21+ messages in thread
From: Andrew Rybchenko @ 2019-08-06 15:27 UTC (permalink / raw)
  To: Matan Azrad, dev
  Cc: Thomas Monjalon, Ferruh Yigit, Konstantin Ananyev, Olivier Matz

On 8/6/19 5:56 PM, Matan Azrad wrote:
> It may be needed by the user to limit the LRO session packet size.
> In order to allow the above limitation, a new Rx configuration may be
> added for the maximum LRO session size.
> 
> A new capability may be added too to expose the maximum LRO session size
> supported by the port.
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>   doc/guides/rel_notes/deprecation.rst | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 37b8592..c0cd9bc 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -59,6 +59,10 @@ Deprecation Notices
>     Target release for removal of the legacy API will be defined once most
>     PMDs have switched to rte_flow.
>   
> +* ethdev: new 32-bit fields may be added for maximum LRO session size, in
> +  struct ``rte_eth_dev_info`` for the port capability and in struct
> +  ``rte_eth_rxmode`` for the port configuration.
> +
>   * 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
> 


Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

I don't know examples when the information is required, but can imagine.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-06 14:56 ` [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO Matan Azrad
@ 2019-08-06 15:58   ` Ananyev, Konstantin
  2019-08-06 18:50     ` Matan Azrad
  2019-08-06 18:17   ` Andrew Rybchenko
  2023-06-12 16:38   ` Stephen Hemminger
  2 siblings, 1 reply; 21+ messages in thread
From: Ananyev, Konstantin @ 2019-08-06 15:58 UTC (permalink / raw)
  To: Matan Azrad, dev
  Cc: Thomas Monjalon, Yigit, Ferruh, Andrew Rybchenko, Olivier Matz



> -----Original Message-----
> From: Matan Azrad [mailto:matan@mellanox.com]
> Sent: Tuesday, August 6, 2019 3:56 PM
> To: dev@dpdk.org
> Cc: Thomas Monjalon <thomas@monjalon.net>; Yigit, Ferruh <ferruh.yigit@intel.com>; Andrew Rybchenko <arybchenko@solarflare.com>;
> Ananyev, Konstantin <konstantin.ananyev@intel.com>; Olivier Matz <olivier.matz@6wind.com>
> Subject: [PATCH 2/2] doc: announce new mbuf field for LRO
> 
> The API breakage is because the ``tso_segsz`` field was documented for
> LRO.
> 
> The ``tso_segsz`` field in mbuf indicates the size of each segment in
> the LRO packet in Rx path and should be provided by the LRO packet
> port.
> 
> While the generic LRO packet may aggregate different segments sizes in
> one packet, it is impossible to expose this information for each segment
> by one field and it doesn't make sense to expose all the segments sizes
> in the mbuf.
> 
> A new field may be added as union with the above field to expose the
> number of segments aggregated in the LRO packet.
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  doc/guides/rel_notes/deprecation.rst | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index c0cd9bc..e826b69 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -45,6 +45,10 @@ Deprecation Notices
>    - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
>    - ``rte_eal_compare_pci_addr`` replaced by ``rte_pci_addr_cmp``
> 
> +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO support. Use union
> +  block for the field memory to be shared with a new field ``lro_segs_n``
> +  indicates the number of segments aggregated in the LRO packet.
> +

Wonder how the upper layer will use that information (except for stats)?
Could you guys provide any examples?
Also what PMD should do if HW does supports LRO, but doesn't provide that information? 
Konstantin  

>  * dpaa2: removal of ``rte_dpaa2_memsegs`` structure which has been replaced
>    by a pa-va search library. This structure was earlier being used for holding
>    memory segments used by dpaa2 driver for faster pa->va translation. This
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-06 14:56 ` [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO Matan Azrad
  2019-08-06 15:58   ` Ananyev, Konstantin
@ 2019-08-06 18:17   ` Andrew Rybchenko
  2019-08-10 21:31     ` Thomas Monjalon
  2023-06-12 16:38   ` Stephen Hemminger
  2 siblings, 1 reply; 21+ messages in thread
From: Andrew Rybchenko @ 2019-08-06 18:17 UTC (permalink / raw)
  To: Matan Azrad, dev
  Cc: Thomas Monjalon, Ferruh Yigit, Konstantin Ananyev, Olivier Matz,
	Maxime Coquelin

On 8/6/19 5:56 PM, Matan Azrad wrote:
> The API breakage is because the ``tso_segsz`` field was documented for
> LRO.
>
> The ``tso_segsz`` field in mbuf indicates the size of each segment in
> the LRO packet in Rx path and should be provided by the LRO packet
> port.
>
> While the generic LRO packet may aggregate different segments sizes in
> one packet, it is impossible to expose this information for each segment
> by one field and it doesn't make sense to expose all the segments sizes
> in the mbuf.
>
> A new field may be added as union with the above field to expose the
> number of segments aggregated in the LRO packet.
>
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>   doc/guides/rel_notes/deprecation.rst | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index c0cd9bc..e826b69 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -45,6 +45,10 @@ Deprecation Notices
>     - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
>     - ``rte_eal_compare_pci_addr`` replaced by ``rte_pci_addr_cmp``
>   
> +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO support. Use union
> +  block for the field memory to be shared with a new field ``lro_segs_n``
> +  indicates the number of segments aggregated in the LRO packet.
> +
>   * dpaa2: removal of ``rte_dpaa2_memsegs`` structure which has been replaced
>     by a pa-va search library. This structure was earlier being used for holding
>     memory segments used by dpaa2 driver for faster pa->va translation. This

I think that the number of segments is more logical in the case of LRO.
The question (already asked by Konstantin) is why it is needed at all
(statistics?). If so, it still makes sense.

Segment size is misleading here, since not all segments
could be the same size. So,

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

As far as I can see bnxt and qede do not fill it in.
mlx5 and vmxnet3 have the number of segments (vmxnet3 has segment
size sometimes and sometimes use a function to guess the value).
So both will win from the change.
It looks like virtio does not have number of segments. CC Maxime to
comment.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-06 15:58   ` Ananyev, Konstantin
@ 2019-08-06 18:50     ` Matan Azrad
  2019-08-07 10:17       ` Ananyev, Konstantin
  0 siblings, 1 reply; 21+ messages in thread
From: Matan Azrad @ 2019-08-06 18:50 UTC (permalink / raw)
  To: Ananyev, Konstantin, dev
  Cc: Thomas Monjalon, Yigit, Ferruh, Andrew Rybchenko, Olivier Matz

Hi

From: Ananyev, Konstantin
> > -----Original Message-----
> > From: Matan Azrad [mailto:matan@mellanox.com]
> > Sent: Tuesday, August 6, 2019 3:56 PM
> > To: dev@dpdk.org
> > Cc: Thomas Monjalon <thomas@monjalon.net>; Yigit, Ferruh
> > <ferruh.yigit@intel.com>; Andrew Rybchenko
> > <arybchenko@solarflare.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>; Olivier Matz <olivier.matz@6wind.com>
> > Subject: [PATCH 2/2] doc: announce new mbuf field for LRO
> >
> > The API breakage is because the ``tso_segsz`` field was documented for
> > LRO.
> >
> > The ``tso_segsz`` field in mbuf indicates the size of each segment in
> > the LRO packet in Rx path and should be provided by the LRO packet
> > port.
> >
> > While the generic LRO packet may aggregate different segments sizes in
> > one packet, it is impossible to expose this information for each
> > segment by one field and it doesn't make sense to expose all the
> > segments sizes in the mbuf.
> >
> > A new field may be added as union with the above field to expose the
> > number of segments aggregated in the LRO packet.
> >
> > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > ---
> >  doc/guides/rel_notes/deprecation.rst | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/doc/guides/rel_notes/deprecation.rst
> > b/doc/guides/rel_notes/deprecation.rst
> > index c0cd9bc..e826b69 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -45,6 +45,10 @@ Deprecation Notices
> >    - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
> >    - ``rte_eal_compare_pci_addr`` replaced by ``rte_pci_addr_cmp``
> >
> > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO support.
> > +Use union
> > +  block for the field memory to be shared with a new field
> > +``lro_segs_n``
> > +  indicates the number of segments aggregated in the LRO packet.
> > +
> 
> Wonder how the upper layer will use that information (except for stats)?
> Could you guys provide any examples?

1. Stats, allow to calc accurate PPS. 
2. Supply accurate information unlike the seg size which cannot be accurate.
2. Let the user all the information (segs num allow an average seg size calculation)

> Also what PMD should do if HW does supports LRO, but doesn't provide that
> information?

If the PMD knows all the segments size he can calculate it, no?
0 means PMD doesn't support it. 
 

> >  * dpaa2: removal of ``rte_dpaa2_memsegs`` structure which has been
> replaced
> >    by a pa-va search library. This structure was earlier being used for holding
> >    memory segments used by dpaa2 driver for faster pa->va translation.
> > This
> > --
> > 1.8.3.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-06 18:50     ` Matan Azrad
@ 2019-08-07 10:17       ` Ananyev, Konstantin
  2019-08-07 12:35         ` Matan Azrad
  0 siblings, 1 reply; 21+ messages in thread
From: Ananyev, Konstantin @ 2019-08-07 10:17 UTC (permalink / raw)
  To: Matan Azrad, dev
  Cc: Thomas Monjalon, Yigit, Ferruh, Andrew Rybchenko, Olivier Matz

Hi Matan,

> > >
> > > The API breakage is because the ``tso_segsz`` field was documented for
> > > LRO.
> > >
> > > The ``tso_segsz`` field in mbuf indicates the size of each segment in
> > > the LRO packet in Rx path and should be provided by the LRO packet
> > > port.
> > >
> > > While the generic LRO packet may aggregate different segments sizes in
> > > one packet, it is impossible to expose this information for each
> > > segment by one field and it doesn't make sense to expose all the
> > > segments sizes in the mbuf.
> > >
> > > A new field may be added as union with the above field to expose the
> > > number of segments aggregated in the LRO packet.
> > >
> > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > ---
> > >  doc/guides/rel_notes/deprecation.rst | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > b/doc/guides/rel_notes/deprecation.rst
> > > index c0cd9bc..e826b69 100644
> > > --- a/doc/guides/rel_notes/deprecation.rst
> > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > @@ -45,6 +45,10 @@ Deprecation Notices
> > >    - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
> > >    - ``rte_eal_compare_pci_addr`` replaced by ``rte_pci_addr_cmp``
> > >
> > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO support.
> > > +Use union
> > > +  block for the field memory to be shared with a new field
> > > +``lro_segs_n``
> > > +  indicates the number of segments aggregated in the LRO packet.
> > > +
> >
> > Wonder how the upper layer will use that information (except for stats)?
> > Could you guys provide any examples?
> 
> 1. Stats, allow to calc accurate PPS.
> 2. Supply accurate information unlike the seg size which cannot be accurate.
> 2. Let the user all the information (segs num allow an average seg size calculation)

So just for stats, right?
If so,  wouldn't it be more plausible to extend PMD itself
to provide some extra statistics?
Just a thought.

> 
> > Also what PMD should do if HW does supports LRO, but doesn't to 
> > information?
> 
> If the PMD knows all the segments size he can calculate it, no?
> 0 means PMD doesn't support it.

I mean HW/PMD might support LRO, but doesn't provide information
about number of coalesced segments.
What PMD should do in that case?
Still  set DEV_RX_OFFLOAD_TCP_LRO as enabled RX offload,
but don't set PKT_RX_LRO flag in the RX-ed mbuf,
even if it does contain coalesced packets?
As I understand that what happens now.
It is probably ok by me (as means no changes in ixgbe PMD)...
But wouldn't that mean no defined way for the user to determine
will HW/PMD provide that information or not?
Konstantin



> 
> 
> > >  * dpaa2: removal of ``rte_dpaa2_memsegs`` structure which has been
> > replaced
> > >    by a pa-va search library. This structure was earlier being used for holding
> > >    memory segments used by dpaa2 driver for faster pa->va translation.
> > > This
> > > --
> > > 1.8.3.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-07 10:17       ` Ananyev, Konstantin
@ 2019-08-07 12:35         ` Matan Azrad
  2019-08-07 14:18           ` Ananyev, Konstantin
  0 siblings, 1 reply; 21+ messages in thread
From: Matan Azrad @ 2019-08-07 12:35 UTC (permalink / raw)
  To: Ananyev, Konstantin, dev
  Cc: Thomas Monjalon, Yigit, Ferruh, Andrew Rybchenko, Olivier Matz


Hi Konstantin

From: Ananyev, Konstantin
> Sent: Wednesday, August 7, 2019 1:18 PM
> To: Matan Azrad <matan@mellanox.com>; dev@dpdk.org
> Cc: Thomas Monjalon <thomas@monjalon.net>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Andrew Rybchenko
> <arybchenko@solarflare.com>; Olivier Matz <olivier.matz@6wind.com>
> Subject: RE: [PATCH 2/2] doc: announce new mbuf field for LRO
> 
> Hi Matan,
> 
> > > >
> > > > The API breakage is because the ``tso_segsz`` field was documented
> > > > for LRO.
> > > >
> > > > The ``tso_segsz`` field in mbuf indicates the size of each segment
> > > > in the LRO packet in Rx path and should be provided by the LRO
> > > > packet port.
> > > >
> > > > While the generic LRO packet may aggregate different segments
> > > > sizes in one packet, it is impossible to expose this information
> > > > for each segment by one field and it doesn't make sense to expose
> > > > all the segments sizes in the mbuf.
> > > >
> > > > A new field may be added as union with the above field to expose
> > > > the number of segments aggregated in the LRO packet.
> > > >
> > > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > > ---
> > > >  doc/guides/rel_notes/deprecation.rst | 4 ++++
> > > >  1 file changed, 4 insertions(+)
> > > >
> > > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > > b/doc/guides/rel_notes/deprecation.rst
> > > > index c0cd9bc..e826b69 100644
> > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > @@ -45,6 +45,10 @@ Deprecation Notices
> > > >    - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
> > > >    - ``rte_eal_compare_pci_addr`` replaced by ``rte_pci_addr_cmp``
> > > >
> > > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO support.
> > > > +Use union
> > > > +  block for the field memory to be shared with a new field
> > > > +``lro_segs_n``
> > > > +  indicates the number of segments aggregated in the LRO packet.
> > > > +
> > >
> > > Wonder how the upper layer will use that information (except for stats)?
> > > Could you guys provide any examples?
> >
> > 1. Stats, allow to calc accurate PPS.
> > 2. Supply accurate information unlike the seg size which cannot be
> accurate.
> > 2. Let the user all the information (segs num allow an average seg
> > size calculation)
> 
> So just for stats, right?

Stats it is one option.

The user configured LRO, means he wants X > 1 packets to be aggregated by the port.

Don't you think X is interesting for the user?

For example, maybe there is Y for the next calculation:

If average(X) < Y:
	Stop LRO - not very good for performance to aggregate small number of packets - stop LRO.
 


> If so,  wouldn't it be more plausible to extend PMD itself to provide some
> extra statistics?
> Just a thought.

Yes, may be interesting but it can be redundant work when the user don't need it.

> 
> >
> > > Also what PMD should do if HW does supports LRO, but doesn't to
> > > information?
> >
> > If the PMD knows all the segments size he can calculate it, no?
> > 0 means PMD doesn't support it.
> 
> I mean HW/PMD might support LRO, but doesn't provide information about
> number of coalesced segments.
> What PMD should do in that case?

As I said, to set this field with 0 and set the PKT_RX_LRO flag in ol_flags.
0 in this case means support LRO but cannot supply the segments num.

Do you familiar with PMDs that supports LRO but cannot provide the segments num?
If so, what do these PMDs can provide instead?

> Still  set DEV_RX_OFFLOAD_TCP_LRO as enabled RX offload, but don't set
> PKT_RX_LRO flag in the RX-ed mbuf, even if it does contain coalesced
> packets?

No, read above.

> As I understand that what happens now.
> It is probably ok by me (as means no changes in ixgbe PMD)...
> But wouldn't that mean no defined way for the user to determine will
> HW/PMD provide that information or not?

Will compare to 0, see above.


> Konstantin


> > > >  * dpaa2: removal of ``rte_dpaa2_memsegs`` structure which has
> > > > been
> > > replaced
> > > >    by a pa-va search library. This structure was earlier being used for
> holding
> > > >    memory segments used by dpaa2 driver for faster pa->va translation.
> > > > This
> > > > --
> > > > 1.8.3.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-07 12:35         ` Matan Azrad
@ 2019-08-07 14:18           ` Ananyev, Konstantin
  2019-08-08 10:16             ` Matan Azrad
  0 siblings, 1 reply; 21+ messages in thread
From: Ananyev, Konstantin @ 2019-08-07 14:18 UTC (permalink / raw)
  To: Matan Azrad, dev
  Cc: Thomas Monjalon, Yigit, Ferruh, Andrew Rybchenko, Olivier Matz



> 
> Hi Konstantin
> 
> From: Ananyev, Konstantin
> > Sent: Wednesday, August 7, 2019 1:18 PM
> > To: Matan Azrad <matan@mellanox.com>; dev@dpdk.org
> > Cc: Thomas Monjalon <thomas@monjalon.net>; Yigit, Ferruh
> > <ferruh.yigit@intel.com>; Andrew Rybchenko
> > <arybchenko@solarflare.com>; Olivier Matz <olivier.matz@6wind.com>
> > Subject: RE: [PATCH 2/2] doc: announce new mbuf field for LRO
> >
> > Hi Matan,
> >
> > > > >
> > > > > The API breakage is because the ``tso_segsz`` field was documented
> > > > > for LRO.
> > > > >
> > > > > The ``tso_segsz`` field in mbuf indicates the size of each segment
> > > > > in the LRO packet in Rx path and should be provided by the LRO
> > > > > packet port.
> > > > >
> > > > > While the generic LRO packet may aggregate different segments
> > > > > sizes in one packet, it is impossible to expose this information
> > > > > for each segment by one field and it doesn't make sense to expose
> > > > > all the segments sizes in the mbuf.
> > > > >
> > > > > A new field may be added as union with the above field to expose
> > > > > the number of segments aggregated in the LRO packet.
> > > > >
> > > > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > > > ---
> > > > >  doc/guides/rel_notes/deprecation.rst | 4 ++++
> > > > >  1 file changed, 4 insertions(+)
> > > > >
> > > > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > > > b/doc/guides/rel_notes/deprecation.rst
> > > > > index c0cd9bc..e826b69 100644
> > > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > > @@ -45,6 +45,10 @@ Deprecation Notices
> > > > >    - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
> > > > >    - ``rte_eal_compare_pci_addr`` replaced by ``rte_pci_addr_cmp``
> > > > >
> > > > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO support.
> > > > > +Use union
> > > > > +  block for the field memory to be shared with a new field
> > > > > +``lro_segs_n``
> > > > > +  indicates the number of segments aggregated in the LRO packet.
> > > > > +
> > > >
> > > > Wonder how the upper layer will use that information (except for stats)?
> > > > Could you guys provide any examples?
> > >
> > > 1. Stats, allow to calc accurate PPS.
> > > 2. Supply accurate information unlike the seg size which cannot be
> > accurate.
> > > 2. Let the user all the information (segs num allow an average seg
> > > size calculation)
> >
> > So just for stats, right?
> 
> Stats it is one option.
> 
> The user configured LRO, means he wants X > 1 packets to be aggregated by the port.
> 
> Don't you think X is interesting for the user?
> 
> For example, maybe there is Y for the next calculation:
> 
> If average(X) < Y:
> 	Stop LRO - not very good for performance to aggregate small number of packets - stop LRO.
> 

Might be, but I think user can use other metrics (let say average aggregated packet size)
for that purpose. 

> 
> 
> > If so,  wouldn't it be more plausible to extend PMD itself to provide some
> > extra statistics?
> > Just a thought.
> 
> Yes, may be interesting but it can be redundant work when the user don't need it.
> 
> >
> > >
> > > > Also what PMD should do if HW does supports LRO, but doesn't to
> > > > information?
> > >
> > > If the PMD knows all the segments size he can calculate it, no?
> > > 0 means PMD doesn't support it.
> >
> > I mean HW/PMD might support LRO, but doesn't provide information about
> > number of coalesced segments.
> > What PMD should do in that case?
> 
> As I said, to set this field with 0 and set the PKT_RX_LRO flag in ol_flags.
> 0 in this case means support LRO but cannot supply the segments num.

Ok..., but then what for then to set PKT_RX_LRO at all?
From PMD perspective it would be easier not to set that flag at all and not to touch tso_segsz.

> 
> Do you familiar with PMDs that supports LRO but cannot provide the segments num?
> If so, what do these PMDs can provide instead?

Yes, ixgbe PMD.
It does support TCP_LRO offload, and when enabled, does coalesce the packets,
but doesn't set PKT_RX_LRO and doesn't touch tso_segsz.

> 
> > Still  set DEV_RX_OFFLOAD_TCP_LRO as enabled RX offload, but don't set
> > PKT_RX_LRO flag in the RX-ed mbuf, even if it does contain coalesced
> > packets?
> 
> No, read above.
> 
> > As I understand that what happens now.
> > It is probably ok by me (as means no changes in ixgbe PMD)...
> > But wouldn't that mean no defined way for the user to determine will
> > HW/PMD provide that information or not?
> 
> Will compare to 0, see above.

I mean how the user will determine in advance would given PMD/HW provide that info in tso_segsz or not?
Wait for the first LRO packet? Something else?

> 
> 
> > Konstantin
> 
> 
> > > > >  * dpaa2: removal of ``rte_dpaa2_memsegs`` structure which has
> > > > > been
> > > > replaced
> > > > >    by a pa-va search library. This structure was earlier being used for
> > holding
> > > > >    memory segments used by dpaa2 driver for faster pa->va translation.
> > > > > This
> > > > > --
> > > > > 1.8.3.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-07 14:18           ` Ananyev, Konstantin
@ 2019-08-08 10:16             ` Matan Azrad
  2019-08-08 10:48               ` Ananyev, Konstantin
  0 siblings, 1 reply; 21+ messages in thread
From: Matan Azrad @ 2019-08-08 10:16 UTC (permalink / raw)
  To: Ananyev, Konstantin, dev
  Cc: Thomas Monjalon, Yigit, Ferruh, Andrew Rybchenko, Olivier Matz



From: Ananyev, Konstantin
> > Hi Konstantin
> >
> > From: Ananyev, Konstantin
> > > Sent: Wednesday, August 7, 2019 1:18 PM
> > > To: Matan Azrad <matan@mellanox.com>; dev@dpdk.org
> > > Cc: Thomas Monjalon <thomas@monjalon.net>; Yigit, Ferruh
> > > <ferruh.yigit@intel.com>; Andrew Rybchenko
> > > <arybchenko@solarflare.com>; Olivier Matz <olivier.matz@6wind.com>
> > > Subject: RE: [PATCH 2/2] doc: announce new mbuf field for LRO
> > >
> > > Hi Matan,
> > >
> > > > > >
> > > > > > The API breakage is because the ``tso_segsz`` field was
> > > > > > documented for LRO.
> > > > > >
> > > > > > The ``tso_segsz`` field in mbuf indicates the size of each
> > > > > > segment in the LRO packet in Rx path and should be provided by
> > > > > > the LRO packet port.
> > > > > >
> > > > > > While the generic LRO packet may aggregate different segments
> > > > > > sizes in one packet, it is impossible to expose this
> > > > > > information for each segment by one field and it doesn't make
> > > > > > sense to expose all the segments sizes in the mbuf.
> > > > > >
> > > > > > A new field may be added as union with the above field to
> > > > > > expose the number of segments aggregated in the LRO packet.
> > > > > >
> > > > > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > > > > ---
> > > > > >  doc/guides/rel_notes/deprecation.rst | 4 ++++
> > > > > >  1 file changed, 4 insertions(+)
> > > > > >
> > > > > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > > > > b/doc/guides/rel_notes/deprecation.rst
> > > > > > index c0cd9bc..e826b69 100644
> > > > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > > > @@ -45,6 +45,10 @@ Deprecation Notices
> > > > > >    - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
> > > > > >    - ``rte_eal_compare_pci_addr`` replaced by
> > > > > > ``rte_pci_addr_cmp``
> > > > > >
> > > > > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO
> support.
> > > > > > +Use union
> > > > > > +  block for the field memory to be shared with a new field
> > > > > > +``lro_segs_n``
> > > > > > +  indicates the number of segments aggregated in the LRO packet.
> > > > > > +
> > > > >
> > > > > Wonder how the upper layer will use that information (except for
> stats)?
> > > > > Could you guys provide any examples?
> > > >
> > > > 1. Stats, allow to calc accurate PPS.
> > > > 2. Supply accurate information unlike the seg size which cannot be
> > > accurate.
> > > > 2. Let the user all the information (segs num allow an average seg
> > > > size calculation)
> > >
> > > So just for stats, right?
> >
> > Stats it is one option.
> >
> > The user configured LRO, means he wants X > 1 packets to be aggregated
> by the port.
> >
> > Don't you think X is interesting for the user?
> >
> > For example, maybe there is Y for the next calculation:
> >
> > If average(X) < Y:
> > 	Stop LRO - not very good for performance to aggregate small number
> of packets - stop LRO.
> >
> 
> Might be, but I think user can use other metrics (let say average aggregated
> packet size) for that purpose.

Yes, but I think it is better to supply the segs number which is an accurate number instead of average size of segment.
Then, user can decide any calculation he prefers.

> 
> >
> >
> > > If so,  wouldn't it be more plausible to extend PMD itself to
> > > provide some extra statistics?
> > > Just a thought.
> >
> > Yes, may be interesting but it can be redundant work when the user don't
> need it.
> >
> > >
> > > >
> > > > > Also what PMD should do if HW does supports LRO, but doesn't to
> > > > > information?
> > > >
> > > > If the PMD knows all the segments size he can calculate it, no?
> > > > 0 means PMD doesn't support it.
> > >
> > > I mean HW/PMD might support LRO, but doesn't provide information
> > > about number of coalesced segments.
> > > What PMD should do in that case?
> >
> > As I said, to set this field with 0 and set the PKT_RX_LRO flag in ol_flags.
> > 0 in this case means support LRO but cannot supply the segments num.
> 
> Ok..., but then what for then to set PKT_RX_LRO at all?
> From PMD perspective it would be easier not to set that flag at all and not to
> touch tso_segsz.

The user should know that LRO is working. LRO flag should be set in any case.

> >
> > Do you familiar with PMDs that supports LRO but cannot provide the
> segments num?
> > If so, what do these PMDs can provide instead?
> 
> Yes, ixgbe PMD.
> It does support TCP_LRO offload, and when enabled, does coalesce the
> packets, but doesn't set PKT_RX_LRO and doesn't touch tso_segsz.

I think it should be changed to set the flag.

> 
> >
> > > Still  set DEV_RX_OFFLOAD_TCP_LRO as enabled RX offload, but don't
> > > set PKT_RX_LRO flag in the RX-ed mbuf, even if it does contain
> > > coalesced packets?
> >
> > No, read above.
> >
> > > As I understand that what happens now.
> > > It is probably ok by me (as means no changes in ixgbe PMD)...
> > > But wouldn't that mean no defined way for the user to determine will
> > > HW/PMD provide that information or not?
> >
> > Will compare to 0, see above.
> 
> I mean how the user will determine in advance would given PMD/HW
> provide that info in tso_segsz or not?
> Wait for the first LRO packet? Something else?

Or wait to for the first LRO packet, or we can add a new ethdev capability for it.

What do you think?

> 
> >
> >
> > > Konstantin
> >
> >
> > > > > >  * dpaa2: removal of ``rte_dpaa2_memsegs`` structure which has
> > > > > > been
> > > > > replaced
> > > > > >    by a pa-va search library. This structure was earlier being
> > > > > > used for
> > > holding
> > > > > >    memory segments used by dpaa2 driver for faster pa->va
> translation.
> > > > > > This
> > > > > > --
> > > > > > 1.8.3.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-08 10:16             ` Matan Azrad
@ 2019-08-08 10:48               ` Ananyev, Konstantin
  2019-08-08 11:16                 ` Matan Azrad
  0 siblings, 1 reply; 21+ messages in thread
From: Ananyev, Konstantin @ 2019-08-08 10:48 UTC (permalink / raw)
  To: Matan Azrad, dev
  Cc: Thomas Monjalon, Yigit, Ferruh, Andrew Rybchenko, Olivier Matz

Hi Matan,

> > > > > > >
> > > > > > > The API breakage is because the ``tso_segsz`` field was
> > > > > > > documented for LRO.
> > > > > > >
> > > > > > > The ``tso_segsz`` field in mbuf indicates the size of each
> > > > > > > segment in the LRO packet in Rx path and should be provided by
> > > > > > > the LRO packet port.
> > > > > > >
> > > > > > > While the generic LRO packet may aggregate different segments
> > > > > > > sizes in one packet, it is impossible to expose this
> > > > > > > information for each segment by one field and it doesn't make
> > > > > > > sense to expose all the segments sizes in the mbuf.
> > > > > > >
> > > > > > > A new field may be added as union with the above field to
> > > > > > > expose the number of segments aggregated in the LRO packet.
> > > > > > >
> > > > > > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > > > > > ---
> > > > > > >  doc/guides/rel_notes/deprecation.rst | 4 ++++
> > > > > > >  1 file changed, 4 insertions(+)
> > > > > > >
> > > > > > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > > > > > b/doc/guides/rel_notes/deprecation.rst
> > > > > > > index c0cd9bc..e826b69 100644
> > > > > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > > > > @@ -45,6 +45,10 @@ Deprecation Notices
> > > > > > >    - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
> > > > > > >    - ``rte_eal_compare_pci_addr`` replaced by
> > > > > > > ``rte_pci_addr_cmp``
> > > > > > >
> > > > > > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO
> > support.
> > > > > > > +Use union
> > > > > > > +  block for the field memory to be shared with a new field
> > > > > > > +``lro_segs_n``
> > > > > > > +  indicates the number of segments aggregated in the LRO packet.
> > > > > > > +
> > > > > >
> > > > > > Wonder how the upper layer will use that information (except for
> > stats)?
> > > > > > Could you guys provide any examples?
> > > > >
> > > > > 1. Stats, allow to calc accurate PPS.
> > > > > 2. Supply accurate information unlike the seg size which cannot be
> > > > accurate.
> > > > > 2. Let the user all the information (segs num allow an average seg
> > > > > size calculation)
> > > >
> > > > So just for stats, right?
> > >
> > > Stats it is one option.
> > >
> > > The user configured LRO, means he wants X > 1 packets to be aggregated
> > by the port.
> > >
> > > Don't you think X is interesting for the user?
> > >
> > > For example, maybe there is Y for the next calculation:
> > >
> > > If average(X) < Y:
> > > 	Stop LRO - not very good for performance to aggregate small number
> > of packets - stop LRO.
> > >
> >
> > Might be, but I think user can use other metrics (let say average aggregated
> > packet size) for that purpose.
> 
> Yes, but I think it is better to supply the segs number which is an accurate number instead of average size of segment.
> Then, user can decide any calculation he prefers.
> 
> >
> > >
> > >
> > > > If so,  wouldn't it be more plausible to extend PMD itself to
> > > > provide some extra statistics?
> > > > Just a thought.
> > >
> > > Yes, may be interesting but it can be redundant work when the user don't
> > need it.
> > >
> > > >
> > > > >
> > > > > > Also what PMD should do if HW does supports LRO, but doesn't to
> > > > > > information?
> > > > >
> > > > > If the PMD knows all the segments size he can calculate it, no?
> > > > > 0 means PMD doesn't support it.
> > > >
> > > > I mean HW/PMD might support LRO, but doesn't provide information
> > > > about number of coalesced segments.
> > > > What PMD should do in that case?
> > >
> > > As I said, to set this field with 0 and set the PKT_RX_LRO flag in ol_flags.
> > > 0 in this case means support LRO but cannot supply the segments num.
> >
> > Ok..., but then what for then to set PKT_RX_LRO at all?
> > From PMD perspective it would be easier not to set that flag at all and not to
> > touch tso_segsz.
> 
> The user should know that LRO is working. LRO flag should be set in any case.

Well, then I think you trying to introduce a new requirement for PMD.
Right now, as I can see it is optional, and supposed to be set only
when PMD RX path updates tso_segsz.

/**
 * When packets are coalesced by a hardware or virtual driver, this flag
 * can be set in the RX mbuf, meaning that the m->tso_segsz field is
 * valid and is set to the segment size of original packets.
 */
#define PKT_RX_LRO           (1ULL << 16)

> 
> > >
> > > Do you familiar with PMDs that supports LRO but cannot provide the
> > segments num?
> > > If so, what do these PMDs can provide instead?
> >
> > Yes, ixgbe PMD.
> > It does support TCP_LRO offload, and when enabled, does coalesce the
> > packets, but doesn't set PKT_RX_LRO and doesn't touch tso_segsz.
> 
> I think it should be changed to set the flag.
> 
> >
> > >
> > > > Still  set DEV_RX_OFFLOAD_TCP_LRO as enabled RX offload, but don't
> > > > set PKT_RX_LRO flag in the RX-ed mbuf, even if it does contain
> > > > coalesced packets?
> > >
> > > No, read above.
> > >
> > > > As I understand that what happens now.
> > > > It is probably ok by me (as means no changes in ixgbe PMD)...
> > > > But wouldn't that mean no defined way for the user to determine will
> > > > HW/PMD provide that information or not?
> > >
> > > Will compare to 0, see above.
> >
> > I mean how the user will determine in advance would given PMD/HW
> > provide that info in tso_segsz or not?
> > Wait for the first LRO packet? Something else?
> 
> Or wait to for the first LRO packet, or we can add a new ethdev capability for it.
> 
> What do you think?

I still in doubt is it really worth to support that feature at all...
Though if we'll decide to add it, then I think it needs to be 
a new capability DEV_RX_OFFLOAD_LRO_STAT (or so)
and probably new mbuf.ol_flag value for it.

Konstantin

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-08 10:48               ` Ananyev, Konstantin
@ 2019-08-08 11:16                 ` Matan Azrad
  2019-08-08 16:26                   ` Ananyev, Konstantin
  0 siblings, 1 reply; 21+ messages in thread
From: Matan Azrad @ 2019-08-08 11:16 UTC (permalink / raw)
  To: Ananyev, Konstantin, dev
  Cc: Thomas Monjalon, Yigit, Ferruh, Andrew Rybchenko, Olivier Matz


Hi
From: Ananyev, Konstantin
> Hi Matan,
> 
> > > > > > > >
> > > > > > > > The API breakage is because the ``tso_segsz`` field was
> > > > > > > > documented for LRO.
> > > > > > > >
> > > > > > > > The ``tso_segsz`` field in mbuf indicates the size of each
> > > > > > > > segment in the LRO packet in Rx path and should be
> > > > > > > > provided by the LRO packet port.
> > > > > > > >
> > > > > > > > While the generic LRO packet may aggregate different
> > > > > > > > segments sizes in one packet, it is impossible to expose
> > > > > > > > this information for each segment by one field and it
> > > > > > > > doesn't make sense to expose all the segments sizes in the
> mbuf.
> > > > > > > >
> > > > > > > > A new field may be added as union with the above field to
> > > > > > > > expose the number of segments aggregated in the LRO packet.
> > > > > > > >
> > > > > > > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > > > > > > ---
> > > > > > > >  doc/guides/rel_notes/deprecation.rst | 4 ++++
> > > > > > > >  1 file changed, 4 insertions(+)
> > > > > > > >
> > > > > > > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > > > > > > b/doc/guides/rel_notes/deprecation.rst
> > > > > > > > index c0cd9bc..e826b69 100644
> > > > > > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > > > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > > > > > @@ -45,6 +45,10 @@ Deprecation Notices
> > > > > > > >    - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
> > > > > > > >    - ``rte_eal_compare_pci_addr`` replaced by
> > > > > > > > ``rte_pci_addr_cmp``
> > > > > > > >
> > > > > > > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO
> > > support.
> > > > > > > > +Use union
> > > > > > > > +  block for the field memory to be shared with a new
> > > > > > > > +field ``lro_segs_n``
> > > > > > > > +  indicates the number of segments aggregated in the LRO
> packet.
> > > > > > > > +
> > > > > > >
> > > > > > > Wonder how the upper layer will use that information (except
> > > > > > > for
> > > stats)?
> > > > > > > Could you guys provide any examples?
> > > > > >
> > > > > > 1. Stats, allow to calc accurate PPS.
> > > > > > 2. Supply accurate information unlike the seg size which
> > > > > > cannot be
> > > > > accurate.
> > > > > > 2. Let the user all the information (segs num allow an average
> > > > > > seg size calculation)
> > > > >
> > > > > So just for stats, right?
> > > >
> > > > Stats it is one option.
> > > >
> > > > The user configured LRO, means he wants X > 1 packets to be
> > > > aggregated
> > > by the port.
> > > >
> > > > Don't you think X is interesting for the user?
> > > >
> > > > For example, maybe there is Y for the next calculation:
> > > >
> > > > If average(X) < Y:
> > > > 	Stop LRO - not very good for performance to aggregate small
> > > > number
> > > of packets - stop LRO.
> > > >
> > >
> > > Might be, but I think user can use other metrics (let say average
> > > aggregated packet size) for that purpose.
> >
> > Yes, but I think it is better to supply the segs number which is an accurate
> number instead of average size of segment.
> > Then, user can decide any calculation he prefers.
> >
> > >
> > > >
> > > >
> > > > > If so,  wouldn't it be more plausible to extend PMD itself to
> > > > > provide some extra statistics?
> > > > > Just a thought.
> > > >
> > > > Yes, may be interesting but it can be redundant work when the user
> > > > don't
> > > need it.
> > > >
> > > > >
> > > > > >
> > > > > > > Also what PMD should do if HW does supports LRO, but doesn't
> > > > > > > to information?
> > > > > >
> > > > > > If the PMD knows all the segments size he can calculate it, no?
> > > > > > 0 means PMD doesn't support it.
> > > > >
> > > > > I mean HW/PMD might support LRO, but doesn't provide information
> > > > > about number of coalesced segments.
> > > > > What PMD should do in that case?
> > > >
> > > > As I said, to set this field with 0 and set the PKT_RX_LRO flag in ol_flags.
> > > > 0 in this case means support LRO but cannot supply the segments num.
> > >
> > > Ok..., but then what for then to set PKT_RX_LRO at all?
> > > From PMD perspective it would be easier not to set that flag at all
> > > and not to touch tso_segsz.
> >
> > The user should know that LRO is working. LRO flag should be set in any
> case.
> 
> Well, then I think you trying to introduce a new requirement for PMD.

Yes, this is the patch purpose.

> Right now, as I can see it is optional, and supposed to be set only when PMD
> RX path updates tso_segsz.
> 
> /**
>  * When packets are coalesced by a hardware or virtual driver, this flag
>  * can be set in the RX mbuf, meaning that the m->tso_segsz field is
>  * valid and is set to the segment size of original packets.
>  */
> #define PKT_RX_LRO           (1ULL << 16)

Yes, need to be changed to:
/**
 * When packets are coalesced by a hardware or virtual driver, this flag
  * is set in the RX mbuf.
  */


> >
> > > >
> > > > Do you familiar with PMDs that supports LRO but cannot provide the
> > > segments num?
> > > > If so, what do these PMDs can provide instead?
> > >
> > > Yes, ixgbe PMD.
> > > It does support TCP_LRO offload, and when enabled, does coalesce the
> > > packets, but doesn't set PKT_RX_LRO and doesn't touch tso_segsz.
> >
> > I think it should be changed to set the flag.
> >
> > >
> > > >
> > > > > Still  set DEV_RX_OFFLOAD_TCP_LRO as enabled RX offload, but
> > > > > don't set PKT_RX_LRO flag in the RX-ed mbuf, even if it does
> > > > > contain coalesced packets?
> > > >
> > > > No, read above.
> > > >
> > > > > As I understand that what happens now.
> > > > > It is probably ok by me (as means no changes in ixgbe PMD)...
> > > > > But wouldn't that mean no defined way for the user to determine
> > > > > will HW/PMD provide that information or not?
> > > >
> > > > Will compare to 0, see above.
> > >
> > > I mean how the user will determine in advance would given PMD/HW
> > > provide that info in tso_segsz or not?
> > > Wait for the first LRO packet? Something else?
> >
> > Or wait to for the first LRO packet, or we can add a new ethdev capability
> for it.
> >
> > What do you think?
> 
> I still in doubt is it really worth to support that feature at all...
> Though if we'll decide to add it, then I think it needs to be a new capability
> DEV_RX_OFFLOAD_LRO_STAT (or so) and probably new mbuf.ol_flag value
> for it.

I don't think that new mbuf ol_flag should be introduced. Only capability.

We discussed on 2 topics:

1. Changing the LRO field meaning in mbuf. segs size => segs num.
2. Whether to set the PKT_RX_LRO when the PMD cannot supply the field but can  coalesce packets or not.

If we do only 1, the flag setting method can be stay as is.

Can you agree with 1? this is the main reason for this patch.

I think it is problematic that ixgbe PMD doesn't allow to the user to know whether the packet is coalesced or not.

IMO setting the PKT_RX_LRO flag and 0 in the LRO field is better.

> 
> Konstantin

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-08 11:16                 ` Matan Azrad
@ 2019-08-08 16:26                   ` Ananyev, Konstantin
  0 siblings, 0 replies; 21+ messages in thread
From: Ananyev, Konstantin @ 2019-08-08 16:26 UTC (permalink / raw)
  To: Matan Azrad, dev
  Cc: Thomas Monjalon, Yigit, Ferruh, Andrew Rybchenko, Olivier Matz



> Hi
> From: Ananyev, Konstantin
> > Hi Matan,
> >
> > > > > > > > >
> > > > > > > > > The API breakage is because the ``tso_segsz`` field was
> > > > > > > > > documented for LRO.
> > > > > > > > >
> > > > > > > > > The ``tso_segsz`` field in mbuf indicates the size of each
> > > > > > > > > segment in the LRO packet in Rx path and should be
> > > > > > > > > provided by the LRO packet port.
> > > > > > > > >
> > > > > > > > > While the generic LRO packet may aggregate different
> > > > > > > > > segments sizes in one packet, it is impossible to expose
> > > > > > > > > this information for each segment by one field and it
> > > > > > > > > doesn't make sense to expose all the segments sizes in the
> > mbuf.
> > > > > > > > >
> > > > > > > > > A new field may be added as union with the above field to
> > > > > > > > > expose the number of segments aggregated in the LRO packet.
> > > > > > > > >
> > > > > > > > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > > > > > > > ---
> > > > > > > > >  doc/guides/rel_notes/deprecation.rst | 4 ++++
> > > > > > > > >  1 file changed, 4 insertions(+)
> > > > > > > > >
> > > > > > > > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > > > > > > > b/doc/guides/rel_notes/deprecation.rst
> > > > > > > > > index c0cd9bc..e826b69 100644
> > > > > > > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > > > > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > > > > > > @@ -45,6 +45,10 @@ Deprecation Notices
> > > > > > > > >    - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_parse``
> > > > > > > > >    - ``rte_eal_compare_pci_addr`` replaced by
> > > > > > > > > ``rte_pci_addr_cmp``
> > > > > > > > >
> > > > > > > > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO
> > > > support.
> > > > > > > > > +Use union
> > > > > > > > > +  block for the field memory to be shared with a new
> > > > > > > > > +field ``lro_segs_n``
> > > > > > > > > +  indicates the number of segments aggregated in the LRO
> > packet.
> > > > > > > > > +
> > > > > > > >
> > > > > > > > Wonder how the upper layer will use that information (except
> > > > > > > > for
> > > > stats)?
> > > > > > > > Could you guys provide any examples?
> > > > > > >
> > > > > > > 1. Stats, allow to calc accurate PPS.
> > > > > > > 2. Supply accurate information unlike the seg size which
> > > > > > > cannot be
> > > > > > accurate.
> > > > > > > 2. Let the user all the information (segs num allow an average
> > > > > > > seg size calculation)
> > > > > >
> > > > > > So just for stats, right?
> > > > >
> > > > > Stats it is one option.
> > > > >
> > > > > The user configured LRO, means he wants X > 1 packets to be
> > > > > aggregated
> > > > by the port.
> > > > >
> > > > > Don't you think X is interesting for the user?
> > > > >
> > > > > For example, maybe there is Y for the next calculation:
> > > > >
> > > > > If average(X) < Y:
> > > > > 	Stop LRO - not very good for performance to aggregate small
> > > > > number
> > > > of packets - stop LRO.
> > > > >
> > > >
> > > > Might be, but I think user can use other metrics (let say average
> > > > aggregated packet size) for that purpose.
> > >
> > > Yes, but I think it is better to supply the segs number which is an accurate
> > number instead of average size of segment.
> > > Then, user can decide any calculation he prefers.
> > >
> > > >
> > > > >
> > > > >
> > > > > > If so,  wouldn't it be more plausible to extend PMD itself to
> > > > > > provide some extra statistics?
> > > > > > Just a thought.
> > > > >
> > > > > Yes, may be interesting but it can be redundant work when the user
> > > > > don't
> > > > need it.
> > > > >
> > > > > >
> > > > > > >
> > > > > > > > Also what PMD should do if HW does supports LRO, but doesn't
> > > > > > > > to information?
> > > > > > >
> > > > > > > If the PMD knows all the segments size he can calculate it, no?
> > > > > > > 0 means PMD doesn't support it.
> > > > > >
> > > > > > I mean HW/PMD might support LRO, but doesn't provide information
> > > > > > about number of coalesced segments.
> > > > > > What PMD should do in that case?
> > > > >
> > > > > As I said, to set this field with 0 and set the PKT_RX_LRO flag in ol_flags.
> > > > > 0 in this case means support LRO but cannot supply the segments num.
> > > >
> > > > Ok..., but then what for then to set PKT_RX_LRO at all?
> > > > From PMD perspective it would be easier not to set that flag at all
> > > > and not to touch tso_segsz.
> > >
> > > The user should know that LRO is working. LRO flag should be set in any
> > case.
> >
> > Well, then I think you trying to introduce a new requirement for PMD.
> 
> Yes, this is the patch purpose.
> 
> > Right now, as I can see it is optional, and supposed to be set only when PMD
> > RX path updates tso_segsz.
> >
> > /**
> >  * When packets are coalesced by a hardware or virtual driver, this flag
> >  * can be set in the RX mbuf, meaning that the m->tso_segsz field is
> >  * valid and is set to the segment size of original packets.
> >  */
> > #define PKT_RX_LRO           (1ULL << 16)
> 
> Yes, need to be changed to:
> /**
>  * When packets are coalesced by a hardware or virtual driver, this flag
>   * is set in the RX mbuf.
>   */
> 
> 
> > >
> > > > >
> > > > > Do you familiar with PMDs that supports LRO but cannot provide the
> > > > segments num?
> > > > > If so, what do these PMDs can provide instead?
> > > >
> > > > Yes, ixgbe PMD.
> > > > It does support TCP_LRO offload, and when enabled, does coalesce the
> > > > packets, but doesn't set PKT_RX_LRO and doesn't touch tso_segsz.
> > >
> > > I think it should be changed to set the flag.
> > >
> > > >
> > > > >
> > > > > > Still  set DEV_RX_OFFLOAD_TCP_LRO as enabled RX offload, but
> > > > > > don't set PKT_RX_LRO flag in the RX-ed mbuf, even if it does
> > > > > > contain coalesced packets?
> > > > >
> > > > > No, read above.
> > > > >
> > > > > > As I understand that what happens now.
> > > > > > It is probably ok by me (as means no changes in ixgbe PMD)...
> > > > > > But wouldn't that mean no defined way for the user to determine
> > > > > > will HW/PMD provide that information or not?
> > > > >
> > > > > Will compare to 0, see above.
> > > >
> > > > I mean how the user will determine in advance would given PMD/HW
> > > > provide that info in tso_segsz or not?
> > > > Wait for the first LRO packet? Something else?
> > >
> > > Or wait to for the first LRO packet, or we can add a new ethdev capability
> > for it.
> > >
> > > What do you think?
> >
> > I still in doubt is it really worth to support that feature at all...
> > Though if we'll decide to add it, then I think it needs to be a new capability
> > DEV_RX_OFFLOAD_LRO_STAT (or so) and probably new mbuf.ol_flag value
> > for it.
> 
> I don't think that new mbuf ol_flag should be introduced. Only capability.
> 
> We discussed on 2 topics:
> 
> 1. Changing the LRO field meaning in mbuf. segs size => segs num.
> 2. Whether to set the PKT_RX_LRO when the PMD cannot supply the field but can  coalesce packets or not.
> 
> If we do only 1, the flag setting method can be stay as is.
> 
> Can you agree with 1? this is the main reason for this patch.

Ok, NP with #1.

> 
> I think it is problematic that ixgbe PMD doesn't allow to the user to know whether the packet is coalesced or not.
> 
> IMO setting the PKT_RX_LRO flag and 0 in the LRO field is better.
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-06 18:17   ` Andrew Rybchenko
@ 2019-08-10 21:31     ` Thomas Monjalon
  2020-05-24 23:41       ` Thomas Monjalon
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Monjalon @ 2019-08-10 21:31 UTC (permalink / raw)
  To: Matan Azrad
  Cc: dev, Andrew Rybchenko, Ferruh Yigit, Konstantin Ananyev,
	Olivier Matz, Maxime Coquelin

06/08/2019 20:17, Andrew Rybchenko:
> On 8/6/19 5:56 PM, Matan Azrad wrote:
> > The API breakage is because the ``tso_segsz`` field was documented for
> > LRO.
> >
> > The ``tso_segsz`` field in mbuf indicates the size of each segment in
> > the LRO packet in Rx path and should be provided by the LRO packet
> > port.
> >
> > While the generic LRO packet may aggregate different segments sizes in
> > one packet, it is impossible to expose this information for each segment
> > by one field and it doesn't make sense to expose all the segments sizes
> > in the mbuf.
> >
> > A new field may be added as union with the above field to expose the
> > number of segments aggregated in the LRO packet.
> >
> > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > ---
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO support. Use union
> > +  block for the field memory to be shared with a new field ``lro_segs_n``
> > +  indicates the number of segments aggregated in the LRO packet.
> 
> I think that the number of segments is more logical in the case of LRO.
> The question (already asked by Konstantin) is why it is needed at all
> (statistics?). If so, it still makes sense.
> 
> Segment size is misleading here, since not all segments
> could be the same size. So,
> 
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> As far as I can see bnxt and qede do not fill it in.
> mlx5 and vmxnet3 have the number of segments (vmxnet3 has segment
> size sometimes and sometimes use a function to guess the value).
> So both will win from the change.
> It looks like virtio does not have number of segments. CC Maxime to
> comment.

I support improving the API for LRO.
Unfortunately, the consensus is not strong enough at the moment.
Anyway we should avoid any API breakage in 19.11,
so I suggest to do only non-breaking additions in 19.11 if possible:
	- fill a new unioned field for LRO segments number
	- not set PKT_RX_LRO (which is still related to tso_segsz)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] doc: announce ethdev ABI change for LRO fields
  2019-08-06 15:27 ` [dpdk-dev] [PATCH 1/2] doc: announce ethdev ABI change for LRO fields Andrew Rybchenko
@ 2019-08-10 21:40   ` Thomas Monjalon
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Monjalon @ 2019-08-10 21:40 UTC (permalink / raw)
  To: Matan Azrad
  Cc: dev, Andrew Rybchenko, Ferruh Yigit, Konstantin Ananyev, Olivier Matz

06/08/2019 17:27, Andrew Rybchenko:
> On 8/6/19 5:56 PM, Matan Azrad wrote:
> > It may be needed by the user to limit the LRO session packet size.
> > In order to allow the above limitation, a new Rx configuration may be
> > added for the maximum LRO session size.
> > 
> > A new capability may be added too to expose the maximum LRO session size
> > supported by the port.
> > 
> > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > ---
> > +* ethdev: new 32-bit fields may be added for maximum LRO session size, in
> > +  struct ``rte_eth_dev_info`` for the port capability and in struct
> > +  ``rte_eth_rxmode`` for the port configuration.
> 
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> I don't know examples when the information is required, but can imagine.

Acked-by: Thomas Monjalon <thomas@monjalon.net>

We have only 2 acks but as they are simple new fields,
better to announce their addition in advance and allow for more
discussion during 19.11 release cycle.

Applied (only patch 1 of 2)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-10 21:31     ` Thomas Monjalon
@ 2020-05-24 23:41       ` Thomas Monjalon
  2020-06-02  6:49         ` Matan Azrad
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Monjalon @ 2020-05-24 23:41 UTC (permalink / raw)
  To: Matan Azrad, Andrew Rybchenko, Olivier Matz, Maxime Coquelin
  Cc: dev, Ferruh Yigit, Konstantin Ananyev

10/08/2019 23:31, Thomas Monjalon:
> 06/08/2019 20:17, Andrew Rybchenko:
> > On 8/6/19 5:56 PM, Matan Azrad wrote:
> > > The API breakage is because the ``tso_segsz`` field was documented for
> > > LRO.
> > >
> > > The ``tso_segsz`` field in mbuf indicates the size of each segment in
> > > the LRO packet in Rx path and should be provided by the LRO packet
> > > port.
> > >
> > > While the generic LRO packet may aggregate different segments sizes in
> > > one packet, it is impossible to expose this information for each segment
> > > by one field and it doesn't make sense to expose all the segments sizes
> > > in the mbuf.
> > >
> > > A new field may be added as union with the above field to expose the
> > > number of segments aggregated in the LRO packet.
> > >
> > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > ---
> > > --- a/doc/guides/rel_notes/deprecation.rst
> > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO support. Use union
> > > +  block for the field memory to be shared with a new field ``lro_segs_n``
> > > +  indicates the number of segments aggregated in the LRO packet.
> > 
> > I think that the number of segments is more logical in the case of LRO.
> > The question (already asked by Konstantin) is why it is needed at all
> > (statistics?). If so, it still makes sense.
> > 
> > Segment size is misleading here, since not all segments
> > could be the same size. So,
> > 
> > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > 
> > As far as I can see bnxt and qede do not fill it in.
> > mlx5 and vmxnet3 have the number of segments (vmxnet3 has segment
> > size sometimes and sometimes use a function to guess the value).
> > So both will win from the change.
> > It looks like virtio does not have number of segments. CC Maxime to
> > comment.
> 
> I support improving the API for LRO.
> Unfortunately, the consensus is not strong enough at the moment.

We had no progress about LRO field in mbuf.
Is it a change we would like to have in 20.11?



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2020-05-24 23:41       ` Thomas Monjalon
@ 2020-06-02  6:49         ` Matan Azrad
  2020-07-27  8:00           ` Olivier Matz
  0 siblings, 1 reply; 21+ messages in thread
From: Matan Azrad @ 2020-06-02  6:49 UTC (permalink / raw)
  To: Thomas Monjalon, Andrew Rybchenko, Olivier Matz, Maxime Coquelin
  Cc: dev, Ferruh Yigit, Konstantin Ananyev

Hi

From: Thomas Monjalon
> 10/08/2019 23:31, Thomas Monjalon:
> > 06/08/2019 20:17, Andrew Rybchenko:
> > > On 8/6/19 5:56 PM, Matan Azrad wrote:
> > > > The API breakage is because the ``tso_segsz`` field was documented
> > > > for LRO.
> > > >
> > > > The ``tso_segsz`` field in mbuf indicates the size of each segment
> > > > in the LRO packet in Rx path and should be provided by the LRO
> > > > packet port.
> > > >
> > > > While the generic LRO packet may aggregate different segments
> > > > sizes in one packet, it is impossible to expose this information
> > > > for each segment by one field and it doesn't make sense to expose
> > > > all the segments sizes in the mbuf.
> > > >
> > > > A new field may be added as union with the above field to expose
> > > > the number of segments aggregated in the LRO packet.
> > > >
> > > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > > ---
> > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO
> > > > +support. Use union
> > > > +  block for the field memory to be shared with a new field
> > > > +``lro_segs_n``
> > > > +  indicates the number of segments aggregated in the LRO packet.
> > >
> > > I think that the number of segments is more logical in the case of LRO.
> > > The question (already asked by Konstantin) is why it is needed at
> > > all (statistics?). If so, it still makes sense.
> > >
> > > Segment size is misleading here, since not all segments could be the
> > > same size. So,
> > >
> > > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > >
> > > As far as I can see bnxt and qede do not fill it in.
> > > mlx5 and vmxnet3 have the number of segments (vmxnet3 has segment
> > > size sometimes and sometimes use a function to guess the value).
> > > So both will win from the change.
> > > It looks like virtio does not have number of segments. CC Maxime to
> > > comment.
> >
> > I support improving the API for LRO.
> > Unfortunately, the consensus is not strong enough at the moment.
> 
> We had no progress about LRO field in mbuf.
> Is it a change we would like to have in 20.11?
> 
+1 to make the change.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2020-06-02  6:49         ` Matan Azrad
@ 2020-07-27  8:00           ` Olivier Matz
  2020-07-27  8:41             ` Matan Azrad
  0 siblings, 1 reply; 21+ messages in thread
From: Olivier Matz @ 2020-07-27  8:00 UTC (permalink / raw)
  To: Matan Azrad
  Cc: Thomas Monjalon, Andrew Rybchenko, Maxime Coquelin, dev,
	Ferruh Yigit, Konstantin Ananyev

Hi,

On Tue, Jun 02, 2020 at 06:49:01AM +0000, Matan Azrad wrote:
> Hi
> 
> From: Thomas Monjalon
> > 10/08/2019 23:31, Thomas Monjalon:
> > > 06/08/2019 20:17, Andrew Rybchenko:
> > > > On 8/6/19 5:56 PM, Matan Azrad wrote:
> > > > > The API breakage is because the ``tso_segsz`` field was documented
> > > > > for LRO.
> > > > >
> > > > > The ``tso_segsz`` field in mbuf indicates the size of each segment
> > > > > in the LRO packet in Rx path and should be provided by the LRO
> > > > > packet port.
> > > > >
> > > > > While the generic LRO packet may aggregate different segments
> > > > > sizes in one packet, it is impossible to expose this information
> > > > > for each segment by one field and it doesn't make sense to expose
> > > > > all the segments sizes in the mbuf.
> > > > >
> > > > > A new field may be added as union with the above field to expose
> > > > > the number of segments aggregated in the LRO packet.
> > > > >
> > > > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > > > ---
> > > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO
> > > > > +support. Use union
> > > > > +  block for the field memory to be shared with a new field
> > > > > +``lro_segs_n``
> > > > > +  indicates the number of segments aggregated in the LRO packet.
> > > >
> > > > I think that the number of segments is more logical in the case of LRO.
> > > > The question (already asked by Konstantin) is why it is needed at
> > > > all (statistics?). If so, it still makes sense.
> > > >
> > > > Segment size is misleading here, since not all segments could be the
> > > > same size. So,
> > > >
> > > > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > > >
> > > > As far as I can see bnxt and qede do not fill it in.
> > > > mlx5 and vmxnet3 have the number of segments (vmxnet3 has segment
> > > > size sometimes and sometimes use a function to guess the value).
> > > > So both will win from the change.
> > > > It looks like virtio does not have number of segments. CC Maxime to
> > > > comment.
> > >
> > > I support improving the API for LRO.
> > > Unfortunately, the consensus is not strong enough at the moment.
> > 
> > We had no progress about LRO field in mbuf.
> > Is it a change we would like to have in 20.11?
> > 
> +1 to make the change.

Thinking about this, having the segment size for LRO is useful: it is
expected to give the size of the segments, except the last one. The
advantage of this is to be able to resegment exactly at the same MSS on
Tx (so it does not break PMTU). This is needed if you want to do a
bridge or a router with LRO enabled.

What is described above is more GRO than LRO. But today, it is possible
to do this with the virtio driver, so removing the segment size would
break this use case.

Regards,
Olivier

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2020-07-27  8:00           ` Olivier Matz
@ 2020-07-27  8:41             ` Matan Azrad
  2020-07-27  9:07               ` Olivier Matz
  0 siblings, 1 reply; 21+ messages in thread
From: Matan Azrad @ 2020-07-27  8:41 UTC (permalink / raw)
  To: Olivier Matz
  Cc: Thomas Monjalon, Andrew Rybchenko, Maxime Coquelin, dev,
	Ferruh Yigit, Konstantin Ananyev


Hi Olivier

From: Olivier Matz:
> Hi,
> 
> On Tue, Jun 02, 2020 at 06:49:01AM +0000, Matan Azrad wrote:
> > Hi
> >
> > From: Thomas Monjalon
> > > 10/08/2019 23:31, Thomas Monjalon:
> > > > 06/08/2019 20:17, Andrew Rybchenko:
> > > > > On 8/6/19 5:56 PM, Matan Azrad wrote:
> > > > > > The API breakage is because the ``tso_segsz`` field was
> > > > > > documented for LRO.
> > > > > >
> > > > > > The ``tso_segsz`` field in mbuf indicates the size of each
> > > > > > segment in the LRO packet in Rx path and should be provided by
> > > > > > the LRO packet port.
> > > > > >
> > > > > > While the generic LRO packet may aggregate different segments
> > > > > > sizes in one packet, it is impossible to expose this
> > > > > > information for each segment by one field and it doesn't make
> > > > > > sense to expose all the segments sizes in the mbuf.
> > > > > >
> > > > > > A new field may be added as union with the above field to
> > > > > > expose the number of segments aggregated in the LRO packet.
> > > > > >
> > > > > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > > > > ---
> > > > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO
> > > > > > +support. Use union
> > > > > > +  block for the field memory to be shared with a new field
> > > > > > +``lro_segs_n``
> > > > > > +  indicates the number of segments aggregated in the LRO packet.
> > > > >
> > > > > I think that the number of segments is more logical in the case of LRO.
> > > > > The question (already asked by Konstantin) is why it is needed
> > > > > at all (statistics?). If so, it still makes sense.
> > > > >
> > > > > Segment size is misleading here, since not all segments could be
> > > > > the same size. So,
> > > > >
> > > > > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > > > >
> > > > > As far as I can see bnxt and qede do not fill it in.
> > > > > mlx5 and vmxnet3 have the number of segments (vmxnet3 has
> > > > > segment size sometimes and sometimes use a function to guess the
> value).
> > > > > So both will win from the change.
> > > > > It looks like virtio does not have number of segments. CC Maxime
> > > > > to comment.
> > > >
> > > > I support improving the API for LRO.
> > > > Unfortunately, the consensus is not strong enough at the moment.
> > >
> > > We had no progress about LRO field in mbuf.
> > > Is it a change we would like to have in 20.11?
> > >
> > +1 to make the change.
> 
> Thinking about this, having the segment size for LRO is useful: it is expected
> to give the size of the segments, except the last one. The advantage of this is
> to be able to resegment exactly at the same MSS on Tx (so it does not break
> PMTU). This is needed if you want to do a bridge or a router with LRO
> enabled.

Yes, you right it may be useful.

I don't familiar with other vendors, but mlx5 HWs supply the number of segments aggregated by the HW and doesn't assume all the head segments are in the same size.

So, we just put in the current field packet_size/num of segments.

So, maybe we need the 2 options as uinion or as 2 separated fields to be more accurate.

> What is described above is more GRO than LRO. But today, it is possible to do
> this with the virtio driver, so removing the segment size would break this use
> case.
> 
> Regards,
> Olivier

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2020-07-27  8:41             ` Matan Azrad
@ 2020-07-27  9:07               ` Olivier Matz
  0 siblings, 0 replies; 21+ messages in thread
From: Olivier Matz @ 2020-07-27  9:07 UTC (permalink / raw)
  To: Matan Azrad
  Cc: Thomas Monjalon, Andrew Rybchenko, Maxime Coquelin, dev,
	Ferruh Yigit, Konstantin Ananyev

On Mon, Jul 27, 2020 at 08:41:47AM +0000, Matan Azrad wrote:
> 
> Hi Olivier
> 
> From: Olivier Matz:
> > Hi,
> > 
> > On Tue, Jun 02, 2020 at 06:49:01AM +0000, Matan Azrad wrote:
> > > Hi
> > >
> > > From: Thomas Monjalon
> > > > 10/08/2019 23:31, Thomas Monjalon:
> > > > > 06/08/2019 20:17, Andrew Rybchenko:
> > > > > > On 8/6/19 5:56 PM, Matan Azrad wrote:
> > > > > > > The API breakage is because the ``tso_segsz`` field was
> > > > > > > documented for LRO.
> > > > > > >
> > > > > > > The ``tso_segsz`` field in mbuf indicates the size of each
> > > > > > > segment in the LRO packet in Rx path and should be provided by
> > > > > > > the LRO packet port.
> > > > > > >
> > > > > > > While the generic LRO packet may aggregate different segments
> > > > > > > sizes in one packet, it is impossible to expose this
> > > > > > > information for each segment by one field and it doesn't make
> > > > > > > sense to expose all the segments sizes in the mbuf.
> > > > > > >
> > > > > > > A new field may be added as union with the above field to
> > > > > > > expose the number of segments aggregated in the LRO packet.
> > > > > > >
> > > > > > > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > > > > > > ---
> > > > > > > --- a/doc/guides/rel_notes/deprecation.rst
> > > > > > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > > > > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO
> > > > > > > +support. Use union
> > > > > > > +  block for the field memory to be shared with a new field
> > > > > > > +``lro_segs_n``
> > > > > > > +  indicates the number of segments aggregated in the LRO packet.
> > > > > >
> > > > > > I think that the number of segments is more logical in the case of LRO.
> > > > > > The question (already asked by Konstantin) is why it is needed
> > > > > > at all (statistics?). If so, it still makes sense.
> > > > > >
> > > > > > Segment size is misleading here, since not all segments could be
> > > > > > the same size. So,
> > > > > >
> > > > > > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > > > > >
> > > > > > As far as I can see bnxt and qede do not fill it in.
> > > > > > mlx5 and vmxnet3 have the number of segments (vmxnet3 has
> > > > > > segment size sometimes and sometimes use a function to guess the
> > value).
> > > > > > So both will win from the change.
> > > > > > It looks like virtio does not have number of segments. CC Maxime
> > > > > > to comment.
> > > > >
> > > > > I support improving the API for LRO.
> > > > > Unfortunately, the consensus is not strong enough at the moment.
> > > >
> > > > We had no progress about LRO field in mbuf.
> > > > Is it a change we would like to have in 20.11?
> > > >
> > > +1 to make the change.
> > 
> > Thinking about this, having the segment size for LRO is useful: it is expected
> > to give the size of the segments, except the last one. The advantage of this is
> > to be able to resegment exactly at the same MSS on Tx (so it does not break
> > PMTU). This is needed if you want to do a bridge or a router with LRO
> > enabled.
> 
> Yes, you right it may be useful.
> 
> I don't familiar with other vendors, but mlx5 HWs supply the number of segments aggregated by the HW and doesn't assume all the head segments are in the same size.
> 
> So, we just put in the current field packet_size/num of segments.
> 
> So, maybe we need the 2 options as uinion or as 2 separated fields to be more accurate.

Yes.

Having ethdev capas would help to know what the PMD can do (basically,
reassembly of same segment sizes or not).

Renaming PKT_RX_LRO to PKT_RX_LRO_SEGSIZE could make sense, and the new
one PKT_RX_LRO_PKTNUM could be added in case the packet number is
provided. I have no strong opinion about union vs 2 separate fields.

If a new field is added, I think we should prefer a dynamic mbuf field.


> 
> > What is described above is more GRO than LRO. But today, it is possible to do
> > this with the virtio driver, so removing the segment size would break this use
> > case.
> > 
> > Regards,
> > Olivier

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO
  2019-08-06 14:56 ` [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO Matan Azrad
  2019-08-06 15:58   ` Ananyev, Konstantin
  2019-08-06 18:17   ` Andrew Rybchenko
@ 2023-06-12 16:38   ` Stephen Hemminger
  2 siblings, 0 replies; 21+ messages in thread
From: Stephen Hemminger @ 2023-06-12 16:38 UTC (permalink / raw)
  To: Matan Azrad
  Cc: dev, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko,
	Konstantin Ananyev, Olivier Matz

On Tue,  6 Aug 2019 14:56:23 +0000
Matan Azrad <matan@mellanox.com> wrote:

> The API breakage is because the ``tso_segsz`` field was documented for
> LRO.
> 
> The ``tso_segsz`` field in mbuf indicates the size of each segment in
> the LRO packet in Rx path and should be provided by the LRO packet
> port.
> 
> While the generic LRO packet may aggregate different segments sizes in
> one packet, it is impossible to expose this information for each segment
> by one field and it doesn't make sense to expose all the segments sizes
> in the mbuf.
> 
> A new field may be added as union with the above field to expose the
> number of segments aggregated in the LRO packet.
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>

I assume LRO worked out how to use dynamic field for this.
And the rest of this patchset is no longer relevant.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2023-06-12 16:38 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-06 14:56 [dpdk-dev] [PATCH 1/2] doc: announce ethdev ABI change for LRO fields Matan Azrad
2019-08-06 14:56 ` [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO Matan Azrad
2019-08-06 15:58   ` Ananyev, Konstantin
2019-08-06 18:50     ` Matan Azrad
2019-08-07 10:17       ` Ananyev, Konstantin
2019-08-07 12:35         ` Matan Azrad
2019-08-07 14:18           ` Ananyev, Konstantin
2019-08-08 10:16             ` Matan Azrad
2019-08-08 10:48               ` Ananyev, Konstantin
2019-08-08 11:16                 ` Matan Azrad
2019-08-08 16:26                   ` Ananyev, Konstantin
2019-08-06 18:17   ` Andrew Rybchenko
2019-08-10 21:31     ` Thomas Monjalon
2020-05-24 23:41       ` Thomas Monjalon
2020-06-02  6:49         ` Matan Azrad
2020-07-27  8:00           ` Olivier Matz
2020-07-27  8:41             ` Matan Azrad
2020-07-27  9:07               ` Olivier Matz
2023-06-12 16:38   ` Stephen Hemminger
2019-08-06 15:27 ` [dpdk-dev] [PATCH 1/2] doc: announce ethdev ABI change for LRO fields Andrew Rybchenko
2019-08-10 21:40   ` Thomas Monjalon

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