intel-wired-lan.lists.osuosl.org archive mirror
 help / color / mirror / Atom feed
From: Marcin Szycik <marcin.szycik@linux.intel.com>
To: netdev@vger.kernel.org
Cc: simon.horman@corigine.com, kurt@linutronix.de, paulb@nvidia.com,
	edumazet@google.com, boris.sukholitko@broadcom.com,
	jiri@resnulli.us, paulus@samba.org, gnault@redhat.com,
	jesse.brandeburg@intel.com, intel-wired-lan@lists.osuosl.org,
	kuba@kernel.org, zhangkaiheb@126.com, pablo@netfilter.org,
	baowen.zheng@corigine.com, komachi.yoshiki@gmail.com,
	jhs@mojatatu.com, mostrows@earthlink.net,
	xiyou.wangcong@gmail.com, pabeni@redhat.com,
	gustavoars@kernel.org, davem@davemloft.net
Subject: [Intel-wired-lan] [RFC PATCH net-next v3 3/4] flow_offload: Introduce flow_match_pppoe
Date: Wed, 29 Jun 2022 16:38:58 +0200	[thread overview]
Message-ID: <20220629143859.209028-4-marcin.szycik@linux.intel.com> (raw)
In-Reply-To: <20220629143859.209028-1-marcin.szycik@linux.intel.com>

From: Wojciech Drewek <wojciech.drewek@intel.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@intel.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 6484095a8c01..50283a30b97b 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -72,6 +72,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,
@@ -116,6 +120,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 929f6379a279..d13d293e3de2 100644
--- a/net/core/flow_offload.c
+++ b/net/core/flow_offload.c
@@ -223,6 +223,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

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  parent reply	other threads:[~2022-06-29 14:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29 14:38 [Intel-wired-lan] [RFC PATCH net-next v3 0/4] ice: PPPoE offload support Marcin Szycik
2022-06-29 14:38 ` [Intel-wired-lan] [RFC PATCH net-next v3 1/4] flow_dissector: Add PPPoE dissectors Marcin Szycik
2022-06-30 23:10   ` Guillaume Nault
2022-07-01 10:53     ` Drewek, Wojciech
2022-07-01 12:41       ` Guillaume Nault
2022-07-01 13:33         ` Drewek, Wojciech
2022-06-29 14:38 ` [Intel-wired-lan] [RFC PATCH net-next v3 2/4] net/sched: flower: Add PPPoE filter Marcin Szycik
2022-06-30 23:11   ` Guillaume Nault
2022-06-29 14:38 ` Marcin Szycik [this message]
2022-06-29 14:38 ` [Intel-wired-lan] [RFC PATCH net-next v3 4/4] ice: Add support for PPPoE hardware offload Marcin Szycik
2022-06-30 23:12   ` Guillaume Nault
2022-07-01 16:12     ` Marcin Szycik
2022-07-05  9:54       ` Marcin Szycik
2022-07-07 14:14         ` Guillaume Nault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220629143859.209028-4-marcin.szycik@linux.intel.com \
    --to=marcin.szycik@linux.intel.com \
    --cc=baowen.zheng@corigine.com \
    --cc=boris.sukholitko@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gnault@redhat.com \
    --cc=gustavoars@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=komachi.yoshiki@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --cc=mostrows@earthlink.net \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=paulb@nvidia.com \
    --cc=paulus@samba.org \
    --cc=simon.horman@corigine.com \
    --cc=xiyou.wangcong@gmail.com \
    --cc=zhangkaiheb@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).