Message ID | 1496922410-36853-4-git-send-email-roid@mellanox.com |
---|---|
State | Superseded |
Headers | show |
On Thu, Jun 08, 2017 at 02:46:20PM +0300, Roi Dayan wrote: > Use the available TC macros instead of 0xffff. > > Signed-off-by: Roi Dayan <roid@mellanox.com> This looks good to me. I'd be happy to apply it if someone reviewed it. > --- > lib/tc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/tc.c b/lib/tc.c > index d3263a2..a71a9e0 100644 > --- a/lib/tc.c > +++ b/lib/tc.c > @@ -95,7 +95,7 @@ tc_add_del_ingress_qdisc(int ifindex, bool add) > int flags = add ? NLM_F_EXCL | NLM_F_CREATE : 0; > > tcmsg = tc_make_request(ifindex, type, flags, &request); > - tcmsg->tcm_handle = tc_make_handle(0xffff, 0); > + tcmsg->tcm_handle = TC_H_MAKE(TC_H_INGRESS, 0); > tcmsg->tcm_parent = TC_H_INGRESS; > nl_msg_put_string(&request, TCA_KIND, "ingress"); > nl_msg_put_unspec(&request, TCA_OPTIONS, NULL, 0); > -- > 2.7.4 >
On Thu, Jun 08, 2017 at 02:46:20PM +0300, Roi Dayan wrote: > Use the available TC macros instead of 0xffff. > > Signed-off-by: Roi Dayan <roid@mellanox.com> > --- Acked-by: Flavio Leitner <fbl@sysclose.org>
diff --git a/lib/tc.c b/lib/tc.c index d3263a2..a71a9e0 100644 --- a/lib/tc.c +++ b/lib/tc.c @@ -95,7 +95,7 @@ tc_add_del_ingress_qdisc(int ifindex, bool add) int flags = add ? NLM_F_EXCL | NLM_F_CREATE : 0; tcmsg = tc_make_request(ifindex, type, flags, &request); - tcmsg->tcm_handle = tc_make_handle(0xffff, 0); + tcmsg->tcm_handle = TC_H_MAKE(TC_H_INGRESS, 0); tcmsg->tcm_parent = TC_H_INGRESS; nl_msg_put_string(&request, TCA_KIND, "ingress"); nl_msg_put_unspec(&request, TCA_OPTIONS, NULL, 0);
Use the available TC macros instead of 0xffff. Signed-off-by: Roi Dayan <roid@mellanox.com> --- lib/tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)