From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9C7747CDA for ; Tue, 25 Sep 2018 13:35:37 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 04:35:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,301,1534834800"; d="scan'208";a="89153991" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.39]) ([10.237.221.39]) by fmsmga002.fm.intel.com with ESMTP; 25 Sep 2018 04:34:16 -0700 To: Ajit Khaparde , dev@dpdk.org Cc: Bei Sun References: <20180922045559.27438-1-ajit.khaparde@broadcom.com> <20180922045559.27438-12-ajit.khaparde@broadcom.com> From: Ferruh Yigit Openpgp: preference=signencrypt Message-ID: <6c6f72c7-a3ee-c1b0-d675-e1095db3685c@intel.com> Date: Tue, 25 Sep 2018 12:34:15 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180922045559.27438-12-ajit.khaparde@broadcom.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 11/12] net/bnxt: set VLAN strip mode before default vnic cfg 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: Tue, 25 Sep 2018 11:35:38 -0000 On 9/22/2018 5:55 AM, Ajit Khaparde wrote: > From: Bei Sun > > Firmware sets pf pair in default vnic cfg. If the VLAN strip > setting is not available at this time, it will not be > configured correctly in the CFA. > Set the desired VLAN strip mode before default vnic configuration. vnic used as uppercase in prev patch titles, can you please make usage consistent? > > Signed-off-by: Bei Sun > Signed-off-by: Ajit Khaparde > --- > drivers/net/bnxt/bnxt_ethdev.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c > index e1b684c2e..e605df424 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -202,7 +202,9 @@ static int bnxt_init_chip(struct bnxt *bp) > struct bnxt_rx_queue *rxq; > struct rte_eth_link new; > struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(bp->eth_dev); > + struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; > struct rte_intr_handle *intr_handle = &pci_dev->intr_handle; > + uint64_t rx_offloads = dev_conf->rxmode.offloads; > uint32_t intr_vector = 0; > uint32_t queue_id, base = BNXT_MISC_VEC_ID; > uint32_t vec = BNXT_MISC_VEC_ID; > @@ -283,6 +285,16 @@ static int bnxt_init_chip(struct bnxt *bp) > } > } > > + /* > + * Firmware sets pf pair in default vnic cfg. If the VLAN strip > + * setting is not available at this time, it will not be > + * configured correctly in the CFA. > + */ > + if (rx_offloads & DEV_RX_OFFLOAD_VLAN_STRIP) > + vnic->vlan_strip = true; > + else > + vnic->vlan_strip = false; > + > rc = bnxt_hwrm_vnic_cfg(bp, vnic); > if (rc) { > PMD_DRV_LOG(ERR, "HWRM vnic %d cfg failure rc: %x\n", >