Skip to content

Commit c8915d7

Browse files
rkannoth1davem330
authored andcommitted
tc: flower: Enable offload support IPSEC SPI field.
This patch enables offload for TC classifier flower rules which matches against SPI field. Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4c13eda commit c8915d7

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

include/net/flow_offload.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ struct flow_match_tcp {
6464
struct flow_dissector_key_tcp *key, *mask;
6565
};
6666

67+
struct flow_match_ipsec {
68+
struct flow_dissector_key_ipsec *key, *mask;
69+
};
70+
6771
struct flow_match_mpls {
6872
struct flow_dissector_key_mpls *key, *mask;
6973
};
@@ -116,6 +120,8 @@ void flow_rule_match_ports_range(const struct flow_rule *rule,
116120
struct flow_match_ports_range *out);
117121
void flow_rule_match_tcp(const struct flow_rule *rule,
118122
struct flow_match_tcp *out);
123+
void flow_rule_match_ipsec(const struct flow_rule *rule,
124+
struct flow_match_ipsec *out);
119125
void flow_rule_match_icmp(const struct flow_rule *rule,
120126
struct flow_match_icmp *out);
121127
void flow_rule_match_mpls(const struct flow_rule *rule,

net/core/flow_offload.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ void flow_rule_match_tcp(const struct flow_rule *rule,
146146
}
147147
EXPORT_SYMBOL(flow_rule_match_tcp);
148148

149+
void flow_rule_match_ipsec(const struct flow_rule *rule,
150+
struct flow_match_ipsec *out)
151+
{
152+
FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_IPSEC, out);
153+
}
154+
EXPORT_SYMBOL(flow_rule_match_ipsec);
155+
149156
void flow_rule_match_icmp(const struct flow_rule *rule,
150157
struct flow_match_icmp *out)
151158
{

0 commit comments

Comments
 (0)