bridge fdb: add 'use' option to set NTF_USE flag in fdb add requests
This is similar to command options corresponding to other NTF_* flags already exposed to the user space (examples self/master). Also updates bridge man page (The man page patch also includes a fix to the 'self' entry and documents 'master' for fdb entries) Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
This commit is contained in:
parent
efb169717e
commit
cd8df30b7c
|
|
@ -31,8 +31,9 @@ static unsigned int filter_index;
|
||||||
|
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Usage: bridge fdb { add | append | del | replace } ADDR dev DEV {self|master} [ temp ]\n"
|
fprintf(stderr, "Usage: bridge fdb { add | append | del | replace ADDR dev DEV\n"
|
||||||
" [router] [ dst IPADDR] [ vlan VID ]\n"
|
" [ self ] [ master ] [ use ] [ router ]\n"
|
||||||
|
" [ local | temp ] [ dst IPADDR ] [ vlan VID ]\n"
|
||||||
" [ port PORT] [ vni VNI ] [via DEV]\n");
|
" [ port PORT] [ vni VNI ] [via DEV]\n");
|
||||||
fprintf(stderr, " bridge fdb {show} [ br BRDEV ] [ brport DEV ]\n");
|
fprintf(stderr, " bridge fdb {show} [ br BRDEV ] [ brport DEV ]\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|
@ -305,6 +306,8 @@ static int fdb_modify(int cmd, int flags, int argc, char **argv)
|
||||||
duparg2("vlan", *argv);
|
duparg2("vlan", *argv);
|
||||||
NEXT_ARG();
|
NEXT_ARG();
|
||||||
vid = atoi(*argv);
|
vid = atoi(*argv);
|
||||||
|
} else if (matches(*argv, "use") == 0) {
|
||||||
|
req.ndm.ndm_flags |= NTF_USE;
|
||||||
} else {
|
} else {
|
||||||
if (strcmp(*argv, "to") == 0) {
|
if (strcmp(*argv, "to") == 0) {
|
||||||
NEXT_ARG();
|
NEXT_ARG();
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,8 @@ bridge \- show / manipulate bridge addresses and devices
|
||||||
.I LLADDR
|
.I LLADDR
|
||||||
.B dev
|
.B dev
|
||||||
.IR DEV " { "
|
.IR DEV " { "
|
||||||
.BR local " | " temp " } { "
|
.BR local " | " temp " } [ "
|
||||||
.BR self " } { " router " } [ "
|
.BR self " ] [ " master " ] [ " router " ] [ " use " ] [ "
|
||||||
.B dst
|
.B dst
|
||||||
.IR IPADDR " ] [ "
|
.IR IPADDR " ] [ "
|
||||||
.B vni
|
.B vni
|
||||||
|
|
@ -323,7 +323,11 @@ the Ethernet MAC address.
|
||||||
the interface to which this address is associated.
|
the interface to which this address is associated.
|
||||||
|
|
||||||
.B self
|
.B self
|
||||||
- the address is associated with a software fdb (default)
|
- the address is associated with the port drivers fdb. Usually hardware.
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.B master
|
||||||
|
- the address is associated with master devices fdb. Usually software (default).
|
||||||
.sp
|
.sp
|
||||||
|
|
||||||
.B router
|
.B router
|
||||||
|
|
@ -332,6 +336,11 @@ Valid if the referenced device is a VXLAN type device and has
|
||||||
route shortcircuit enabled.
|
route shortcircuit enabled.
|
||||||
.sp
|
.sp
|
||||||
|
|
||||||
|
.B use
|
||||||
|
- the address is in use. User space can use this option to
|
||||||
|
indicate to the kernel that the fdb entry is in use.
|
||||||
|
.sp
|
||||||
|
|
||||||
.in -8
|
.in -8
|
||||||
The next command line parameters apply only
|
The next command line parameters apply only
|
||||||
when the specified device
|
when the specified device
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue