[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHS8izM-QqyiYz100sC-QPhVOnD0zbc4TZhcTxZzritOa_z7FA@mail.gmail.com>
Date: Tue, 6 Feb 2024 10:17:30 -0800
From: Mina Almasry <almasrymina@...gle.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Jason Gunthorpe <jgg@...dia.com>,
Christian König <christian.koenig@....com>,
Shakeel Butt <shakeelb@...gle.com>, Yunsheng Lin <linyunsheng@...wei.com>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>
Subject: Re: [PATCH net-next v7 2/2] net: add netmem to skb_frag_t
On Tue, Feb 6, 2024 at 1:30 AM Paolo Abeni <pabeni@...hat.com> wrote:
>
> On Thu, 2024-02-01 at 13:34 -0800, Mina Almasry wrote:
> > @@ -2528,8 +2562,25 @@ static inline void skb_fill_page_desc_noacc(struct sk_buff *skb, int i,
> > shinfo->nr_frags = i + 1;
> > }
> >
> > -void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off,
> > - int size, unsigned int truesize);
> > +static inline void skb_add_rx_frag_netmem(struct sk_buff *skb, int i,
> > + netmem_ref netmem, int off, int size,
> > + unsigned int truesize)
> > +{
> > + DEBUG_NET_WARN_ON_ONCE(size > truesize);
> > +
> > + skb_fill_netmem_desc(skb, i, netmem, off, size);
> > + skb->len += size;
> > + skb->data_len += size;
> > + skb->truesize += truesize;
> > +}
>
> > +
> > +static inline void skb_add_rx_frag(struct sk_buff *skb, int i,
> > + struct page *page, int off, int size,
> > + unsigned int truesize)
> > +{
> > + skb_add_rx_frag_netmem(skb, i, page_to_netmem(page), off, size,
> > + truesize);
> > +}
>
> I'm very sorry, I was not clear in my previous feedback: only
> skb_add_rx_frag() was supposed to be 'static inline'.
>
> skb_add_rx_frag_netmem() contains a few more instructions and there are
> a lot of callers, always inline it does not look the best option.
>
> I'm sorry for requiring an additional iteration, but feel free to ad my
> Acked-by with the above change.
>
No worries, minor miscommunication. I'm happy to respin with the change. Thanks!
--
Thanks,
Mina
Powered by blists - more mailing lists