Skip to content

Commit

Permalink
flow_offload: Introduce flow_match_pppoe
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
WojDrew authored and anguy11 committed Jul 26, 2022
1 parent 5008750 commit 6a21b08
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/net/flow_offload.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ struct flow_match_ct {
struct flow_dissector_key_ct *key, *mask;
};

struct flow_match_pppoe {
struct flow_dissector_key_pppoe *key, *mask;
};

struct flow_rule;

void flow_rule_match_meta(const struct flow_rule *rule,
Expand Down Expand Up @@ -122,6 +126,8 @@ void flow_rule_match_enc_opts(const struct flow_rule *rule,
struct flow_match_enc_opts *out);
void flow_rule_match_ct(const struct flow_rule *rule,
struct flow_match_ct *out);
void flow_rule_match_pppoe(const struct flow_rule *rule,
struct flow_match_pppoe *out);

enum flow_action_id {
FLOW_ACTION_ACCEPT = 0,
Expand Down
7 changes: 7 additions & 0 deletions net/core/flow_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,13 @@ void flow_rule_match_ct(const struct flow_rule *rule,
}
EXPORT_SYMBOL(flow_rule_match_ct);

void flow_rule_match_pppoe(const struct flow_rule *rule,
struct flow_match_pppoe *out)
{
FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_PPPOE, out);
}
EXPORT_SYMBOL(flow_rule_match_pppoe);

struct flow_block_cb *flow_block_cb_alloc(flow_setup_cb_t *cb,
void *cb_ident, void *cb_priv,
void (*release)(void *cb_priv))
Expand Down

0 comments on commit 6a21b08

Please sign in to comment.