]> git.ipfire.org Git - thirdparty/linux.git/commit
octeontx2-pf: AF_XDP: code clean up
authorHariprasad Kelam <hkelam@marvell.com>
Sun, 20 Apr 2025 03:23:50 +0000 (08:53 +0530)
committerJakub Kicinski <kuba@kernel.org>
Thu, 24 Apr 2025 01:33:14 +0000 (18:33 -0700)
commitb5cdb9b3113e6633d84f5598b5010794e86a4d35
tree4ca5fb880503057c5fc5539ca6f9ccc3a83c2340
parent3fec58f5a455411393f9f72314a6cb6327a26bd1
octeontx2-pf: AF_XDP: code clean up

The current API, otx2_xdp_sq_append_pkt, verifies the number of available
descriptors before sending packets to the hardware.

However, for AF_XDP, this check is unnecessary because the batch value
is already determined based on the free descriptors.

This patch introduces a new API, "otx2_xsk_sq_append_pkt" to address this.

Remove the logic for releasing the TX buffers, as it is implicitly handled
by xsk_tx_peek_release_desc_batch

Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Link: https://patch.msgid.link/20250420032350.4047706-1-hkelam@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_xsk.c