From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) by dpdk.org (Postfix) with ESMTP id 09F261B6A3 for ; Tue, 30 Jan 2018 18:24:33 +0100 (CET) Received: by mail-wr0-f170.google.com with SMTP id a43so4464140wrc.4 for ; Tue, 30 Jan 2018 09:24:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3eKIIdLYrwDldEE/lkB92ilyyRxasvA3jOUq9NrZsJk=; b=c147XkZApgAhJHUPAEJTIR9Pi1YYOgNqXo31dK1zEafozJu7dolLYL489joOn6e3GV Xok+oELNjEnGVpwj2uNbMzY7C3MTDLgobv4kMuRYVfPFJXCo61kEHa0+2eze1tSoIxIx E5lXU6XM0jUn7kruC/zBHzLcJrOX7G92UINBLLNcI17xeSHlRFP9paEkKhfFyLIFjtjx g2wBLU3VbJuVg4KZDulbrLLtQW1BJkvjp1E3HynTmny8UChqetIBYH9MKjyAlaTKxC93 4HIN02xmKHz8Xk1u3lumtiF+vOG2g+J+W/4ctmhEYYXw7BXtK9jDyYRXwFVHS46zQKdw tXyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3eKIIdLYrwDldEE/lkB92ilyyRxasvA3jOUq9NrZsJk=; b=Jpt+AEETHtJJAI7ARTveeqYtz1Xu2xFfrOVauIhQ7UCC0yoDApuds8RpZ7i7qrDnVG otZ7kZDgu4NxIoSqQnmBzsNKQL82D/iwKV+vE21UHv3gPZm0AiFcokhbbZAtNJ2ltt9S 4SNNrHTaPY6Erl6YkYc+nMbJYUdk6j+4d5rkA6llOmcgvVGD6ur7EGyvJD1o3n0GgqUK JV4RSSFE1CySAF6AVVRQOrgaZh6CB9AvAjTmh84OUETHm/sXQBCF6BzoDFGW0riuYpxg 8tFD/xx20kF/SjQM2Q8QimD7Nqrpl8JcfEzqbqsLdAXWXYol8Iet4kaBBm4JAhbUKNO8 jzQw== X-Gm-Message-State: AKwxytfLBRIkfpSB6W3qcrX2/ye3eELkejGoOycoOsch4vlqPvLUBL0Z bo9mlMrb3K553wFMkApq6hcDDA== X-Google-Smtp-Source: AH8x225ccDfkI86Kgge7oVtg4ySwZE9cFdPTfeAZWCAEK3eLftQ9apIuuaFeupzvtAiQ7PAfu244nA== X-Received: by 10.223.146.135 with SMTP id 7mr22960611wrn.123.1517333072762; Tue, 30 Jan 2018 09:24:32 -0800 (PST) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id x91sm16240953wrb.77.2018.01.30.09.24.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2018 09:24:31 -0800 (PST) Date: Tue, 30 Jan 2018 18:24:19 +0100 From: Adrien Mazarguil To: Moti Haimovsky Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20180130172419.GQ4256@6wind.com> References: <1517327640-182072-1-git-send-email-motih@mellanox.com> <20180130164107.GP4256@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180130164107.GP4256@6wind.com> Subject: Re: [dpdk-dev] [PATCH] net/mlx4: fix drop flow resources not freed 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: Tue, 30 Jan 2018 17:24:33 -0000 On Tue, Jan 30, 2018 at 05:41:07PM +0100, Adrien Mazarguil wrote: > Hi Moti, > > On Tue, Jan 30, 2018 at 05:54:00PM +0200, Moti Haimovsky wrote: > > This patch fixes the drop-flow resources not being freed when the device > > is closed. > > Issue can be observed when running testpmd and adding the following rule > > more than once: > > "flow create 0 ingress pattern eth / end actions drop / end" > > then either exiting testpmd using the "quit" command or by running the > > command: "port stop all" > > > > Fixes: d3a7e09234e4 ("net/mlx4: allocate drop flow resources on demand") > > Cc: stable@dpdk.org > > > > Signed-off-by: Moti Haimovsky > > Thanks for investigating this problem, however I do not think the proposed > patch uses the right approach to address it, more below. > We need to find out why we do not end up with a number of mlx5_drop_put() > calls matching that of mlx5_drop_get(). One is likely missing somewhere. > I'll have a look as well. After investigation, the following change in mlx4_flow_toggle() should do the trick: if (flow->drop) { + if (flow->ibv_flow) + return 0; mlx4_drop_get(priv); Without this, an already-enabled drop flow rule takes another reference when re-enabled, hence the issue. I can send a fix tomorrow. -- Adrien Mazarguil 6WIND