numam-dpdk/drivers/net/bonding
Chengwen Feng c622735dd3 net/bonding: call Tx prepare before Tx burst
Normally, to use the HW offloads capability (e.g. checksum and TSO) in
the Tx direction, the application needs to call rte_eth_tx_prepare() to
do some adjustment with the packets before sending them. But the
tx_prepare callback of the bonding driver is not implemented. Therefore,
the sent packets may have errors (e.g. checksum errors).

However, it is difficult to design the tx_prepare callback for bonding
driver. Because when a bonded device sends packets, the bonded device
allocates the packets to different slave devices based on the real-time
link status and bonding mode. That is, it is very difficult for the
bonded device to determine which slave device's prepare function should
be invoked.

So in this patch, the tx_prepare callback of bonding driver is not
implemented. Instead, the rte_eth_tx_prepare() will be called before
rte_eth_tx_burst(). In this way, all tx_offloads can be processed
correctly for all NIC devices.

Note: because it is rara that bond different PMDs together, so just
call tx-prepare once in broadcast bonding mode.

Also the following description was added to the rte_eth_tx_burst()
function:
"@note This function must not modify mbufs (including packets data)
unless the refcnt is 1. The exception is the bonding PMD, which does not
have tx-prepare function, in this case, mbufs maybe modified."

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Chas Williams <3chas3@gmail.com>
2022-10-20 08:36:34 +02:00
..
bonding_testpmd.c net/bonding: move testpmd commands 2022-06-20 19:48:39 +02:00
eth_bond_8023ad_private.h fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
eth_bond_private.h net/bonding: add link speeds configuration 2022-10-17 10:20:30 +02:00
meson.build drivers: mark SW PMDs to support disabling IOVA as PA 2022-10-09 13:14:57 +02:00
rte_eth_bond_8023ad.c net/bonding: call Tx prepare before Tx burst 2022-10-20 08:36:34 +02:00
rte_eth_bond_8023ad.h fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
rte_eth_bond_alb.c net: rename Ethernet header fields 2021-10-08 14:58:11 +02:00
rte_eth_bond_alb.h fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
rte_eth_bond_api.c net/bonding: add link speeds configuration 2022-10-17 10:20:30 +02:00
rte_eth_bond_args.c bus: hide bus object 2022-09-23 16:14:34 +02:00
rte_eth_bond_flow.c eal: remove sys/queue.h from public headers 2021-10-01 13:09:43 +02:00
rte_eth_bond_pmd.c net/bonding: call Tx prepare before Tx burst 2022-10-20 08:36:34 +02:00
rte_eth_bond.h net: add rte prefix to ether structures 2019-05-24 13:34:45 +02:00
version.map version: 22.11-rc0 2022-07-21 12:13:48 +02:00