tc: flower: add support for verbose logging
Currently there is no way to log offloading errors if the rule is not explicitly marked as skip_sw, making it hard for other applications such as Open vSwitch to log why a given could not be offloaded. This patch adds support for signaling the kernel that more verbose logging is wanted, which now will include such messages. Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com> Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
4276e65290
commit
ac6a4c2299
|
|
@ -22,6 +22,8 @@ flower \- flow based traffic control filter
|
||||||
.IR MATCH " := { "
|
.IR MATCH " := { "
|
||||||
.B indev
|
.B indev
|
||||||
.IR ifname " | "
|
.IR ifname " | "
|
||||||
|
.BR verbose
|
||||||
|
.RI " | "
|
||||||
.BR skip_sw " | " skip_hw
|
.BR skip_sw " | " skip_hw
|
||||||
.RI " | { "
|
.RI " | { "
|
||||||
.BR dst_mac " | " src_mac " } "
|
.BR dst_mac " | " src_mac " } "
|
||||||
|
|
@ -100,6 +102,11 @@ is the name of an interface which must exist at the time of
|
||||||
.B tc
|
.B tc
|
||||||
invocation.
|
invocation.
|
||||||
.TP
|
.TP
|
||||||
|
.BI verbose
|
||||||
|
Enable verbose logging, including offloading errors when not using
|
||||||
|
.B skip_sw
|
||||||
|
flag.
|
||||||
|
.TP
|
||||||
.BI skip_sw
|
.BI skip_sw
|
||||||
Do not process filter by software. If hardware has no offload support for this
|
Do not process filter by software. If hardware has no offload support for this
|
||||||
filter, or TC offload is not enabled for the interface, operation will fail.
|
filter, or TC offload is not enabled for the interface, operation will fail.
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ enum flower_icmp_field {
|
||||||
static void explain(void)
|
static void explain(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: ... flower [ MATCH-LIST ]\n"
|
"Usage: ... flower [ MATCH-LIST ] [ verbose ]\n"
|
||||||
" [ skip_sw | skip_hw ]\n"
|
" [ skip_sw | skip_hw ]\n"
|
||||||
" [ action ACTION-SPEC ] [ classid CLASSID ]\n"
|
" [ action ACTION-SPEC ] [ classid CLASSID ]\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
@ -648,6 +648,8 @@ static int flower_parse_opt(struct filter_util *qu, char *handle,
|
||||||
fprintf(stderr, "Illegal \"ip_flags\"\n");
|
fprintf(stderr, "Illegal \"ip_flags\"\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
} else if (matches(*argv, "verbose") == 0) {
|
||||||
|
flags |= TCA_CLS_FLAGS_VERBOSE;
|
||||||
} else if (matches(*argv, "skip_hw") == 0) {
|
} else if (matches(*argv, "skip_hw") == 0) {
|
||||||
flags |= TCA_CLS_FLAGS_SKIP_HW;
|
flags |= TCA_CLS_FLAGS_SKIP_HW;
|
||||||
} else if (matches(*argv, "skip_sw") == 0) {
|
} else if (matches(*argv, "skip_sw") == 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue