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 7021D42441; Wed, 25 Jan 2023 19:38:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0AE3042D4C; Wed, 25 Jan 2023 19:38:09 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2043.outbound.protection.outlook.com [40.107.243.43]) by mails.dpdk.org (Postfix) with ESMTP id 4084542D47 for ; Wed, 25 Jan 2023 19:38:07 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j01cZ4yXy9Mpn/NU12S2whiNFfU7J8p6ZRP3oDMaPPpW2lSK6MUrjZv3L2aa1yMVkMI/mtaOzHCnmzC5OtqltXISADyvtbpAkNizYTTPlFre3myJEXiLqSD5CpfCf8qFT9hgGsYxe+DQpAOsId+mZooDysZrsy8E9zaH9yhxfgRWhOqwBCLs6EFT8LoFTg1+EGDOIVksXYaz/wMEwHLs7HbOCae+nmsmxWO0HXjrD/CEUGO7JJ7Jcj3MRA/e+xZIMM7bGrcx0NV4E9P980x+RFMyyXGx2FGqV2wkhI2DBS780GRqJl6h9Sdk5bebH/4RnMV+waG7wjZiBtSVelfsPg== 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=jsqXqaXCTeKHlQmY+hFms5DHTRe+i2d1dcZHh4LMuSA=; b=Vv0R0vTTJS1b7pzpZes3Kz7ezOiyohoRUPWNgv4YIc4ITT9ajQJE2NiLFe6dWJXEhr36lOZ9tvMiSIclOHBMpD/CQY0Zp57D/cIWPmtLWXIkKTUORdRX8/yEzvdqaDNRtDC5ZssfwSvHeOQyK41crn+tZlFkB6t5KZ/kw0/+/s3tTTls009lUqdAhmJ5bD9DCbUfRLiPRLBeKkXShjmE57KUMrHntjq2RZdftyxry1UEGrcGkGXg193dQNB/AU7B2TlkuWtUdxlvCqFeUl5cIORg8zotbmkORIWyE8crv8DYntij7s51wvmzsTCWCOQEukPFzGoCnxW0YUi72s56ow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jsqXqaXCTeKHlQmY+hFms5DHTRe+i2d1dcZHh4LMuSA=; b=sr+VKTvgqLHi3GS+sxR8NYFsoeeDteWf4eiP2xgETSnaeNqjWR8FcO6DAfGt+CezcSDx/GgG1aWaexlGIqR907VJBWUENFOChegCEaOgBKeB+tKqgD+QOxzImC6V0IVmFa++jARlB7dJdxa2j82/I07avY8WWu5OHZxLK2BYM/o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by SA1PR12MB7443.namprd12.prod.outlook.com (2603:10b6:806:2b7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.21; Wed, 25 Jan 2023 18:38:05 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a%7]) with mapi id 15.20.6002.033; Wed, 25 Jan 2023 18:38:05 +0000 Message-ID: Date: Wed, 25 Jan 2023 18:37:58 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH 2/2] app/testpmd: add disable-flow-flush parameter Content-Language: en-US To: Chengwen Feng , thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, Ori Kam , aman.deep.singh@intel.com Cc: dev@dpdk.org, liudongdong3@huawei.com, yisen.zhuang@huawei.com, yuying.zhang@intel.com References: <20221215014142.15750-1-fengchengwen@huawei.com> <20221215014142.15750-3-fengchengwen@huawei.com> From: Ferruh Yigit In-Reply-To: <20221215014142.15750-3-fengchengwen@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LNXP265CA0016.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5e::28) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SA1PR12MB7443:EE_ X-MS-Office365-Filtering-Correlation-Id: 98b9c6d8-0d9e-4aa4-fdb0-08daff034be8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZiVXruRj+8ZXMKBIoowwNAav5+ODXf9c33vnOxfnZQuckUwf7WTfjReYHAputKjVyoHOIVmduqq9lJmr2Ly6pDsrJWfEB3sTvnS9jxH7nSY4OlTgiEc9jQfcIfM0hfn+fBv+MM+WYQFvQQvjgwKiHgYd/JML31jPljgGMwDqIB2NWXutkMwEULLz780wrNJIuuG+xfJML7uA7qqFk/MSYg4J6LP4rl69dN068c3oG5patb8xNWmaOza1yVNeX2xUNSv5SPMrmAkZ+sn9vEokIS1z7TNwPAe3+mGwOe3xie5sUslqy3SfX8+0b+tkr+aAVL8Mtw4sseza44FGO5W2eymIU4pHq8MbbDu1l4fxDtjCk8od+pFZR20bErTYyPtmuhUZFjCv89OeSFaJ+UHg/xWPSS3ZTmFiPwEhQ/MuHYKE0C4byPj/Y/h0l59krgDd0RYLXN1ReJ+Ge22QMgp8sQ7oHTI81lcl414dWXyA9lOGrftAnv5RRWqFSxHiPBwmry6s9sg7eNuvqqC06OO3+fmb6BiHRIabXvBG3ioNnF6/B5uvD6hXmHRbmvJjJ1UYTEkF+1gFCViTheS6BT5L/xlPW3hSghYoE5LxelaBukcQsNPAzIYcVXxB/atoq1TLbJPiMB3abAtPzIZwlWaAOpHXbrCbTrOEzoM0jiNatln7IKZA1VZOvndnal1YDmlkePtYM2f8MfJabKNQFfYtz0BpxpytLFVBzvRlhctkeus= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(366004)(396003)(136003)(39860400002)(346002)(376002)(451199018)(38100700002)(86362001)(31696002)(36756003)(110136005)(44832011)(2906002)(31686004)(66476007)(41300700001)(4326008)(66556008)(66946007)(8936002)(8676002)(5660300002)(186003)(6512007)(26005)(53546011)(6506007)(2616005)(316002)(6486002)(83380400001)(6666004)(478600001)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZVZxM1pjb1doU0NETHZ3dnMydkJId043bWFnZlFSRWg2anpaTEd2UUYrZXRr?= =?utf-8?B?VUJvSkFEMzdQYkU1VG5BR2xQQmhGTGYva24wOG11UktZQ2RIbEdDZGRvR2FI?= =?utf-8?B?TzJLeW14NHJhTUlTTktOcGVTd0xqb0MrM2R4TDJ0My8yWGdObVRnYTZKR1pZ?= =?utf-8?B?blowd1NpN3ZXcno4MVMwY1lSY3lqVkF1UjBNWWFvQUNpR2wvU1NtczRkMjhD?= =?utf-8?B?S2dsY1lsTm15MnVGQnpUbldPYnlTQU84MlF5SkdxNVpaYnlCcE1VOWVFbW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E1rKzBlZGE1MGtBN3owanhnQWw5TDFsdlVTRmZtSXBEaklQYXFQZmpw?= =?utf-8?Q?DCl5q57/8iMiy+l3JD2lkvQx/?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98b9c6d8-0d9e-4aa4-fdb0-08daff034be8 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 18:38:05.2391 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +ZTCTBK91LPfT1UBgbH0i5/mxYAfN0KZiQB+75mWHoyGfRmKmvLAC0aZd/gaMBQC X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7443 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 12/15/2022 1:41 AM, Chengwen Feng wrote: > This patch adds "--disable-flow-flush" parameter, which could used to > disable port flow flush when stop port. It allows testing keep flow > rules or shared flow objects across restart. > > Signed-off-by: Chengwen Feng +cc Ori I am for proceeding with this patch unless there is objection from Aman & Ori. > --- > app/test-pmd/parameters.c | 4 ++++ > app/test-pmd/testpmd.c | 7 ++++++- > app/test-pmd/testpmd.h | 1 + > doc/guides/testpmd_app_ug/run_app.rst | 5 +++++ > 4 files changed, 16 insertions(+), 1 deletion(-) > > diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c > index d597c209ba..e734ad9a02 100644 > --- a/app/test-pmd/parameters.c > +++ b/app/test-pmd/parameters.c > @@ -175,6 +175,7 @@ usage(char* progname) > "disable print of designated event or all of them.\n"); > printf(" --flow-isolate-all: " > "requests flow API isolated mode on all ports at initialization time.\n"); > + printf(" --disable-flow-flush: disable port flow flush when stop port.\n"); > printf(" --tx-offloads=0xXXXXXXXX: hexadecimal bitmask of TX queue offloads\n"); > printf(" --rx-offloads=0xXXXXXXXX: hexadecimal bitmask of RX queue offloads\n"); > printf(" --hot-plug: enable hot plug for device.\n"); > @@ -667,6 +668,7 @@ launch_args_parse(int argc, char** argv) > { "rxfreet", 1, 0, 0 }, > { "no-flush-rx", 0, 0, 0 }, > { "flow-isolate-all", 0, 0, 0 }, > + { "disable-flow-flush", 0, 0, 0 }, > { "rxoffs", 1, 0, 0 }, > { "rxpkts", 1, 0, 0 }, > { "rxhdrs", 1, 0, 0 }, > @@ -1330,6 +1332,8 @@ launch_args_parse(int argc, char** argv) > rmv_interrupt = 0; > if (!strcmp(lgopts[opt_idx].name, "flow-isolate-all")) > flow_isolate_all = 1; > + if (!strcmp(lgopts[opt_idx].name, "disable-flow-flush")) > + no_flow_flush = 1; > if (!strcmp(lgopts[opt_idx].name, "tx-offloads")) { > char *end = NULL; > n = strtoull(optarg, &end, 16); > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 134d79a555..ea78f8982d 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -383,6 +383,11 @@ uint8_t no_flush_rx = 0; /* flush by default */ > */ > uint8_t flow_isolate_all; > > +/* > + * Disable port flow flush when stop port. > + */ > +uint8_t no_flow_flush = 0; /* do flow flush by default */ > + > /* > * Avoids to check link status when starting/stopping a port. > */ > @@ -3246,7 +3251,7 @@ stop_port(portid_t pid) > } > } > > - if (port->flow_list) > + if (port->flow_list && !no_flow_flush) > port_flow_flush(pi); > > ret = eth_dev_stop_mp(pi); > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h > index 7d24d25970..ab4733522d 100644 > --- a/app/test-pmd/testpmd.h > +++ b/app/test-pmd/testpmd.h > @@ -476,6 +476,7 @@ extern uint8_t numa_support; /**< set by "--numa" parameter */ > extern uint16_t port_topology; /**< set by "--port-topology" parameter */ > extern uint8_t no_flush_rx; /** extern uint8_t flow_isolate_all; /**< set by "--flow-isolate-all */ > +extern uint8_t no_flow_flush; /**< set by "--disable-flow-flush" parameter */ > extern uint8_t mp_alloc_type; > /**< set by "--mp-anon" or "--mp-alloc" parameter */ > extern uint32_t eth_link_speed; > diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst > index 074f910fc9..3ec3d4f5e6 100644 > --- a/doc/guides/testpmd_app_ug/run_app.rst > +++ b/doc/guides/testpmd_app_ug/run_app.rst > @@ -436,6 +436,11 @@ The command line options are: > > Ports that do not support this mode are automatically discarded. > > +* ``--disable-flow-flush`` > + > + Disable port flow flush when stop port. This allows testing keep flow rules > + or shared flow objects across restart. > + > * ``--tx-offloads=0xXXXXXXXX`` > > Set the hexadecimal bitmask of TX queue offloads.