History

net/sched: add tunnel option support to act_tunnel_key

Allow setting tunnel options using the act_tunnel_key action. Options are expressed as class:type:data and multiple options may be listed using a comma delimiter. # ip link add name geneve0 type geneve dstport 0 external # tc qdisc add dev eth0 ingress # tc filter add dev eth0 protocol ip parent ffff: \ flower indev eth0 \ ip_proto udp \ action tunnel_key \ set src_ip 10.0.99.192 \ dst_ip 10.0.99.193 \ dst_port 6081 \ id 11 \ geneve_opts 0102:80:00800022,0102:80:00800022 \ action mirred egress redirect dev geneve0

Simon Horman committed 8 years ago

Commit 0ed52691 parent 256c87c2 files · +236 −4Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/tc_act/tc_tunnel_key.h+26−0
@@ -36,9 +36,35 @@ enum { · 35 unmodified lines
3636 TCA_TUNNEL_KEY_PAD,
3737 TCA_TUNNEL_KEY_ENC_DST_PORT, /* be16 */
3838 TCA_TUNNEL_KEY_NO_CSUM, /* u8 */
39+ TCA_TUNNEL_KEY_ENC_OPTS, /* Nested TCA_TUNNEL_KEY_ENC_OPTS_
40+ * attributes
41+ */
3942 __TCA_TUNNEL_KEY_MAX,
4043 };
4144
4245 #define TCA_TUNNEL_KEY_MAX (__TCA_TUNNEL_KEY_MAX - 1)
4346
47+enum {
48+ TCA_TUNNEL_KEY_ENC_OPTS_UNSPEC,
49+ TCA_TUNNEL_KEY_ENC_OPTS_GENEVE, /* Nested
50+ * TCA_TUNNEL_KEY_ENC_OPTS_
51+ * attributes
52+ */
53+ __TCA_TUNNEL_KEY_ENC_OPTS_MAX,
54+};
55+
56+#define TCA_TUNNEL_KEY_ENC_OPTS_MAX (__TCA_TUNNEL_KEY_ENC_OPTS_MAX - 1)
57+
58+enum {
59+ TCA_TUNNEL_KEY_ENC_OPT_GENEVE_UNSPEC,
60+ TCA_TUNNEL_KEY_ENC_OPT_GENEVE_CLASS, /* be16 */
61+ TCA_TUNNEL_KEY_ENC_OPT_GENEVE_TYPE, /* u8 */
62+ TCA_TUNNEL_KEY_ENC_OPT_GENEVE_DATA, /* 4 to 128 bytes */
63+
64+ __TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX,
65+};
66+
67+#define TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX \
68+ (__TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX - 1)
69+
4470 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t