diff mbox series

[RFC,net-next,3/3] flow_offload: support CVLAN match

Message ID alpine.LFD.2.21.1905031607170.11823@ehc-opti7040.uk.solarflarecom.com
State RFC
Delegated to: David Miller
Headers show
Series flow_offload: Re-add various features that disappeared | expand

Commit Message

Edward Cree May 3, 2019, 3:08 p.m. UTC
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(+)

Comments

Jianbo Liu May 13, 2019, 12:54 p.m. UTC | #1
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!
Edward Cree May 13, 2019, 1:28 p.m. UTC | #2
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
Jianbo Liu May 14, 2019, 8:53 a.m. UTC | #3
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
diff mbox series

Patch

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