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 4456AA0505 for ; Tue, 12 Apr 2022 07:42:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A0C2427ED; Tue, 12 Apr 2022 07:42:13 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 0129340DF7; Tue, 12 Apr 2022 07:42:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649742130; x=1681278130; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=VCJYdSgbyKRsgJxrWUyLkhHOg3iO5cj0H6VBVgro5p8=; b=EiTJ2XHQ9+6Hdekcp/ImnmVxQCm6ayyvxFT4+DEs2OiPttRIg/i0NXKH LaixJrh2zDDCxOj1gJyqXx8fvVaaFbzzqIuE/4+7GbfoBallOsnOcQVCK LMaTpSTylC4UOQ4EkfBUAwdrty+9QliQowi9CeGKVXnv4J6R5qqCB2maj KqxXqjmpMat0W1n/JcDcjHQ3kcgOdes7a8VcuCwNGBPVRhuIAvAZcofc8 cqKdFVjn3YKF1ISz3xmddhbIlwXlFjXX0n3ZDgV1t572wARe96eALSkrn wwp7bhuq1UXZAMR63C3wo3TEHVDGxdnSvOcTW4XvI5g03Bhpoe+wwrvpa w==; X-IronPort-AV: E=McAfee;i="6400,9594,10314"; a="242868166" X-IronPort-AV: E=Sophos;i="5.90,252,1643702400"; d="scan'208";a="242868166" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2022 22:42:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,252,1643702400"; d="scan'208";a="526308855" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga006.jf.intel.com with ESMTP; 11 Apr 2022 22:42:08 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 11 Apr 2022 22:42:07 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 11 Apr 2022 22:42:07 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 11 Apr 2022 22:42:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DV4APitLGBgDPehFWjwOPyTjSR8e7xMfAGrYOq5Iwm6Jud9PbrRXNQ41Q0KW+wO6+9jWCJMKk6UJQu3Yg9nQ7pEquwLj+lNDy//4dOBpLh/y+9+HU29AEmakcF46MnIY8mfLAKblcP9UhJRug5POjlTVUcWzsbs/iAigwyisVKhgPfmePOs7B9cHoDnIBK2IvuTheQHHfzMjLbxDHd98fDB3/vZ9XbisvJMNP8y1oaCmCxkb5ZJgjaclmJpPgogi03FM8CszV/dADBcwxXKpeRUhE+lvVCVAeWPvJZwX8OyJ2eYMdDqAl34QPqXErLDO0qZMBa4B67cVWWYdG92aVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VCJYdSgbyKRsgJxrWUyLkhHOg3iO5cj0H6VBVgro5p8=; b=hyD3kqo/IM2jnTV3xLuVwr/cfTuhuR+13GYYBMPucSCqAYflbfcnWZZvLoL/j8Tp8eTEW79S8qAbIoXEuwiLnmfdz5sU9lVOiXz/xIILoB9X1kYSbb87bhHTga554PXFOObxwdeR2Cp1rHe6z4qce3Ribywd1bse9IhMS0WqNNrXgqYhBAvUxP4SzE65+e5Dhvle9jedFuZJXAguUUKBsNUnSx7y/Sm17vN5qxXQ5yn5n+hrqlctvhcxfqj/aKaOW+NyPkc7vsbwIj65BefCai4BdQoZp/HSPlb7z4Q7syL9Be2u3fgpwZZS5MWbkyuiTOvidLvOoNtssTSBmGX0fg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MWHPR11MB0062.namprd11.prod.outlook.com (2603:10b6:301:67::34) by DM6PR11MB3994.namprd11.prod.outlook.com (2603:10b6:5:193::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Tue, 12 Apr 2022 05:42:06 +0000 Received: from MWHPR11MB0062.namprd11.prod.outlook.com ([fe80::c3c:359:d9c4:3a54]) by MWHPR11MB0062.namprd11.prod.outlook.com ([fe80::c3c:359:d9c4:3a54%4]) with mapi id 15.20.5144.029; Tue, 12 Apr 2022 05:42:05 +0000 Message-ID: <707c865e-e50b-63e9-a6b0-c46418fd39ae@intel.com> Date: Tue, 12 Apr 2022 11:11:55 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] app/testpmd: fix use of indirect action after port close Content-Language: en-US To: Dmitry Kozlyuk , "dev@dpdk.org" CC: "stable@dpdk.org" , Matan Azrad , Xiaoyun Li , Yuying Zhang References: <20220307164821.821406-1-dkozlyuk@nvidia.com> <4f68f319-a533-5170-149b-623acf8bb30d@intel.com> From: "Singh, Aman Deep" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN0PR01CA0045.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:49::8) To MWHPR11MB0062.namprd11.prod.outlook.com (2603:10b6:301:67::34) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9547bf59-2cca-4677-0b13-08da1c472d3f X-MS-TrafficTypeDiagnostic: DM6PR11MB3994:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZMSNpr8FD6MG22arw4HRQ0/Ui6GHxZBpvWY7Vn000df2Xru2WSDlMZ+qZepVywJV1o4JbP4m0dlXxM4OXGuiCHg7izabJjHSoxnt2C7H0zuBXaFcqMHQnYD0X+2/EN4z/To+CfRvNqhgDfrdVEXnfUVuvtZQzA8PPXB8mT0ZyLStYwXPWva3s+UmA09gTNCPyTwD1pdCpdPwFWRU3pE6AO409XG/Gw+W8TI58nSvn915hU+D+zBpCWH8DgwAymHENg8MWMWFqcUnG6ndmo2HBLEjwuIGtdo0FuAdx1e4+zeaX9bOIbeENp1SI71aAdORmWOccSXfEBqdplesNUFnQdO9n8+nNVq4rGsE7hiwJrcfQyk08EiuEvj6J/y+pT+7FnzTbqT6uR2aPkI92E6gQ0KoyjomsY4wjvouDFeUJjFM1DzbW5veitLPKqNBdWyj8fDzlI7X3+K2OgVu5nWlbekV1QwWRsH9O1X/+h/mKw3hYSxBrVX3q0KKllCqXcuTHIgksSyYW6P97FiZDMKdLp8/hpSDthdZcK7TsGkWCG+wtzYndJW9FrdDiZZhRgj19e3PAY09fVFfkjYmIQHIoVY78K0ZewtvvZp4Jg/G2bmqykAdLdK+8Q4nVcWF/B44JtWq6w8ZGZL6U1mS+zSVoYOsA6WcbmcncXmWM+2U3AorSX5B/V8RzvqXFGrz1777qj20P/5DNmvqx1DjtUWhEF6hwrfqaZAc6xh0w/fPlhU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB0062.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(2906002)(36756003)(5660300002)(83380400001)(31686004)(6486002)(53546011)(86362001)(6506007)(6512007)(82960400001)(508600001)(31696002)(6666004)(38100700002)(316002)(54906003)(26005)(110136005)(2616005)(186003)(107886003)(4326008)(8676002)(66946007)(66476007)(66556008)(8936002)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UEpUUitpdVpjOU1KZTFDZ0lWaDJSMGhMdW04NndKTVdXR1hRZXRXTHBQeFo0?= =?utf-8?B?QjBYSVRTZWl0OEVpenZXTHZLSmJKSTl2RC9SYmZNWHdlQzM5MVZ4MFAzWTla?= =?utf-8?B?d0RYdHVWUEloR0dDTW5DN1lSWS9ORUQrTThiZWQyK2RkYXZRS0JIcUgwNmJ3?= =?utf-8?B?YnlGOVFCc3J6blZtOEFBaHJZMXRYeTVySU9seDNkVUpOTk5xSUwybkd0WFo4?= =?utf-8?B?NUpLZUoxWFkybFZHTElaWVJOVEQ1RXg2NUx1T3ZtcFFOTFRIZldUcUpXQ3pN?= =?utf-8?B?UGRDdlo0SG9Ld3l6TFJ3RTBEeURuZGV6eEd5Tkp4cEUzZTFmNjlnZXNwTTZT?= =?utf-8?B?QjdaR1NEQlJEd0Y0ZGd5aDUyNDZZQXkwQkNTamJLeVRz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is4TnpRWUJiM01nR2VBS01DVy9RREJJVXo4ZHg0TFlseFBNWEJqOThv?= =?utf-8?B?ZzNRVGhnTVVHOHpPVm9YWERCZzhtYUg1Z3NWMGNPRURGQ3EwU3cxczhyN2Fh?= =?utf-8?B?MUZPY0JIU2RiTlZmMVZwaDlIQW53a043NU1lV3FKVksyMi9SR29FL0JyMDlU?= =?utf-8?Q?dft4zhxcCqoM+Xgg=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9547bf59-2cca-4677-0b13-08da1c472d3f X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB0062.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2022 05:42:05.7145 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: R2q/MiUiSSenWTcJrDfpYsotFIAD6DA96Z01FtFarP66M6iNKTeQi8lpu/+ugnVjzIYGNxu0Ps0USVdhJZdhaVw8A4tydsaJo+sJt5PXVo4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3994 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 4/11/2022 2:01 AM, Dmitry Kozlyuk wrote: > Hi Aman, > >> From: Dmitry Kozlyuk >> Sent: Thursday, March 31, 2022 1:57 AM >> [...] >>> From: Singh, Aman Deep >>> Sent: Wednesday, March 30, 2022 5:24 PM >>> [...] >>> On 3/7/2022 10:18 PM, Dmitry Kozlyuk wrote: >>>> When a port was closed, 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. >>>> Automatically flush indirect actions when a port is closed. >>>> >>>> Fixes: 4b61b8774be9 ("ethdev: introduce indirect flow action") >>>> Cc: stable@dpdk.org >>>> >>>> Signed-off-by: Dmitry Kozlyuk >>>> Acked-by: Matan Azrad >>>> --- >>> From: guides/prog_guide/rte_flow.rst >>> /"If ``RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP`` is advertised,// >>> //this means that the PMD can keep at least some indirect actions// >>> //across device stop and start. >>> >>> /Please check, if we are inline with the guidelines given in the >> section. >> >> This patch is related to port closing, not port stopping. >> Flow API resources are owned by the port, >> so they cannot be valid when the port is closed and its ethdev removed. >> TestPMD was keeping indirect action handles contrary to this. Agreed, at port close these should be flushed. LGTM Acked-by: Aman Singh >> >> As for RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP, >> there is already "flow indirect_action destroy" >> to erase indirect actions before stopping the port if this is desired. >> I had another patch in mind to add "flow indirect_action flush" >> for convenience, but it is independent of this fix. > Did my response clear up your concern? > In short: this patch is aligned with the defined flow resource behavior.