From: "Toke Høiland-Jørgensen" <toke@redhat•com>
To: Jakub Kicinski <kuba@kernel•org>, davem@davemloft•net
Cc: netdev@vger•kernel.org, edumazet@google•com, dsahern@gmail•com,
Jakub Kicinski <kuba@kernel•org>
Subject: Re: [PATCH net-next] skb: make drop reason booleanable
Date: Tue, 08 Mar 2022 14:57:51 +0100 [thread overview]
Message-ID: <87cziwy2ao.fsf@toke.dk> (raw)
In-Reply-To: <20220308004421.237826-1-kuba@kernel.org>
Jakub Kicinski <kuba@kernel•org> writes:
> We have a number of cases where function returns drop/no drop
> decision as a boolean. Now that we want to report the reason
> code as well we have to pass extra output arguments.
>
> We can make the reason code evaluate correctly as bool.
>
> I believe we're good to reorder the reasons as they are
> reported to user space as strings.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel•org>
> ---
> v2: use Eric's suggestion for the name, indeed better than mine
> ---
> include/linux/skbuff.h | 1 +
> include/net/tcp.h | 21 +++++++++++----------
> net/ipv4/tcp.c | 21 +++++++++------------
> net/ipv4/tcp_ipv4.c | 12 +++++++-----
> net/ipv6/tcp_ipv6.c | 11 +++++++----
> 5 files changed, 35 insertions(+), 31 deletions(-)
>
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 34f572271c0c..26538ceb4b01 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -314,6 +314,7 @@ struct sk_buff;
> * used to translate the reason to string.
> */
> enum skb_drop_reason {
> + SKB_NOT_DROPPED_YET = 0,
Haha, nice! Even feels like this is touching on some deep philosophical
truth about the state of packets - the best they can hope for is to be
not dropped... yet! :D
-Toke
next prev parent reply other threads:[~2022-03-08 13:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 0:44 [PATCH net-next] skb: make drop reason booleanable Jakub Kicinski
2022-03-08 13:57 ` Toke Høiland-Jørgensen [this message]
2022-03-08 16:35 ` David Ahern
2022-03-09 11:30 ` patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2022-03-04 4:53 Jakub Kicinski
2022-03-04 5:22 ` Jakub Kicinski
2022-03-04 6:37 ` Eric Dumazet
2022-03-04 15:31 ` David Ahern
2022-03-04 16:36 ` Eric Dumazet
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=87cziwy2ao.fsf@toke.dk \
--to=toke@redhat$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dsahern@gmail$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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