All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Herbert <tom@quantonium.net>
To: stephen@networkplumber.org
Cc: netdev@vger.kernel.org, rohit@quantonium.net,
	Tom Herbert <tom@quantonium.net>
Subject: [PATCH iproute 3/5] ila: support to configure checksum neutral-map-auto
Date: Wed, 22 Nov 2017 12:05:35 -0800	[thread overview]
Message-ID: <20171122200537.26703-4-tom@quantonium.net> (raw)
In-Reply-To: <20171122200537.26703-1-tom@quantonium.net>

Configuration support in both ip ila and ip LWT for checksum
neutral-map-auto. This is a mode of ILA where checksum
neutral mapping is assumed for packets (there is no C-bit
in the identifier to indicate checksum neutral).

Signed-off-by: Tom Herbert <tom@quantonium.net>
---
 ip/ipila.c            | 8 +++++---
 ip/iproute_lwtunnel.c | 4 ++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ip/ipila.c b/ip/ipila.c
index d4935d18..0b706f0b 100644
--- a/ip/ipila.c
+++ b/ip/ipila.c
@@ -28,7 +28,7 @@ static void usage(void)
 	fprintf(stderr, "Usage: ip ila add loc_match LOCATOR_MATCH "
 		"loc LOCATOR [ dev DEV ] "
 		"[ csum-mode { adj-transport | neutral-map | "
-		"no-action } ]\n");
+		"neutral-map-auto | no-action } ]\n");
 	fprintf(stderr, "       ip ila del loc_match LOCATOR_MATCH "
 		"[ loc LOCATOR ] [ dev DEV ]\n");
 	fprintf(stderr, "       ip ila list\n");
@@ -59,6 +59,8 @@ static char *ila_csum_mode2name(__u8 csum_mode)
 		return "neutral-map";
 	case ILA_CSUM_NO_ACTION:
 		return "no-action";
+	case ILA_CSUM_NEUTRAL_MAP_AUTO:
+		return "neutral-map-auto";
 	default:
 		return "unknown";
 	}
@@ -70,8 +72,8 @@ static int ila_csum_name2mode(char *name)
 		return ILA_CSUM_ADJUST_TRANSPORT;
 	else if (strcmp(name, "neutral-map") == 0)
 		return ILA_CSUM_NEUTRAL_MAP;
-	else if (strcmp(name, "no-action") == 0)
-		return ILA_CSUM_NO_ACTION;
+	else if (strcmp(name, "neutral-map-auto") == 0)
+		return ILA_CSUM_NEUTRAL_MAP_AUTO;
 	else
 		return -1;
 }
diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c
index 1c8adbe7..ebedd94a 100644
--- a/ip/iproute_lwtunnel.c
+++ b/ip/iproute_lwtunnel.c
@@ -288,6 +288,8 @@ static char *ila_csum_mode2name(__u8 csum_mode)
 		return "neutral-map";
 	case ILA_CSUM_NO_ACTION:
 		return "no-action";
+	case ILA_CSUM_NEUTRAL_MAP_AUTO:
+		return "neutral-map-auto";
 	default:
 		return "unknown";
 	}
@@ -301,6 +303,8 @@ static int ila_csum_name2mode(char *name)
 		return ILA_CSUM_NEUTRAL_MAP;
 	else if (strcmp(name, "no-action") == 0)
 		return ILA_CSUM_NO_ACTION;
+	else if (strcmp(name, "neutral-map-auto") == 0)
+		return ILA_CSUM_NEUTRAL_MAP_AUTO;
 	else
 		return -1;
 }
-- 
2.11.0

  parent reply	other threads:[~2017-11-22 20:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 20:05 [PATCH iproute 0/5] ila: additional configuratio support Tom Herbert
2017-11-22 20:05 ` [PATCH iproute 1/5] ila: Fix reporting of ILA locators and locator match Tom Herbert
2017-11-22 20:05 ` [PATCH iproute 2/5] ila: added csum neutral support to ipila Tom Herbert
2017-11-22 20:05 ` Tom Herbert [this message]
2017-11-22 20:05 ` [PATCH iproute 4/5] ila: support for configuring identifier and hook types Tom Herbert
2017-11-22 20:05 ` [PATCH iproute 5/5] ila: create ila_common.h Tom Herbert
2017-11-24 17:26 ` [PATCH iproute 0/5] ila: additional configuratio support Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171122200537.26703-4-tom@quantonium.net \
    --to=tom@quantonium.net \
    --cc=netdev@vger.kernel.org \
    --cc=rohit@quantonium.net \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.