diff options
author | Hadar Hen Zion <hadarh@mellanox.com> | 2016-11-07 14:14:38 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-09 19:41:54 +0100 |
commit | 519d10521cd3049f9500a1f4709ec1719a18540f (patch) | |
tree | 253d12c48bc77c4d135cb50a711ecf262bf0f6b0 /net/sched | |
parent | flow_dissector: Add enums for encapsulation keys (diff) | |
download | linux-519d10521cd3049f9500a1f4709ec1719a18540f.tar.xz linux-519d10521cd3049f9500a1f4709ec1719a18540f.zip |
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 <hadarh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/cls_flower.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index db4cd882a989..6369b74c8f5b 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -567,6 +567,16 @@ static void fl_init_dissector(struct cls_fl_head *head, FLOW_DISSECTOR_KEY_PORTS, tp); FL_KEY_SET_IF_MASKED(&mask->key, keys, cnt, FLOW_DISSECTOR_KEY_VLAN, vlan); + FL_KEY_SET_IF_MASKED(&mask->key, keys, cnt, + FLOW_DISSECTOR_KEY_ENC_KEYID, enc_key_id); + FL_KEY_SET_IF_MASKED(&mask->key, keys, cnt, + FLOW_DISSECTOR_KEY_ENC_IPV4_ADDRS, enc_ipv4); + FL_KEY_SET_IF_MASKED(&mask->key, keys, cnt, + FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS, enc_ipv6); + if (FL_KEY_IS_MASKED(&mask->key, enc_ipv4) || + FL_KEY_IS_MASKED(&mask->key, enc_ipv6)) + FL_KEY_SET(keys, cnt, FLOW_DISSECTOR_KEY_ENC_CONTROL, + enc_control); skb_flow_dissector_init(&head->dissector, keys, cnt); } |