mbox series

[bpf,0/2] Two fixes for cpu-map

Message ID 20230729095107.1722450-1-houtao@huaweicloud.com (mailing list archive)
Headers show
Series Two fixes for cpu-map | expand

Message

Hou Tao July 29, 2023, 9:51 a.m. UTC
From: Hou Tao <houtao1@huawei.com>

Hi,

The patchset fixes two reported warning in cpu-map when running
xdp_redirect_cpu and some RT threads concurrently. Patch #1 fixes
the warning in __cpu_map_ring_cleanup() when kthread is stopped
prematurely. Patch #2 fixes the warning in __xdp_return() when
there are pending skbs in ptr_ring.

Please see individual patches for more details. And comments are always
welcome.

Regards,
Tao

Hou Tao (2):
  bpf, cpumap: Make sure kthread is running before map update returns
  bpf, cpumap: Handle skb as well when clean up ptr_ring

 kernel/bpf/cpumap.c | 35 +++++++++++++++++++++--------------
 1 file changed, 21 insertions(+), 14 deletions(-)

Comments

Martin KaFai Lau July 31, 2023, 10:57 p.m. UTC | #1
On 7/29/23 2:51 AM, Hou Tao wrote:
> The patchset fixes two reported warning in cpu-map when running
> xdp_redirect_cpu and some RT threads concurrently. Patch #1 fixes
> the warning in __cpu_map_ring_cleanup() when kthread is stopped
> prematurely. Patch #2 fixes the warning in __xdp_return() when
> there are pending skbs in ptr_ring.

Applied to the bpf tree. Thanks.