All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] bridge: fdb: print NDA_SRC_VNI if available
@ 2017-10-26 17:12 Roopa Prabhu
  2017-11-01 21:31 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Roopa Prabhu @ 2017-10-26 17:12 UTC (permalink / raw)
  To: stephen; +Cc: netdev, nikolay

From: Roopa Prabhu <roopa@cumulusnetworks.com>

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
 bridge/fdb.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bridge/fdb.c b/bridge/fdb.c
index e5cebf9..081233a 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -204,6 +204,15 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 				rta_getattr_u32(tb[NDA_VNI]));
 	}
 
+	if (tb[NDA_SRC_VNI]) {
+		if (jw_global)
+			jsonw_uint_field(jw_global, "src_vni",
+					 rta_getattr_u32(tb[NDA_SRC_VNI]));
+		else
+			fprintf(fp, "src_vni %d ",
+				rta_getattr_u32(tb[NDA_SRC_VNI]));
+	}
+
 	if (tb[NDA_IFINDEX]) {
 		unsigned int ifindex = rta_getattr_u32(tb[NDA_IFINDEX]);
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH iproute2] bridge: fdb: print NDA_SRC_VNI if available
  2017-10-26 17:12 [PATCH iproute2] bridge: fdb: print NDA_SRC_VNI if available Roopa Prabhu
@ 2017-11-01 21:31 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2017-11-01 21:31 UTC (permalink / raw)
  To: Roopa Prabhu; +Cc: netdev, nikolay

On Thu, 26 Oct 2017 10:12:55 -0700
Roopa Prabhu <roopa@cumulusnetworks.com> wrote:

> From: Roopa Prabhu <roopa@cumulusnetworks.com>
> 
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>

In general, this looks ok and I will apply it.

But why is there no ability to set source vni? The kernel accepts
it as a parameter to vxlan, but there is no option to set it with
ip command when creating vxlan.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-01 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26 17:12 [PATCH iproute2] bridge: fdb: print NDA_SRC_VNI if available Roopa Prabhu
2017-11-01 21:31 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.