Ido Schimmel
2023-Oct-16 13:12 UTC
[Bridge] [PATCH net-next 07/13] bridge: add MDB get uAPI attributes
Add MDB get attributes that correspond to the MDB set attributes used in RTM_NEWMDB messages. Specifically, add 'MDBA_GET_ENTRY' which will hold a 'struct br_mdb_entry' and 'MDBA_GET_ENTRY_ATTRS' which will hold 'MDBE_ATTR_*' attributes that are used as indexes (source IP and source VNI). An example request will look as follows: [ struct nlmsghdr ] [ struct br_port_msg ] [ MDBA_GET_ENTRY ] struct br_mdb_entry [ MDBA_GET_ENTRY_ATTRS ] [ MDBE_ATTR_SOURCE ] struct in_addr / struct in6_addr [ MDBE_ATTR_SRC_VNI ] u32 Signed-off-by: Ido Schimmel <idosch at nvidia.com> --- include/uapi/linux/if_bridge.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index f95326fce6bb..7e1bf080b414 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h @@ -723,6 +723,14 @@ enum { }; #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1) +enum { + MDBA_GET_ENTRY_UNSPEC, + MDBA_GET_ENTRY, + MDBA_GET_ENTRY_ATTRS, + __MDBA_GET_ENTRY_MAX, +}; +#define MDBA_GET_ENTRY_MAX (__MDBA_GET_ENTRY_MAX - 1) + /* [MDBA_SET_ENTRY_ATTRS] = { * [MDBE_ATTR_xxx] * ... -- 2.40.1
Nikolay Aleksandrov
2023-Oct-17 09:08 UTC
[Bridge] [PATCH net-next 07/13] bridge: add MDB get uAPI attributes
On 10/16/23 16:12, Ido Schimmel wrote:> Add MDB get attributes that correspond to the MDB set attributes used in > RTM_NEWMDB messages. Specifically, add 'MDBA_GET_ENTRY' which will hold > a 'struct br_mdb_entry' and 'MDBA_GET_ENTRY_ATTRS' which will hold > 'MDBE_ATTR_*' attributes that are used as indexes (source IP and source > VNI). > > An example request will look as follows: > > [ struct nlmsghdr ] > [ struct br_port_msg ] > [ MDBA_GET_ENTRY ] > struct br_mdb_entry > [ MDBA_GET_ENTRY_ATTRS ] > [ MDBE_ATTR_SOURCE ] > struct in_addr / struct in6_addr > [ MDBE_ATTR_SRC_VNI ] > u32 >Could you please add this info as a comment above the enum? Similar to the enum below it. It'd be nice to have an example of what's expected.> Signed-off-by: Ido Schimmel <idosch at nvidia.com> > --- > include/uapi/linux/if_bridge.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h > index f95326fce6bb..7e1bf080b414 100644 > --- a/include/uapi/linux/if_bridge.h > +++ b/include/uapi/linux/if_bridge.h > @@ -723,6 +723,14 @@ enum { > }; > #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1) > > +enum { > + MDBA_GET_ENTRY_UNSPEC, > + MDBA_GET_ENTRY, > + MDBA_GET_ENTRY_ATTRS, > + __MDBA_GET_ENTRY_MAX, > +}; > +#define MDBA_GET_ENTRY_MAX (__MDBA_GET_ENTRY_MAX - 1) > + > /* [MDBA_SET_ENTRY_ATTRS] = { > * [MDBE_ATTR_xxx] > * ...