mbox series

[v3,0/2] enhance bonding PMD to support the LACP negotiation

Message ID 20230301024826.885727-1-chaoyong.he@corigine.com (mailing list archive)
Headers
Series enhance bonding PMD to support the LACP negotiation |

Message

Chaoyong He March 1, 2023, 2:48 a.m. UTC
  App may not support the LACP negotiation in some cases.
This patch series solves this problem and add logics to
testpmd app to support the forward of bonding port in
mode 4 with the disabled dedicated queue.

---
v2:
* Export symbol to solve the link problem.
v3:
* Add 'rte_experimental' flags to new add API.
* Move '#ifdef RTE_NET_BOND' into function.
* Replace 'slave' with 'member' in new add logic.
---

Long Wu (2):
  net/bonding: add independent LACP sending function
  app/testpmd: add support for bonding port's LACP negotiation

 app/test-pmd/config.c                     | 19 ++++++++
 app/test-pmd/parameters.c                 |  4 ++
 app/test-pmd/testpmd.c                    | 37 +++++++++++++++
 app/test-pmd/testpmd.h                    |  4 ++
 doc/guides/testpmd_app_ug/run_app.rst     |  4 ++
 drivers/net/bonding/rte_eth_bond_8023ad.c | 58 +++++++++++++++++++++++
 drivers/net/bonding/rte_eth_bond_8023ad.h | 21 ++++++++
 drivers/net/bonding/version.map           |  8 ++++
 8 files changed, 155 insertions(+)
  

Comments

Niklas Söderlund March 15, 2023, 12:03 p.m. UTC | #1
Hi all,

A gentle ping on this series.

On 2023-03-01 10:48:24 +0800, Chaoyong He wrote:
> App may not support the LACP negotiation in some cases.
> This patch series solves this problem and add logics to
> testpmd app to support the forward of bonding port in
> mode 4 with the disabled dedicated queue.
> 
> ---
> v2:
> * Export symbol to solve the link problem.
> v3:
> * Add 'rte_experimental' flags to new add API.
> * Move '#ifdef RTE_NET_BOND' into function.
> * Replace 'slave' with 'member' in new add logic.
> ---
> 
> Long Wu (2):
>   net/bonding: add independent LACP sending function
>   app/testpmd: add support for bonding port's LACP negotiation
> 
>  app/test-pmd/config.c                     | 19 ++++++++
>  app/test-pmd/parameters.c                 |  4 ++
>  app/test-pmd/testpmd.c                    | 37 +++++++++++++++
>  app/test-pmd/testpmd.h                    |  4 ++
>  doc/guides/testpmd_app_ug/run_app.rst     |  4 ++
>  drivers/net/bonding/rte_eth_bond_8023ad.c | 58 +++++++++++++++++++++++
>  drivers/net/bonding/rte_eth_bond_8023ad.h | 21 ++++++++
>  drivers/net/bonding/version.map           |  8 ++++
>  8 files changed, 155 insertions(+)
> 
> -- 
> 2.39.1
>
  
Chaoyong He May 12, 2023, 1:50 a.m. UTC | #2
A gentle ping on this series.

There has a large patch series enhance the bonding PMD depends on this series is waiting for send out, it would be kind if this could be looked at early in this release cycle.

> -----Original Message-----
> From: Chaoyong He
> Sent: Wednesday, March 1, 2023 10:49 AM
> To: dev@dpdk.org
> Cc: oss-drivers <oss-drivers@corigine.com>; Niklas Soderlund
> <niklas.soderlund@corigine.com>; Chaoyong He
> <chaoyong.he@corigine.com>
> Subject: [PATCH v3 0/2] enhance bonding PMD to support the LACP
> negotiation
> 
> App may not support the LACP negotiation in some cases.
> This patch series solves this problem and add logics to testpmd app to support
> the forward of bonding port in mode 4 with the disabled dedicated queue.
> 
> ---
> v2:
> * Export symbol to solve the link problem.
> v3:
> * Add 'rte_experimental' flags to new add API.
> * Move '#ifdef RTE_NET_BOND' into function.
> * Replace 'slave' with 'member' in new add logic.
> ---
> 
> Long Wu (2):
>   net/bonding: add independent LACP sending function
>   app/testpmd: add support for bonding port's LACP negotiation
> 
>  app/test-pmd/config.c                     | 19 ++++++++
>  app/test-pmd/parameters.c                 |  4 ++
>  app/test-pmd/testpmd.c                    | 37 +++++++++++++++
>  app/test-pmd/testpmd.h                    |  4 ++
>  doc/guides/testpmd_app_ug/run_app.rst     |  4 ++
>  drivers/net/bonding/rte_eth_bond_8023ad.c | 58
> +++++++++++++++++++++++  drivers/net/bonding/rte_eth_bond_8023ad.h
> | 21 ++++++++
>  drivers/net/bonding/version.map           |  8 ++++
>  8 files changed, 155 insertions(+)
> 
> --
> 2.39.1
  
