[dpdk-stable] [PATCH v2] net/ixgbe: fix tunnel type set error for FDIR
Zhao1, Wei
wei.zhao1 at intel.com
Thu Jun 14 03:51:08 CEST 2018
Hi,
> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Thursday, June 14, 2018 8:42 AM
> To: Zhao1, Wei <wei.zhao1 at intel.com>; dev at dpdk.org
> Cc: stable at dpdk.org
> Subject: RE: [PATCH v2] net/ixgbe: fix tunnel type set error for FDIR
>
> Hi Wei,
>
>
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Wednesday, June 13, 2018 4:12 PM
> > To: dev at dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu at intel.com>; stable at dpdk.org; Zhao1, Wei
> > <wei.zhao1 at intel.com>
> > Subject: [PATCH v2] net/ixgbe: fix tunnel type set error for FDIR
> >
> > Tunnel type format should be translated to ixgbe required format
> > before register set in FDIR cloud mode, Ans also some register not
> > useful in cloud mode but only useful in IP mode should be set to zero as
> datasheet request.
> >
> > 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 at intel.com>
> > ---
> >
> > v2:
> > -change register write function for FDIRIPSA and FDIRIPDA.
> >
> > ---
> > drivers/net/ixgbe/ixgbe_fdir.c | 17 +++++++++++++----
> > drivers/net/ixgbe/ixgbe_flow.c | 6 ++----
> > 2 files changed, 15 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_fdir.c
> > b/drivers/net/ixgbe/ixgbe_fdir.c index 67ab627..3feb815 100644
> > --- a/drivers/net/ixgbe/ixgbe_fdir.c
> > +++ b/drivers/net/ixgbe/ixgbe_fdir.c
> > @@ -771,8 +771,15 @@ ixgbe_fdir_filter_to_atr_input(const struct
> > rte_eth_fdir_filter *fdir_filter,
> > input->formatted.inner_mac,
> > fdir_filter-
> > >input.flow.tunnel_flow.mac_addr.addr_bytes,
> > sizeof(input->formatted.inner_mac));
> > - input->formatted.tunnel_type =
> > - fdir_filter->input.flow.tunnel_flow.tunnel_type;
> > + if (fdir_filter->input.flow.tunnel_flow.tunnel_type ==
> > + RTE_FDIR_TUNNEL_TYPE_VXLAN)
> > + input->formatted.tunnel_type = 0x8000;
> > + else if (fdir_filter->input.flow.tunnel_flow.tunnel_type ==
> > + RTE_FDIR_TUNNEL_TYPE_NVGRE)
> > + input->formatted.tunnel_type = 0;
> Better use macros for 0x8000 and 0. And add comments why these values
> are used.
Ok, I will add some comment.
More information about the stable
mailing list