From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id E57C2548B; Wed, 13 Feb 2019 05:05:52 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2019 20:05:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,364,1544515200"; d="scan'208";a="142972182" Received: from pgsmsx111.gar.corp.intel.com ([10.108.55.200]) by fmsmga002.fm.intel.com with ESMTP; 12 Feb 2019 20:05:50 -0800 Received: from pgsmsx110.gar.corp.intel.com (10.221.44.111) by PGSMSX111.gar.corp.intel.com (10.108.55.200) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 13 Feb 2019 12:05:49 +0800 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.6]) by PGSMSX110.gar.corp.intel.com ([169.254.13.64]) with mapi id 14.03.0415.000; Wed, 13 Feb 2019 12:05:49 +0800 From: "Zhao1, Wei" To: "dev@dpdk.org" CC: "stable@dpdk.org" , "Zhang, Qi Z" Thread-Topic: [PATCH v2] net/ice: enable VLAN filter offloads support Thread-Index: AQHUw1ArWFLScPNKIEChbTLs4A+elqXdHAWA Date: Wed, 13 Feb 2019 04:05:49 +0000 Message-ID: References: <1548662003-7339-1-git-send-email-wei.zhao1@intel.com> <1550028615-44721-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1550028615-44721-1-git-send-email-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] net/ice: enable VLAN filter offloads support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 04:05:53 -0000 Error patch, please ignore it. > -----Original Message----- > From: Zhao1, Wei > Sent: Wednesday, February 13, 2019 11:30 AM > To: dev@dpdk.org > Cc: stable@dpdk.org; Zhang, Qi Z ; Zhao1, Wei > > Subject: [PATCH v2] net/ice: enable VLAN filter offloads support >=20 > 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. >=20 > Signed-off-by: Wei Zhao >=20 > --- >=20 > 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(-) >=20 > 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); >=20 > 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); >=20 > 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 =3D pf->main_vsi; > uint16_t nb_rxq =3D 0; > uint16_t nb_txq, i; > - int ret; > + int mask, ret; >=20 > /* program Tx queues' context in hardware */ > for (nb_txq =3D 0; nb_txq < data->nb_tx_queues; nb_txq++) { @@ - > 1748,6 +1748,14 @@ ice_dev_start(struct rte_eth_dev *dev) >=20 > ice_set_rx_function(dev); >=20 > + mask =3D ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK | > + ETH_VLAN_EXTEND_MASK; > + ret =3D 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