From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id D975C1B29A; Thu, 21 Mar 2019 04:30:25 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2019 20:30:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,251,1549958400"; d="scan'208";a="156912550" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by fmsmga001.fm.intel.com with ESMTP; 20 Mar 2019 20:30:17 -0700 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.210]) by KMSMSX151.gar.corp.intel.com ([169.254.10.186]) with mapi id 14.03.0415.000; Thu, 21 Mar 2019 11:30:12 +0800 From: "Zhao1, Wei" To: "Stillwell Jr, Paul M" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Zhang, Qi Z" Thread-Topic: [dpdk-dev] [PATCH] net/iavf: fix vertor interrupt number configuration error Thread-Index: AQHU3gqPMSH3uTf7yEmnEYh18190aKYVcFOQ Date: Thu, 21 Mar 2019 03:30:11 +0000 Message-ID: References: <1552964680-45860-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: 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.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix vertor interrupt number configuration error 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: Thu, 21 Mar 2019 03:30:26 -0000 > -----Original Message----- > From: Stillwell Jr, Paul M > Sent: Tuesday, March 19, 2019 12:17 PM > To: Zhao1, Wei ; dev@dpdk.org > Cc: stable@dpdk.org; Zhang, Qi Z ; Zhao1, Wei > > Subject: RE: [dpdk-dev] [PATCH] net/iavf: fix vertor interrupt number > configuration error >=20 >=20 > > -----Original Message----- > > From: dev On Behalf Of Wei Zhao > > Sent: Monday, March 18, 2019 8:05 PM > > To: dev@dpdk.org > > Cc: stable@dpdk.org; Zhang, Qi Z ; Zhao1, Wei > > > > Subject: [dpdk-dev] [PATCH] net/iavf: fix vertor interrupt number > > configuration error > > >=20 > Should the patch name be net/avf? No, DPDK has change name to iavf in recent days. =20 >=20 > > There is a issue when iavf do vertor interrupt configuration, it will > > miss one interrupt vector which set admin queue interrupt when > > communicate with host pf. > > >=20 > I would reword this to be clearer, something like: >=20 > The AVF driver needs to send an extra vector number to the Linux PF to > Work around an issue with interrupt vector mapping. The admin queue > needs to be added to the number of queues sent to the PF. Good, add in v2 later >=20 > > Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") > > Cc: stable@dpdk.org > > > > Signed-off-by: Wei Zhao > > Signed-off-by: Zhao Wei > > --- > > drivers/net/iavf/iavf_ethdev.c | 4 ++-- > > drivers/net/iavf/iavf_vchnl.c | 8 > > +++++++- > > 2 files changed, 9 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/iavf/iavf_ethdev.c > > b/drivers/net/iavf/iavf_ethdev.c index 846e604..49c9499 100644 > > --- a/drivers/net/iavf/iavf_ethdev.c > > +++ b/drivers/net/iavf/iavf_ethdev.c > > @@ -308,7 +308,7 @@ static int iavf_config_rx_queues_irqs(struct > > rte_eth_dev *dev, > > if (!dev->data->dev_conf.intr_conf.rxq || > > !rte_intr_dp_is_en(intr_handle)) { > > /* Rx interrupt disabled, Map interrupt only for writeback */ > > - vf->nb_msix =3D 1; > > + vf->nb_msix =3D 2; > > if (vf->vf_res->vf_cap_flags & > > VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) { > > /* If WB_ON_ITR supports, enable it */ @@ -338,7 > > +338,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev > > +*dev, > > vf->rxq_map[vf->msix_base] |=3D 1 << i; > > } else { > > if (!rte_intr_allow_others(intr_handle)) { > > - vf->nb_msix =3D 1; > > + vf->nb_msix =3D 2; > > vf->msix_base =3D IAVF_MISC_VEC_ID; > > for (i =3D 0; i < dev->data->nb_rx_queues; i++) { > > vf->rxq_map[vf->msix_base] |=3D 1 << i; diff -- > git > > a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index > > 6381fb6..d9a376e 100644 > > --- a/drivers/net/iavf/iavf_vchnl.c > > +++ b/drivers/net/iavf/iavf_vchnl.c > > @@ -609,7 +609,7 @@ iavf_config_irq_map(struct iavf_adapter *adapter) > > return -ENOMEM; > > > > map_info->num_vectors =3D vf->nb_msix; > > - for (i =3D 0; i < vf->nb_msix; i++) { > > + for (i =3D 0; i < vf->nb_msix - 1; i++) { > > vecmap =3D &map_info->vecmap[i]; > > vecmap->vsi_id =3D vf->vsi_res->vsi_id; > > vecmap->rxitr_idx =3D IAVF_ITR_INDEX_DEFAULT; @@ -618,6 > > +618,12 @@ iavf_config_irq_map(struct iavf_adapter *adapter) > > vecmap->rxq_map =3D vf->rxq_map[vf->msix_base + i]; > > } > > > > + vecmap =3D &map_info->vecmap[i]; > > + vecmap->vsi_id =3D vf->vsi_res->vsi_id; > > + vecmap->vector_id =3D 0; > > + vecmap->txq_map =3D 0; > > + vecmap->rxq_map =3D 0; > > + > > args.ops =3D VIRTCHNL_OP_CONFIG_IRQ_MAP; > > args.in_args =3D (u8 *)map_info; > > args.in_args_size =3D len; > > -- > > 2.7.5 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 03083A00E6 for ; Thu, 21 Mar 2019 04:30:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 562781B2B3; Thu, 21 Mar 2019 04:30:28 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id D975C1B29A; Thu, 21 Mar 2019 04:30:25 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2019 20:30:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,251,1549958400"; d="scan'208";a="156912550" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by fmsmga001.fm.intel.com with ESMTP; 20 Mar 2019 20:30:17 -0700 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.210]) by KMSMSX151.gar.corp.intel.com ([169.254.10.186]) with mapi id 14.03.0415.000; Thu, 21 Mar 2019 11:30:12 +0800 From: "Zhao1, Wei" To: "Stillwell Jr, Paul M" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Zhang, Qi Z" Thread-Topic: [dpdk-dev] [PATCH] net/iavf: fix vertor interrupt number configuration error Thread-Index: AQHU3gqPMSH3uTf7yEmnEYh18190aKYVcFOQ Date: Thu, 21 Mar 2019 03:30:11 +0000 Message-ID: References: <1552964680-45860-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: 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.206] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix vertor interrupt number configuration error 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" Message-ID: <20190321033011.BWuNy1Wscl5XeQ6Nhwm6zODcp2B3w9pJTNKtxvYX6EM@z> > -----Original Message----- > From: Stillwell Jr, Paul M > Sent: Tuesday, March 19, 2019 12:17 PM > To: Zhao1, Wei ; dev@dpdk.org > Cc: stable@dpdk.org; Zhang, Qi Z ; Zhao1, Wei > > Subject: RE: [dpdk-dev] [PATCH] net/iavf: fix vertor interrupt number > configuration error >=20 >=20 > > -----Original Message----- > > From: dev On Behalf Of Wei Zhao > > Sent: Monday, March 18, 2019 8:05 PM > > To: dev@dpdk.org > > Cc: stable@dpdk.org; Zhang, Qi Z ; Zhao1, Wei > > > > Subject: [dpdk-dev] [PATCH] net/iavf: fix vertor interrupt number > > configuration error > > >=20 > Should the patch name be net/avf? No, DPDK has change name to iavf in recent days. =20 >=20 > > There is a issue when iavf do vertor interrupt configuration, it will > > miss one interrupt vector which set admin queue interrupt when > > communicate with host pf. > > >=20 > I would reword this to be clearer, something like: >=20 > The AVF driver needs to send an extra vector number to the Linux PF to > Work around an issue with interrupt vector mapping. The admin queue > needs to be added to the number of queues sent to the PF. Good, add in v2 later >=20 > > Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") > > Cc: stable@dpdk.org > > > > Signed-off-by: Wei Zhao > > Signed-off-by: Zhao Wei > > --- > > drivers/net/iavf/iavf_ethdev.c | 4 ++-- > > drivers/net/iavf/iavf_vchnl.c | 8 > > +++++++- > > 2 files changed, 9 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/iavf/iavf_ethdev.c > > b/drivers/net/iavf/iavf_ethdev.c index 846e604..49c9499 100644 > > --- a/drivers/net/iavf/iavf_ethdev.c > > +++ b/drivers/net/iavf/iavf_ethdev.c > > @@ -308,7 +308,7 @@ static int iavf_config_rx_queues_irqs(struct > > rte_eth_dev *dev, > > if (!dev->data->dev_conf.intr_conf.rxq || > > !rte_intr_dp_is_en(intr_handle)) { > > /* Rx interrupt disabled, Map interrupt only for writeback */ > > - vf->nb_msix =3D 1; > > + vf->nb_msix =3D 2; > > if (vf->vf_res->vf_cap_flags & > > VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) { > > /* If WB_ON_ITR supports, enable it */ @@ -338,7 > > +338,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev > > +*dev, > > vf->rxq_map[vf->msix_base] |=3D 1 << i; > > } else { > > if (!rte_intr_allow_others(intr_handle)) { > > - vf->nb_msix =3D 1; > > + vf->nb_msix =3D 2; > > vf->msix_base =3D IAVF_MISC_VEC_ID; > > for (i =3D 0; i < dev->data->nb_rx_queues; i++) { > > vf->rxq_map[vf->msix_base] |=3D 1 << i; diff -- > git > > a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index > > 6381fb6..d9a376e 100644 > > --- a/drivers/net/iavf/iavf_vchnl.c > > +++ b/drivers/net/iavf/iavf_vchnl.c > > @@ -609,7 +609,7 @@ iavf_config_irq_map(struct iavf_adapter *adapter) > > return -ENOMEM; > > > > map_info->num_vectors =3D vf->nb_msix; > > - for (i =3D 0; i < vf->nb_msix; i++) { > > + for (i =3D 0; i < vf->nb_msix - 1; i++) { > > vecmap =3D &map_info->vecmap[i]; > > vecmap->vsi_id =3D vf->vsi_res->vsi_id; > > vecmap->rxitr_idx =3D IAVF_ITR_INDEX_DEFAULT; @@ -618,6 > > +618,12 @@ iavf_config_irq_map(struct iavf_adapter *adapter) > > vecmap->rxq_map =3D vf->rxq_map[vf->msix_base + i]; > > } > > > > + vecmap =3D &map_info->vecmap[i]; > > + vecmap->vsi_id =3D vf->vsi_res->vsi_id; > > + vecmap->vector_id =3D 0; > > + vecmap->txq_map =3D 0; > > + vecmap->rxq_map =3D 0; > > + > > args.ops =3D VIRTCHNL_OP_CONFIG_IRQ_MAP; > > args.in_args =3D (u8 *)map_info; > > args.in_args_size =3D len; > > -- > > 2.7.5