[v3,09/22] net/bnxt: ignore VLAN priority mask
diff mbox series

Message ID 20200724053235.71069-10-ajit.khaparde@broadcom.com
State Superseded, archived
Delegated to: Ajit Khaparde
Headers show
Series
  • bnxt patches
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch warning coding style issues

Commit Message

Ajit Khaparde July 24, 2020, 5:32 a.m. UTC
From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

This is a work around for the OVS setting offload rules that
are passing vlan priority mask as wild card and currently we
do not support it.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Ferruh Yigit July 27, 2020, 10:30 a.m. UTC | #1
On 7/24/2020 6:32 AM, Ajit Khaparde wrote:
> From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> 
> This is a work around for the OVS setting offload rules that
> are passing vlan priority mask as wild card and currently we
> do not support it.
> 
> Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
> ---
>  drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> index 67f9319d6..665f5d381 100644
> --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> @@ -709,8 +709,17 @@ ulp_rte_vlan_hdr_handler(const struct rte_flow_item *item,
>  			vlan_tag |= ~ULP_VLAN_TAG_MASK;
>  		vlan_tag = htons(vlan_tag);
>  
> +#ifdef ULP_DONT_IGNORE_TOS
>  		ulp_rte_prsr_mask_copy(params, &idx, &priority,
>  				       sizeof(priority));
> +#else
> +		/*
> +		 * The priority field is ignored since OVS is setting it as
> +		 * wild card match and it is not supported. This is a work
> +		 * around and shall be addressed in the future.
> +		 */
> +		idx += 1;
> +#endif
>  		ulp_rte_prsr_mask_copy(params, &idx, &vlan_tag,
>  				       sizeof(vlan_tag));
>  		ulp_rte_prsr_mask_copy(params, &idx, &vlan_mask->inner_type,
> 

Hi Ajit,

What sets the 'ULP_DONT_IGNORE_TOS', I don't see it in our build system. If ways
'else' leg is taken, why not drop the macro completely?
Ajit Khaparde July 28, 2020, 5:22 a.m. UTC | #2
On Mon, Jul 27, 2020 at 3:30 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 7/24/2020 6:32 AM, Ajit Khaparde wrote:
> > From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> >
> > This is a work around for the OVS setting offload rules that
> > are passing vlan priority mask as wild card and currently we
> > do not support it.
> >
> > Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> > Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
> > ---
> >  drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> > index 67f9319d6..665f5d381 100644
> > --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> > +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> > @@ -709,8 +709,17 @@ ulp_rte_vlan_hdr_handler(const struct rte_flow_item
> *item,
> >                       vlan_tag |= ~ULP_VLAN_TAG_MASK;
> >               vlan_tag = htons(vlan_tag);
> >
> > +#ifdef ULP_DONT_IGNORE_TOS
> >               ulp_rte_prsr_mask_copy(params, &idx, &priority,
> >                                      sizeof(priority));
> > +#else
> > +             /*
> > +              * The priority field is ignored since OVS is setting it as
> > +              * wild card match and it is not supported. This is a work
> > +              * around and shall be addressed in the future.
> > +              */
> > +             idx += 1;
> > +#endif
> >               ulp_rte_prsr_mask_copy(params, &idx, &vlan_tag,
> >                                      sizeof(vlan_tag));
> >               ulp_rte_prsr_mask_copy(params, &idx,
> &vlan_mask->inner_type,
> >
>
> Hi Ajit,
>
> What sets the 'ULP_DONT_IGNORE_TOS', I don't see it in our build system.
> If ways
> 'else' leg is taken, why not drop the macro completely?
>
Ferruh,
Yes. I will submit a v4 to take care of that.

Thanks
Ajit

Patch
diff mbox series

diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 67f9319d6..665f5d381 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -709,8 +709,17 @@  ulp_rte_vlan_hdr_handler(const struct rte_flow_item *item,
 			vlan_tag |= ~ULP_VLAN_TAG_MASK;
 		vlan_tag = htons(vlan_tag);
 
+#ifdef ULP_DONT_IGNORE_TOS
 		ulp_rte_prsr_mask_copy(params, &idx, &priority,
 				       sizeof(priority));
+#else
+		/*
+		 * The priority field is ignored since OVS is setting it as
+		 * wild card match and it is not supported. This is a work
+		 * around and shall be addressed in the future.
+		 */
+		idx += 1;
+#endif
 		ulp_rte_prsr_mask_copy(params, &idx, &vlan_tag,
 				       sizeof(vlan_tag));
 		ulp_rte_prsr_mask_copy(params, &idx, &vlan_mask->inner_type,