Re: [PATCH bpf] xsk: Add truesize to skb_add_rx_frag().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 13, 2024 at 04:37:37PM +0100, Sebastian Andrzej Siewior wrote:
> On 2024-02-02 17:32:20 [+0100], To bpf@xxxxxxxxxxxxxxx wrote:
> > xsk_build_skb() allocates a page and adds it to the skb via
> > skb_add_rx_frag() and specifies 0 for truesize. This leads to a warning
> > in skb_add_rx_frag() with CONFIG_DEBUG_NET enabled because size is
> > larger than truesize.
> > 
> > Increasing truesize requires to add the same amount to socket's
> > sk_wmem_alloc counter in order not to underflow the counter during
> > release in the destructor (sock_wfree()).
> > 
> > Pass the size of the allocated page as truesize to skb_add_rx_frag().
> > Add this mount to socket's sk_wmem_alloc counter.
> > 
> > Fixes: cf24f5a5feea ("xsk: add support for AF_XDP multi-buffer on Tx path")
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> 
> Is this stuck somewhere or just waiting for review/ etc?
> Patchwork says new and the ci failure on s390x seems unrelated.

I acked it week ago or so, maybe bpf maintainers missed it as I don't see
them being CCed? Adding in now.

> 
> Sebastian




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux