[dpdk-dev] [PATCH v2 3/3] net/ixgbe: enable flex bytes for generic flow API

Lu, Wenzhuo wenzhuo.lu at intel.com
Fri Jun 2 04:14:26 CEST 2017


Hi Qi,

> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Friday, June 2, 2017 10:00 AM
> To: Lu, Wenzhuo; Zhang, Helin
> Cc: dev at dpdk.org
> Subject: RE: [PATCH v2 3/3] net/ixgbe: enable flex bytes for generic flow API
> 
> 
> 
> > -----Original Message-----
> > From: Lu, Wenzhuo
> > Sent: Friday, June 2, 2017 9:49 AM
> > To: Zhang, Qi Z <qi.z.zhang at intel.com>; Zhang, Helin
> > <helin.zhang at intel.com>
> > Cc: dev at dpdk.org
> > Subject: RE: [PATCH v2 3/3] net/ixgbe: enable flex bytes for generic
> > flow API
> >
> > Hi Qi,
> >
> >
> > > -----Original Message-----
> > > From: Zhang, Qi Z
> > > Sent: Thursday, June 1, 2017 3:46 AM
> > > To: Lu, Wenzhuo; Zhang, Helin
> > > Cc: dev at dpdk.org; Zhang, Qi Z
> > > Subject: [PATCH v2 3/3] net/ixgbe: enable flex bytes for generic
> > > flow API
> > >
> > > Add fdir flex byte support for rte_flow APIs.
> > >
> > > Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
> > > ---
> > >
> > > v2:
> > > - fix couple checkpatch errors.
> > >
> > >  drivers/net/ixgbe/ixgbe_ethdev.h |   3 +
> > >  drivers/net/ixgbe/ixgbe_fdir.c   |  31 ++++++++-
> > >  drivers/net/ixgbe/ixgbe_flow.c   | 137
> > > ++++++++++++++++++++++++++++++++++++++-
> > >  3 files changed, 167 insertions(+), 4 deletions(-)
> >
> >
> > > diff --git a/drivers/net/ixgbe/ixgbe_fdir.c
> > > b/drivers/net/ixgbe/ixgbe_fdir.c index 7f6c7b5..950f5ba 100644
> > > --- a/drivers/net/ixgbe/ixgbe_fdir.c
> > > +++ b/drivers/net/ixgbe/ixgbe_fdir.c
> > > @@ -302,7 +302,7 @@ fdir_set_input_mask_82599(struct rte_eth_dev
> > *dev)
> > >  	 * mask VM pool and DIPv6 since there are currently not supported
> > >  	 * mask FLEX byte, it will be set in flex_conf
> > >  	 */
> > > -	uint32_t fdirm = IXGBE_FDIRM_POOL | IXGBE_FDIRM_DIPv6 |
> > > IXGBE_FDIRM_FLEX;
> > > +	uint32_t fdirm = IXGBE_FDIRM_POOL | IXGBE_FDIRM_DIPv6;
> > >  	uint32_t fdirtcpm;  /* TCP source and destination port masks. */
> > >  	uint32_t fdiripv6m; /* IPv6 source and destination masks. */
> > >  	volatile uint32_t *reg;
> > > @@ -333,6 +333,10 @@ fdir_set_input_mask_82599(struct rte_eth_dev
> > *dev)
> > >  		return -EINVAL;
> > >  	}
> > >
> > > +	/* flex byte mask */
> > > +	if (info->mask.flex_bytes_mask == 0)
> > > +		fdirm |= IXGBE_FDIRM_FLEX;
> > > +
> > >  	IXGBE_WRITE_REG(hw, IXGBE_FDIRM, fdirm);
> > Should the same change be done for x550?
> >
> Currently I didn't see it is necessary.
> Because I saw fdir_set_input_mask_x550 will only be used for mac-vlan and
> tunneling filter where flex byte is not considered in this patch. so keep it
> disabled Please correct if I miss something.
O, this patch only enables flexible bytes for IP flow. You already say that in the comments. It's not necessary to change the x550 code.

Acked-by: Wenzhuo Lu <wenzhuo.lu at intel.com>



More information about the dev mailing list