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 F1DFA42659; Thu, 28 Sep 2023 19:24:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D260402E5; Thu, 28 Sep 2023 19:24:03 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2057.outbound.protection.outlook.com [40.107.244.57]) by mails.dpdk.org (Postfix) with ESMTP id 4482640273 for ; Thu, 28 Sep 2023 19:24:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XDoGTsxAkBOfQK1n6fRhPJi4sZh6AMyJqu1pdvVkBMSAmis5E9fr/ipLOc+iHJ7qF4Z18DIeRfn9i5rYabjcLziXkfQNLC1ZT0BezZYpaOx2ypvrWj0lTzPc6LwxpU1Dm8QwBvttjzhSUUW7wwGfZ7wZQ/cFS1AwbS6zqnapiQjKvt1/bplGq8wqzTZIT7wZuCfp/9ygkd0YtH+TDoVVJubRJAZO99C1QLawswAFpnpdcbWqM7y/rD+2rzUicOIR9qzxR8dlCaKIA/m9DqUlHbKzNd4yJJBZRfF8JrUBga230aVZccj8069/nxAsCr8wH+8QC4tem/ylzyOGG1EKwg== 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=k8qREWx1upJvmWH6/1op9JW8aYKrVuQjn7HbXxRHDV8=; b=eWwnCLjsROZNRUQFM+7hl49sK/8ld0Kal0mHpE87wVCF7G65kZOS6jrpMxyEEOfx70zEp/cAc9HbtVDm7s63PhlP74PpssHIRIcoOg+beBrPaIgnY/nlO/rN1w0M6Z500hf/d8kMApUuEYyKqCg54V9Tp7SvUVp6P0ioiWaRsdtIFSyAbcN80br6msXy4OG29xEST83B+p6RLNc/20mRBtd0tTgdTqQ7FFzSkJNd3TlUdNBidS1Lw/jQB1Ek87KpzaYYXv035WDd2U2CRHMh6hvmhAblMwfQfTdOaWKvegHmaxAWYbV9H/7ocnAYY8LWY5Grm5TeqgY0PL7VNkpsVw== 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=k8qREWx1upJvmWH6/1op9JW8aYKrVuQjn7HbXxRHDV8=; b=NbO7VL7BWgPmdhMvAz06No552SQ8dlODi5nvr9LKQNFC2foE1RCHroxXk0ogziiS+BzsdUcMiDFxe6CtSmGqi0syIwlqjRTIJu0t58DrEHcKT5ByccID56qjCTfvzkJ2wfI7KsEuws79HiB2kXLzuL/UnECC3U47bP/5MFAlF8c= 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 SJ2PR12MB9243.namprd12.prod.outlook.com (2603:10b6:a03:578::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Thu, 28 Sep 2023 17:23:59 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8%4]) with mapi id 15.20.6838.024; Thu, 28 Sep 2023 17:23:59 +0000 Message-ID: Date: Thu, 28 Sep 2023 18:23:52 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] app/testpmd: add flush multicast MAC address command Content-Language: en-US To: Dengdui Huang , dev@dpdk.org Cc: stephen@networkplumber.org, aman.deep.singh@intel.com, yuying.zhang@intel.com, anatoly.burakov@intel.com, liuyonglong@huawei.com References: <20230801024304.2187484-1-huangdengdui@huawei.com> <20230802062311.3477794-1-huangdengdui@huawei.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6B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mA17nx+c2uR5jx8wb4j68umG2X++0dSta5eHAVhmtXvrqPW6Ku 3FQ= In-Reply-To: <20230802062311.3477794-1-huangdengdui@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0250.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:350::12) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ2PR12MB9243:EE_ X-MS-Office365-Filtering-Correlation-Id: 76b365b7-b26c-4148-9762-08dbc047b362 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vTVRHTZlJYZ1IfoW10MkOYYpyPs+qTQCHLR4jZ9tnmBnTt1QKhtyjIV7D1fNyjNxumq3Yytljdeq9SI3krwJ2iD5QvUWDK9S6rmp6y3NFXkiIW+JKjjWFQxEsjrW6QVtlQQGNK8FYakSJ08jvuXv8t8A1tJaF9ZefEIBO+Wd1y4+uNwQskaRd/oiEaQ01BGUsKK3zqKIC0BHcyCVhY0qPCCBS+9dz5h76/h20OHBdVLfr6+TFH69cxI7Abadcfn1UhdjqpNaWux3U8hQGTdf4N9VEt3hu9wdC3mbIM0w17m/oXofcR4GzQNQ/P715s2JDJGQovi1fMg3mviklFkcqEwn8Q7HKA/zNGb/cRVUapEVg2HJCfHbmLR1x5U+uMW2oE1pG6RHYEYlr8qULNJvjo8eaXuXW0LSyUIWFF1vWAN0eqrqlHo68TRuyasjhzrvK0+Ew+xitHsJMTFfLV6tE5TIZef/O6sntt9A9O0mvSHo6+1hU/+R9O5KS7QnQvFwP7VQ8GgI01ycaxt3NVL0Z1Ry8u8eXQMxCMfhWuG3f48YAzHg8CnF5J38dVDGdtzZbXyxKFErAmjLxJCXAUQudMCLCGO/3B0G9sQfuCc6Bs6y1OeuS216vGoYZSpBVnkWyWcxN00YmBqZgWM913THiw== 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:(13230031)(346002)(136003)(396003)(376002)(366004)(39860400002)(230922051799003)(64100799003)(451199024)(1800799009)(186009)(316002)(44832011)(5660300002)(8936002)(41300700001)(8676002)(4326008)(66476007)(66556008)(66946007)(31686004)(478600001)(2906002)(53546011)(2616005)(31696002)(6512007)(6506007)(36756003)(86362001)(6486002)(83380400001)(38100700002)(6666004)(26005)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RVg3clBuNVNpWk8wSklPdGc1SVZQdE9EV0RvVlhEQjk3dHJiK1pnZnN3bWhY?= =?utf-8?B?Nno5QUNEK1V1NEwvdGtlNnVzRzFWdDRPQlFacnFlajZpVmxZaWVueEgxQzQr?= =?utf-8?B?Q1JSY09uWjhMcVBKSndWUjU4dWwvclNlT2l5TjhOaVBoWEFuR0RlaHA4M2tq?= =?utf-8?B?b1IvZWtuVjl4V0ppUHVFaDFUNnhUVlFjQWFmbUladFBjNldkZ1pLUTlTMWNx?= =?utf-8?B?NUZwSENQOUtDeUNkQmdmOU5MU3dtWTlGb3RxNVFWdWJDOWk0UE0xdHV4anVQ?= =?utf-8?B?d3MzSXFBRHNMUzRQR0Jyd3o4S0x6RlVwNUVFeVUvbXpMM3ZyQ3RVOFhkQ0N4?= =?utf-8?B?TDJTSzErQ0lYN2Fxc055amYyYzFVUnJpU3dyeXNSd0xVOXgrS0hyZ0RSbEhX?= =?utf-8?B?YWJzcjlQVW9yS1RrdTN4OENkNTlhNldEYzNvZzluRDlqbDhHei9DKzRLbXZY?= =?utf-8?B?WEpEa2ZES2pjY09wK3FBWEZERzZNdXRoSmNySExtS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VuemFueHBuOUZPdUNQQWxVaHoxaFBpSzlYRXVJM0VPQ2l0?= =?utf-8?B?WGpNbWVvUm11Mi9abmZ2VEY1Mytac1FRVW84blh1MzZudG84d1RWODZmdVow?= =?utf-8?B?YnRMVDdOSS9iY2dpd0VGSHFqVGdSQy91SFFKcmRWMUdQdm5YVzllazhpRXVE?= =?utf-8?B?aVdWcFhaeEwxc0VyL2lWMHRUTXl1VmxOWFBKbVZrZ3h6UWMreitrNHJCanY2?= =?utf-8?B?SmJyaThZdXM3K0UvbVZUeWNpY252cEIrLzNQWUVMZUtmNDZoSm9iUXhuRHdG?= =?utf-8?B?QXcrYVJoQ3V2SUxNTDQ5b2YycGV3NHFvQThCeS8xdE9GU2hmOUFzb2h5MkVh?= =?utf-8?B?anpZUUVyaGFzOHZtR3lUNlhxejFScXBpV3NOdkhiWmJuYlBnREp4cmtZNDhM?= =?utf-8?B?Zk9zMTl0TDJvdGk4K3M2dFQxRFVZWjFINnhNb2dpK1VuWFI1UDA4SDFGejlO?= =?utf-8?B?MW5lTGw0ZTVlTmxkUm0wMkZha2FHQk5uMWJwUXQzem1iZHFGQVNicjY3cUJJ?= =?utf-8?B?eXU1djBJWWxBV3N0RFpmMlF6YXZ3NkJFci84VVFnVldqakxqdE13ZHB6bEhW?= =?utf-8?B?SVFBeDh5UnUrbHRBQTNWMHZxS3d5T3FhWmhiblJueDNwRlRiS096QWpKVkhX?= =?utf-8?B?bWptZ083MUhMd1lZV2NnL1UrQkNQNVhrYzUxNGtTSC96MllqT3NBbTlmZlUz?= =?utf-8?Q?FkGGwGhtSIRPbsqn6HtjlirBI?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76b365b7-b26c-4148-9762-08dbc047b362 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2023 17:23:59.2248 (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: 1cVEger7ZjfEOD5J0vbEzFW/mwff/fljqqp0xb9U0Xe+uzz5oUUrCh+Btc4RpX0f X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9243 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 8/2/2023 7:23 AM, Dengdui Huang wrote: > Add command to flush multicast MAC address > Usage: > mcast_addr flush : > flush multicast MAC address on port_id > > Signed-off-by: Dengdui Huang > --- > app/test-pmd/cmdline.c | 43 +++++++++++++++++++++ > app/test-pmd/config.c | 18 +++++++++ > app/test-pmd/testpmd.h | 1 + > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 8 ++++ > 4 files changed, 70 insertions(+) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 0d0723f659..d5a3bd2287 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -516,6 +516,9 @@ static void cmd_help_long_parsed(void *parsed_result, > "set allmulti (port_id|all) (on|off)\n" > " Set the allmulti mode on port_id, or all.\n\n" > > + "mcast_addr flush (port_id)\n" > + " To flush the set of multicast addresses.\n\n" > +> I assume 'set of multicast address' comes from the API getting 'mc_addr_set' as parameter, but using 'set' is not useful in the command description, what about: "Flush all multicast MAC addresses on port_id." Similarly there are logs/documents below refers as "set of multicast addresses", does it make sense to replace all as "all multicast MAC addresses"? And relating to the ordering, as you said "mcast_addr add|remove ..." is missing, which is contributing to the confusion. Can you please add this first (in a separate patch) to just below "mac_addr .*" group, later put "mcast_addr flush .*' below it in this patch? > "set flow_ctrl rx (on|off) tx (on|off) (high_water)" > " (low_water) (pause_time) (send_xon) mac_ctrl_frame_fwd" > " (on|off) autoneg (on|off) (port_id)\n" > @@ -8561,6 +8564,45 @@ static cmdline_parse_inst_t cmd_mcast_addr = { > }, > }; > > +/* *** FLUSH MULTICAST MAC ADDRESS ON PORT *** */ > +struct cmd_mcast_addr_flush_result { > + cmdline_fixed_string_t mcast_addr_cmd; > + cmdline_fixed_string_t what; > + uint16_t port_num; > +}; > + > +static void cmd_mcast_addr_flush_parsed(void *parsed_result, > + __rte_unused struct cmdline *cl, > + __rte_unused void *data) > +{ > + struct cmd_mcast_addr_flush_result *res = parsed_result; > + > + mcast_addr_flush(res->port_num); > +} > + > +static cmdline_parse_token_string_t cmd_mcast_addr_flush_cmd = > + TOKEN_STRING_INITIALIZER(struct cmd_mcast_addr_result, > + mcast_addr_cmd, "mcast_addr"); > +static cmdline_parse_token_string_t cmd_mcast_addr_flush_what = > + TOKEN_STRING_INITIALIZER(struct cmd_mcast_addr_result, what, > + "flush"); > +static cmdline_parse_token_num_t cmd_mcast_addr_flush_portnum = > + TOKEN_NUM_INITIALIZER(struct cmd_mcast_addr_result, port_num, > + RTE_UINT16); > + > +static cmdline_parse_inst_t cmd_mcast_addr_flush = { > + .f = cmd_mcast_addr_flush_parsed, > + .data = (void *)0, > + .help_str = "mcast_addr flush : " > + "flush multicast MAC address on port_id",> What about: "Flush all multicast MAC addresses on port_id." > + .tokens = { > + (void *)&cmd_mcast_addr_flush_cmd, > + (void *)&cmd_mcast_addr_flush_what, > + (void *)&cmd_mcast_addr_flush_portnum, > + NULL, > + }, > +}; > + > /* vf vlan anti spoof configuration */ > > /* Common result structure for vf vlan anti spoof */ > @@ -12929,6 +12971,7 @@ static cmdline_parse_ctx_t builtin_ctx[] = { > (cmdline_parse_inst_t *)&cmd_set_port_meter_stats_mask, > (cmdline_parse_inst_t *)&cmd_show_port_meter_stats, > (cmdline_parse_inst_t *)&cmd_mcast_addr, > + (cmdline_parse_inst_t *)&cmd_mcast_addr_flush, > (cmdline_parse_inst_t *)&cmd_set_vf_vlan_anti_spoof, > (cmdline_parse_inst_t *)&cmd_set_vf_mac_anti_spoof, > (cmdline_parse_inst_t *)&cmd_set_vf_vlan_stripq, > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 11f3a22048..d66d1db37c 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -6802,6 +6802,24 @@ mcast_addr_remove(portid_t port_id, struct rte_ether_addr *mc_addr) > mcast_addr_pool_append(port, mc_addr); > } > > +void > +mcast_addr_flush(portid_t port_id) > +{ > + int ret; > + > + if (port_id_is_invalid(port_id, ENABLED_WARN)) > + return; > + > + ret = rte_eth_dev_set_mc_addr_list(port_id, NULL, 0); > + if (ret != 0) { > + fprintf(stderr, > + "Failed to flush the set of filtered addresses on port %u\n", > + port_id); > + return; > + } > + mcast_addr_pool_destroy(port_id); > +} > + > void > port_dcb_info_display(portid_t port_id) > { > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h > index f1df6a8faf..65d3634f6a 100644 > --- a/app/test-pmd/testpmd.h > +++ b/app/test-pmd/testpmd.h > @@ -1176,6 +1176,7 @@ void show_mcast_macs(portid_t port_id); > /* Functions to manage the set of filtered Multicast MAC addresses */ > void mcast_addr_add(portid_t port_id, struct rte_ether_addr *mc_addr); > void mcast_addr_remove(portid_t port_id, struct rte_ether_addr *mc_addr); > +void mcast_addr_flush(portid_t port_id); > void port_dcb_info_display(portid_t port_id); > > uint8_t *open_file(const char *file_path, uint32_t *size); > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index a182479ab2..c3ab1507c4 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -1320,6 +1320,14 @@ filtered by port:: > > testpmd> mcast_addr remove (port_id) (mcast_addr) > > +mcast_addr flush > +~~~~~~~~~~~~~~~~ > + > +To flush the set of multicast addresses > +filtered by port:: > Can join the lines into single line > + > + testpmd> mcast_addr flush (port_id) > + > mac_addr add (for VF) > ~~~~~~~~~~~~~~~~~~~~~ >