]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ila: support to configure checksum neutral-map-auto
authorTom Herbert <tom@quantonium.net>
Wed, 22 Nov 2017 20:05:35 +0000 (12:05 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 24 Nov 2017 17:14:13 +0000 (09:14 -0800)
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
ip/iproute_lwtunnel.c

index d4935d182424424ba2a26539f22289af2ae71906..0b706f0b0d49edd930749f593a1b6bf5164bc630 100644 (file)
@@ -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;
 }
index 1c8adbe78ed2896d76a4f93b541a20d71c1a379d..ebedd94a9ffcb931bda3a2ff9c0898d1c634ce0d 100644 (file)
@@ -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;
 }