summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 75791ba)
raw | patch | inline | side by side (parent: 75791ba)
author | Grygorii Strashko <grygorii.strashko@ti.com> | |
Fri, 8 Sep 2017 23:14:15 +0000 (18:14 -0500) | ||
committer | Sekhar Nori <nsekhar@ti.com> | |
Thu, 14 Sep 2017 11:11:34 +0000 (16:41 +0530) |
switch-config tool now accepts MC/BC ratelimit parameters, but doesn't send
ioctl request to the Kernel, hence fix it.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ioctl request to the Kernel, hence fix it.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
switch-config.c | patch | blob | history |
diff --git a/switch-config.c b/switch-config.c
index 882c074e8400506fb8dd30ae1928ca71399d0c2b..11364958a023cc81931b29efbd11cb0f111b8d26 100644 (file)
--- a/switch-config.c
+++ b/switch-config.c
return -1;
}
break;
+ case CONFIG_SWITCH_RATELIMIT:
+ if ((port_num <= 2)) {
+ cmd_struct.port = port_num;
+ if (ioctl(sockfd, SIOCSWITCHCONFIG, &ifr) < 0) {
+ printf("Set Port B/M ratelimit Failed\n");
+ close(sockfd);
+ return -1;
+ } else {
+ printf("Set Port B/M ratelimit successful\n");
+ }
+ } else {
+ printf("Invalid Arguments\n");
+ return -1;
+ }
+ break;
+
}
close(sockfd);