Message ID | 20231025123020.788710-8-idosch@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 83c1bbeb864f2a197603b91b3e0f748cca64543d |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Add MDB get support | expand |
On 10/25/23 15:30, 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 > > Signed-off-by: Ido Schimmel <idosch@nvidia.com> > --- > > Notes: > v2: > * Add comment. > > include/uapi/linux/if_bridge.h | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index f95326fce6bb..2e23f99dc0f1 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h @@ -723,6 +723,24 @@ enum { }; #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1) +/* [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 + * } + * } + */ +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] * ...
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@nvidia.com> --- Notes: v2: * Add comment. include/uapi/linux/if_bridge.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)