Commit dbef36b6 authored by Stephen Hemminger's avatar Stephen Hemminger

Merge in fix for loss of MQ

Fix up conflict with earlier attempt at resolving build
issues with MQ
parents 19ecc16d f0b34d2d
...@@ -123,16 +123,6 @@ struct tc_prio_qopt ...@@ -123,16 +123,6 @@ struct tc_prio_qopt
__u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */
}; };
/* Obsolete option from original multiqueue */
enum
{
TCA_PRIO_UNSPEC,
TCA_PRIO_MQ,
__TCA_PRIO_MAX
};
#define TCA_PRIO_MAX (__TCA_PRIO_MAX - 1)
/* TBF section */ /* TBF section */
struct tc_tbf_qopt struct tc_tbf_qopt
......
...@@ -697,10 +697,12 @@ static int ipaddr_list_or_flush(int argc, char **argv, int flush) ...@@ -697,10 +697,12 @@ static int ipaddr_list_or_flush(int argc, char **argv, int flush)
exit(1); exit(1);
} }
if (filter.flushed == 0) { if (filter.flushed == 0) {
if (round == 0) { if (show_stats) {
fprintf(stderr, "Nothing to flush.\n"); if (round == 0)
} else if (show_stats) printf("Nothing to flush.\n");
printf("*** Flush is complete after %d round%s ***\n", round, round>1?"s":""); else
printf("*** Flush is complete after %d round%s ***\n", round, round>1?"s":"");
}
fflush(stdout); fflush(stdout);
return 0; return 0;
} }
......
...@@ -402,10 +402,12 @@ int do_show_or_flush(int argc, char **argv, int flush) ...@@ -402,10 +402,12 @@ int do_show_or_flush(int argc, char **argv, int flush)
exit(1); exit(1);
} }
if (filter.flushed == 0) { if (filter.flushed == 0) {
if (round == 0) { if (show_stats) {
fprintf(stderr, "Nothing to flush.\n"); if (round == 0)
} else if (show_stats) printf("Nothing to flush.\n");
printf("*** Flush is complete after %d round%s ***\n", round, round>1?"s":""); else
printf("*** Flush is complete after %d round%s ***\n", round, round>1?"s":"");
}
fflush(stdout); fflush(stdout);
return 0; return 0;
} }
......
...@@ -1209,11 +1209,12 @@ static int iproute_list_or_flush(int argc, char **argv, int flush) ...@@ -1209,11 +1209,12 @@ static int iproute_list_or_flush(int argc, char **argv, int flush)
exit(1); exit(1);
} }
if (filter.flushed == 0) { if (filter.flushed == 0) {
if (round == 0) { if (show_stats) {
if (!filter.cloned || do_ipv6 == AF_INET6) if (round == 0 && (!filter.cloned || do_ipv6 == AF_INET6))
fprintf(stderr, "Nothing to flush.\n"); printf("Nothing to flush.\n");
} else if (show_stats) else
printf("*** Flush is complete after %d round%s ***\n", round, round>1?"s":""); printf("*** Flush is complete after %d round%s ***\n", round, round>1?"s":"");
}
fflush(stdout); fflush(stdout);
return 0; return 0;
} }
......
...@@ -284,7 +284,7 @@ int get_addr_1(inet_prefix *addr, const char *name, int family) ...@@ -284,7 +284,7 @@ int get_addr_1(inet_prefix *addr, const char *name, int family)
addr->family = AF_INET; addr->family = AF_INET;
if (family != AF_UNSPEC && family != AF_INET) if (family != AF_UNSPEC && family != AF_INET)
return -1; return -1;
if (inet_pton(AF_INET, name, addr->data) <= 0) if (inet_aton(name, addr->data) <= 0)
return -1; return -1;
addr->bytelen = 4; addr->bytelen = 4;
addr->bitlen = -1; addr->bitlen = -1;
......
...@@ -7,6 +7,18 @@ ...@@ -7,6 +7,18 @@
#include <linux/gen_stats.h> #include <linux/gen_stats.h>
#include "tc_core.h" #include "tc_core.h"
/* This is the deprecated multiqueue interface */
#ifndef TCA_PRIO_MAX
enum
{
TCA_PRIO_UNSPEC,
TCA_PRIO_MQ,
__TCA_PRIO_MAX
};
#define TCA_PRIO_MAX (__TCA_PRIO_MAX - 1)
#endif
struct qdisc_util struct qdisc_util
{ {
struct qdisc_util *next; struct qdisc_util *next;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment