Skip to content

Commit 70ea86a

Browse files
steen-hegelund-mchpdavem330
authored andcommitted
net: flow_offload: add support for ARP frame matching
This adds a new flow_rule_match_arp function that allows drivers to be able to dissect ARP frames. Signed-off-by: Steen Hegelund <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2fd450c commit 70ea86a

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
@@ -32,6 +32,10 @@ struct flow_match_vlan {
3232
struct flow_dissector_key_vlan *key, *mask;
3333
};
3434

35+
struct flow_match_arp {
36+
struct flow_dissector_key_arp *key, *mask;
37+
};
38+
3539
struct flow_match_ipv4_addrs {
3640
struct flow_dissector_key_ipv4_addrs *key, *mask;
3741
};
@@ -98,6 +102,8 @@ void flow_rule_match_vlan(const struct flow_rule *rule,
98102
struct flow_match_vlan *out);
99103
void flow_rule_match_cvlan(const struct flow_rule *rule,
100104
struct flow_match_vlan *out);
105+
void flow_rule_match_arp(const struct flow_rule *rule,
106+
struct flow_match_arp *out);
101107
void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
102108
struct flow_match_ipv4_addrs *out);
103109
void flow_rule_match_ipv6_addrs(const struct flow_rule *rule,

net/core/flow_offload.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ void flow_rule_match_cvlan(const struct flow_rule *rule,
9797
}
9898
EXPORT_SYMBOL(flow_rule_match_cvlan);
9999

100+
void flow_rule_match_arp(const struct flow_rule *rule,
101+
struct flow_match_arp *out)
102+
{
103+
FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_ARP, out);
104+
}
105+
EXPORT_SYMBOL(flow_rule_match_arp);
106+
100107
void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
101108
struct flow_match_ipv4_addrs *out)
102109
{

0 commit comments

Comments
 (0)