Skip to content

Commit 6a21b08

Browse files
WojDrewanguy11
authored andcommitted
flow_offload: Introduce flow_match_pppoe
Allow to offload PPPoE filters by adding flow_rule_match_pppoe. Drivers can extract PPPoE specific fields from now on. Signed-off-by: Wojciech Drewek <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 5008750 commit 6a21b08

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
@@ -76,6 +76,10 @@ struct flow_match_ct {
7676
struct flow_dissector_key_ct *key, *mask;
7777
};
7878

79+
struct flow_match_pppoe {
80+
struct flow_dissector_key_pppoe *key, *mask;
81+
};
82+
7983
struct flow_rule;
8084

8185
void flow_rule_match_meta(const struct flow_rule *rule,
@@ -122,6 +126,8 @@ void flow_rule_match_enc_opts(const struct flow_rule *rule,
122126
struct flow_match_enc_opts *out);
123127
void flow_rule_match_ct(const struct flow_rule *rule,
124128
struct flow_match_ct *out);
129+
void flow_rule_match_pppoe(const struct flow_rule *rule,
130+
struct flow_match_pppoe *out);
125131

126132
enum flow_action_id {
127133
FLOW_ACTION_ACCEPT = 0,

net/core/flow_offload.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,13 @@ void flow_rule_match_ct(const struct flow_rule *rule,
230230
}
231231
EXPORT_SYMBOL(flow_rule_match_ct);
232232

233+
void flow_rule_match_pppoe(const struct flow_rule *rule,
234+
struct flow_match_pppoe *out)
235+
{
236+
FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_PPPOE, out);
237+
}
238+
EXPORT_SYMBOL(flow_rule_match_pppoe);
239+
233240
struct flow_block_cb *flow_block_cb_alloc(flow_setup_cb_t *cb,
234241
void *cb_ident, void *cb_priv,
235242
void (*release)(void *cb_priv))

0 commit comments

Comments
 (0)