From: David Ahern <dsahern@gmail.com>
To: Roopa Prabhu <roopa@nvidia.com>,
Alexander Mikhalitsyn <alexander@mihalicyn.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
Stephen Hemminger <stephen@networkplumber.org>,
Ido Schimmel <idosch@nvidia.com>,
Jakub Kicinski <kuba@kernel.org>, Andrei Vagin <avagin@gmail.com>,
Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Subject: Re: [RFC PATCH net-next] rtnetlink: add RTNH_F_REJECT_MASK
Date: Thu, 11 Nov 2021 19:27:48 -0700 [thread overview]
Message-ID: <d7c2d8fa-052e-b941-2ef1-830c1ba655c1@gmail.com> (raw)
In-Reply-To: <ff405eae-21d9-35f4-1397-b6f9a29a57ff@nvidia.com>
On 11/11/21 6:02 PM, Roopa Prabhu wrote:
>
> On 11/11/21 2:19 PM, David Ahern wrote:
>> [ cc roopa]
>>
>> On 11/11/21 12:23 PM, Alexander Mikhalitsyn wrote:
>>> On Thu, Nov 11, 2021 at 10:13 PM David Ahern <dsahern@gmail.com> wrote:
>>>> On 11/11/21 9:02 AM, Alexander Mikhalitsyn wrote:
>>>>> diff --git a/include/uapi/linux/rtnetlink.h
>>>>> b/include/uapi/linux/rtnetlink.h
>>>>> index 5888492a5257..c15e591e5d25 100644
>>>>> --- a/include/uapi/linux/rtnetlink.h
>>>>> +++ b/include/uapi/linux/rtnetlink.h
>>>>> @@ -417,6 +417,9 @@ struct rtnexthop {
>>>>> #define RTNH_COMPARE_MASK (RTNH_F_DEAD | RTNH_F_LINKDOWN | \
>>>>> RTNH_F_OFFLOAD | RTNH_F_TRAP)
>>>>>
>>>>> +/* these flags can't be set by the userspace */
>>>>> +#define RTNH_F_REJECT_MASK (RTNH_F_DEAD | RTNH_F_LINKDOWN)
>>>>> +
>>>>> /* Macros to handle hexthops */
>>>> Userspace can not set any of the flags in RTNH_COMPARE_MASK.
>>> Hi David,
>>>
>>> thanks! So, I have to prepare a patch which fixes current checks for
>>> rtnh_flags
>>> against RTNH_COMPARE_MASK. So, there is no need to introduce a separate
>>> RTNH_F_REJECT_MASK.
>>> Am I right?
>>>
>> Added Roopa to double check if Cumulus relies on this for their switchd.
>>
>> If that answer is no, then there is no need for a new mask.
>>
>
> yes, these flags are already exposed to userspace and we do use it.
>
> We have also considered optimizations where routing daemons set OFFLOAD
> and drivers clear it when offload fails.
>
> I wont be surprised if other open network os distributions are also
> using it.
>
>
> Thanks for the headsup David.
>
Thanks, Roopa. So then the separate mask is needed.
next prev parent reply other threads:[~2021-11-12 2:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 16:02 [RFC PATCH iproute2] ip route: save: exclude rtnh_flags which can't be set Alexander Mikhalitsyn
2021-11-11 16:02 ` [RFC PATCH net-next] rtnetlink: add RTNH_F_REJECT_MASK Alexander Mikhalitsyn
2021-11-11 17:48 ` Jakub Kicinski
2021-11-11 17:51 ` Alexander Mikhalitsyn
2021-11-11 17:56 ` Jakub Kicinski
2021-11-11 18:01 ` Alexander Mikhalitsyn
2021-11-11 19:13 ` David Ahern
2021-11-11 19:23 ` Alexander Mikhalitsyn
2021-11-11 22:19 ` David Ahern
2021-11-12 1:02 ` Roopa Prabhu
2021-11-12 2:27 ` David Ahern [this message]
2021-11-26 13:43 ` [PATCH iproute2] ip route: save: exclude rtnh_flags which can't be set Alexander Mikhalitsyn
2021-11-26 13:43 ` [PATCH net-next] rtnetlink: add RTNH_REJECT_MASK Alexander Mikhalitsyn
2021-11-28 14:01 ` Ido Schimmel
2021-11-29 0:19 ` David Ahern
2021-11-30 7:59 ` Ido Schimmel
2021-11-30 8:35 ` Alexander Mikhalitsyn
2021-11-30 9:28 ` Ido Schimmel
2021-11-30 9:53 ` Alexander Mikhalitsyn
2021-11-30 10:28 ` Ido Schimmel
2021-11-30 15:12 ` David Ahern
2021-11-30 8:18 ` Alexander Mikhalitsyn
2021-11-28 13:09 ` [PATCH iproute2] ip route: save: exclude rtnh_flags which can't be set Ido Schimmel
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=d7c2d8fa-052e-b941-2ef1-830c1ba655c1@gmail.com \
--to=dsahern@gmail.com \
--cc=alexander@mihalicyn.com \
--cc=avagin@gmail.com \
--cc=davem@davemloft.net \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ptikhomirov@virtuozzo.com \
--cc=roopa@nvidia.com \
--cc=stephen@networkplumber.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).