Skip to content

Commit

Permalink
bridge: add MDB get uAPI attributes
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Nikolay Aleksandrov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
idosch authored and davem330 committed Oct 27, 2023
1 parent 14c32a4 commit 83c1bbe
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions include/uapi/linux/if_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -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]
* ...
Expand Down

0 comments on commit 83c1bbe

Please sign in to comment.