Skip to content
Snippets Groups Projects
Commit 2e6d5650 authored by Amit Kumar's avatar Amit Kumar Committed by Rahul Thakur
Browse files

qosmngr: qosmngr option to get num of queue

parent f7ac191c
No related branches found
No related tags found
1 merge request!16qosmngr: qosmngr option to get num of queue
Pipeline #94408 passed
......@@ -45,6 +45,8 @@
#define OPT_BURST_SIZE "burst_size"
#define OPT_WEIGHT "weight"
#define QOS_MIN_Q_NUM_PER_PORT 4 //default minimum number of queue per port
enum {
QOS_POLICY_IFNAME,
QOS_POLICY_QID,
......
......@@ -89,11 +89,12 @@ int main(int argc, char **argv)
{
int ret;
int ch;
int num_of_q = QOS_MIN_Q_NUM_PER_PORT;
/* Logging to syslog */
openlog("qosmngr", LOG_PID|LOG_CONS, LOG_LOCAL1);
while ((ch = getopt(argc, argv, "vs:e:")) != -1) {
while ((ch = getopt(argc, argv, "vsq:e:")) != -1) {
switch (ch) {
case 'v':
qosmngr_version();
......@@ -101,6 +102,10 @@ int main(int argc, char **argv)
case 's':
ubus_socket = optarg;
break;
case 'q':
num_of_q = get_no_of_q_per_port(argv[argc-1]);
printf("%d", num_of_q);
exit(0);
default:
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment