diff options
| author | Alexander Lobakin <[email protected]> | 2024-12-18 17:44:31 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-12-20 03:51:14 +0000 |
| commit | 539c1fba1ac77184215d892eda0857f5687b7366 (patch) | |
| tree | c46d5ec839e98f8a9fd34d797b3c4e76bfbd3944 /tools/testing/selftests/net/lib/py/utils.py | |
| parent | xdp: add generic xdp_buff_add_frag() (diff) | |
| download | kernel-539c1fba1ac77184215d892eda0857f5687b7366.tar.gz kernel-539c1fba1ac77184215d892eda0857f5687b7366.zip | |
xdp: add generic xdp_build_skb_from_buff()
The code which builds an skb from an &xdp_buff keeps multiplying itself
around the drivers with almost no changes. Let's try to stop that by
adding a generic function.
Unlike __xdp_build_skb_from_frame(), always allocate an skbuff head
using napi_build_skb() and make use of the available xdp_rxq pointer to
assign the Rx queue index. In case of PP-backed buffer, mark the skb to
be recycled, as every PP user's been switched to recycle skbs.
Reviewed-by: Toke Høiland-Jørgensen <[email protected]>
Signed-off-by: Alexander Lobakin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions
