From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 1874E1B2A3; Wed, 14 Feb 2018 15:29:31 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BF13D2088E; Wed, 14 Feb 2018 09:29:30 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 14 Feb 2018 09:29:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=tBxx1NPyiLPg0C4f/S95wO6fol em9umS1kIH3LC16NU=; b=Sl708Re4XpndoC4QHpe9V1qWQs0lq7idHdCNjmSb6k 77qFLS8iB0YDuR63xavWEcV8yEGYYTvjdr0YynuFSlUu1i1rm8BicYfBgirsVdl+ +Lmjat1aGotSS/lakOfAS1R9F69PWqRLsxB9KBAKhnSwjSacPzQZvVmEVXuIUjhP M= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=tBxx1N PyiLPg0C4f/S95wO6folem9umS1kIH3LC16NU=; b=PpOKy45cjNJ2BMZmSA8GRm UVpHYQnRCW1OV90SJuuRAbO9VukjXLMlu3p12GEGqwZ3BniY7hMrq9HsTmEiZXch ++teTzIZNdyF7jGSXlr8TSelmC6hfgKSqAhvvUEr3Kqq9LumSwCYKnLCaBrnhS+P 1wJze9xATDqhDY8pmUtWfB42m+2iOPHEgz9UZ6OKbTQ9IL9q+3maYtux67muD+PG iBWQx++EKLLZIZUto+RKW8it7Kn7qF/svSxbkj3FPg+lJ6D1HBKAkstuyAJu+NuN JVGPS4uhUaxbL8p55HzOzcYLkXJBjIgR2vOQsnPj/PAZJt0c7fMHB1NEM07JsLcg == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 74F0C7E446; Wed, 14 Feb 2018 09:29:30 -0500 (EST) From: Thomas Monjalon To: Ophir Munk Cc: dev@dpdk.org, Pascal Mazon , Olga Shern , stable@dpdk.org Date: Wed, 14 Feb 2018 15:29:18 +0100 Message-ID: <1643538.LAAp0OXPes@xps> In-Reply-To: References: <1518546947-20932-1-git-send-email-ophirmu@mellanox.com> <1518607939-29121-1-git-send-email-ophirmu@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v3] net/tap: fix promiscuous rules double insertions X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Feb 2018 14:29:31 -0000 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