netd…@kernel.org writes:
> [Severity: Low] > The enum doc is updated here. Should the struct libeth_sqe kernel-doc in > the same file be updated as well? It still describes per-frame values:
Will fix.
> [Severity: High] > Does this decrement move the in-flight count the right way once idpf > applies it?
[...]
> Should libeth accumulate a positive count here (cp->xdp_tx++, and > cp->xdp_tx += sqe->nr_frags above)? Or should idpf add cp.xdp_tx > instead of subtracting it?
Correct, but it is older than this patch. Since 26ce8eb0bb7d ("libeth: xdp: add XDPSQE completion helpers") libeth counts completed buffers down from zero and idpf subtracts the result, so xdp_tx only grows. This patch keeps that convention. It is not related to the shared info, so that's a separate series.
> [Severity: Low] > This isn't a bug introduced by this patch, but the kernel-doc for > struct libeth_cq_pp in include/net/libeth/tx.h says: > > * @xdp_tx: number of XDP-not-XSk frames processed > > __libeth_xdp_complete_tx() actually counts buffers, and that includes > XSk XDP_TX buffers. The old code already counted LIBETH_SQE_XSK_TX > here. Could the wording be fixed while this code is being changed?
Ya, but with the separate fix above.
> [Severity: High] > This is a pre-existing issue and was not introduced by this patch. It > is in the same XSk XDP_TX path: does libeth_xsk_tx_queue_bulk() in this > file handle a flush failure in the middle of a frame correctly?
[...]
> This goes back to b3ad8450b4dc, and 90e5d84086d9 only covered the > success exit. Would it help to free the popped frag (or put it back) on > this error path, and handle the head's frags flag consistently?
This one is real too. It only happens when the XDP queue has no free descriptor at all, and then the popped frag leaks, the frags after it stay on the pool's list, and the head keeps its frags flag. It is not related to the shared info, so separate fix on its own instead of growing this series. Björn