From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 10C381B6B4 for ; Tue, 30 Jan 2018 18:24:33 +0100 (CET) Received: by mail-wr0-f177.google.com with SMTP id 39so3341655wrb.10 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=HgEyxhd5lcvL94BOwXMCrtuHUeX6Dpg1ikJIslxvovJQeR4/vY9G1HIRek4IKLH3DR FcSPtcjoiw6s8eZ2+gfpvTC6sHhYxVTaK9/azNJK49DqNo4kl5cNItSgEo+dimnRDeiQ 6P0fxc7XpQS2F/IbC3vgtfkqXhJtn39oDn4CWmvKDR4vDp5ju+/ow/d6OVMm/onh6CD1 QZ6wPC3tyGb7k5W0qHhN+HX0CMtASf8gDH5/qU+g8mWpNrg04Uo1IT/J08bf2gNnn4jo ly3CElN7Jk5nVbf6kLJ9ucQGENZ+tEMn1FnqP1BSf5iADc/Od/TeFU0YqbhnQpalv58W Zyag== X-Gm-Message-State: AKwxytfjtzNS/UTXxyAfvnyNjVCKDvuu2A4yL/NQ7hXWOA5PfhTlYZYV /MC7UeLVFxljeL9dK9G0Y+2RTQ== 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-stable] [PATCH] net/mlx4: fix drop flow resources not freed 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: 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