[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240805152344.2aa5f237@kernel.org>
Date: Mon, 5 Aug 2024 15:23:44 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Petr Machata <petrm@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
<netdev@...r.kernel.org>, Ido Schimmel <idosch@...dia.com>, "David Ahern"
<dsahern@...nel.org>, Donald Sharp <sharpd@...dia.com>, <mlxsw@...dia.com>
Subject: Re: [PATCH net-next 1/6] net: nexthop: Add flag to assert that
NHGRP reserved fields are zero
On Thu, 1 Aug 2024 18:23:57 +0200 Petr Machata wrote:
> diff --git a/include/uapi/linux/nexthop.h b/include/uapi/linux/nexthop.h
> index dd8787f9cf39..2ed643207847 100644
> --- a/include/uapi/linux/nexthop.h
> +++ b/include/uapi/linux/nexthop.h
> @@ -33,6 +33,9 @@ enum {
> #define NHA_OP_FLAG_DUMP_STATS BIT(0)
> #define NHA_OP_FLAG_DUMP_HW_STATS BIT(1)
>
> +/* Response OP_FLAGS. */
> +#define NHA_OP_FLAG_RESP_GRP_RESVD_0 BIT(0)
I guess these are op flags, so nobody should have a need to store them,
but having bits mean different things in and out make decoding and
binding generation much harder. Let's not do this unless absolutely
necessary. Perhaps you can start defining response flags from the
"other end", i.e. bit 31? Chances are the two sides will never "meet".
Powered by blists - more mailing lists