From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wang, Liang-min" Subject: Re: [PATCH v4 1/4] ethdev: add apis to support access device info Date: Thu, 11 Jun 2015 13:25:23 +0000 Message-ID: References: <1432946276-9424-1-git-send-email-liang-min.wang@intel.com> <1433948996-9716-1-git-send-email-liang-min.wang@intel.com> <1433948996-9716-2-git-send-email-liang-min.wang@intel.com> <2601191342CEEE43887BDE71AB97725836A08BA3@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB97725836A08BEC@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: "Ananyev, Konstantin" , "dev@dpdk.org" Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9E3F79E7 for ; Thu, 11 Jun 2015 15:25:35 +0200 (CEST) In-Reply-To: <2601191342CEEE43887BDE71AB97725836A08BEC@irsmsx105.ger.corp.intel.com> Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Ananyev, Konstantin > Sent: Thursday, June 11, 2015 9:14 AM > To: Wang, Liang-min; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v4 1/4] ethdev: add apis to support access > device info >=20 >=20 > > > > + > > > > +int > > > > +rte_eth_dev_set_ringparam(uint8_t port_id, struct > > > > +rte_dev_ring_info > > > > +*info) { > > > > + struct rte_eth_dev *dev; > > > > + > > > > + if (!rte_eth_dev_is_valid_port(port_id)) { > > > > + PMD_DEBUG_TRACE("Invalid port_id=3D%d\n", port_id); > > > > + return -ENODEV; > > > > + } > > > > + > > > > + if ((dev=3D &rte_eth_devices[port_id]) =3D=3D NULL) { > > > > + PMD_DEBUG_TRACE("Invalid port device\n"); > > > > + return -ENODEV; > > > > + } > > > > + > > > > + FUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_ringparam, - > > > ENOTSUP); > > > > + return (*dev->dev_ops->set_ringparam)(dev, info); } > > > > > > > > > I am a bit confused, what particular value of rte_dev_ring_info will > > > be allowed to change? > > > You can't change number of RXD/TXD at runtime. > > > You have to stop the device first, and then reconfigure particular > queue(s). > > > Again, you can't reset RXF/TXD without stopping RX/TX first. > > > So what that function is supposed to do? > > > As I can see currently, none of the PMD in your patch support it. > > > > > > > Exactly, setting RXD/TXD will require some change on kernel (RX/TX burs= t) > function. > > As you already observe that there is no dev_op registered for set_ring. > > The API is created as a placeholder for future implementation. > > There are a couple of idea thrown around (such as mono- > increase/decrease to avoid buffer overrun). > > Any suggestion is welcome. >=20 > If you don't plan to implement it in current patch-set, then it is better= to > remove it for now. > About suggestions - as I said, I don't think it is doable without stoppin= g (and > reconfiguring) the queue. > Again not sure, why do you want to do that run-tme. > Konstantin That's a very valid point. To support run-time ring descriptor size adjustm= ent, we need to stop traffic in some way.