Skip to content

Commit 519d105

Browse files
hadarhenziondavem330
authored andcommitted
net/sched: cls_flower: Allow setting encapsulation fields as used key
When encapsulation field is set, mark it as used key for the flow dissector. This will be used by offloading drivers. Signed-off-by: Hadar Hen Zion <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9ba6a9a commit 519d105

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

net/sched/cls_flower.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,16 @@ static void fl_init_dissector(struct cls_fl_head *head,
567567
FLOW_DISSECTOR_KEY_PORTS, tp);
568568
FL_KEY_SET_IF_MASKED(&mask->key, keys, cnt,
569569
FLOW_DISSECTOR_KEY_VLAN, vlan);
570+
FL_KEY_SET_IF_MASKED(&mask->key, keys, cnt,
571+
FLOW_DISSECTOR_KEY_ENC_KEYID, enc_key_id);
572+
FL_KEY_SET_IF_MASKED(&mask->key, keys, cnt,
573+
FLOW_DISSECTOR_KEY_ENC_IPV4_ADDRS, enc_ipv4);
574+
FL_KEY_SET_IF_MASKED(&mask->key, keys, cnt,
575+
FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS, enc_ipv6);
576+
if (FL_KEY_IS_MASKED(&mask->key, enc_ipv4) ||
577+
FL_KEY_IS_MASKED(&mask->key, enc_ipv6))
578+
FL_KEY_SET(keys, cnt, FLOW_DISSECTOR_KEY_ENC_CONTROL,
579+
enc_control);
570580

571581
skb_flow_dissector_init(&head->dissector, keys, cnt);
572582
}

0 commit comments

Comments
 (0)