Skip to content

Commit bfda5a6

Browse files
Asbjørn Sloth Tønnesenkuba-moo
authored andcommitted
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. Signed-off-by: Asbjørn Sloth Tønnesen <[email protected]> Reviewed-by: Donald Hunter <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 49ba9fc commit bfda5a6

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

Documentation/netlink/specs/tc.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ definitions:
4747
entries:
4848
- frag
4949
- firstfrag
50+
- tuncsum
51+
- tundf
52+
- tunoam
53+
- tuncrit
5054
-
5155
name: tc-stats
5256
type: struct

include/net/flow_dissector.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ struct sk_buff;
1717
* struct flow_dissector_key_control:
1818
* @thoff: Transport header offset
1919
* @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_*)
2122
*/
2223
struct flow_dissector_key_control {
2324
u16 thoff;
@@ -31,6 +32,10 @@ struct flow_dissector_key_control {
3132
enum flow_dissector_ctrl_flags {
3233
FLOW_DIS_IS_FRAGMENT = TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT,
3334
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,
3439

3540
/* These flags are internal to the kernel */
3641
FLOW_DIS_ENCAPSULATION = (TCA_FLOWER_KEY_FLAGS_MAX << 1),

include/uapi/linux/pkt_cls.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,10 @@ enum {
677677
enum {
678678
TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT = (1 << 0),
679679
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),
680684
__TCA_FLOWER_KEY_FLAGS_MAX,
681685
};
682686

0 commit comments

Comments
 (0)