Skip to content

Commit

Permalink
tc: Refactor tcm handle assignment when creating filter qdisc
Browse files Browse the repository at this point in the history
Use the available TC macros instead of 0xffff.

Signed-off-by: Roi Dayan <[email protected]>
Acked-by: Flavio Leitner <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
  • Loading branch information
roidayan authored and shorman-netronome committed Jun 14, 2017
1 parent c1c5c72 commit 209832d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 209832d

Please sign in to comment.