[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e1bb0c93-3b4b-3b25-f1e1-7833600a61f6@web.de>
Date: Wed, 26 Jul 2023 13:48:35 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Yan Zhai <yan@...udflare.com>, bpf@...r.kernel.org,
kernel-janitors@...r.kernel.org, netdev@...r.kernel.org,
linux-kselftest@...r.kernel.org, kernel-team@...udflare.com,
Stanislav Fomichev <sdf@...gle.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
Yonghong Song <yhs@...com>, John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Mykola Lysenko <mykolal@...com>,
Shuah Khan <shuah@...nel.org>, Jordan Griege <jgriege@...udflare.com>,
Jakub Sitnicki <jakub@...udflare.com>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 bpf 1/2] bpf: fix skb_do_redirect return values
…
> +++ b/include/linux/netdevice.h
> @@ -87,6 +87,8 @@ void netdev_sw_irq_coalesce_default_on(struct net_device *dev);
> #define NET_RX_SUCCESS 0 /* keep 'em coming, baby */
> #define NET_RX_DROP 1 /* packet dropped */
>
> +#define net_rx_errno(e) ((e) == NET_RX_DROP ? -ENOBUFS : (e))
…
Can it become safer to use an inline function
instead of the proposed macro addition?
See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.5-rc3#n814
Regards,
Markus
Powered by blists - more mailing lists