[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220726203133.2171332-4-anthony.l.nguyen@intel.com>
Date: Tue, 26 Jul 2022 13:31:32 -0700
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com
Cc: Wojciech Drewek <wojciech.drewek@...el.com>,
netdev@...r.kernel.org, anthony.l.nguyen@...el.com,
xiyou.wangcong@...il.com, jesse.brandeburg@...el.com,
gustavoars@...nel.org, baowen.zheng@...igine.com,
boris.sukholitko@...adcom.com, kurt@...utronix.de,
pablo@...filter.org, paulb@...dia.com, simon.horman@...igine.com,
komachi.yoshiki@...il.com, zhangkaiheb@....com,
michal.swiatkowski@...ux.intel.com, alexandr.lobakin@...el.com,
gnault@...hat.com, mostrows@...akeasy.net, paulus@...ba.org,
marcin.szycik@...ux.intel.com
Subject: [PATCH net-next 3/4] flow_offload: Introduce flow_match_pppoe
From: Wojciech Drewek <wojciech.drewek@...el.com>
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 <wojciech.drewek@...el.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
---
include/net/flow_offload.h | 6 ++++++
net/core/flow_offload.c | 7 +++++++
2 files changed, 13 insertions(+)
diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
index a8d8512b7059..2a9a9e42e7fd 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -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,
@@ -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,
diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
index 0d3075d3c8fb..8cfb63528d18 100644
--- a/net/core/flow_offload.c
+++ b/net/core/flow_offload.c
@@ -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))
--
2.35.1
Powered by blists - more mailing lists