mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
net/sched: cls_flower: add tunnel flags to fl_{set,dump}_key_flags()
Prepare to set and dump the tunnel flags. This code won't see any of these flags yet, as these flags aren't allowed by the NLA_POLICY_MASK, and the functions doesn't get called with encap set to true yet. Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net> Tested-by: Davide Caratti <dcaratti@redhat.com> Reviewed-by: Davide Caratti <dcaratti@redhat.com> Link: https://patch.msgid.link/20240713021911.1631517-9-ast@fiberby.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
03afeb613b
commit
988f8723d3
@ -1204,6 +1204,21 @@ static int fl_set_key_flags(struct nlattr **tb, bool encap, u32 *flags_key,
|
||||
TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST,
|
||||
FLOW_DIS_FIRST_FRAG);
|
||||
|
||||
fl_set_key_flag(key, mask, flags_key, flags_mask,
|
||||
TCA_FLOWER_KEY_FLAGS_TUNNEL_CSUM,
|
||||
FLOW_DIS_F_TUNNEL_CSUM);
|
||||
|
||||
fl_set_key_flag(key, mask, flags_key, flags_mask,
|
||||
TCA_FLOWER_KEY_FLAGS_TUNNEL_DONT_FRAGMENT,
|
||||
FLOW_DIS_F_TUNNEL_DONT_FRAGMENT);
|
||||
|
||||
fl_set_key_flag(key, mask, flags_key, flags_mask,
|
||||
TCA_FLOWER_KEY_FLAGS_TUNNEL_OAM, FLOW_DIS_F_TUNNEL_OAM);
|
||||
|
||||
fl_set_key_flag(key, mask, flags_key, flags_mask,
|
||||
TCA_FLOWER_KEY_FLAGS_TUNNEL_CRIT_OPT,
|
||||
FLOW_DIS_F_TUNNEL_CRIT_OPT);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -3127,6 +3142,21 @@ static int fl_dump_key_flags(struct sk_buff *skb, bool encap,
|
||||
TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST,
|
||||
FLOW_DIS_FIRST_FRAG);
|
||||
|
||||
fl_get_key_flag(flags_key, flags_mask, &key, &mask,
|
||||
TCA_FLOWER_KEY_FLAGS_TUNNEL_CSUM,
|
||||
FLOW_DIS_F_TUNNEL_CSUM);
|
||||
|
||||
fl_get_key_flag(flags_key, flags_mask, &key, &mask,
|
||||
TCA_FLOWER_KEY_FLAGS_TUNNEL_DONT_FRAGMENT,
|
||||
FLOW_DIS_F_TUNNEL_DONT_FRAGMENT);
|
||||
|
||||
fl_get_key_flag(flags_key, flags_mask, &key, &mask,
|
||||
TCA_FLOWER_KEY_FLAGS_TUNNEL_OAM, FLOW_DIS_F_TUNNEL_OAM);
|
||||
|
||||
fl_get_key_flag(flags_key, flags_mask, &key, &mask,
|
||||
TCA_FLOWER_KEY_FLAGS_TUNNEL_CRIT_OPT,
|
||||
FLOW_DIS_F_TUNNEL_CRIT_OPT);
|
||||
|
||||
_key = cpu_to_be32(key);
|
||||
_mask = cpu_to_be32(mask);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user