Skip to content

Commit

Permalink
netdev-tc-offloads: Use correct hook qdisc at init tc flow
Browse files Browse the repository at this point in the history
A preliminary netdev qdisc cleanup is done during init tc flow.
The cited commit allows for creating of egress hook qdiscs on internal
ports. This breaks the netdev qdisc cleanup as currently only ingress
hook qdiscs type is deleted. As a consequence the check for tc ingress
shared block support fails when the check is done on internal port.

Issue can be reproduced by the following steps:
- start openvswitch service
- create ovs bridge
- restart openvswitch service

Fix by using the correct hook qdisc type at netdev hook qdisc cleanup.

Fixes 608ff46 ("ovs-tc: offload datapath rules matching on internal ports")
Signed-off-by: Raed Salem <raeds@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Acked-by: John Hurley <john.hurley@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
  • Loading branch information
Raed Salem authored and shorman-netronome committed Jun 13, 2019
1 parent db7a3c9 commit 9e74acb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/netdev-offload-tc.c
Expand Up @@ -1571,8 +1571,8 @@ netdev_tc_init_flow_api(struct netdev *netdev)
return -ifindex;
}

/* make sure there is no ingress qdisc */
tc_add_del_qdisc(ifindex, false, 0, TC_INGRESS);
/* make sure there is no ingress/egress qdisc */
tc_add_del_qdisc(ifindex, false, 0, hook);

if (ovsthread_once_start(&block_once)) {
probe_tc_block_support(ifindex);
Expand Down

0 comments on commit 9e74acb

Please sign in to comment.