[dpdk-dev] [PATCH] net/i40e: remove dependency on old rxmode flags

Xing, Beilei beilei.xing at intel.com
Tue May 22 04:50:31 CEST 2018



> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Tuesday, May 22, 2018 9:01 AM
> To: Yigit, Ferruh <ferruh.yigit at intel.com>
> Cc: dev at dpdk.org; Xing, Beilei <beilei.xing at intel.com>; Zhang, Qi Z
> <qi.z.zhang at intel.com>
> Subject: [PATCH] net/i40e: remove dependency on old rxmode flags
> 
> Cleanup remain dependency on old rxmode flags since we move to new
> offload APIs.
> 
> Fixes: c3ac7c5b0b8a ("net/i40e: convert to new Rx offloads API")
> Fixes: e0cb96204b71 ("net/i40e: add support for representor ports")
> 
> Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
> ---
>  drivers/net/i40e/i40e_rxtx_vec_common.h | 4 ++--
> drivers/net/i40e/i40e_vf_representor.c  | 6 ++++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h
> b/drivers/net/i40e/i40e_rxtx_vec_common.h
> index 3ffedcb9e..63cb17742 100644
> --- a/drivers/net/i40e/i40e_rxtx_vec_common.h
> +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h
> @@ -202,11 +202,11 @@
> i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
>  	 /* - no csum error report support
>  	 * - no header split support
>  	 */
> -	if (rxmode->header_split == 1)
> +	if (rxmode->offloads & DEV_RX_OFFLOAD_HEADER_SPLIT)
>  		return -1;
> 
>  	/* no QinQ support */
> -	if (rxmode->hw_vlan_extend == 1)
> +	if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_EXTEND)
>  		return -1;
> 
>  	return 0;
> diff --git a/drivers/net/i40e/i40e_vf_representor.c
> b/drivers/net/i40e/i40e_vf_representor.c
> index 8dc94b479..f9f131611 100644
> --- a/drivers/net/i40e/i40e_vf_representor.c
> +++ b/drivers/net/i40e/i40e_vf_representor.c
> @@ -378,7 +378,8 @@ i40e_vf_representor_vlan_offload_set(struct
> rte_eth_dev *ethdev, int mask)
> 
>  	if (mask & ETH_VLAN_FILTER_MASK) {
>  		/* Enable or disable VLAN filtering offload */
> -		if (ethdev->data->dev_conf.rxmode.hw_vlan_filter)
> +		if (ethdev->data->dev_conf.rxmode.offloads &
> +		    DEV_RX_OFFLOAD_VLAN_FILTER)
>  			return i40e_vsi_config_vlan_filter(vsi, TRUE);
>  		else
>  			return i40e_vsi_config_vlan_filter(vsi, FALSE); @@ -
> 386,7 +387,8 @@ i40e_vf_representor_vlan_offload_set(struct rte_eth_dev
> *ethdev, int mask)
> 
>  	if (mask & ETH_VLAN_STRIP_MASK) {
>  		/* Enable or disable VLAN stripping offload */
> -		if (ethdev->data->dev_conf.rxmode.hw_vlan_strip)
> +		if (ethdev->data->dev_conf.rxmode.offloads &
> +		    DEV_RX_OFFLOAD_VLAN_STRIP)
>  			return i40e_vsi_config_vlan_stripping(vsi, TRUE);
>  		else
>  			return i40e_vsi_config_vlan_stripping(vsi, FALSE);
> --
> 2.13.6

Acked-by: Beilei Xing <beilei.xing at intel.com>



More information about the dev mailing list