netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Menglong Dong <menglong8.dong@gmail.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	dsahern@kernel.org, pablo@netfilter.org, kadlec@netfilter.org,
	roopa@nvidia.com, razor@blackwall.org, gnault@redhat.com,
	bigeasy@linutronix.de, idosch@nvidia.com, ast@kernel.org,
	dongml2@chinatelecom.cn, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org,
	coreteam@netfilter.org, bridge@lists.linux.dev,
	bpf@vger.kernel.org
Subject: Re: [PATCH net-next v3 07/10] net: ip: make ip_route_input_noref() return drop reasons
Date: Mon, 21 Oct 2024 12:44:26 +0200	[thread overview]
Message-ID: <c6e8f053-32bb-4ebd-871b-af416d0b0531@redhat.com> (raw)
In-Reply-To: <20241015140800.159466-8-dongml2@chinatelecom.cn>

On 10/15/24 16:07, Menglong Dong wrote:
> diff --git a/net/core/lwt_bpf.c b/net/core/lwt_bpf.c
> index e0ca24a58810..a4652f2a103a 100644
> --- a/net/core/lwt_bpf.c
> +++ b/net/core/lwt_bpf.c
> @@ -98,6 +98,7 @@ static int bpf_lwt_input_reroute(struct sk_buff *skb)
>  		skb_dst_drop(skb);
>  		err = ip_route_input_noref(skb, iph->daddr, iph->saddr,
>  					   ip4h_dscp(iph), dev);
> +		err = err ? -EINVAL : 0;

Please introduce and use a drop_reason variable here instead of 'err',
to make it clear the type conversion.

Thanks,

Paolo


  reply	other threads:[~2024-10-21 10:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-15 14:07 [PATCH net-next v3 00/10] net: ip: add drop reasons to input route Menglong Dong
2024-10-15 14:07 ` [PATCH net-next v3 01/10] net: ip: refactor fib_validate_source/__fib_validate_source Menglong Dong
2024-10-21 10:03   ` Paolo Abeni
2024-10-15 14:07 ` [PATCH net-next v3 02/10] net: ip: make fib_validate_source() return drop reason Menglong Dong
2024-10-21 10:20   ` Paolo Abeni
2024-10-21 10:36     ` Paolo Abeni
2024-10-22  8:47     ` Menglong Dong
2024-10-15 14:07 ` [PATCH net-next v3 03/10] net: ip: make ip_route_input_mc() " Menglong Dong
2024-10-15 14:07 ` [PATCH net-next v3 04/10] net: ip: make ip_mc_validate_source() " Menglong Dong
2024-10-15 14:07 ` [PATCH net-next v3 05/10] net: ip: make ip_route_input_slow() return drop reasons Menglong Dong
2024-10-21 10:52   ` Paolo Abeni
2024-10-22  8:50     ` Menglong Dong
2024-10-15 14:07 ` [PATCH net-next v3 06/10] net: ip: make ip_route_input_rcu() " Menglong Dong
2024-10-15 14:07 ` [PATCH net-next v3 07/10] net: ip: make ip_route_input_noref() " Menglong Dong
2024-10-21 10:44   ` Paolo Abeni [this message]
2024-10-21 10:49     ` Paolo Abeni
2024-10-22  8:49       ` Menglong Dong
2024-10-15 14:07 ` [PATCH net-next v3 08/10] net: ip: make ip_route_input() " Menglong Dong
2024-10-15 14:07 ` [PATCH net-next v3 09/10] net: ip: make ip_mkroute_input/__mkroute_input " Menglong Dong
2024-10-15 14:08 ` [PATCH net-next v3 10/10] net: ip: make ip_route_use_hint() " Menglong Dong

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=c6e8f053-32bb-4ebd-871b-af416d0b0531@redhat.com \
    --to=pabeni@redhat.com \
    --cc=ast@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=bpf@vger.kernel.org \
    --cc=bridge@lists.linux.dev \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=dongml2@chinatelecom.cn \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=gnault@redhat.com \
    --cc=idosch@nvidia.com \
    --cc=kadlec@netfilter.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menglong8.dong@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=razor@blackwall.org \
    --cc=roopa@nvidia.com \
    /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).