From 74776a9a952915531233e5092e6e1dbfdaf846d5 Mon Sep 17 00:00:00 2001
From: Phil Sutter <psutter@redhat.com>
Date: Tue, 28 Feb 2017 16:12:38 +0100
Subject: [PATCH] bridge: mdb: add support for offloaded mdb entries
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1417289
Upstream Status: iproute2.git commit 29d61fb385967
commit 29d61fb385967e6e558aad99f68714df42f18c38
Author: Elad Raz <eladr@mellanox.com>
Date: Sun Mar 6 12:46:04 2016 -0800
bridge: mdb: add support for offloaded mdb entries
Mark MDB entries which are offloaded to HW with "offload" flag
Signed-off-by: Elad Raz <eladr@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
bridge/mdb.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bridge/mdb.c b/bridge/mdb.c
index 09d4b22..600596c 100644
--- a/bridge/mdb.c
+++ b/bridge/mdb.c
@@ -60,10 +60,11 @@ static void print_mdb_entry(FILE *f, int ifindex, struct br_mdb_entry *e,
(const void *)&e->addr.u.ip6;
if (n->nlmsg_type == RTM_DELMDB)
fprintf(f, "Deleted ");
- fprintf(f, "dev %s port %s grp %s %s", ll_index_to_name(ifindex),
+ fprintf(f, "dev %s port %s grp %s %s %s", ll_index_to_name(ifindex),
ll_index_to_name(e->ifindex),
inet_ntop(af, src, abuf, sizeof(abuf)),
- (e->state & MDB_PERMANENT) ? "permanent" : "temp");
+ (e->state & MDB_PERMANENT) ? "permanent" : "temp",
+ (e->flags & MDB_FLAGS_OFFLOAD) ? "offload" : "");
if (e->vid)
fprintf(f, " vid %hu", e->vid);
if (show_stats && tb && tb[MDBA_MDB_EATTR_TIMER]) {
--
1.8.3.1