From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 39CF01B974 for ; Mon, 29 Jan 2018 17:25:09 +0100 (CET) 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/DHE-RSA-AES256-GCM-SHA384; 29 Jan 2018 08:25:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,431,1511856000"; d="scan'208";a="27197421" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga001.jf.intel.com with ESMTP; 29 Jan 2018 08:25:06 -0800 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 29 Jan 2018 16:25:06 +0000 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.197]) by irsmsx112.ger.corp.intel.com ([169.254.1.242]) with mapi id 14.03.0319.002; Mon, 29 Jan 2018 16:25:06 +0000 From: "Ananyev, Konstantin" To: Chas Williams <3chas3@gmail.com>, "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Charles (Chas) Williams" Thread-Topic: [PATCH] net/ixgbe: fix reconfiguration of rx queues Thread-Index: AQHTmRTYE/Umvo2hr02H2/aHNSRnBKOLCIkQ Date: Mon, 29 Jan 2018 16:25:05 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258905653D7@IRSMSX103.ger.corp.intel.com> References: <20180129152115.26359-1-3chas3@gmail.com> In-Reply-To: <20180129152115.26359-1-3chas3@gmail.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzA5YjUyZGItY2NiMy00Njc5LWI3NWUtZmVmN2VmMTg2YThlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InJUY3ZENW0wUUFMM2FwNm10XC8yRXptRUVvckIyQWdUTkZKaFBzb1wvVzRGTT0ifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix reconfiguration of rx queues 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: Mon, 29 Jan 2018 16:25:09 -0000 > -----Original Message----- > From: Chas Williams [mailto:3chas3@gmail.com] > Sent: Monday, January 29, 2018 3:21 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo ; Ananyev, Konstantin ; Charles (Chas) Williams > > Subject: [PATCH] net/ixgbe: fix reconfiguration of rx queues >=20 > From: "Charles (Chas) Williams" >=20 > .dev_configure() may be called again after RX queues have been setup. > This has the effect of clearing whatever setting the RX queues made for > rx_bulk_alloc_allowed or rx_vec_allowed. Only reset this configuration > is there aren't any currently allocated queues. >=20 > Fixes: 01fa1d6215fa ("ixgbe: unify Rx setup") >=20 > Signed-off-by: Chas Williams > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 18 ++++++++++++++++-- > 1 file changed, 16 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_e= thdev.c > index 37eb668..b39249a 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -2348,6 +2348,7 @@ ixgbe_dev_configure(struct rte_eth_dev *dev) > struct ixgbe_adapter *adapter =3D > (struct ixgbe_adapter *)dev->data->dev_private; > int ret; > + uint16_t i; >=20 > PMD_INIT_FUNC_TRACE(); > /* multipe queue mode checking */ > @@ -2363,11 +2364,17 @@ ixgbe_dev_configure(struct rte_eth_dev *dev) >=20 > /* > * Initialize to TRUE. If any of Rx queues doesn't meet the bulk > - * allocation or vector Rx preconditions we will reset it. > + * allocation or vector Rx preconditions we will reset it. We > + * can only do this is there aren't any existing RX queues. > */ > + for (i =3D 0; i < dev->data->nb_rx_queues; i++) { > + if (dev->data->rx_queues[i]) > + goto out; > + } I don't see why this is needed. It surely should be possible to reconfigure device with different number of queues.=20 Konstantin > adapter->rx_bulk_alloc_allowed =3D true; > adapter->rx_vec_allowed =3D true; >=20 > +out: > return 0; > } >=20 > @@ -4959,6 +4966,7 @@ ixgbevf_dev_configure(struct rte_eth_dev *dev) > struct rte_eth_conf *conf =3D &dev->data->dev_conf; > struct ixgbe_adapter *adapter =3D > (struct ixgbe_adapter *)dev->data->dev_private; > + uint16_t i; >=20 > PMD_INIT_LOG(DEBUG, "Configured Virtual Function port id: %d", > dev->data->port_id); > @@ -4981,11 +4989,17 @@ ixgbevf_dev_configure(struct rte_eth_dev *dev) >=20 > /* > * Initialize to TRUE. If any of Rx queues doesn't meet the bulk > - * allocation or vector Rx preconditions we will reset it. > + * allocation or vector Rx preconditions we will reset it. We > + * can only do this is there aren't any existing RX queues. > */ > + for (i =3D 0; i < dev->data->nb_rx_queues; i++) { > + if (dev->data->rx_queues[i]) > + goto out; > + } > adapter->rx_bulk_alloc_allowed =3D true; > adapter->rx_vec_allowed =3D true; >=20 > +out: > return 0; > } >=20 > -- > 2.9.5