From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 51200A0093; Thu, 23 Jun 2022 13:17:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2F2A40042; Thu, 23 Jun 2022 13:17:29 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 599454003F; Thu, 23 Jun 2022 13:17:29 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id C41D9AC; Thu, 23 Jun 2022 14:17:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru C41D9AC DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1655983048; bh=iT2zpteWrZMiHOxL64SS55Iy/XoNU3K4tPFzaRwns+0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ic0b8bxf+Z7lnuD1vfxx0pz2SSWjp59Uz+LQsC3bNDnv/Fquc+woN1RKA0A1Z6aCZ 4P9SXLHlbxMfreZgz46kwlkWOYR60dPqDlD/pMTy9k/bn+htCyT/WEEE2+mFTz9/Fj GXwwSLz0vKRr0slpJKPpGo+TStgUMeOhF9I3gVXc= Message-ID: <3ceae1bc-56ef-eaf1-4540-2669584c01a9@oktetlabs.ru> Date: Thu, 23 Jun 2022 14:17:28 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] app/testpmd: cleanup port resources after implicit close Content-Language: en-US To: Dmitry Kozlyuk , dev@dpdk.org Cc: stable@dpdk.org, Matan Azrad , Xiaoyun Li , Aman Singh , Yuying Zhang References: <20220615231212.44122-1-dkozlyuk@nvidia.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20220615231212.44122-1-dkozlyuk@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 6/16/22 02:12, Dmitry Kozlyuk wrote: > When a port was closed implicitly closed by the PMD, for example, > if it was a representor port and its master port was detached, > flow indirect actions could remain with their handles no longer valid. > If a newly attached device was assigned the same ID as the closed port, > those indirect actions became accessible again. > Any attempt to use them resulted in an undefined behavior. > Flow flex items had no such issue on close, but had it on detach. > > Introduce flush_port_owned_resources() function > for consistent cleanup and call it when a port is closed or detached. > Make it flush flow rules and multicast addresses too > because they logically belong to the port being removed. > > Fixes: 55509e3a49fb ("app/testpmd: support shared flow action") > Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands") > Cc: stable@dpdk.org > > Signed-off-by: Dmitry Kozlyuk > Acked-by: Matan Azrad Acked-by: Andrew Rybchenko Resolved merge conflict on apply to dpdk-next-net/main, applied, thanks.