Chaoyong He June 6, 2023, 1:23 a.m. UTC | #3
A gentle ping on this series.

> -----Original Message-----
> From: Chaoyong He
> Sent: Friday, May 12, 2023 9:51 AM
> To: dev@dpdk.org
> Cc: oss-drivers <oss-drivers@corigine.com>; Niklas Soderlund
> <niklas.soderlund@corigine.com>
> Subject: RE: [PATCH v3 0/2] enhance bonding PMD to support the LACP
> negotiation
> 
> A gentle ping on this series.
> 
> There has a large patch series enhance the bonding PMD depends on this
> series is waiting for send out, it would be kind if this could be looked at early in
> this release cycle.
> 
> > -----Original Message-----
> > From: Chaoyong He
> > Sent: Wednesday, March 1, 2023 10:49 AM
> > To: dev@dpdk.org
> > Cc: oss-drivers <oss-drivers@corigine.com>; Niklas Soderlund
> > <niklas.soderlund@corigine.com>; Chaoyong He
> > <chaoyong.he@corigine.com>
> > Subject: [PATCH v3 0/2] enhance bonding PMD to support the LACP
> > negotiation
> >
> > App may not support the LACP negotiation in some cases.
> > This patch series solves this problem and add logics to testpmd app to
> > support the forward of bonding port in mode 4 with the disabled dedicated
> queue.
> >
> > ---
> > v2:
> > * Export symbol to solve the link problem.
> > v3:
> > * Add 'rte_experimental' flags to new add API.
> > * Move '#ifdef RTE_NET_BOND' into function.
> > * Replace 'slave' with 'member' in new add logic.
> > ---
> >
> > Long Wu (2):
> >   net/bonding: add independent LACP sending function
> >   app/testpmd: add support for bonding port's LACP negotiation
> >
> >  app/test-pmd/config.c                     | 19 ++++++++
> >  app/test-pmd/parameters.c                 |  4 ++
> >  app/test-pmd/testpmd.c                    | 37 +++++++++++++++
> >  app/test-pmd/testpmd.h                    |  4 ++
> >  doc/guides/testpmd_app_ug/run_app.rst     |  4 ++
> >  drivers/net/bonding/rte_eth_bond_8023ad.c | 58
> > +++++++++++++++++++++++
> drivers/net/bonding/rte_eth_bond_8023ad.h
> > | 21 ++++++++
> >  drivers/net/bonding/version.map           |  8 ++++
> >  8 files changed, 155 insertions(+)
> >
> > --
> > 2.39.1
  
