patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: "Zhao1, Wei" <wei.zhao1@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] net/ixgbe: fix tunnel id format error for FDIR
Date: Tue, 12 Jun 2018 08:39:12 +0000	[thread overview]
Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B7E84D6@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <A2573D2ACFCADC41BB3BE09C6DE313CA07DFC9DE@PGSMSX103.gar.corp.intel.com>

Hi Wei,

> -----Original Message-----
> From: Zhao1, Wei
> Sent: Tuesday, June 12, 2018 3:49 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: RE: [PATCH] net/ixgbe: fix tunnel id format error for FDIR
> 
> 
> Hi, Wenzhuo
> 
> > -----Original Message-----
> > From: Lu, Wenzhuo
> > Sent: Tuesday, June 12, 2018 1:10 PM
> > To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> > Cc: stable@dpdk.org
> > Subject: RE: [PATCH] net/ixgbe: fix tunnel id format error for FDIR
> >
> > Hi Wei,
> >
> >
> > > -----Original Message-----
> > > From: Zhao1, Wei
> > > Sent: Tuesday, June 5, 2018 5:12 PM
> > > To: dev@dpdk.org
> > > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org; Zhao1, Wei
> > > <wei.zhao1@intel.com>
> > > Subject: [PATCH] net/ixgbe: fix tunnel id format error for FDIR
> > >
> > > In cloud mode for FDIR, tunnel id should be set as protocol request,
> > > the lower 8 bits should be set as reserved.
> > To my opinion, the original implementation and this patch have
> > different understanding of the 'tunnel_id' in ' struct
> > rte_eth_tunnel_flow'. Originally it only means the tunnel id but not
> including the reserved 8 bits.
> > This patch means it should include the reserved bits. Maybe it makes
> > things easier because the whole 4 bytes are big endian.
> > So, may I suggest to add some comments in ' struct
> > rte_eth_tunnel_flow' to let the users know what the 'tunnel_id' really
> means?
> 
> The format from input for 'tunnel_id' should be network network byte order
> And it also should not contain reserved 1 byte, but hardware HASH need the
> format include  reserved 1 byte And in network byte order. So, this patch
> convert to that format.
> I will add some comment in  function ixgbe_fdir_filter_to_atr_input and
> ixgbe_parse_fdir_filter_tunnel, That will not Influence other NIC format for
> this struct member.
> Is that ok?
It's not appropriate that different NIC has different understanding of the same info provided by APP.
And I found this tunnel_id is already used by other NICs. We cannot change the meaning. So I think this patch is not good.

> 
> 
> >
> > >
> > > Fixes: 82fb702077f6 ("ixgbe: support new flow director modes for
> > > X550")
> > > Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")
> > >
> > > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> > > ---
> > >  drivers/net/ixgbe/ixgbe_fdir.c | 2 +-
> > > drivers/net/ixgbe/ixgbe_flow.c
> > > | 5 ++---
> > >  2 files changed, 3 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/net/ixgbe/ixgbe_fdir.c
> > > b/drivers/net/ixgbe/ixgbe_fdir.c index d5e5179..67ab627 100644
> > > --- a/drivers/net/ixgbe/ixgbe_fdir.c
> > > +++ b/drivers/net/ixgbe/ixgbe_fdir.c
> > > @@ -774,7 +774,7 @@ ixgbe_fdir_filter_to_atr_input(const struct
> > > rte_eth_fdir_filter *fdir_filter,
> > >  		input->formatted.tunnel_type =
> > >  			fdir_filter->input.flow.tunnel_flow.tunnel_type;
> > >  		input->formatted.tni_vni =
> > > -			fdir_filter->input.flow.tunnel_flow.tunnel_id;
> > > +			fdir_filter->input.flow.tunnel_flow.tunnel_id >> 8;
> > >  	}
> > >
> > >  	return 0;
> > > diff --git a/drivers/net/ixgbe/ixgbe_flow.c
> > > b/drivers/net/ixgbe/ixgbe_flow.c index eb0644c..64af777 100644
> > > --- a/drivers/net/ixgbe/ixgbe_flow.c
> > > +++ b/drivers/net/ixgbe/ixgbe_flow.c
> > > @@ -2489,8 +2489,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct
> > > rte_flow_attr *attr,
> > >  			rte_memcpy(((uint8_t *)
> > >  				&rule->ixgbe_fdir.formatted.tni_vni + 1),
> > >  				vxlan_spec->vni, RTE_DIM(vxlan_spec->vni));
> > > -			rule->ixgbe_fdir.formatted.tni_vni =
> > > rte_be_to_cpu_32(
> > > -				rule->ixgbe_fdir.formatted.tni_vni);
> > > +			rule->ixgbe_fdir.formatted.tni_vni >>= 8;
> > >  		}
> > >  	}
> > >
> > > @@ -2587,7 +2586,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct
> > > rte_flow_attr *attr,
> > >  			/* tni is a 24-bits bit field */
> > >  			rte_memcpy(&rule->ixgbe_fdir.formatted.tni_vni,
> > >  			nvgre_spec->tni, RTE_DIM(nvgre_spec->tni));
> > > -			rule->ixgbe_fdir.formatted.tni_vni <<= 8;
> > > +			rule->ixgbe_fdir.formatted.tni_vni >>= 8;
> > >  		}
> > >  	}
> > >
> > > --
> > > 2.7.5

  reply	other threads:[~2018-06-12  8:39 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05  9:12 [dpdk-stable] [PATCH] app/testpmd: fix VLAN tci mask set " Wei Zhao
2018-06-05  9:12 ` [dpdk-stable] [PATCH] net/ixgbe: add query rule stats support " Wei Zhao
2018-06-12  1:46   ` Lu, Wenzhuo
2018-06-12  1:51     ` Zhao1, Wei
2018-06-12  2:07       ` Lu, Wenzhuo
2018-06-13  8:07   ` [dpdk-stable] [PATCH v2] " Wei Zhao
2018-06-13  8:08   ` Wei Zhao
2018-06-14  0:36     ` Lu, Wenzhuo
2018-06-21 14:08       ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z
2018-06-05  9:12 ` [dpdk-stable] [PATCH] net/ixgbe: add support for VLAN in IP mode FDIR Wei Zhao
2018-06-12  2:25   ` Lu, Wenzhuo
2018-06-12  2:30     ` Zhao1, Wei
2018-06-12  2:41       ` Lu, Wenzhuo
2018-06-12  2:49         ` Zhao1, Wei
2018-06-12  3:18         ` Zhao1, Wei
2018-06-13  8:09   ` [dpdk-stable] [PATCH v2] " Wei Zhao
2018-06-14  0:37     ` Lu, Wenzhuo
2018-06-21 14:09       ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z
2018-06-05  9:12 ` [dpdk-stable] [PATCH] net/ixgbe: fix tunnel id format error for FDIR Wei Zhao
2018-06-12  5:10   ` Lu, Wenzhuo
2018-06-12  7:49     ` Zhao1, Wei
2018-06-12  8:39       ` Lu, Wenzhuo [this message]
2018-06-12  8:43         ` Zhao1, Wei
2018-06-13  8:11   ` [dpdk-stable] [PATCH v2] " Wei Zhao
2018-06-14  0:38     ` Lu, Wenzhuo
2018-06-21 14:10       ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z
2018-06-05  9:12 ` [dpdk-stable] [PATCH] net/ixgbe: fix tunnel type set " Wei Zhao
2018-06-13  8:11   ` [dpdk-stable] [PATCH v2] " Wei Zhao
2018-06-14  0:41     ` Lu, Wenzhuo
2018-06-14  1:51       ` Zhao1, Wei
2018-06-14  8:17     ` [dpdk-stable] [PATCH v3] " Wei Zhao
2018-06-15  0:50       ` Lu, Wenzhuo
2018-06-21 14:11         ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z
2018-06-12  1:12 ` [dpdk-stable] [PATCH] app/testpmd: fix VLAN tci mask " Lu, Wenzhuo
2018-06-21 14:27   ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z

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=6A0DE07E22DDAD4C9103DF62FEBC09093B7E84D6@shsmsx102.ccr.corp.intel.com \
    --to=wenzhuo.lu@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=wei.zhao1@intel.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).