From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 85CBEA034F; Fri, 15 May 2020 05:29:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5616E1D9E6; Fri, 15 May 2020 05:29:48 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 057701D9E6; Fri, 15 May 2020 05:29:45 +0200 (CEST) IronPort-SDR: ABpLFrsQwmDQObSSDGL6tofSepLwBdGPEsVPnsoRoWDBhme77N5k/oLvWDy96MBYRl85cNn33m hvvAyj5DL3ug== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 20:29:45 -0700 IronPort-SDR: fOvMwv1dvKDYJOBI7meQK8VA8Hyj4KrWYNdMogIyTqjYYwVIB2H8stp5aUJZeMMnDSqxExBq5X A4arzv0osr5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,393,1583222400"; d="scan'208";a="341839818" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 14 May 2020 20:29:44 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 14 May 2020 20:29:44 -0700 Received: from cdsmsx151.ccr.corp.intel.com (172.17.4.38) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 14 May 2020 20:29:43 -0700 Received: from cdsmsx102.ccr.corp.intel.com ([169.254.2.227]) by CDSMSX151.ccr.corp.intel.com ([169.254.3.43]) with mapi id 14.03.0439.000; Fri, 15 May 2020 11:29:40 +0800 From: "Zeng, XiaoxiaoX" To: "Xu, Ting" , "dev@dpdk.org" CC: "Xing, Beilei" , "Wu, Jingjing" , "Ye, Xiaolong" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v1] net/iavf: fix setting wrong RXDID value for Rx queue Thread-Index: AQHWJ2XWfSickLwCTEC1kCHnCzGFZqiogxTw Date: Fri, 15 May 2020 03:29:40 +0000 Message-ID: References: <20200511152748.21144-1-ting.xu@intel.com> In-Reply-To: <20200511152748.21144-1-ting.xu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.6.105] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v1] net/iavf: fix setting wrong RXDID value for Rx queue 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Tested-by: Zeng,XiaoxiaoX Best regards, Zeng,xiaoxiao > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ting Xu > Sent: Monday, May 11, 2020 11:28 PM > To: dev@dpdk.org > Cc: Xing, Beilei ; Wu, Jingjing > ; Ye, Xiaolong ; > stable@dpdk.org > Subject: [dpdk-dev] [PATCH v1] net/iavf: fix setting wrong RXDID value fo= r Rx > queue >=20 > CVL kernel PF configures all reserved queues for VF, including Rx queue > RXDID. The number of reserved queues is the maximum between Tx and Rx > queues. If the number of the enabled Rx queues is less than that of reser= ved > queues, required RXDID will only be set for those enabled, but default va= lue > (0) is set for others. > However, RXDID 0 (legacy 16byte descriptor) is not supported now, PF will > return error when configuring those disabled VF queues. >=20 > In this patch, required RXDID is set for all reserved Rx queues, no matte= r > enabled or not. In this way, PF will configure Rx queues correctly withou= t > reporting error. >=20 > Fixes: b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal = path") > Cc: stable@dpdk.org >=20 > Signed-off-by: Ting Xu > --- > drivers/net/iavf/iavf_vchnl.c | 44 +++++++++++++++++------------------ > 1 file changed, 22 insertions(+), 22 deletions(-) >=20 > diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.= c index > 2a0cdd927..328cfdf01 100644 > --- a/drivers/net/iavf/iavf_vchnl.c > +++ b/drivers/net/iavf/iavf_vchnl.c > @@ -593,32 +593,32 @@ iavf_configure_queues(struct iavf_adapter > *adapter) > vc_qp->rxq.ring_len =3D rxq[i]->nb_rx_desc; > vc_qp->rxq.dma_ring_addr =3D rxq[i]- > >rx_ring_phys_addr; > vc_qp->rxq.databuffer_size =3D rxq[i]->rx_buf_len; > + } >=20 > #ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC > - if (vf->vf_res->vf_cap_flags & > - VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC && > - vf->supported_rxdid & > BIT(IAVF_RXDID_COMMS_OVS_1)) { > - vc_qp->rxq.rxdid =3D > IAVF_RXDID_COMMS_OVS_1; > - PMD_DRV_LOG(NOTICE, "request RXDID > =3D=3D %d in " > - "Queue[%d]", vc_qp->rxq.rxdid, i); > - } else { > - vc_qp->rxq.rxdid =3D IAVF_RXDID_LEGACY_1; > - PMD_DRV_LOG(NOTICE, "request RXDID > =3D=3D %d in " > - "Queue[%d]", vc_qp->rxq.rxdid, i); > - } > + if (vf->vf_res->vf_cap_flags & > + VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC && > + vf->supported_rxdid & > BIT(IAVF_RXDID_COMMS_OVS_1)) { > + vc_qp->rxq.rxdid =3D IAVF_RXDID_COMMS_OVS_1; > + PMD_DRV_LOG(NOTICE, "request RXDID =3D=3D %d in " > + "Queue[%d]", vc_qp->rxq.rxdid, i); > + } else { > + vc_qp->rxq.rxdid =3D IAVF_RXDID_LEGACY_1; > + PMD_DRV_LOG(NOTICE, "request RXDID =3D=3D %d in " > + "Queue[%d]", vc_qp->rxq.rxdid, i); > + } > #else > - if (vf->vf_res->vf_cap_flags & > - VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC && > - vf->supported_rxdid & > BIT(IAVF_RXDID_LEGACY_0)) { > - vc_qp->rxq.rxdid =3D IAVF_RXDID_LEGACY_0; > - PMD_DRV_LOG(NOTICE, "request RXDID > =3D=3D %d in " > - "Queue[%d]", vc_qp->rxq.rxdid, i); > - } else { > - PMD_DRV_LOG(ERR, "RXDID =3D=3D 0 is not > supported"); > - return -1; > - } > -#endif > + if (vf->vf_res->vf_cap_flags & > + VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC && > + vf->supported_rxdid & BIT(IAVF_RXDID_LEGACY_0)) > { > + vc_qp->rxq.rxdid =3D IAVF_RXDID_LEGACY_0; > + PMD_DRV_LOG(NOTICE, "request RXDID =3D=3D %d in " > + "Queue[%d]", vc_qp->rxq.rxdid, i); > + } else { > + PMD_DRV_LOG(ERR, "RXDID =3D=3D 0 is not supported"); > + return -1; > } > +#endif > } >=20 > memset(&args, 0, sizeof(args)); > -- > 2.17.1