summaryrefslogtreecommitdiffstats
path: root/include/net/tc_act
diff options
context:
space:
mode:
authorAmir Vadai <amir@vadai.me>2017-02-07 08:56:08 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-10 19:18:33 +0100
commit853a14ba4682f820266469979c9297debc05f60c (patch)
tree5475357c2342327746b5f99a67d46f4eb4ef78d3 /include/net/tc_act
parentnet/act_pedit: Support using offset relative to the conventional network headers (diff)
downloadlinux-853a14ba4682f820266469979c9297debc05f60c.tar.xz
linux-853a14ba4682f820266469979c9297debc05f60c.zip
net/act_pedit: Introduce 'add' operation
This command could be useful to inc/dec fields. For example, to forward any TCP packet and decrease its TTL: $ tc filter add dev enp0s9 protocol ip parent ffff: \ flower ip_proto tcp \ action pedit munge ip ttl add 0xff pipe \ action mirred egress redirect dev veth0 In the example above, adding 0xff to this u8 field is actually decreasing it by one, since the operation is masked. Signed-off-by: Amir Vadai <amir@vadai.me> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tc_act')
-rw-r--r--include/net/tc_act/tc_pedit.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/tc_act/tc_pedit.h b/include/net/tc_act/tc_pedit.h
index e076f22035a5..dfbd6ee0bc7c 100644
--- a/include/net/tc_act/tc_pedit.h
+++ b/include/net/tc_act/tc_pedit.h
@@ -5,6 +5,7 @@
struct tcf_pedit_key_ex {
enum pedit_header_type htype;
+ enum pedit_cmd cmd;
};
struct tcf_pedit {