From patchwork Mon Jun 10 11:58:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roi Dayan X-Patchwork-Id: 1113063 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Ms9Z5SSSz9s00 for ; Mon, 10 Jun 2019 21:58:57 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 2DCD3B43; Mon, 10 Jun 2019 11:58:53 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id A0C3CAF0 for ; Mon, 10 Jun 2019 11:58:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id C689B711 for ; Mon, 10 Jun 2019 11:58:49 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE2 (envelope-from roid@mellanox.com) with ESMTPS (AES256-SHA encrypted); 10 Jun 2019 14:58:48 +0300 Received: from dev-r-vrt-139.mtr.labs.mlnx (dev-r-vrt-139.mtr.labs.mlnx [10.212.139.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x5ABwluh016575; Mon, 10 Jun 2019 14:58:48 +0300 From: Roi Dayan To: dev@openvswitch.org Date: Mon, 10 Jun 2019 14:58:40 +0300 Message-Id: <1560167920-15493-1-git-send-email-roid@mellanox.com> X-Mailer: git-send-email 2.7.5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Simon Horman , Raed Salem Subject: [ovs-dev] [PATCH] netdev-tc-offloads: Use correct hook qdisc at init tc flow X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Raed Salem 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 --- lib/netdev-tc-offloads.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/netdev-tc-offloads.c b/lib/netdev-tc-offloads.c index ef9ee0786215..97fbe03ed11d 100644 --- a/lib/netdev-tc-offloads.c +++ b/lib/netdev-tc-offloads.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);