Thread (23 messages) flat view 23 messages, 6 authors, 2021-11-30

Re: [RFC PATCH net-next] rtnetlink: add RTNH_F_REJECT_MASK

From: David Ahern <hidden>
Date: 2021-11-12 02:27:52

On 11/11/21 6:02 PM, Roopa Prabhu wrote:
On 11/11/21 2:19 PM, David Ahern wrote:
quoted
[ cc roopa]

On 11/11/21 12:23 PM, Alexander Mikhalitsyn wrote:
quoted
On Thu, Nov 11, 2021 at 10:13 PM David Ahern [off-list ref] wrote:
quoted
On 11/11/21 9:02 AM, Alexander Mikhalitsyn wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help