From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 30 Jan 2017 06:34:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,311,1477983600"; d="scan'208";a="219288462" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 30 Jan 2017 06:34:39 -0800 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.248.2; Mon, 30 Jan 2017 06:34:39 -0800 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.230]) by fmsmsx118.amr.corp.intel.com ([169.254.1.242]) with mapi id 14.03.0248.002; Mon, 30 Jan 2017 06:34:38 -0800 From: "Wiles, Keith" To: "Yigit, Ferruh" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/tap: driver closing tx interface on queue setup Thread-Index: AQHSeugNf/Oo2Oh9K0+Thn0jLxcaCaFRnDmA 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> In-Reply-To: <2c430141-94c1-5482-7fc2-94f5908b41e0@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.137.159] Content-Type: text/plain; charset="us-ascii" Content-ID: <6E392F6ED8423840BEBD0FB022A230ED@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/tap: driver closing tx interface on queue setup 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, 30 Jan 2017 14:34:41 -0000 > 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