Ferruh Yigit June 6, 2023, 4:48 p.m. UTC | #4
On 6/6/2023 2:23 AM, Chaoyong He wrote:
> A gentle ping on this series.
> 
>> -----Original Message-----
>> From: Chaoyong He
>> Sent: Friday, May 12, 2023 9:51 AM
>> To: dev@dpdk.org
>> Cc: oss-drivers <oss-drivers@corigine.com>; Niklas Soderlund
>> <niklas.soderlund@corigine.com>
>> Subject: RE: [PATCH v3 0/2] enhance bonding PMD to support the LACP
>> negotiation
>>
>> A gentle ping on this series.
>>
>> There has a large patch series enhance the bonding PMD depends on this
>> series is waiting for send out, it would be kind if this could be looked at early in
>> this release cycle.
>>
>>> -----Original Message-----
>>> From: Chaoyong He
>>> Sent: Wednesday, March 1, 2023 10:49 AM
>>> To: dev@dpdk.org
>>> Cc: oss-drivers <oss-drivers@corigine.com>; Niklas Soderlund
>>> <niklas.soderlund@corigine.com>; Chaoyong He
>>> <chaoyong.he@corigine.com>
>>> Subject: [PATCH v3 0/2] enhance bonding PMD to support the LACP
>>> negotiation
>>>
>>> App may not support the LACP negotiation in some cases.
>>> This patch series solves this problem and add logics to testpmd app to
>>> support the forward of bonding port in mode 4 with the disabled dedicated
>> queue.
>>>
>>> ---
>>> v2:
>>> * Export symbol to solve the link problem.
>>> v3:
>>> * Add 'rte_experimental' flags to new add API.
>>> * Move '#ifdef RTE_NET_BOND' into function.
>>> * Replace 'slave' with 'member' in new add logic.
>>> ---
>>>
>>> Long Wu (2):
>>>   net/bonding: add independent LACP sending function
>>>   app/testpmd: add support for bonding port's LACP negotiation
>>>
>>>  app/test-pmd/config.c                     | 19 ++++++++
>>>  app/test-pmd/parameters.c                 |  4 ++
>>>  app/test-pmd/testpmd.c                    | 37 +++++++++++++++
>>>  app/test-pmd/testpmd.h                    |  4 ++
>>>  doc/guides/testpmd_app_ug/run_app.rst     |  4 ++
>>>  drivers/net/bonding/rte_eth_bond_8023ad.c | 58
>>> +++++++++++++++++++++++
>> drivers/net/bonding/rte_eth_bond_8023ad.h
>>> | 21 ++++++++
>>>  drivers/net/bonding/version.map           |  8 ++++
>>>  8 files changed, 155 insertions(+)
>>>
>>> --
>>> 2.39.1
> 

Hi Chaoyong,

Sorry for the delay, bonding maintainers are cc'ed.

I can see this set adds new bonding specific APIs, instead can't
application (in this case testpmd) call bonding Tx function explicitly
to handle LACP packets?

Or should we have a special forwarding mode for bonding, as we have one
for ICMP echo?
  
Chaoyong He June 7, 2023, 3:10 a.m. UTC | #5
> On 6/6/2023 2:23 AM, Chaoyong He wrote:
> > A gentle ping on this series.
...
> >>> Long Wu (2):
> >>>   net/bonding: add independent LACP sending function
> >>>   app/testpmd: add support for bonding port's LACP negotiation
> >>>
> >>>  app/test-pmd/config.c                     | 19 ++++++++
> >>>  app/test-pmd/parameters.c                 |  4 ++
> >>>  app/test-pmd/testpmd.c                    | 37 +++++++++++++++
> >>>  app/test-pmd/testpmd.h                    |  4 ++
> >>>  doc/guides/testpmd_app_ug/run_app.rst     |  4 ++
> >>>  drivers/net/bonding/rte_eth_bond_8023ad.c | 58
> >>> +++++++++++++++++++++++
> >> drivers/net/bonding/rte_eth_bond_8023ad.h
> >>> | 21 ++++++++
> >>>  drivers/net/bonding/version.map           |  8 ++++
> >>>  8 files changed, 155 insertions(+)
> >>>
> >>> --
> >>> 2.39.1
> >
> 
> Hi Chaoyong,
> 
> Sorry for the delay, bonding maintainers are cc'ed.
> 
> I can see this set adds new bonding specific APIs, instead can't application (in
> this case testpmd) call bonding Tx function explicitly to handle LACP packets?

Actually, I think apps should not aware of LACP packets because these packets are stored by bonding pmd(port->tx_ring). 

> Or should we have a special forwarding mode for bonding, as we have one for
> ICMP echo?

Yes, both ICMP and LACP are protocol. But LACP is related to a type of port (bonding port in mode4).
Of course, we can add a special forwarding mode for bonding, but that will make it valid in very narrow situation.

What I really want is to support mode4 bonding port on every forward mode of testpmd, and I also want to treat dpdk bonding port as a regular NIC.
  
Ferruh Yigit June 23, 2023, 1:32 p.m. UTC | #6
On 6/7/2023 4:10 AM, Chaoyong He wrote:
>> On 6/6/2023 2:23 AM, Chaoyong He wrote:
>>> A gentle ping on this series.
> ...
>>>>> Long Wu (2):
>>>>>   net/bonding: add independent LACP sending function
>>>>>   app/testpmd: add support for bonding port's LACP negotiation
>>>>>
>>>>>  app/test-pmd/config.c                     | 19 ++++++++
>>>>>  app/test-pmd/parameters.c                 |  4 ++
>>>>>  app/test-pmd/testpmd.c                    | 37 +++++++++++++++
>>>>>  app/test-pmd/testpmd.h                    |  4 ++
>>>>>  doc/guides/testpmd_app_ug/run_app.rst     |  4 ++
>>>>>  drivers/net/bonding/rte_eth_bond_8023ad.c | 58
>>>>> +++++++++++++++++++++++
>>>> drivers/net/bonding/rte_eth_bond_8023ad.h
>>>>> | 21 ++++++++
>>>>>  drivers/net/bonding/version.map           |  8 ++++
>>>>>  8 files changed, 155 insertions(+)
>>>>>
>>>>> --
>>>>> 2.39.1
>>>
>>
>> Hi Chaoyong,
>>
>> Sorry for the delay, bonding maintainers are cc'ed.
>>
>> I can see this set adds new bonding specific APIs, instead can't application (in
>> this case testpmd) call bonding Tx function explicitly to handle LACP packets?
> 
> Actually, I think apps should not aware of LACP packets because these packets are stored by bonding pmd(port->tx_ring). 
> 
>> Or should we have a special forwarding mode for bonding, as we have one for
>> ICMP echo?
> 
> Yes, both ICMP and LACP are protocol. But LACP is related to a type of port (bonding port in mode4).
> Of course, we can add a special forwarding mode for bonding, but that will make it valid in very narrow situation.
> 
> What I really want is to support mode4 bonding port on every forward mode of testpmd, and I also want to treat dpdk bonding port as a regular NIC.
> 

It makes sense to make bonding work as regular NIC and supported by all
forwarding modes.
But current patch adds bonding specific check to the shared forwarding
function, that is not good I think.

If application doesn't need to know about LACP packages, or if there is
no decision making required by application, can we handle LACP packets
within bonding PMD, transparent to application?

Chas, Connor, what do you think?
  
humin (Q) June 25, 2023, 1:32 a.m. UTC | #7
Hi, Ferruh,

在 2023/6/23 21:32, Ferruh Yigit 写道:
> On 6/7/2023 4:10 AM, Chaoyong He wrote:
>>> On 6/6/2023 2:23 AM, Chaoyong He wrote:
>>>> A gentle ping on this series.
>> ...
>>>>>> Long Wu (2):
>>>>>>    net/bonding: add independent LACP sending function
>>>>>>    app/testpmd: add support for bonding port's LACP negotiation
>>>>>>
>>>>>>   app/test-pmd/config.c                     | 19 ++++++++
>>>>>>   app/test-pmd/parameters.c                 |  4 ++
>>>>>>   app/test-pmd/testpmd.c                    | 37 +++++++++++++++
>>>>>>   app/test-pmd/testpmd.h                    |  4 ++
>>>>>>   doc/guides/testpmd_app_ug/run_app.rst     |  4 ++
>>>>>>   drivers/net/bonding/rte_eth_bond_8023ad.c | 58
>>>>>> +++++++++++++++++++++++
>>>>> drivers/net/bonding/rte_eth_bond_8023ad.h
>>>>>> | 21 ++++++++
>>>>>>   drivers/net/bonding/version.map           |  8 ++++
>>>>>>   8 files changed, 155 insertions(+)
>>>>>>
>>>>>> --
>>>>>> 2.39.1
>>> Hi Chaoyong,
>>>
>>> Sorry for the delay, bonding maintainers are cc'ed.
>>>
>>> I can see this set adds new bonding specific APIs, instead can't application (in
>>> this case testpmd) call bonding Tx function explicitly to handle LACP packets?
>> Actually, I think apps should not aware of LACP packets because these packets are stored by bonding pmd(port->tx_ring).
>>
>>> Or should we have a special forwarding mode for bonding, as we have one for
>>> ICMP echo?
>> Yes, both ICMP and LACP are protocol. But LACP is related to a type of port (bonding port in mode4).
>> Of course, we can add a special forwarding mode for bonding, but that will make it valid in very narrow situation.
>>
>> What I really want is to support mode4 bonding port on every forward mode of testpmd, and I also want to treat dpdk bonding port as a regular NIC.
>>
> It makes sense to make bonding work as regular NIC and supported by all
> forwarding modes.
> But current patch adds bonding specific check to the shared forwarding
> function, that is not good I think.
>
> If application doesn't need to know about LACP packages, or if there is
> no decision making required by application, can we handle LACP packets
> within bonding PMD, transparent to application?
>
> Chas, Connor, what do you think?

Agree with you, Currently testpmd is too "big" to add specific check.

Also, private APIs should be restricted to add because we want to make

bonding device as a  regular NIC device.


>