Skip to content

xsk: introduce pre-allocated memory per xsk CQ

Jason Xing bpf netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 1 replyIn review
  2. v32 patches 1 replySuperseded
  3. v22 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches2 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xsk: introduce local_cq for each af_xdp socketinclude/net/xdp_sock.h net/xdp/xsk.c+62 -00 replies
2/2xsk: introduce a dedicated local completion queue for each xsknet/xdp/xsk.c+61 -1081 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH bpf-next v4 0/2] xsk: introduce pre-allocated memory per xsk CQ

From: Jason Xing <[email protected]>

This series was made based on the previous work[1] to fix the issue without causing too much performance impact through adding a pre-allocated memory for each xsk.

[1]: commit 30f241fcf52a ("xsk: Fix immature cq descriptor production")
---
v4

1. use u64 addr in xsk_cq_write_addr()

v3

1. fix double free of lcq in xsk_clear_local_cq()
2. keep lcq->prod align with cq->cached_prod, which can be found in xsk_cq_cancel_locked().
3. move xsk_clear_local_cq() from xsk_release() to xsk_destruct() to avoid crash when using lcq in xsk_destruct_skb() after lcq is already freed.

v2

1. add if condition to test if cq is NULL
2. initialize the prod of local_cq

Jason Xing (2):
xsk: introduce local_cq for each af_xdp socket
xsk: introduce a dedicated local completion queue for each xsk

 include/net/xdp_sock.h |   8 ++
 net/xdp/xsk.c          | 223 +++++++++++++++++++++--------------------
 2 files changed, 123 insertions(+), 108 deletions(-)
Signature · 1 line
2.41.3