netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: flow_offload: add support for ARP frame matching
@ 2022-11-04 12:33 Steen Hegelund
  2022-11-04 12:50 ` Drewek, Wojciech
  2022-11-07  6:30 ` Leon Romanovsky
  0 siblings, 2 replies; 5+ messages in thread
From: Steen Hegelund @ 2022-11-04 12:33 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Steen Hegelund, Louis Peens, Baowen Zheng, Simon Horman,
	Tony Nguyen, Wojciech Drewek, Maksym Glubokiy, Pablo Neira Ayuso,
	netdev, linux-kernel, UNGLinuxDriver, Horatiu Vultur

This adds a new flow_rule_match_arp function that allows drivers
to be able to dissect APR frames.

Signed-off-by: Steen Hegelund <steen.hegelund@microchip.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 7a60bc6d72c9..0400a0ac8a29 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -32,6 +32,10 @@ struct flow_match_vlan {
 	struct flow_dissector_key_vlan *key, *mask;
 };
 
+struct flow_match_arp {
+	struct flow_dissector_key_arp *key, *mask;
+};
+
 struct flow_match_ipv4_addrs {
 	struct flow_dissector_key_ipv4_addrs *key, *mask;
 };
@@ -98,6 +102,8 @@ void flow_rule_match_vlan(const struct flow_rule *rule,
 			  struct flow_match_vlan *out);
 void flow_rule_match_cvlan(const struct flow_rule *rule,
 			   struct flow_match_vlan *out);
+void flow_rule_match_arp(const struct flow_rule *rule,
+			 struct flow_match_arp *out);
 void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
 				struct flow_match_ipv4_addrs *out);
 void flow_rule_match_ipv6_addrs(const struct flow_rule *rule,
diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
index abe423fd5736..acfc1f88ea79 100644
--- a/net/core/flow_offload.c
+++ b/net/core/flow_offload.c
@@ -97,6 +97,13 @@ void flow_rule_match_cvlan(const struct flow_rule *rule,
 }
 EXPORT_SYMBOL(flow_rule_match_cvlan);
 
+void flow_rule_match_arp(const struct flow_rule *rule,
+			 struct flow_match_arp *out)
+{
+	FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_ARP, out);
+}
+EXPORT_SYMBOL(flow_rule_match_arp);
+
 void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
 				struct flow_match_ipv4_addrs *out)
 {
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH net-next] net: flow_offload: add support for ARP frame matching
  2022-11-04 12:33 [PATCH net-next] net: flow_offload: add support for ARP frame matching Steen Hegelund
@ 2022-11-04 12:50 ` Drewek, Wojciech
  2022-11-07  6:30 ` Leon Romanovsky
  1 sibling, 0 replies; 5+ messages in thread
From: Drewek, Wojciech @ 2022-11-04 12:50 UTC (permalink / raw)
  To: Steen Hegelund, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: Louis Peens, Baowen Zheng, Simon Horman, Nguyen, Anthony L,
	Maksym Glubokiy, Pablo Neira Ayuso, netdev, linux-kernel,
	UNGLinuxDriver, Horatiu Vultur



> -----Original Message-----
> From: Steen Hegelund <steen.hegelund@microchip.com>
> Sent: piątek, 4 listopada 2022 13:33
> To: David S . Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo
> Abeni <pabeni@redhat.com>
> Cc: Steen Hegelund <steen.hegelund@microchip.com>; Louis Peens <louis.peens@corigine.com>; Baowen Zheng
> <baowen.zheng@corigine.com>; Simon Horman <simon.horman@corigine.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Drewek, Wojciech <wojciech.drewek@intel.com>; Maksym Glubokiy
> <maksym.glubokiy@plvision.eu>; Pablo Neira Ayuso <pablo@netfilter.org>; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> UNGLinuxDriver@microchip.com; Horatiu Vultur <horatiu.vultur@microchip.com>
> Subject: [PATCH net-next] 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 APR frames.

ARP* frames
Other than that looks ok.
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>

