MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cmd_set_allmulti_mode_parsed

Function cmd_set_allmulti_mode_parsed

dpdk/app/test-pmd/cmdline.c:5853–5875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5851};
5852
5853static void cmd_set_allmulti_mode_parsed(void *parsed_result,
5854 __rte_unused struct cmdline *cl,
5855 void *allports)
5856{
5857 struct cmd_set_allmulti_mode_result *res = parsed_result;
5858 int enable;
5859 portid_t i;
5860
5861 if (!strcmp(res->mode, "on"))
5862 enable = 1;
5863 else
5864 enable = 0;
5865
5866 /* all ports */
5867 if (allports) {
5868 RTE_ETH_FOREACH_DEV(i) {
5869 eth_set_allmulticast_mode(i, enable);
5870 }
5871 }
5872 else {
5873 eth_set_allmulticast_mode(res->port_num, enable);
5874 }
5875}
5876
5877static cmdline_parse_token_string_t cmd_setallmulti_set =
5878 TOKEN_STRING_INITIALIZER(struct cmd_set_allmulti_mode_result, set, "set");

Callers

nothing calls this directly

Calls 2

strcmpFunction · 0.85

Tested by

no test coverage detected