Message ID | 20180109140731.1022-4-jiri@resnulli.us |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Series | net: sched: allow qdiscs to share filter block instances | expand |
On 1/9/18 7:07 AM, Jiri Pirko wrote: > From: Jiri Pirko <jiri@mellanox.com> > > Use block index in the messages instead. > > Signed-off-by: Jiri Pirko <jiri@mellanox.com> > --- > net/sched/cls_api.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c > index 9b45950..31e91dc 100644 > --- a/net/sched/cls_api.c > +++ b/net/sched/cls_api.c > @@ -672,8 +672,9 @@ int tcf_classify(struct sk_buff *skb, const struct tcf_proto *tp, > #ifdef CONFIG_NET_CLS_ACT > reset: > if (unlikely(limit++ >= max_reclassify_loop)) { > - net_notice_ratelimited("%s: reclassify loop, rule prio %u, protocol %02x\n", > - tp->q->ops->id, tp->prio & 0xffff, > + net_notice_ratelimited("%u: reclassify loop, rule prio %u, protocol %02x\n", if you are dumping index instead of prio shouldn't the 'rule prio' above be adjusted? > + tp->chain->block->index, > + tp->prio & 0xffff, > ntohs(tp->protocol)); > return TC_ACT_SHOT; > } >
Wed, Jan 10, 2018 at 05:17:28PM CET, dsahern@gmail.com wrote: >On 1/9/18 7:07 AM, Jiri Pirko wrote: >> From: Jiri Pirko <jiri@mellanox.com> >> >> Use block index in the messages instead. >> >> Signed-off-by: Jiri Pirko <jiri@mellanox.com> >> --- >> net/sched/cls_api.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c >> index 9b45950..31e91dc 100644 >> --- a/net/sched/cls_api.c >> +++ b/net/sched/cls_api.c >> @@ -672,8 +672,9 @@ int tcf_classify(struct sk_buff *skb, const struct tcf_proto *tp, >> #ifdef CONFIG_NET_CLS_ACT >> reset: >> if (unlikely(limit++ >= max_reclassify_loop)) { >> - net_notice_ratelimited("%s: reclassify loop, rule prio %u, protocol %02x\n", >> - tp->q->ops->id, tp->prio & 0xffff, >> + net_notice_ratelimited("%u: reclassify loop, rule prio %u, protocol %02x\n", > >if you are dumping index instead of prio shouldn't the 'rule prio' above >be adjusted? I'm not! Why do you think so? "%u:" is tp->chain->block->index "prio %u" is tp->prio & 0xffff "%02x" is ntohs(tp->protocol) > > >> + tp->chain->block->index, >> + tp->prio & 0xffff, >> ntohs(tp->protocol)); >> return TC_ACT_SHOT; >> } >> >
On 1/11/18 2:40 AM, Jiri Pirko wrote: > Wed, Jan 10, 2018 at 05:17:28PM CET, dsahern@gmail.com wrote: >> On 1/9/18 7:07 AM, Jiri Pirko wrote: >>> From: Jiri Pirko <jiri@mellanox.com> >>> >>> Use block index in the messages instead. >>> >>> Signed-off-by: Jiri Pirko <jiri@mellanox.com> >>> --- >>> net/sched/cls_api.c | 5 +++-- >>> 1 file changed, 3 insertions(+), 2 deletions(-) >>> >>> diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c >>> index 9b45950..31e91dc 100644 >>> --- a/net/sched/cls_api.c >>> +++ b/net/sched/cls_api.c >>> @@ -672,8 +672,9 @@ int tcf_classify(struct sk_buff *skb, const struct tcf_proto *tp, >>> #ifdef CONFIG_NET_CLS_ACT >>> reset: >>> if (unlikely(limit++ >= max_reclassify_loop)) { >>> - net_notice_ratelimited("%s: reclassify loop, rule prio %u, protocol %02x\n", >>> - tp->q->ops->id, tp->prio & 0xffff, >>> + net_notice_ratelimited("%u: reclassify loop, rule prio %u, protocol %02x\n", >> >> if you are dumping index instead of prio shouldn't the 'rule prio' above >> be adjusted? > > I'm not! Why do you think so? > > "%u:" is tp->chain->block->index > "prio %u" is tp->prio & 0xffff > "%02x" is ntohs(tp->protocol) > Never mind. scanned that too quickly.
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 9b45950..31e91dc 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -672,8 +672,9 @@ int tcf_classify(struct sk_buff *skb, const struct tcf_proto *tp, #ifdef CONFIG_NET_CLS_ACT reset: if (unlikely(limit++ >= max_reclassify_loop)) { - net_notice_ratelimited("%s: reclassify loop, rule prio %u, protocol %02x\n", - tp->q->ops->id, tp->prio & 0xffff, + net_notice_ratelimited("%u: reclassify loop, rule prio %u, protocol %02x\n", + tp->chain->block->index, + tp->prio & 0xffff, ntohs(tp->protocol)); return TC_ACT_SHOT; }