From 9e74acbe4fb35e006068b2ad82b21780ed3183e8 Mon Sep 17 00:00:00 2001 From: Raed Salem Date: Mon, 10 Jun 2019 14:58:40 +0300 Subject: [PATCH] netdev-tc-offloads: Use correct hook qdisc at init tc flow 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 608ff46aaf0d ("ovs-tc: offload datapath rules matching on internal ports") Signed-off-by: Raed Salem Reviewed-by: Roi Dayan Acked-by: John Hurley Signed-off-by: Simon Horman --- lib/netdev-offload-tc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c index 2af0f10d9e0..902ec9543b3 100644 --- a/lib/netdev-offload-tc.c +++ b/lib/netdev-offload-tc.c @@ -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);