> 
> Signed-off-by: Steen Hegelund <steen.hegelund@microchip.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 7a60bc6d72c9..0400a0ac8a29 100644
> --- a/include/net/flow_offload.h
> +++ b/include/net/flow_offload.h
> @@ -32,6 +32,10 @@ struct flow_match_vlan {
>  	struct flow_dissector_key_vlan *key, *mask;
>  };
> 
> +struct flow_match_arp {
> +	struct flow_dissector_key_arp *key, *mask;
> +};
> +
>  struct flow_match_ipv4_addrs {
>  	struct flow_dissector_key_ipv4_addrs *key, *mask;
>  };
> @@ -98,6 +102,8 @@ void flow_rule_match_vlan(const struct flow_rule *rule,
>  			  struct flow_match_vlan *out);
>  void flow_rule_match_cvlan(const struct flow_rule *rule,
>  			   struct flow_match_vlan *out);
> +void flow_rule_match_arp(const struct flow_rule *rule,
> +			 struct flow_match_arp *out);
>  void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
>  				struct flow_match_ipv4_addrs *out);
>  void flow_rule_match_ipv6_addrs(const struct flow_rule *rule,
> diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
> index abe423fd5736..acfc1f88ea79 100644
> --- a/net/core/flow_offload.c
> +++ b/net/core/flow_offload.c
> @@ -97,6 +97,13 @@ void flow_rule_match_cvlan(const struct flow_rule *rule,
>  }
>  EXPORT_SYMBOL(flow_rule_match_cvlan);
> 
> +void flow_rule_match_arp(const struct flow_rule *rule,
> +			 struct flow_match_arp *out)
> +{
> +	FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_ARP, out);
> +}
> +EXPORT_SYMBOL(flow_rule_match_arp);
> +
>  void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
>  				struct flow_match_ipv4_addrs *out)
>  {
> --
> 2.38.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net: flow_offload: add support for ARP frame matching
  2022-11-04 12:33 [PATCH net-next] net: flow_offload: add support for ARP frame matching Steen Hegelund
  2022-11-04 12:50 ` Drewek, Wojciech
@ 2022-11-07  6:30 ` Leon Romanovsky
  1 sibling, 0 replies; 5+ messages in thread
From: Leon Romanovsky @ 2022-11-07  6:30 UTC (permalink / raw)
  To: Steen Hegelund
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Louis Peens, Baowen Zheng, Simon Horman, Tony Nguyen,
	Wojciech Drewek, Maksym Glubokiy, Pablo Neira Ayuso, netdev,
	linux-kernel, UNGLinuxDriver, Horatiu Vultur

On Fri, Nov 04, 2022 at 01:33:14PM +0100, Steen Hegelund wrote:
> This adds a new flow_rule_match_arp function that allows drivers
> to be able to dissect APR frames.
> 
> Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
> ---
>  include/net/flow_offload.h | 6 ++++++
>  net/core/flow_offload.c    | 7 +++++++
>  2 files changed, 13 insertions(+)

I don't see any usage of this new API.
Please send this as part of the code that actually uses it.

Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net: flow_offload: add support for ARP frame matching
  2022-11-04 12:19 Steen Hegelund
@ 2022-11-04 12:27 ` Steen Hegelund
  0 siblings, 0 replies; 5+ messages in thread
From: Steen Hegelund @ 2022-11-04 12:27 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Louis Peens, Baowen Zheng, Simon Horman, Tony Nguyen,
	Wojciech Drewek, Maksym Glubokiy, Pablo Neira Ayuso, netdev,
	linux-kernel, UNGLinuxDriver, Horatiu Vultur

Sorry: 

Please ignore this.  The commit message had not been updated...

BR
Steen


On Fri, 2022-11-04 at 13:19 +0100, Steen Hegelund wrote:
> flow_rule_match_arp allows drivers to dissect APR frames
> 
> Signed-off-by: Steen Hegelund <steen.hegelund@microchip.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 7a60bc6d72c9..0400a0ac8a29 100644
> --- a/include/net/flow_offload.h
> +++ b/include/net/flow_offload.h
> @@ -32,6 +32,10 @@ struct flow_match_vlan {
>         struct flow_dissector_key_vlan *key, *mask;
>  };
>  
> +struct flow_match_arp {
> +       struct flow_dissector_key_arp *key, *mask;
> +};
> +
>  struct flow_match_ipv4_addrs {
>         struct flow_dissector_key_ipv4_addrs *key, *mask;
>  };
> @@ -98,6 +102,8 @@ void flow_rule_match_vlan(const struct flow_rule *rule,
>                           struct flow_match_vlan *out);
>  void flow_rule_match_cvlan(const struct flow_rule *rule,
>                            struct flow_match_vlan *out);
> +void flow_rule_match_arp(const struct flow_rule *rule,
> +                        struct flow_match_arp *out);
>  void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
>                                 struct flow_match_ipv4_addrs *out);
>  void flow_rule_match_ipv6_addrs(const struct flow_rule *rule,
> diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
> index abe423fd5736..acfc1f88ea79 100644
> --- a/net/core/flow_offload.c
> +++ b/net/core/flow_offload.c
> @@ -97,6 +97,13 @@ void flow_rule_match_cvlan(const struct flow_rule *rule,
>  }
>  EXPORT_SYMBOL(flow_rule_match_cvlan);
>  
> +void flow_rule_match_arp(const struct flow_rule *rule,
> +                        struct flow_match_arp *out)
> +{
> +       FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_ARP, out);
> +}
> +EXPORT_SYMBOL(flow_rule_match_arp);
> +
>  void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
>                                 struct flow_match_ipv4_addrs *out)
>  {


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net-next] net: flow_offload: add support for ARP frame matching
@ 2022-11-04 12:19 Steen Hegelund
  2022-11-04 12:27 ` Steen Hegelund
  0 siblings, 1 reply; 5+ messages in thread
From: Steen Hegelund @ 2022-11-04 12:19 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Steen Hegelund, Louis Peens, Baowen Zheng, Simon Horman,
	Tony Nguyen, Wojciech Drewek, Maksym Glubokiy, Pablo Neira Ayuso,
	netdev, linux-kernel, UNGLinuxDriver, Horatiu Vultur

flow_rule_match_arp allows drivers to dissect APR frames

Signed-off-by: Steen Hegelund <steen.hegelund@microchip.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 7a60bc6d72c9..0400a0ac8a29 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -32,6 +32,10 @@ struct flow_match_vlan {
 	struct flow_dissector_key_vlan *key, *mask;
 };
 
+struct flow_match_arp {
+	struct flow_dissector_key_arp *key, *mask;
+};
+
 struct flow_match_ipv4_addrs {
 	struct flow_dissector_key_ipv4_addrs *key, *mask;
 };
@@ -98,6 +102,8 @@ void flow_rule_match_vlan(const struct flow_rule *rule,
 			  struct flow_match_vlan *out);
 void flow_rule_match_cvlan(const struct flow_rule *rule,
 			   struct flow_match_vlan *out);
+void flow_rule_match_arp(const struct flow_rule *rule,
+			 struct flow_match_arp *out);
 void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
 				struct flow_match_ipv4_addrs *out);
 void flow_rule_match_ipv6_addrs(const struct flow_rule *rule,
diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
index abe423fd5736..acfc1f88ea79 100644
--- a/net/core/flow_offload.c
+++ b/net/core/flow_offload.c
@@ -97,6 +97,13 @@ void flow_rule_match_cvlan(const struct flow_rule *rule,
 }
 EXPORT_SYMBOL(flow_rule_match_cvlan);
 
+void flow_rule_match_arp(const struct flow_rule *rule,
+			 struct flow_match_arp *out)
+{
+	FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_ARP, out);
+}
+EXPORT_SYMBOL(flow_rule_match_arp);
+
 void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
 				struct flow_match_ipv4_addrs *out)
 {
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-07  6:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04 12:33 [PATCH net-next] net: flow_offload: add support for ARP frame matching Steen Hegelund
2022-11-04 12:50 ` Drewek, Wojciech
2022-11-07  6:30 ` Leon Romanovsky
  -- strict thread matches above, loose matches on Subject: below --
2022-11-04 12:19 Steen Hegelund
2022-11-04 12:27 ` Steen Hegelund

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).