linma / rpms / iproute

Forked from rpms/iproute 4 years ago
Clone

Blame SOURCES/0043-iproute2-unify-naming-for-entries-offloaded-to-hardw.patch

4aca6e
From 61ce940e17bcc13378c59fed8247a1afa7ae918d Mon Sep 17 00:00:00 2001
4aca6e
From: Phil Sutter <psutter@redhat.com>
4aca6e
Date: Tue, 28 Feb 2017 16:10:39 +0100
4aca6e
Subject: [PATCH] iproute2: unify naming for entries offloaded to hardware
4aca6e
4aca6e
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1417289
4aca6e
Upstream Status: iproute2.git commit aa05b988f53b5
4aca6e
4aca6e
commit aa05b988f53b5ce68f25c5b4e52c6bd3e32a6347
4aca6e
Author: Andy Gospodarek <gospo@cumulusnetworks.com>
4aca6e
Date:   Fri Apr 10 16:50:40 2015 -0400
4aca6e
4aca6e
    iproute2: unify naming for entries offloaded to hardware
4aca6e
4aca6e
    The kernel now has the capability to offload FDB and FIB entries to hardware.
4aca6e
    It is important to let users know if table entries are also offloaded to
4aca6e
    hardware.  Currently offloaded FDB entries are indicated by the existence of
4aca6e
    the flag 'external' on the entry as of the following commit:
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
    When the patch to add support for indicating that FIB entries were also
4aca6e
    offloaded as posted to netdev by Scott Feldman it became clear that 'external'
4aca6e
    would not be an ideal name for routes.  There could definitely be confusion
4aca6e
    about what this might mean since many routes are to external networks -- a
4aca6e
    collision/confusion that did not happen with FDB.
4aca6e
4aca6e
    Scott Feldman asked me to check with others and build concensus around a name.
4aca6e
    After speaking with several people about this I am proposing we refer to both
4aca6e
    FDB and FIB entries that are currently backed by hardware (based on the work
4aca6e
    done in rocker) with the flag 'offload' appended to the end ofthe entry.
4aca6e
4aca6e
    Some people liked the string 'external,' others liked 'hardware,' but the point
4aca6e
    is to communicate that these routes are available to something that will will
4aca6e
    offload the forwarding normally done by the kernel.  Since the term 'offload'
4aca6e
    is used so frequently it seems appropriate to use the same language in
4aca6e
    ip/bridge output.
4aca6e
4aca6e
    The term 'offload' also seems to resonate with many of the people who have
4aca6e
    responded on Scott's original thread or to those who I reached out to directly
4aca6e
    and did respond to my query, so it seems we have reached consensus that it
4aca6e
    should be the term used going forward.
4aca6e
4aca6e
    v2: rebased against net-next branch
4aca6e
4aca6e
    Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
4aca6e
    CC: Jamal Hadi Salim <jhs@mojatatu.com>
4aca6e
    CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
4aca6e
    CC: Jiri Pirko <jiri@resnulli.us>
4aca6e
    CC: John W. Linville <linville@tuxdriver.com>
4aca6e
    CC: Roopa Prabhu <roopa@cumulusnetworks.com>
4aca6e
    CC: Scott Feldman <sfeldma@gmail.com>
4aca6e
    CC: Stephen Hemminger <stephen@networkplumber.org>
4aca6e
---
4aca6e
 bridge/fdb.c | 2 +-
4aca6e
 ip/iproute.c | 2 +-
4aca6e
 2 files changed, 2 insertions(+), 2 deletions(-)
4aca6e
4aca6e
diff --git a/bridge/fdb.c b/bridge/fdb.c
4aca6e
index 3020633..edf621c 100644
4aca6e
--- a/bridge/fdb.c
4aca6e
+++ b/bridge/fdb.c
4aca6e
@@ -159,7 +159,7 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
4aca6e
 	if (r->ndm_flags & NTF_ROUTER)
4aca6e
 		fprintf(fp, "router ");
4aca6e
 	if (r->ndm_flags & NTF_EXT_LEARNED)
4aca6e
-		fprintf(fp, "external ");
4aca6e
+		fprintf(fp, "offload ");
4aca6e
 
4aca6e
 	fprintf(fp, "%s\n", state_n2a(r->ndm_state));
4aca6e
 	return 0;
4aca6e
diff --git a/ip/iproute.c b/ip/iproute.c
4aca6e
index 6d64469..3f4b91a 100644
4aca6e
--- a/ip/iproute.c
4aca6e
+++ b/ip/iproute.c
4aca6e
@@ -439,7 +439,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
4aca6e
 	if (r->rtm_flags & RTNH_F_PERVASIVE)
4aca6e
 		fprintf(fp, "pervasive ");
4aca6e
 	if (r->rtm_flags & RTNH_F_EXTERNAL)
4aca6e
-		fprintf(fp, "external ");
4aca6e
+		fprintf(fp, "offload ");
4aca6e
 	if (r->rtm_flags & RTM_F_NOTIFY)
4aca6e
 		fprintf(fp, "notify ");
4aca6e
 	if (tb[RTA_MARK]) {
4aca6e
-- 
4aca6e
1.8.3.1
4aca6e