netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH net-next 3/3] flow_offload: support CVLAN match
@ 2019-05-03 15:08 Edward Cree
  2019-05-13 12:54 ` Jianbo Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Edward Cree @ 2019-05-03 15:08 UTC (permalink / raw)
  To: Jamal Hadi Salim, Jiri Pirko, Pablo Neira Ayuso, David Miller
  Cc: netdev, Cong Wang, Andy Gospodarek, Anjali Singhai Jain,
	Jakub Kicinski, Or Gerlitz

Plumb it through from the flow_dissector.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 include/net/flow_offload.h | 2 ++
 net/core/flow_offload.c    | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
index 6f59cdaf6eb6..48847ee7aa3a 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -71,6 +71,8 @@ void flow_rule_match_eth_addrs(const struct flow_rule *rule,
 			       struct flow_match_eth_addrs *out);
 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_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 c3a00eac4804..5ce7d47a960e 100644
--- a/net/core/flow_offload.c
+++ b/net/core/flow_offload.c
@@ -54,6 +54,13 @@ void flow_rule_match_vlan(const struct flow_rule *rule,
 }
 EXPORT_SYMBOL(flow_rule_match_vlan);
 
+void flow_rule_match_cvlan(const struct flow_rule *rule,
+			   struct flow_match_vlan *out)
+{
+	FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_CVLAN, out);
+}
+EXPORT_SYMBOL(flow_rule_match_cvlan);
+
 void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
 				struct flow_match_ipv4_addrs *out)
 {

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

* Re: [RFC PATCH net-next 3/3] flow_offload: support CVLAN match
  2019-05-03 15:08 [RFC PATCH net-next 3/3] flow_offload: support CVLAN match Edward Cree
@ 2019-05-13 12:54 ` Jianbo Liu
  2019-05-13 13:28   ` Edward Cree
  0 siblings, 1 reply; 4+ messages in thread
From: Jianbo Liu @ 2019-05-13 12:54 UTC (permalink / raw)
  To: Edward Cree
  Cc: Jamal Hadi Salim, Jiri Pirko, Pablo Neira Ayuso, David Miller,
	netdev, Cong Wang, Andy Gospodarek, Anjali Singhai Jain,
	Jakub Kicinski, Or Gerlitz

The 05/03/2019 16:08, Edward Cree wrote:
> Plumb it through from the flow_dissector.
> 
> Signed-off-by: Edward Cree <ecree@solarflare.com>
> ---
>  include/net/flow_offload.h | 2 ++
>  net/core/flow_offload.c    | 7 +++++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
> index 6f59cdaf6eb6..48847ee7aa3a 100644
> --- a/include/net/flow_offload.h
> +++ b/include/net/flow_offload.h
> @@ -71,6 +71,8 @@ void flow_rule_match_eth_addrs(const struct flow_rule *rule,
>  			       struct flow_match_eth_addrs *out);
>  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_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 c3a00eac4804..5ce7d47a960e 100644
> --- a/net/core/flow_offload.c
> +++ b/net/core/flow_offload.c
> @@ -54,6 +54,13 @@ void flow_rule_match_vlan(const struct flow_rule *rule,
>  }
>  EXPORT_SYMBOL(flow_rule_match_vlan);
>  
> +void flow_rule_match_cvlan(const struct flow_rule *rule,
> +			   struct flow_match_vlan *out)
> +{
> +	FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_CVLAN, out);
> +}
> +EXPORT_SYMBOL(flow_rule_match_cvlan);
> +
>  void flow_rule_match_ipv4_addrs(const struct flow_rule *rule,
>  				struct flow_match_ipv4_addrs *out)
>  {

Could you please push to 5.1 and 5.0-stable? The original patch brought a bug
in mlx5_core driver. Need your patch to fix.

--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -1615,7 +1615,7 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
        if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_CVLAN)) {
                struct flow_match_vlan match;

-               flow_rule_match_vlan(rule, &match);
+               flow_rule_match_cvlan(rule, &match);
                if (match.mask->vlan_id ||
                    match.mask->vlan_priority ||
                    match.mask->vlan_tpid) {

Thanks!

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

* Re: [RFC PATCH net-next 3/3] flow_offload: support CVLAN match
  2019-05-13 12:54 ` Jianbo Liu
@ 2019-05-13 13:28   ` Edward Cree
  2019-05-14  8:53     ` Jianbo Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Edward Cree @ 2019-05-13 13:28 UTC (permalink / raw)
  To: Jianbo Liu; +Cc: netdev

On 13/05/2019 13:54, Jianbo Liu wrote:
> Could you please push to 5.1 and 5.0-stable? The original patch brought a bug
> in mlx5_core driver. Need your patch to fix.
>
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> @@ -1615,7 +1615,7 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
>         if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_CVLAN)) {
>                 struct flow_match_vlan match;
>
> -               flow_rule_match_vlan(rule, &match);
> +               flow_rule_match_cvlan(rule, &match);
>                 if (match.mask->vlan_id ||
>                     match.mask->vlan_priority ||
>                     match.mask->vlan_tpid) {
>
> Thanks!
My patch will be more easily accepted with a user in-tree, so could
 you give this fix a commit message and SOB?  Then I'll roll it into
 my next posting of this series, thanks!

-Ed

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

* Re: [RFC PATCH net-next 3/3] flow_offload: support CVLAN match
  2019-05-13 13:28   ` Edward Cree
@ 2019-05-14  8:53     ` Jianbo Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Jianbo Liu @ 2019-05-14  8:53 UTC (permalink / raw)
  To: Edward Cree; +Cc: netdev

The 05/13/2019 14:28, Edward Cree wrote:
> On 13/05/2019 13:54, Jianbo Liu wrote:
> > Could you please push to 5.1 and 5.0-stable? The original patch brought a bug
> > in mlx5_core driver. Need your patch to fix.
> >
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> > @@ -1615,7 +1615,7 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
> >         if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_CVLAN)) {
> >                 struct flow_match_vlan match;
> >
> > -               flow_rule_match_vlan(rule, &match);
> > +               flow_rule_match_cvlan(rule, &match);
> >                 if (match.mask->vlan_id ||
> >                     match.mask->vlan_priority ||
> >                     match.mask->vlan_tpid) {
> >
> > Thanks!
> My patch will be more easily accepted with a user in-tree, so could
>  you give this fix a commit message and SOB?  Then I'll roll it into
>  my next posting of this series, thanks!
> 

OK, I will send the patch later, thanks!

Jianbo

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

end of thread, other threads:[~2019-05-14  8:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-03 15:08 [RFC PATCH net-next 3/3] flow_offload: support CVLAN match Edward Cree
2019-05-13 12:54 ` Jianbo Liu
2019-05-13 13:28   ` Edward Cree
2019-05-14  8:53     ` Jianbo Liu

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