From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3] net/tap: fix promiscuous rules double insertions Date: Wed, 14 Feb 2018 15:29:18 +0100 Message-ID: <1643538.LAAp0OXPes@xps> References: <1518546947-20932-1-git-send-email-ophirmu@mellanox.com> <1518607939-29121-1-git-send-email-ophirmu@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Pascal Mazon , Olga Shern , stable@dpdk.org To: Ophir Munk Return-path: In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 14/02/2018 14:13, Pascal Mazon: > On 14/02/2018 12:32, Ophir Munk wrote: > > Running testpmd command "port stop all" followed by command "port start > > all" may result in a TAP error: > > PMD: Kernel refused TC filter rule creation (17): File exists > > > > Root cause analysis: during the execution of "port start all" command > > testpmd calls rte_eth_promiscuous_enable() while during the execution > > of "port stop all" command testpmd does not call > > rte_eth_promiscuous_disable(). > > As a result the TAP PMD is trying to add tc (traffic control command) > > promiscuous rules to the remote netvsc device consecutively. From the > > kernel point of view it is seen as an attempt to add the same rule more > > than once. In recent kernels (e.g. version 4.13) this attempt is rejected > > with a "File exists" error. In less recent kernels (e.g. version 4.4) the > > same rule may have been successfully accepted twice, which is undesirable. > > > > In the corrupted code every tc promiscuous rule included a different > > handle number parameter. If instead an identical handle number is > > used for all tc promiscuous rules - all kernels will reject the second > > identical rule with a "File exists" error, which is easy to identify and > > to silently ignore. > > > > Fixes: 2bc06869cd94 ("net/tap: add remote netdevice traffic capture") > > Cc: stable@dpdk.org > > > > Signed-off-by: Ophir Munk > Acked-by: Pascal Mazon Applied, thanks