|
|
4aca6e |
From 542da2c545d5c309524620a6fe3683cbfb205936 Mon Sep 17 00:00:00 2001
|
|
|
4aca6e |
From: Phil Sutter <psutter@redhat.com>
|
|
|
4aca6e |
Date: Tue, 28 Feb 2017 16:09:45 +0100
|
|
|
4aca6e |
Subject: [PATCH] bridge/fdb: add flag/indication for FDB entry synced from
|
|
|
4aca6e |
offload device
|
|
|
4aca6e |
|
|
|
4aca6e |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1417289
|
|
|
4aca6e |
Upstream Status: iproute2.git commit 28467b7f3facd
|
|
|
4aca6e |
|
|
|
4aca6e |
commit 28467b7f3facd6114b2fbe0c9fecf57adbd52e12
|
|
|
4aca6e |
Author: Scott Feldman <sfeldma@gmail.com>
|
|
|
4aca6e |
Date: Thu Dec 4 09:57:15 2014 +0100
|
|
|
4aca6e |
|
|
|
4aca6e |
bridge/fdb: add flag/indication for FDB entry synced from offload device
|
|
|
4aca6e |
|
|
|
4aca6e |
Add NTF_EXT_LEARNED flag to neigh flags to indicate FDB entry learned by
|
|
|
4aca6e |
device has been learned externally to bridge FDB. For these entries,
|
|
|
4aca6e |
add "external" annotation in bridge fdb show output:
|
|
|
4aca6e |
|
|
|
4aca6e |
00:02:00:00:03:00 dev swp2 used 2/2 master br0 external
|
|
|
4aca6e |
00:02:00:00:03:00 dev swp2 self permanent
|
|
|
4aca6e |
|
|
|
4aca6e |
In the example above, 00:02:00:00:03:00 is shown twice on dev swp2. The
|
|
|
4aca6e |
first entry if from the bridge (master) and is marked as "external" by
|
|
|
4aca6e |
the offload device. The second entry is from the brport offload device (self),
|
|
|
4aca6e |
and was learned by the device.
|
|
|
4aca6e |
|
|
|
4aca6e |
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
|
|
|
4aca6e |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
4aca6e |
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
|
|
|
4aca6e |
---
|
|
|
4aca6e |
bridge/fdb.c | 2 ++
|
|
|
4aca6e |
1 file changed, 2 insertions(+)
|
|
|
4aca6e |
|
|
|
4aca6e |
diff --git a/bridge/fdb.c b/bridge/fdb.c
|
|
|
4aca6e |
index 77f0c77..e411932 100644
|
|
|
4aca6e |
--- a/bridge/fdb.c
|
|
|
4aca6e |
+++ b/bridge/fdb.c
|
|
|
4aca6e |
@@ -158,6 +158,8 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
|
|
|
4aca6e |
fprintf(fp, "master ");
|
|
|
4aca6e |
if (r->ndm_flags & NTF_ROUTER)
|
|
|
4aca6e |
fprintf(fp, "router ");
|
|
|
4aca6e |
+ if (r->ndm_flags & NTF_EXT_LEARNED)
|
|
|
4aca6e |
+ fprintf(fp, "external ");
|
|
|
4aca6e |
|
|
|
4aca6e |
fprintf(fp, "%s\n", state_n2a(r->ndm_state));
|
|
|
4aca6e |
return 0;
|
|
|
4aca6e |
--
|
|
|
4aca6e |
1.8.3.1
|
|
|
4aca6e |
|