[dpdk-stable] [PATCH v2] net/ice: enable VLAN filter offloads support

Zhao1, Wei wei.zhao1 at intel.com
Wed Feb 13 05:05:49 CET 2019


Error patch, please ignore it.

> -----Original Message-----
> From: Zhao1, Wei
> Sent: Wednesday, February 13, 2019 11:30 AM
> To: dev at dpdk.org
> Cc: stable at dpdk.org; Zhang, Qi Z <qi.z.zhang at intel.com>; Zhao1, Wei
> <wei.zhao1 at intel.com>
> Subject: [PATCH v2] net/ice: enable VLAN filter offloads support
> 
> There is need to check whether dev_conf.rxmode.offloads is set when start
> ice device, if one of the vlan related bits is set, for example
> DEV_RX_OFFLOAD_VLAN_FILTER and so on, sevice start process to enable
> this offloads request.
> 
> Signed-off-by: Wei Zhao <wei.zhao1 at intel.com>
> 
> ---
> 
> v2:
> -rework patch for compile error.
> ---
>  drivers/net/avf/avf_ethdev.c |  2 +-
>  drivers/net/ice/ice_ethdev.c | 10 +++++++++-
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
> index 13eec1b..797f505 100644
> --- a/drivers/net/avf/avf_ethdev.c
> +++ b/drivers/net/avf/avf_ethdev.c
> @@ -1159,7 +1159,7 @@ avf_enable_irq0(struct avf_hw *hw)
>  	AVF_WRITE_REG(hw, AVFINT_ICR0_ENA1,
> AVFINT_ICR0_ENA1_ADMINQ_MASK);
> 
>  	AVF_WRITE_REG(hw, AVFINT_DYN_CTL01,
> AVFINT_DYN_CTL01_INTENA_MASK |
> -
> AVFINT_DYN_CTL01_ITR_INDX_MASK);
> +		AVFINT_DYN_CTL01_CLEARPBA_MASK |
> AVFINT_DYN_CTL01_ITR_INDX_MASK);
> 
>  	AVF_WRITE_FLUSH(hw);
>  }
> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
> index 6ab66fa..5753d79 100644
> --- a/drivers/net/ice/ice_ethdev.c
> +++ b/drivers/net/ice/ice_ethdev.c
> @@ -1720,7 +1720,7 @@ ice_dev_start(struct rte_eth_dev *dev)
>  	struct ice_vsi *vsi = pf->main_vsi;
>  	uint16_t nb_rxq = 0;
>  	uint16_t nb_txq, i;
> -	int ret;
> +	int mask, ret;
> 
>  	/* program Tx queues' context in hardware */
>  	for (nb_txq = 0; nb_txq < data->nb_tx_queues; nb_txq++) { @@ -
> 1748,6 +1748,14 @@ ice_dev_start(struct rte_eth_dev *dev)
> 
>  	ice_set_rx_function(dev);
> 
> +	mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK |
> +			ETH_VLAN_EXTEND_MASK;
> +	ret = ice_vlan_offload_set(dev, mask);
> +	if (ret) {
> +		PMD_INIT_LOG(ERR, "Unable to set VLAN offload");
> +		goto rx_err;
> +	}
> +
>  	/* enable Rx interrput and mapping Rx queue to interrupt vector */
>  	if (ice_rxq_intr_setup(dev))
>  		return -EIO;
> --
> 2.7.5



More information about the stable mailing list