History

net/sched: flower: define new tunnel flags

Define new TCA_FLOWER_KEY_FLAGS_* flags for use in struct flow_dissector_key_control, covering the same flags as currently exposed through TCA_FLOWER_KEY_ENC_FLAGS. Put the new flags under FLOW_DIS_F_*. The idea is that we can later, move the existing flags under FLOW_DIS_F_* as well. The ynl flag names have been taken from the RFC iproute2 patch.

Asbjørn Sloth Tønnesen committed 2 years ago

Commit bfda5a61 parent 49ba9fc3 files · +14 −1Browse files

Unified · Split

3 files
  1. Documentation/netlink/specs/tc.yaml +4 −0
  2. include/net/flow_dissector.h +6 −1
  3. include/uapi/linux/pkt_cls.h +4 −0
Documentation/netlink/specs/tc.yaml+4−0
@@ -47,6 +47,10 @@ definitions: · 46 unmodified lines
47 entries:47 entries:
48 - frag48 - frag
49 - firstfrag49 - firstfrag
50 - tuncsum
51 - tundf
52 - tunoam
53 - tuncrit
50 -54 -
51 name: tc-stats55 name: tc-stats
52 type: struct56 type: struct
include/net/flow_dissector.h+6−1
@@ -17,7 +17,8 @@ struct sk_buff; · 16 unmodified lines
17 * struct flow_dissector_key_control:17 * struct flow_dissector_key_control:
18 * @thoff: Transport header offset18 * @thoff: Transport header offset
19 * @addr_type: Type of key. One of FLOW_DISSECTOR_KEY_*19 * @addr_type: Type of key. One of FLOW_DISSECTOR_KEY_*
20 * @flags: Key flags. Any of FLOW_DIS_(IS_FRAGMENT|FIRST_FRAGENCAPSULATION)20 * @flags: Key flags.
21 * Any of FLOW_DIS_(IS_FRAGMENT|FIRST_FRAG|ENCAPSULATION|F_*)
21 */22 */
22struct flow_dissector_key_control {23struct flow_dissector_key_control {
23 u16 thoff;24 u16 thoff;
@@ -31,6 +32,10 @@ struct flow_dissector_key_control { · 7 unmodified lines
31enum flow_dissector_ctrl_flags {32enum flow_dissector_ctrl_flags {
32 FLOW_DIS_IS_FRAGMENT = TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT,33 FLOW_DIS_IS_FRAGMENT = TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT,
33 FLOW_DIS_FIRST_FRAG = TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST,34 FLOW_DIS_FIRST_FRAG = TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST,
35 FLOW_DIS_F_TUNNEL_CSUM = TCA_FLOWER_KEY_FLAGS_TUNNEL_CSUM,
36 FLOW_DIS_F_TUNNEL_DONT_FRAGMENT = TCA_FLOWER_KEY_FLAGS_TUNNEL_DONT_FRAGMENT,
37 FLOW_DIS_F_TUNNEL_OAM = TCA_FLOWER_KEY_FLAGS_TUNNEL_OAM,
38 FLOW_DIS_F_TUNNEL_CRIT_OPT = TCA_FLOWER_KEY_FLAGS_TUNNEL_CRIT_OPT,
34 39
35 /* These flags are internal to the kernel */40 /* These flags are internal to the kernel */
36 FLOW_DIS_ENCAPSULATION = (TCA_FLOWER_KEY_FLAGS_MAX << 1),41 FLOW_DIS_ENCAPSULATION = (TCA_FLOWER_KEY_FLAGS_MAX << 1),
include/uapi/linux/pkt_cls.h+4−0
@@ -677,6 +677,10 @@ enum { · 676 unmodified lines
677enum {677enum {
678 TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT = (1 << 0),678 TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT = (1 << 0),
679 TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST = (1 << 1),679 TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST = (1 << 1),
680 TCA_FLOWER_KEY_FLAGS_TUNNEL_CSUM = (1 << 2),
681 TCA_FLOWER_KEY_FLAGS_TUNNEL_DONT_FRAGMENT = (1 << 3),
682 TCA_FLOWER_KEY_FLAGS_TUNNEL_OAM = (1 << 4),
683 TCA_FLOWER_KEY_FLAGS_TUNNEL_CRIT_OPT = (1 << 5),
680 __TCA_FLOWER_KEY_FLAGS_MAX,684 __TCA_FLOWER_KEY_FLAGS_MAX,
681};685};
682 686