From: "Wiles, Keith" Subject: Re: [PATCH] net/tap: driver closing tx interface on queue setup Date: Mon, 30 Jan 2017 14:34:38 +0000 Message-ID: <6B37A978-0F89-4299-86E1-5697392EDC49@intel.com> References: <20170129021205.36860-1-keith.wiles@intel.com> <2c430141-94c1-5482-7fc2-94f5908b41e0@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: "Yigit, Ferruh" Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id EFD2C2B98 for ; Mon, 30 Jan 2017 15:34:40 +0100 (CET) In-Reply-To: <2c430141-94c1-5482-7fc2-94f5908b41e0@intel.com> Content-Language: en-US Content-ID: <6E392F6ED8423840BEBD0FB022A230ED@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > On Jan 30, 2017, at 5:00 AM, Yigit, Ferruh wrote= : >=20 > On 1/29/2017 2:12 AM, Keith Wiles wrote: >> The tap driver setup both rx and tx file descriptors when the >> rte_eth_rx_queue_setup() causing the tx to be closed when tx setup >> was called. >=20 > Can you please describe the problem more. > Without this patch rx->fd =3D=3D tx->fd, with this patch rx and tx has > different file descriptors. Let me look at this more, I am getting the same FD for both. Must be someth= ing else going on. >=20 > What was the wrong with rx and tx having same fd? >=20 > As far as I can see, rte_eth_rx_queue_setup() won't close tx->fd, that > function will do nothing if rx or tx has valid fd. The rte_eth_rx_queue_setup() look at line 1146 if rxq has a value then rele= ase it, which happens on both Rx/Tx code rxq =3D dev->data->rx_queues; if (rxq[rx_queue_id]) { RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_release, -ENOTSUP); (*dev->dev_ops->rx_queue_release)(rxq[rx_queue_id]); rxq[rx_queue_id] =3D NULL; } if (rx_conf =3D=3D NULL) rx_conf =3D &dev_info.default_rxconf; ret =3D (*dev->dev_ops->rx_queue_setup)(dev, rx_queue_id, nb_rx_desc, socket_id, rx_conf, mp); >=20 >>=20 >> Signed-off-by: Keith Wiles >=20 > <...> Regards, Keith