@@ -506,6 +506,9 @@ static void cmd_help_long_parsed(void *parsed_result,
506506 "mcast_addr remove (port_id ) (mcast_addr )\n "
507507 " Remove a multicast MAC address from port_id .\n \n "
508508
509+ "mcast_addr flush (port_id )\n "
510+ " Flush all multicast MAC addresses on port_id .\n \n "
511+
509512 "set vf mac addr (port_id ) (vf_id ) (XX :XX :XX :XX :XX :XX )\n "
510513 " Set the MAC address for a VF from the PF .\n \n "
511514
@@ -8567,6 +8570,45 @@ static cmdline_parse_inst_t cmd_mcast_addr = {
85678570 },
85688571};
85698572
8573+ /* *** FLUSH MULTICAST MAC ADDRESS ON PORT *** */
8574+ struct cmd_mcast_addr_flush_result {
8575+ cmdline_fixed_string_t mcast_addr_cmd ;
8576+ cmdline_fixed_string_t what ;
8577+ uint16_t port_num ;
8578+ };
8579+
8580+ static void cmd_mcast_addr_flush_parsed (void * parsed_result ,
8581+ __rte_unused struct cmdline * cl ,
8582+ __rte_unused void * data )
8583+ {
8584+ struct cmd_mcast_addr_flush_result * res = parsed_result ;
8585+
8586+ mcast_addr_flush (res -> port_num );
8587+ }
8588+
8589+ static cmdline_parse_token_string_t cmd_mcast_addr_flush_cmd =
8590+ TOKEN_STRING_INITIALIZER (struct cmd_mcast_addr_result ,
8591+ mcast_addr_cmd , "mcast_addr" );
8592+ static cmdline_parse_token_string_t cmd_mcast_addr_flush_what =
8593+ TOKEN_STRING_INITIALIZER (struct cmd_mcast_addr_result , what ,
8594+ "flush" );
8595+ static cmdline_parse_token_num_t cmd_mcast_addr_flush_portnum =
8596+ TOKEN_NUM_INITIALIZER (struct cmd_mcast_addr_result , port_num ,
8597+ RTE_UINT16 );
8598+
8599+ static cmdline_parse_inst_t cmd_mcast_addr_flush = {
8600+ .f = cmd_mcast_addr_flush_parsed ,
8601+ .data = (void * )0 ,
8602+ .help_str = "mcast_addr flush <port_id> : "
8603+ "flush all multicast MAC addresses on port_id" ,
8604+ .tokens = {
8605+ (void * )& cmd_mcast_addr_flush_cmd ,
8606+ (void * )& cmd_mcast_addr_flush_what ,
8607+ (void * )& cmd_mcast_addr_flush_portnum ,
8608+ NULL ,
8609+ },
8610+ };
8611+
85708612/* vf vlan anti spoof configuration */
85718613
85728614/* Common result structure for vf vlan anti spoof */
@@ -12935,6 +12977,7 @@ static cmdline_parse_ctx_t builtin_ctx[] = {
1293512977 (cmdline_parse_inst_t * )& cmd_set_port_meter_stats_mask ,
1293612978 (cmdline_parse_inst_t * )& cmd_show_port_meter_stats ,
1293712979 (cmdline_parse_inst_t * )& cmd_mcast_addr ,
12980+ (cmdline_parse_inst_t * )& cmd_mcast_addr_flush ,
1293812981 (cmdline_parse_inst_t * )& cmd_set_vf_vlan_anti_spoof ,
1293912982 (cmdline_parse_inst_t * )& cmd_set_vf_mac_anti_spoof ,
1294012983 (cmdline_parse_inst_t * )& cmd_set_vf_vlan_stripq ,
0 commit comments