diff options
author | Alexander Lobakin <alexandr.lobakin@intel.com> | 2023-02-10 20:06:17 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-02-13 21:13:12 +0300 |
commit | 055d0920685e53ed8c2ad914888724d69dca17c6 (patch) | |
tree | 1ac7f341a0cd0de5386bcb358597dc9ecbaf897d /tools/perf/scripts/python/export-to-sqlite.py | |
parent | aa1d3faf71a6a46f9b859daa8ffa5b86fa07217c (diff) | |
download | linux-055d0920685e53ed8c2ad914888724d69dca17c6.tar.xz |
ice: Fix freeing XDP frames backed by Page Pool
As already mentioned, freeing any &xdp_frame via page_frag_free() is
wrong, as it assumes the frame is backed by either an order-0 page or
a page with no "patrons" behind them, while in fact frames backed by
Page Pool can be redirected to a device, which's driver doesn't use it.
Keep storing a pointer to the raw buffer and then freeing it
unconditionally via page_frag_free() for %XDP_TX frames, but introduce
a separate type in the enum for frames coming through .ndo_xdp_xmit(),
and free them via xdp_return_frame_bulk(). Note that saving xdpf as
xdp_buff->data_hard_start is intentional and is always true when
everything is configured properly.
After this change, %XDP_REDIRECT from a Page Pool based driver to ice
becomes zero-alloc as it should be and horrendous 3.3 Mpps / queue
turn into 6.6, hehe.
Let it go with no "Fixes:" tag as it spans across good 5+ commits and
can't be trivially backported.
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/bpf/20230210170618.1973430-6-alexandr.lobakin@intel.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions