Commit 9558a83a authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

net: flow_offload: implement support for meta key

Implement support for previously added flow dissector meta key.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8212ed77
...@@ -10,6 +10,10 @@ struct flow_match { ...@@ -10,6 +10,10 @@ struct flow_match {
void *key; void *key;
}; };
struct flow_match_meta {
struct flow_dissector_key_meta *key, *mask;
};
struct flow_match_basic { struct flow_match_basic {
struct flow_dissector_key_basic *key, *mask; struct flow_dissector_key_basic *key, *mask;
}; };
...@@ -64,6 +68,8 @@ struct flow_match_enc_opts { ...@@ -64,6 +68,8 @@ struct flow_match_enc_opts {
struct flow_rule; struct flow_rule;
void flow_rule_match_meta(const struct flow_rule *rule,
struct flow_match_meta *out);
void flow_rule_match_basic(const struct flow_rule *rule, void flow_rule_match_basic(const struct flow_rule *rule,
struct flow_match_basic *out); struct flow_match_basic *out);
void flow_rule_match_control(const struct flow_rule *rule, void flow_rule_match_control(const struct flow_rule *rule,
......
...@@ -25,6 +25,13 @@ EXPORT_SYMBOL(flow_rule_alloc); ...@@ -25,6 +25,13 @@ EXPORT_SYMBOL(flow_rule_alloc);
(__out)->key = skb_flow_dissector_target(__d, __type, (__m)->key); \ (__out)->key = skb_flow_dissector_target(__d, __type, (__m)->key); \
(__out)->mask = skb_flow_dissector_target(__d, __type, (__m)->mask); \ (__out)->mask = skb_flow_dissector_target(__d, __type, (__m)->mask); \
void flow_rule_match_meta(const struct flow_rule *rule,
struct flow_match_meta *out)
{
FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_META, out);
}
EXPORT_SYMBOL(flow_rule_match_meta);
void flow_rule_match_basic(const struct flow_rule *rule, void flow_rule_match_basic(const struct flow_rule *rule,
struct flow_match_basic *out) struct flow_match_basic *out)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment