From: Simon Horman <simon.horman@corigine.com>
To: Yunsheng Lin <linyunsheng@huawei.com>
Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
virtualization@lists.linux-foundation.org,
xen-devel@lists.xenproject.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, edumazet@google.com,
davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
alexanderduyck@fb.com, jbrouer@redhat.com,
ilias.apalodimas@linaro.org
Subject: Re: [PATCH RFC 2/2] net: remove __skb_frag_set_page()
Date: Mon, 8 May 2023 16:31:22 +0200 [thread overview]
Message-ID: <ZFkHulUs7d1xWKSa@corigine.com> (raw)
In-Reply-To: <20230508123922.39284-3-linyunsheng@huawei.com>
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@huawei.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;
>
...
next prev parent reply other threads:[~2023-05-08 14:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 12:39 [PATCH RFC 0/2] introduce skb_frag_fill_page_desc() Yunsheng Lin
2023-05-08 12:39 ` [PATCH RFC 1/2] net: introduce and use skb_frag_fill_page_desc() Yunsheng Lin
2023-05-08 12:39 ` [PATCH RFC 2/2] net: remove __skb_frag_set_page() Yunsheng Lin
2023-05-08 14:31 ` Simon Horman [this message]
2023-05-09 0:51 ` Yunsheng Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZFkHulUs7d1xWKSa@corigine.com \
--to=simon.horman@corigine.com \
--cc=alexanderduyck@fb.com \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jbrouer@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linyunsheng@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox