[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8cd9e84dabcf2efbf80f3bc43326bbea8bd21a98.camel@redhat.com>
Date: Tue, 21 Jun 2022 11:03:57 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jose Alonso <joalonsof@...il.com>,
David Laight <David.Laight@...LAB.COM>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v2] net: usb: ax88179_178a: ax88179_rx_fixup corrections
On Mon, 2022-06-20 at 22:18 -0300, Jose Alonso wrote:
> On Mon, 2022-06-20 at 03:45 +0000, David Laight wrote:
> >
> > > - ax_skb->truesize = pkt_len + sizeof(struct sk_buff);
> >
> > You've 'lost' this lie.
> > IIRC the 'skb' are allocated with 64k buffer space.
> > I'm not at all sure how the buffer space of skb that are cloned
> > into multiple rx buffers are supposed to be accounted for.
I agree that correct memory accounting here is not trivial. I think you
should restore the 'truesize' assignment.
Possibly a slightly more accurate adjustment would be:
/* for last skb */
skb->truesize = SKB_TRUESIZE(pkt_len_buf);
/* for other skbs */
skb->truesize = pkt_len_buf + SKB_DATA_ALIGN(sizeof(struct sk_buff);
>
Thanks!
Paolo
Powered by blists - more mailing lists