Blame SOURCES/0069-tc-f_flower-Add-support-for-matching-first-frag-pack.patch

99be8f
From 69685a7aa7fb408cce256e469430e10e99a43e2d Mon Sep 17 00:00:00 2001
99be8f
From: Andrea Claudi <aclaudi@redhat.com>
99be8f
Date: Mon, 25 Mar 2019 16:54:31 +0100
99be8f
Subject: [PATCH] tc: f_flower: Add support for matching first frag packets
99be8f
99be8f
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1559814
99be8f
Upstream Status: iproute2.git commit fb4e6abfca2c4
99be8f
99be8f
commit fb4e6abfca2c48380210d48c1e7f3685f8bb58fd
99be8f
Author: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
99be8f
Date:   Fri Mar 9 11:07:22 2018 +0100
99be8f
99be8f
    tc: f_flower: Add support for matching first frag packets
99be8f
99be8f
    Add matching support for distinguishing between first and later fragmented
99be8f
    packets.
99be8f
99be8f
     # tc filter add dev eth0 protocol ip parent ffff: \
99be8f
         flower indev eth0 \
99be8f
            ip_flags firstfrag \
99be8f
            ip_proto udp \
99be8f
        action mirred egress redirect dev eth1
99be8f
99be8f
     # tc filter add dev eth0 protocol ip parent ffff: \
99be8f
         flower indev eth0 \
99be8f
            ip_flags nofirstfrag \
99be8f
            ip_proto udp \
99be8f
        action mirred egress redirect dev eth1
99be8f
99be8f
    Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
99be8f
    Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
99be8f
    Signed-off-by: Simon Horman <simon.horman@netronome.com>
99be8f
    Signed-off-by: David Ahern <dsahern@gmail.com>
99be8f
---
99be8f
 man/man8/tc-flower.8 | 8 ++++++--
99be8f
 tc/f_flower.c        | 1 +
99be8f
 2 files changed, 7 insertions(+), 2 deletions(-)
99be8f
99be8f
diff --git a/man/man8/tc-flower.8 b/man/man8/tc-flower.8
99be8f
index 387f73f5cd2e9..661f42200bdfb 100644
99be8f
--- a/man/man8/tc-flower.8
99be8f
+++ b/man/man8/tc-flower.8
99be8f
@@ -255,8 +255,12 @@ is an 8 bit time-to-live value.
99be8f
 .BI ip_flags " IP_FLAGS"
99be8f
 .I IP_FLAGS
99be8f
 may be either
99be8f
-.BR frag " or " nofrag
99be8f
-to match on fragmented packets or not respectively.
99be8f
+.BR frag ", " nofrag ", " firstfrag " or " nofirstfrag
99be8f
+where frag and nofrag could be used to match on fragmented packets or not,
99be8f
+respectively. firstfrag and nofirstfrag can be used to further distinguish
99be8f
+fragmented packet. firstfrag can be used to indicate the first fragmented
99be8f
+packet. nofirstfrag can be used to indicates subsequent fragmented packets
99be8f
+or non-fragmented packets.
99be8f
 .SH NOTES
99be8f
 As stated above where applicable, matches of a certain layer implicitly depend
99be8f
 on the matches of the next lower layer. Precisely, layer one and two matches
99be8f
diff --git a/tc/f_flower.c b/tc/f_flower.c
99be8f
index 40dcfbd687a20..e2c7daa0b8e03 100644
99be8f
--- a/tc/f_flower.c
99be8f
+++ b/tc/f_flower.c
99be8f
@@ -162,6 +162,7 @@ struct flag_to_string {
99be8f
 
99be8f
 static struct flag_to_string flags_str[] = {
99be8f
 	{ TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT, FLOWER_IP_FLAGS, "frag" },
99be8f
+	{ TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST, FLOWER_IP_FLAGS, "firstfrag" },
99be8f
 };
99be8f
 
99be8f
 static int flower_parse_matching_flags(char *str,
99be8f
-- 
99be8f
2.20.1
99be8f