numam-dpdk/lib/ethdev
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
..
ethdev_driver.c eal: deprecate RTE_FUNC_PTR_* macros 2022-09-23 16:14:34 +02:00
ethdev_driver.h ethdev: introduce protocol header API 2022-10-09 16:41:24 +02:00
ethdev_pci.h bus/pci: make driver-only headers private 2022-09-23 16:14:34 +02:00
ethdev_private.c remove extra blank line at EOF 2022-02-27 21:26:06 +01:00
ethdev_private.h ethdev: support congestion management 2022-10-07 11:50:28 +02:00
ethdev_profile.c ethdev: fix Ethernet spelling 2021-10-21 13:43:56 +02:00
ethdev_profile.h ethdev: fix build with vtune option 2022-05-12 10:23:52 +02:00
ethdev_trace_points.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
ethdev_vdev.h bus/vdev: make driver-only headers private 2022-09-23 16:14:34 +02:00
meson.build ethdev: support congestion management 2022-10-07 11:50:28 +02:00
rte_class_eth.c eal: remove unneeded includes from a public header 2022-09-21 15:31:03 +02:00
rte_cman.h ethdev: support congestion management 2022-10-07 11:50:28 +02:00
rte_dev_info.h ethdev: add missing C++ guards 2022-02-22 14:47:49 +01:00
rte_eth_ctrl.h ethdev: fix Rx/Tx spelling 2021-10-21 13:43:56 +02:00
rte_ethdev_cman.c ethdev: support congestion management 2022-10-07 11:50:28 +02:00
rte_ethdev_core.h ethdev: fix Rx/Tx spelling 2021-10-21 13:43:56 +02:00
rte_ethdev_trace_fp.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_ethdev_trace.h ethdev: fix max Rx packet length 2021-10-18 19:20:20 +02:00
rte_ethdev.c ethdev: introduce protocol-based buffer split 2022-10-09 16:41:27 +02:00
rte_ethdev.h net/bonding: call Tx prepare before Tx burst 2022-10-20 08:36:34 +02:00
rte_flow_driver.h ethdev: add indirect action async query 2022-09-28 10:47:34 +02:00
rte_flow.c ethdev: add send to kernel action 2022-10-04 09:47:31 +02:00
rte_flow.h doc: relate bifurcated driver and flow isolated mode 2022-10-04 17:01:03 +02:00
rte_mtr_driver.h ethdev: add protocol parameter to color table update 2022-10-03 13:43:53 +02:00
rte_mtr.c ethdev: add protocol parameter to color table update 2022-10-03 13:43:53 +02:00
rte_mtr.h ethdev: add protocol parameter to color table update 2022-10-03 13:43:53 +02:00
rte_tm_driver.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_tm.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_tm.h ethdev: fix Rx/Tx spelling 2021-10-21 13:43:56 +02:00
sff_8079.c ethdev: support SFF-8079 module telemetry 2022-05-31 16:32:49 +02:00
sff_8472.c ethdev: support SFF-8472 module telemetry 2022-05-31 16:33:15 +02:00
sff_8636.c ethdev: support SFF-8636 module telemetry 2022-05-31 16:33:58 +02:00
sff_8636.h ethdev: support SFF-8636 module telemetry 2022-05-31 16:33:58 +02:00
sff_common.c ethdev: add common code for different SFF specs 2022-05-31 16:30:31 +02:00
sff_common.h ethdev: add common code for different SFF specs 2022-05-31 16:30:31 +02:00
sff_telemetry.c eal: remove unneeded includes from a public header 2022-09-21 15:31:03 +02:00
sff_telemetry.h ethdev: support SFF-8636 module telemetry 2022-05-31 16:33:58 +02:00
version.map ethdev: introduce protocol header API 2022-10-09 16:41:24 +02:00