1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright 2015 Freescale Semiconductor, Inc.
5 * Ethernet Switch commands
12 #include <env_flags.h>
16 static const char *ethsw_name;
18 #define ETHSW_PORT_STATS_HELP "ethsw [port <port_no>] statistics " \
19 "{ [help] | [clear] } - show an l2 switch port's statistics"
21 static int ethsw_port_stats_help_key_func(struct ethsw_command_def *parsed_cmd)
23 printf(ETHSW_PORT_STATS_HELP"\n");
25 return CMD_RET_SUCCESS;
28 #define ETHSW_LEARN_HELP "ethsw [port <port_no>] learning " \
29 "{ [help] | show | auto | disable } " \
30 "- enable/disable/show learning configuration on a port"
32 static int ethsw_learn_help_key_func(struct ethsw_command_def *parsed_cmd)
34 printf(ETHSW_LEARN_HELP"\n");
36 return CMD_RET_SUCCESS;
39 #define ETHSW_FDB_HELP "ethsw [port <port_no>] [vlan <vid>] fdb " \
40 "{ [help] | show | flush | { add | del } <mac> } " \
41 "- Add/delete a mac entry in FDB; use show to see FDB entries; " \
42 "if vlan <vid> is missing, VID 1 will be used"
44 static int ethsw_fdb_help_key_func(struct ethsw_command_def *parsed_cmd)
46 printf(ETHSW_FDB_HELP"\n");
48 return CMD_RET_SUCCESS;
51 #define ETHSW_PVID_HELP "ethsw [port <port_no>] " \
52 "pvid { [help] | show | <pvid> } " \
53 "- set/show PVID (ingress and egress VLAN tagging) for a port"
55 static int ethsw_pvid_help_key_func(struct ethsw_command_def *parsed_cmd)
57 printf(ETHSW_PVID_HELP"\n");
59 return CMD_RET_SUCCESS;
62 #define ETHSW_VLAN_HELP "ethsw [port <port_no>] vlan " \
63 "{ [help] | show | add <vid> | del <vid> } " \
64 "- add a VLAN to a port (VLAN members)"
66 static int ethsw_vlan_help_key_func(struct ethsw_command_def *parsed_cmd)
68 printf(ETHSW_VLAN_HELP"\n");
70 return CMD_RET_SUCCESS;
73 #define ETHSW_PORT_UNTAG_HELP "ethsw [port <port_no>] untagged " \
74 "{ [help] | show | all | none | pvid } " \
75 " - set egress tagging mode for a port"
77 static int ethsw_port_untag_help_key_func(struct ethsw_command_def *parsed_cmd)
79 printf(ETHSW_PORT_UNTAG_HELP"\n");
81 return CMD_RET_SUCCESS;
84 #define ETHSW_EGR_VLAN_TAG_HELP "ethsw [port <port_no>] egress tag " \
85 "{ [help] | show | pvid | classified } " \
86 "- Configure VID source for egress tag. " \
87 "Tag's VID could be the frame's classified VID or the PVID of the port"
89 static int ethsw_egr_tag_help_key_func(struct ethsw_command_def *parsed_cmd)
91 printf(ETHSW_EGR_VLAN_TAG_HELP"\n");
93 return CMD_RET_SUCCESS;
96 #define ETHSW_VLAN_FDB_HELP "ethsw vlan fdb " \
97 "{ [help] | show | shared | private } " \
98 "- make VLAN learning shared or private"
100 static int ethsw_vlan_learn_help_key_func(struct ethsw_command_def *parsed_cmd)
102 printf(ETHSW_VLAN_FDB_HELP"\n");
104 return CMD_RET_SUCCESS;
107 #define ETHSW_PORT_INGR_FLTR_HELP "ethsw [port <port_no>] ingress filtering" \
108 " { [help] | show | enable | disable } " \
109 "- enable/disable VLAN ingress filtering on port"
111 static int ethsw_ingr_fltr_help_key_func(struct ethsw_command_def *parsed_cmd)
113 printf(ETHSW_PORT_INGR_FLTR_HELP"\n");
115 return CMD_RET_SUCCESS;
118 #define ETHSW_PORT_AGGR_HELP "ethsw [port <port_no>] aggr" \
119 " { [help] | show | <lag_group_no> } " \
120 "- get/set LAG group for a port"
122 static int ethsw_port_aggr_help_key_func(struct ethsw_command_def *parsed_cmd)
124 printf(ETHSW_PORT_AGGR_HELP"\n");
126 return CMD_RET_SUCCESS;
129 static struct keywords_to_function {
130 enum ethsw_keyword_id cmd_keyword[ETHSW_MAX_CMD_PARAMS];
132 int (*keyword_function)(struct ethsw_command_def *parsed_cmd);
133 } ethsw_cmd_def[] = {
139 .cmd_func_offset = offsetof(struct ethsw_command_func,
141 .keyword_function = NULL,
147 .cmd_func_offset = offsetof(struct ethsw_command_func,
149 .keyword_function = NULL,
155 .cmd_func_offset = offsetof(struct ethsw_command_func,
157 .keyword_function = NULL,
164 .cmd_func_offset = -1,
165 .keyword_function = ðsw_port_stats_help_key_func,
171 .cmd_func_offset = offsetof(struct ethsw_command_func,
173 .keyword_function = NULL,
180 .cmd_func_offset = offsetof(struct ethsw_command_func,
182 .keyword_function = NULL,
188 .cmd_func_offset = -1,
189 .keyword_function = ðsw_learn_help_key_func,
196 .cmd_func_offset = -1,
197 .keyword_function = ðsw_learn_help_key_func,
204 .cmd_func_offset = offsetof(struct ethsw_command_func,
206 .keyword_function = NULL,
213 .cmd_func_offset = offsetof(struct ethsw_command_func,
215 .keyword_function = NULL,
222 .cmd_func_offset = offsetof(struct ethsw_command_func,
224 .keyword_function = NULL,
230 .cmd_func_offset = -1,
231 .keyword_function = ðsw_fdb_help_key_func,
238 .cmd_func_offset = -1,
239 .keyword_function = ðsw_fdb_help_key_func,
246 .cmd_func_offset = offsetof(struct ethsw_command_func,
248 .keyword_function = NULL,
255 .cmd_func_offset = offsetof(struct ethsw_command_func,
257 .keyword_function = NULL,
262 ethsw_id_add_del_mac,
265 .cmd_func_offset = offsetof(struct ethsw_command_func,
267 .keyword_function = NULL,
272 ethsw_id_add_del_mac,
275 .cmd_func_offset = offsetof(struct ethsw_command_func,
277 .keyword_function = NULL,
283 .cmd_func_offset = -1,
284 .keyword_function = ðsw_pvid_help_key_func,
291 .cmd_func_offset = -1,
292 .keyword_function = ðsw_pvid_help_key_func,
299 .cmd_func_offset = offsetof(struct ethsw_command_func,
301 .keyword_function = NULL,
308 .cmd_func_offset = offsetof(struct ethsw_command_func,
310 .keyword_function = NULL,
316 .cmd_func_offset = -1,
317 .keyword_function = ðsw_vlan_help_key_func,
324 .cmd_func_offset = -1,
325 .keyword_function = ðsw_vlan_help_key_func,
332 .cmd_func_offset = offsetof(struct ethsw_command_func,
334 .keyword_function = NULL,
342 .cmd_func_offset = offsetof(struct ethsw_command_func,
344 .keyword_function = NULL,
352 .cmd_func_offset = offsetof(struct ethsw_command_func,
354 .keyword_function = NULL,
360 .cmd_func_offset = -1,
361 .keyword_function = ðsw_port_untag_help_key_func,
368 .cmd_func_offset = -1,
369 .keyword_function = ðsw_port_untag_help_key_func,
376 .cmd_func_offset = offsetof(struct ethsw_command_func,
378 .keyword_function = NULL,
385 .cmd_func_offset = offsetof(struct ethsw_command_func,
387 .keyword_function = NULL,
394 .cmd_func_offset = offsetof(struct ethsw_command_func,
396 .keyword_function = NULL,
403 .cmd_func_offset = offsetof(struct ethsw_command_func,
405 .keyword_function = NULL,
412 .cmd_func_offset = -1,
413 .keyword_function = ðsw_egr_tag_help_key_func,
421 .cmd_func_offset = -1,
422 .keyword_function = ðsw_egr_tag_help_key_func,
430 .cmd_func_offset = offsetof(struct ethsw_command_func,
432 .keyword_function = NULL,
440 .cmd_func_offset = offsetof(struct ethsw_command_func,
442 .keyword_function = NULL,
450 .cmd_func_offset = offsetof(struct ethsw_command_func,
452 .keyword_function = NULL,
459 .cmd_func_offset = -1,
460 .keyword_function = ðsw_vlan_learn_help_key_func,
468 .cmd_func_offset = -1,
469 .keyword_function = ðsw_vlan_learn_help_key_func,
477 .cmd_func_offset = offsetof(struct ethsw_command_func,
479 .keyword_function = NULL,
487 .cmd_func_offset = offsetof(struct ethsw_command_func,
489 .keyword_function = NULL,
497 .cmd_func_offset = offsetof(struct ethsw_command_func,
499 .keyword_function = NULL,
506 .cmd_func_offset = -1,
507 .keyword_function = ðsw_ingr_fltr_help_key_func,
515 .cmd_func_offset = -1,
516 .keyword_function = ðsw_ingr_fltr_help_key_func,
524 .cmd_func_offset = offsetof(struct ethsw_command_func,
525 port_ingr_filt_show),
526 .keyword_function = NULL,
534 .cmd_func_offset = offsetof(struct ethsw_command_func,
536 .keyword_function = NULL,
544 .cmd_func_offset = offsetof(struct ethsw_command_func,
546 .keyword_function = NULL,
552 .cmd_func_offset = -1,
553 .keyword_function = ðsw_port_aggr_help_key_func,
560 .cmd_func_offset = -1,
561 .keyword_function = ðsw_port_aggr_help_key_func,
568 .cmd_func_offset = offsetof(struct ethsw_command_func,
570 .keyword_function = NULL,
577 .cmd_func_offset = offsetof(struct ethsw_command_func,
579 .keyword_function = NULL,
583 struct keywords_optional {
584 int cmd_keyword[ETHSW_MAX_CMD_PARAMS];
609 static int keyword_match_gen(enum ethsw_keyword_id key_id, int argc, char
610 *const argv[], int *argc_nr,
611 struct ethsw_command_def *parsed_cmd);
612 static int keyword_match_port(enum ethsw_keyword_id key_id, int argc,
613 char *const argv[], int *argc_nr,
614 struct ethsw_command_def *parsed_cmd);
615 static int keyword_match_vlan(enum ethsw_keyword_id key_id, int argc,
616 char *const argv[], int *argc_nr,
617 struct ethsw_command_def *parsed_cmd);
618 static int keyword_match_pvid(enum ethsw_keyword_id key_id, int argc,
619 char *const argv[], int *argc_nr,
620 struct ethsw_command_def *parsed_cmd);
621 static int keyword_match_mac_addr(enum ethsw_keyword_id key_id, int argc,
622 char *const argv[], int *argc_nr,
623 struct ethsw_command_def *parsed_cmd);
624 static int keyword_match_aggr(enum ethsw_keyword_id key_id, int argc,
625 char *const argv[], int *argc_nr,
626 struct ethsw_command_def *parsed_cmd);
629 * Define properties for each keyword;
630 * keep the order synced with enum ethsw_keyword_id
633 const char *keyword_name;
634 int (*match)(enum ethsw_keyword_id key_id, int argc, char *const argv[],
635 int *argc_nr, struct ethsw_command_def *parsed_cmd);
638 .keyword_name = "help",
639 .match = &keyword_match_gen,
641 .keyword_name = "show",
642 .match = &keyword_match_gen,
644 .keyword_name = "port",
645 .match = &keyword_match_port
647 .keyword_name = "enable",
648 .match = &keyword_match_gen,
650 .keyword_name = "disable",
651 .match = &keyword_match_gen,
653 .keyword_name = "statistics",
654 .match = &keyword_match_gen,
656 .keyword_name = "clear",
657 .match = &keyword_match_gen,
659 .keyword_name = "learning",
660 .match = &keyword_match_gen,
662 .keyword_name = "auto",
663 .match = &keyword_match_gen,
665 .keyword_name = "vlan",
666 .match = &keyword_match_vlan,
668 .keyword_name = "fdb",
669 .match = &keyword_match_gen,
671 .keyword_name = "add",
672 .match = &keyword_match_mac_addr,
674 .keyword_name = "del",
675 .match = &keyword_match_mac_addr,
677 .keyword_name = "flush",
678 .match = &keyword_match_gen,
680 .keyword_name = "pvid",
681 .match = &keyword_match_pvid,
683 .keyword_name = "untagged",
684 .match = &keyword_match_gen,
686 .keyword_name = "all",
687 .match = &keyword_match_gen,
689 .keyword_name = "none",
690 .match = &keyword_match_gen,
692 .keyword_name = "egress",
693 .match = &keyword_match_gen,
695 .keyword_name = "tag",
696 .match = &keyword_match_gen,
698 .keyword_name = "classified",
699 .match = &keyword_match_gen,
701 .keyword_name = "shared",
702 .match = &keyword_match_gen,
704 .keyword_name = "private",
705 .match = &keyword_match_gen,
707 .keyword_name = "ingress",
708 .match = &keyword_match_gen,
710 .keyword_name = "filtering",
711 .match = &keyword_match_gen,
713 .keyword_name = "aggr",
714 .match = &keyword_match_aggr,
719 * Function used by an Ethernet Switch driver to set the functions
720 * that must be called by the parser when an ethsw command is given
722 int ethsw_define_functions(const struct ethsw_command_func *cmd_func)
726 int (*cmd_func_aux)(struct ethsw_command_def *);
728 if (!cmd_func->ethsw_name)
731 ethsw_name = cmd_func->ethsw_name;
733 for (i = 0; i < ARRAY_SIZE(ethsw_cmd_def); i++) {
735 * get the pointer to the function send by the Ethernet Switch
736 * driver that corresponds to the proper ethsw command
738 if (ethsw_cmd_def[i].keyword_function)
741 aux_p = (void *)cmd_func + ethsw_cmd_def[i].cmd_func_offset;
743 cmd_func_aux = (int (*)(struct ethsw_command_def *)) *aux_p;
744 ethsw_cmd_def[i].keyword_function = cmd_func_aux;
750 /* Generic function used to match a keyword only by a string */
751 static int keyword_match_gen(enum ethsw_keyword_id key_id, int argc,
752 char *const argv[], int *argc_nr,
753 struct ethsw_command_def *parsed_cmd)
755 if (strcmp(argv[*argc_nr], keyword[key_id].keyword_name) == 0) {
756 parsed_cmd->cmd_to_keywords[*argc_nr] = key_id;
763 /* Function used to match the command's port */
764 static int keyword_match_port(enum ethsw_keyword_id key_id, int argc,
765 char *const argv[], int *argc_nr,
766 struct ethsw_command_def *parsed_cmd)
770 if (!keyword_match_gen(key_id, argc, argv, argc_nr, parsed_cmd))
773 if (*argc_nr + 1 >= argc)
776 if (strict_strtoul(argv[*argc_nr + 1], 10, &val) != -EINVAL) {
777 parsed_cmd->port = val;
779 parsed_cmd->cmd_to_keywords[*argc_nr] = ethsw_id_port_no;
786 /* Function used to match the command's vlan */
787 static int keyword_match_vlan(enum ethsw_keyword_id key_id, int argc,
788 char *const argv[], int *argc_nr,
789 struct ethsw_command_def *parsed_cmd)
794 if (!keyword_match_gen(key_id, argc, argv, argc_nr, parsed_cmd))
797 if (*argc_nr + 1 >= argc)
800 if (strict_strtoul(argv[*argc_nr + 1], 10, &val) != -EINVAL) {
801 parsed_cmd->vid = val;
803 parsed_cmd->cmd_to_keywords[*argc_nr] = ethsw_id_vlan_no;
809 if (keyword_match_gen(ethsw_id_add, argc, argv, &aux, parsed_cmd))
810 parsed_cmd->cmd_to_keywords[*argc_nr + 1] = ethsw_id_add;
811 else if (keyword_match_gen(ethsw_id_del, argc, argv, &aux, parsed_cmd))
812 parsed_cmd->cmd_to_keywords[*argc_nr + 1] = ethsw_id_del;
816 if (*argc_nr + 2 >= argc)
819 if (strict_strtoul(argv[*argc_nr + 2], 10, &val) != -EINVAL) {
820 parsed_cmd->vid = val;
822 parsed_cmd->cmd_to_keywords[*argc_nr] = ethsw_id_add_del_no;
829 /* Function used to match the command's pvid */
830 static int keyword_match_pvid(enum ethsw_keyword_id key_id, int argc,
831 char *const argv[], int *argc_nr,
832 struct ethsw_command_def *parsed_cmd)
836 if (!keyword_match_gen(key_id, argc, argv, argc_nr, parsed_cmd))
839 if (*argc_nr + 1 >= argc)
842 if (strict_strtoul(argv[*argc_nr + 1], 10, &val) != -EINVAL) {
843 parsed_cmd->vid = val;
845 parsed_cmd->cmd_to_keywords[*argc_nr] = ethsw_id_pvid_no;
851 /* Function used to match the command's MAC address */
852 static int keyword_match_mac_addr(enum ethsw_keyword_id key_id, int argc,
853 char *const argv[], int *argc_nr,
854 struct ethsw_command_def *parsed_cmd)
856 if (!keyword_match_gen(key_id, argc, argv, argc_nr, parsed_cmd))
859 if ((*argc_nr + 1 >= argc) ||
860 !is_broadcast_ethaddr(parsed_cmd->ethaddr))
863 if (eth_validate_ethaddr_str(argv[*argc_nr + 1])) {
864 printf("Invalid MAC address: %s\n", argv[*argc_nr + 1]);
868 string_to_enetaddr(argv[*argc_nr + 1], parsed_cmd->ethaddr);
870 if (is_broadcast_ethaddr(parsed_cmd->ethaddr)) {
871 memset(parsed_cmd->ethaddr, 0xFF, sizeof(parsed_cmd->ethaddr));
875 parsed_cmd->cmd_to_keywords[*argc_nr + 1] = ethsw_id_add_del_mac;
880 /* Function used to match the command's aggregation number */
881 static int keyword_match_aggr(enum ethsw_keyword_id key_id, int argc,
882 char *const argv[], int *argc_nr,
883 struct ethsw_command_def *parsed_cmd)
887 if (!keyword_match_gen(key_id, argc, argv, argc_nr, parsed_cmd))
890 if (*argc_nr + 1 >= argc)
893 if (strict_strtoul(argv[*argc_nr + 1], 10, &val) != -EINVAL) {
894 parsed_cmd->aggr_grp = val;
896 parsed_cmd->cmd_to_keywords[*argc_nr] = ethsw_id_aggr_no;
902 /* Finds optional keywords and modifies *argc_va to skip them */
903 static void cmd_keywords_opt_check(const struct ethsw_command_def *parsed_cmd,
907 int keyw_opt_matched;
909 int const *cmd_keyw_p;
910 int const *cmd_keyw_opt_p;
912 /* remember the best match */
913 argc_val_max = *argc_val;
916 * check if our command's optional keywords match the optional
917 * keywords of an available command
919 for (i = 0; i < ARRAY_SIZE(cmd_opt_def); i++) {
920 keyw_opt_matched = 0;
921 cmd_keyw_p = &parsed_cmd->cmd_to_keywords[keyw_opt_matched];
922 cmd_keyw_opt_p = &cmd_opt_def[i].cmd_keyword[keyw_opt_matched];
925 * increase the number of keywords that
926 * matched with a command
928 while (keyw_opt_matched + *argc_val <
929 parsed_cmd->cmd_keywords_nr &&
930 *cmd_keyw_opt_p != ethsw_id_key_end &&
931 *(cmd_keyw_p + *argc_val) == *cmd_keyw_opt_p) {
938 * if all our optional command's keywords perfectly match an
939 * optional pattern, then we can move to the next defined
940 * keywords in our command; remember the one that matched the
941 * greatest number of keywords
943 if (keyw_opt_matched + *argc_val <=
944 parsed_cmd->cmd_keywords_nr &&
945 *cmd_keyw_opt_p == ethsw_id_key_end &&
946 *argc_val + keyw_opt_matched > argc_val_max)
947 argc_val_max = *argc_val + keyw_opt_matched;
950 *argc_val = argc_val_max;
954 * Finds the function to call based on keywords and
955 * modifies *argc_va to skip them
957 static void cmd_keywords_check(struct ethsw_command_def *parsed_cmd,
966 * check if our command's keywords match the
967 * keywords of an available command
969 for (i = 0; i < ARRAY_SIZE(ethsw_cmd_def); i++) {
971 cmd_keyw_p = &parsed_cmd->cmd_to_keywords[keyw_matched];
972 cmd_keyw_def_p = ðsw_cmd_def[i].cmd_keyword[keyw_matched];
975 * increase the number of keywords that
976 * matched with a command
978 while (keyw_matched + *argc_val < parsed_cmd->cmd_keywords_nr &&
979 *cmd_keyw_def_p != ethsw_id_key_end &&
980 *(cmd_keyw_p + *argc_val) == *cmd_keyw_def_p) {
987 * if all our command's keywords perfectly match an
988 * available command, then we get the function we need to call
989 * to configure the Ethernet Switch
991 if (keyw_matched && keyw_matched + *argc_val ==
992 parsed_cmd->cmd_keywords_nr &&
993 *cmd_keyw_def_p == ethsw_id_key_end) {
994 *argc_val += keyw_matched;
995 parsed_cmd->cmd_function =
996 ethsw_cmd_def[i].keyword_function;
1002 /* find all the keywords in the command */
1003 static int keywords_find(int argc, char *const argv[],
1004 struct ethsw_command_def *parsed_cmd)
1009 int rc = CMD_RET_SUCCESS;
1011 for (i = 1; i < argc; i++) {
1012 for (j = 0; j < ethsw_id_count; j++) {
1013 if (keyword[j].match(j, argc, argv, &i, parsed_cmd))
1018 /* if there is no keyword match for a word, the command is invalid */
1019 for (i = 1; i < argc; i++)
1020 if (parsed_cmd->cmd_to_keywords[i] == ethsw_id_key_end)
1023 parsed_cmd->cmd_keywords_nr = argc;
1026 /* get optional parameters first */
1027 cmd_keywords_opt_check(parsed_cmd, &argc_val);
1029 if (argc_val == parsed_cmd->cmd_keywords_nr)
1030 return CMD_RET_USAGE;
1033 * check the keywords and if a match is found,
1034 * get the function to call
1036 cmd_keywords_check(parsed_cmd, &argc_val);
1038 /* error if not all commands' parameters were matched */
1039 if (argc_val == parsed_cmd->cmd_keywords_nr) {
1040 if (!parsed_cmd->cmd_function) {
1041 printf("Command not available for: %s\n", ethsw_name);
1042 rc = CMD_RET_FAILURE;
1051 static void command_def_init(struct ethsw_command_def *parsed_cmd)
1055 for (i = 0; i < ETHSW_MAX_CMD_PARAMS; i++)
1056 parsed_cmd->cmd_to_keywords[i] = ethsw_id_key_end;
1058 parsed_cmd->port = ETHSW_CMD_PORT_ALL;
1059 parsed_cmd->vid = ETHSW_CMD_VLAN_ALL;
1060 parsed_cmd->aggr_grp = ETHSW_CMD_AGGR_GRP_NONE;
1061 parsed_cmd->cmd_function = NULL;
1063 /* We initialize the MAC address with the Broadcast address */
1064 memset(parsed_cmd->ethaddr, 0xff, sizeof(parsed_cmd->ethaddr));
1067 /* function to interpret commands starting with "ethsw " */
1068 static int do_ethsw(struct cmd_tbl *cmdtp, int flag, int argc,
1071 struct ethsw_command_def parsed_cmd;
1072 int rc = CMD_RET_SUCCESS;
1074 if (argc == 1 || argc >= ETHSW_MAX_CMD_PARAMS)
1075 return CMD_RET_USAGE;
1077 command_def_init(&parsed_cmd);
1079 rc = keywords_find(argc, argv, &parsed_cmd);
1081 if (rc == CMD_RET_SUCCESS)
1082 rc = parsed_cmd.cmd_function(&parsed_cmd);
1087 #define ETHSW_PORT_CONF_HELP "[port <port_no>] { enable | disable | show } " \
1088 "- enable/disable a port; show a port's configuration"
1090 U_BOOT_CMD(ethsw, ETHSW_MAX_CMD_PARAMS, 0, do_ethsw,
1091 "Ethernet l2 switch commands",
1092 ETHSW_PORT_CONF_HELP"\n"
1093 ETHSW_PORT_STATS_HELP"\n"
1094 ETHSW_LEARN_HELP"\n"
1098 ETHSW_PORT_UNTAG_HELP"\n"
1099 ETHSW_EGR_VLAN_TAG_HELP"\n"
1100 ETHSW_VLAN_FDB_HELP"\n"
1101 ETHSW_PORT_INGR_FLTR_HELP"\n"
1102 ETHSW_PORT_AGGR_HELP"\n"