[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 03:49:14 CEST 2017


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?




More information about the dev mailing list