[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZFkHulUs7d1xWKSa@corigine.com>
Date: Mon, 8 May 2023 16:31:22 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Yunsheng Lin <linyunsheng@...wei.com>
Cc: netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
xen-devel@...ts.xenproject.org, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org, edumazet@...gle.com,
davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
alexanderduyck@...com, jbrouer@...hat.com,
ilias.apalodimas@...aro.org
Subject: Re: [PATCH RFC 2/2] net: remove __skb_frag_set_page()
On Mon, May 08, 2023 at 08:39:22PM +0800, Yunsheng Lin wrote:
> The remaining users calling __skb_frag_set_page() with
> page being NULL seems to doing defensive programming, as
> shinfo->nr_frags is already decremented, so remove them.
>
> Signed-off-by: Yunsheng Lin <linyunsheng@...wei.com>
...
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index efaff5018af8..f3f08660ec30 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -1105,7 +1105,6 @@ static u32 __bnxt_rx_agg_pages(struct bnxt *bp,
> unsigned int nr_frags;
>
> nr_frags = --shinfo->nr_frags;
Hi Yunsheng,
nr_frags is now unused, other than being set on the line above.
Probably this local variable can be removed.
> - __skb_frag_set_page(&shinfo->frags[nr_frags], NULL);
> cons_rx_buf->page = page;
>
...
Powered by blists - more mailing lists