From: Yunsheng Lin <linyunsheng@huawei.com>
To: Simon Horman <simon.horman@corigine.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: Tue, 9 May 2023 08:51:07 +0800 [thread overview]
Message-ID: <ca5dabb4-d875-7845-553f-915b3ce85be1@huawei.com> (raw)
In-Reply-To: <ZFkHulUs7d1xWKSa@corigine.com>
On 2023/5/8 22:31, Simon Horman wrote:
> 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.
Yes, will remove that.
Thanks.
prev parent reply other threads:[~2023-05-09 0:51 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
2023-05-09 0:51 ` Yunsheng Lin [this message]
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=ca5dabb4-d875-7845-553f-915b3ce85be1@huawei.com \
--to=linyunsheng@huawei.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=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.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