From: Eric Dumazet <eric.dumazet@gmail.com>
To: Vasily Averin <vvs@virtuozzo.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
David Ahern <dsahern@kernel.org>,
Julian Wiedmann <jwi@linux.ibm.com>,
Christoph Paasch <christoph.paasch@gmail.com>,
linux-kernel@vger.kernel.org, kernel@openvz.org
Subject: Re: [PATCH net v9] skb_expand_head() adjust skb->truesize incorrectly
Date: Wed, 20 Oct 2021 09:14:26 -0700 [thread overview]
Message-ID: <0e8fff74-b9a8-8ec8-71f6-4745fc82dd4b@gmail.com> (raw)
In-Reply-To: <a7318420-0182-7e66-33e3-3368d4cc181f@virtuozzo.com>
On 10/4/21 10:57 PM, Vasily Averin wrote:
>>>
>>> diff --git a/net/core/sock.c b/net/core/sock.c
>>> index 62627e868e03..1932755ae9ba 100644
>>> --- a/net/core/sock.c
>>> +++ b/net/core/sock.c
>>> @@ -2227,6 +2227,14 @@ void skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
>>> }
>>> EXPORT_SYMBOL(skb_set_owner_w);
>>>
>>> +bool is_skb_wmem(const struct sk_buff *skb)
>>> +{
>>> + return skb->destructor == sock_wfree ||
>>> + skb->destructor == __sock_wfree ||
>>> + (IS_ENABLED(CONFIG_INET) && skb->destructor == tcp_wfree);
>>> +}
>>> +EXPORT_SYMBOL(is_skb_wmem);
>>> +
>>
>> This probably should be inlined.
>
> David Miller pointed me out in the comments to an early version of the patch
> "Please do not use inline in foo.c files, let the compiler decide."
>
Sure, my suggestion was to move this helper in an include file,
and use
static inline bool ....
I would not suggest add an inline in a C file, unless absolutely critical.
next prev parent reply other threads:[~2021-10-20 16:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 16:24 [RFC net v7] net: skb_expand_head() adjust skb->truesize incorrectly Jakub Kicinski
2021-09-17 18:15 ` Vasily Averin
2021-09-18 10:05 ` Vasily Averin
2021-09-20 18:12 ` Jakub Kicinski
2021-09-20 21:41 ` Vasily Averin
2021-09-21 0:39 ` Jakub Kicinski
2021-09-21 6:36 ` Vasily Averin
2021-09-21 21:25 ` Jakub Kicinski
2021-09-20 21:41 ` [PATCH net v8] " Vasily Averin
2021-09-21 5:21 ` Vasily Averin
2021-10-04 13:00 ` [PATCH net v9] " Vasily Averin
2021-10-04 13:14 ` Vasily Averin
2021-10-04 19:26 ` Eric Dumazet
2021-10-05 5:57 ` Vasily Averin
2021-10-20 16:14 ` Eric Dumazet [this message]
2021-10-20 16:18 ` Eric Dumazet
2021-10-22 10:28 ` [PATCH net v10] " Vasily Averin
2021-10-22 19:32 ` Eric Dumazet
2021-10-22 20:50 ` patchwork-bot+netdevbpf
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=0e8fff74-b9a8-8ec8-71f6-4745fc82dd4b@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=christoph.paasch@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=jwi@linux.ibm.com \
--cc=kernel@openvz.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vvs@virtuozzo.com \
--cc=yoshfuji@linux-ipv6.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;
as well as URLs for NNTP newsgroup(s).