On 17-05-16 08:25 AM, Jiri Pirko wrote:
Tue, May 16, 2017 at 02:09:25PM CEST, j...@mojatatu.com wrote:
On 17-05-15 04:38 AM, Jiri Pirko wrote:
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 88ec1a1..0e49e6e 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -271,7 +271,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct
nlmsghdr *n,
struct tcmsg *t;
u32 protocol;
u32 prio;
- u32 nprio;
+ bool prio_allocate;
prio_allocated? (past tense seems more sensible)
No, it actually tell if the prio should be allocated:
if (prio_allocate)
prio = tcf_auto_prio(tcf_chain_tp_prev(&chain_info));
I believe it is accurate.
Your mileage may vary, this chunk:
===
if (n->nlmsg_flags & NLM_F_CREATE) {
prio = TC_H_MAKE(0x80000000U, 0U);
+ prio_allocate = true;
break;
}
in which prio is used subsequently before the chunk you refer to
allocates implies the prio is already allocated.
Your call really.
I will review more later.
cheers,
jamal
cheers,
jamal