[PATCH 0/2] add function to set dedicated queue size
Chaoyong He
chaoyong.he at corigine.com
Thu Jun 6 03:41:04 CEST 2024
> On Wed, 5 Jun 2024 13:55:18 +0800
> Chaoyong He <chaoyong.he at corigine.com> wrote:
>
> > This patch series mainly add a function to bonding PMD to set
> > dedicated queue size, also add a command to testpmd application to
> > invoke this function.
> >
> > At the same time, standard the log message of bonding PMD.
> >
> > Long Wu (2):
> > net/bonding: standard the log message
> > net/bonding: add command to set dedicated queue size
> >
> > .../link_bonding_poll_mode_drv_lib.rst | 8 ++
> > doc/guides/rel_notes/release_24_07.rst | 4 +
> > drivers/net/bonding/bonding_testpmd.c | 126 ++++++++++++++----
> > drivers/net/bonding/eth_bond_8023ad_private.h | 3 +
> > drivers/net/bonding/rte_eth_bond_8023ad.c | 39 ++++++
> > drivers/net/bonding/rte_eth_bond_8023ad.h | 23 ++++
> > drivers/net/bonding/rte_eth_bond_pmd.c | 6 +-
> > drivers/net/bonding/version.map | 1 +
> > 8 files changed, 185 insertions(+), 25 deletions(-)
> >
>
> This is confusing.
> The patch goes to all the effort to configure rx_queue_size but it is never
> actually used in the driver.
We do used it in the function 'member_configure_slow_queue()' of file 'drivers/net/bonding/rte_eth_bond_pmd.c'.
The original logic hardcodes the value of dedicated hardware Rx/Tx queue size into (128/512) and this will cause the
bonding port start fail if the NIC requires more Rx/Tx descriptors than the hardcoded number.
And this is the situation for our NFP card:
```
testpmd> port stop all
testpmd> create bonding device 4 0
testpmd> set bonding balance_xmit_policy 2 l34
testpmd> add bonding member 0 2
testpmd> add bonding member 1 2
testpmd> set bonding lacp dedicated_queues 2 enable
testpmd> show bonding config 2
testpmd> port start 2
Configuring Port 2 (socket 0)
ETHDEV: Device with port_id=0 already stopped
ETHDEV: Device with port_id=1 already stopped
ETHDEV: Device with port_id=0 already stopped
ETHDEV: Invalid value for nb_rx_desc(=128), should be: <= 32768, >= 512, and a product of 128
member_configure_slow_queue(1699) - rte_eth_rx_queue_setup: port=0 queue_id 1, err (-22)
ETHDEV: Device with port_id=1 already stopped
ETHDEV: Invalid value for nb_rx_desc(=128), should be: <= 32768, >= 512, and a product of 128
member_configure_slow_queue(1699) - rte_eth_rx_queue_setup: port=1 queue_id 1, err (-22)
Port 2: 88:3C:C5:A0:32:46
Checking link statuses...
Done
```
And if apply this patch and configure the 'rx_queue_size', then we can start the bonding port successfully.
More information about the dev
mailing list