From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id F0A45F04; Mon, 18 Sep 2017 21:35:58 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2017 12:35:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,414,1500966000"; d="scan'208";a="901443384" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.57]) ([10.237.220.57]) by FMSMGA003.fm.intel.com with ESMTP; 18 Sep 2017 12:35:55 -0700 To: Pascal Mazon , Ophir Munk Cc: Adrien Mazarguil , dev@dpdk.org, Thomas Monjalon , Olga Shern , stable@dpdk.org References: <0e18a611-3b35-6624-013b-59c72f71307b@6wind.com> <1505601158-21256-1-git-send-email-ophirmu@mellanox.com> <30b8c47b-9f44-881e-ee71-7b6e2abc5da1@6wind.com> From: Ferruh Yigit Message-ID: Date: Mon, 18 Sep 2017 20:35:55 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <30b8c47b-9f44-881e-ee71-7b6e2abc5da1@6wind.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v3] net/tap: fix flow and port commands 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, 18 Sep 2017 19:35:59 -0000 On 9/18/2017 8:46 AM, Pascal Mazon wrote: > > On 17/09/2017 00:32, Ophir Munk wrote: >> This commit fixes two bugs related to tap devices. The first bug occurs >> when executing in testpmd the following flow rule assuming tap device has >> 4 rx and tx pair queues >> "flow create 0 ingress pattern eth / end actions queue index 5 / end" >> This command will report on success and will print ""Flow rule #0 created" >> although it should have failed as queue index number 5 does not exist >> >> The second bug occurs when executing in testpmd "port start all" following >> a port configuration. Assuming 1 pair of rx and tx queues an error is >> reported: "Fail to start port 0" >> >> Before this commit a fixed max number (16) of rx and tx queue pairs were >> created on startup where the file descriptors (fds) of rx and tx pairs were >> identical. As a result in the first bug queue index 5 existed because the >> tap device was created with 16 rx and tx queue pairs regardless of the >> configured number of queues. In the second bug when tap device was started >> tx fd was closed before opening it and executing ioctl() on it. However >> closing the sole fd of the device caused ioctl to fail with "No such >> device". >> >> This commit creates the configured number of rx and tx queue pairs (up to >> max 16) and assigns a unique fd to each queue. It was written to solve the >> first bug and was found as the right fix for the second bug as well. >> >> Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD") >> Fixes: bf7b7f437b49 ("net/tap: create netdevice during probing") >> Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions") >> Cc: stable@dpdk.org >> >> Signed-off-by: Ophir Munk > Hi, > > Your reasons to keep *dev in pmd_internals are good enough for me! > > The rest of the patch looks fine. > > Acked-by: Pascal Mazon Applied to dpdk-next-net/master, thanks. (Welcome Ophir!)