From patchwork Thu May 7 15:54:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 1285461 X-Patchwork-Delegate: i.maximets@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=IXs+8uVS; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Hyh51np9z9sV0 for ; Fri, 8 May 2020 01:54:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9C17787466; Thu, 7 May 2020 15:54:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WbjaUtq6PgCs; Thu, 7 May 2020 15:54:25 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 603F8873BF; Thu, 7 May 2020 15:54:25 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 55212C088E; Thu, 7 May 2020 15:54:25 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id DB522C0865 for ; Thu, 7 May 2020 15:54:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CAFD189567 for ; Thu, 7 May 2020 15:54:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ePOXD-hjQobN for ; Thu, 7 May 2020 15:54:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by hemlock.osuosl.org (Postfix) with ESMTPS id 270988934C for ; Thu, 7 May 2020 15:54:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588866862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fNNQLqHz9UVnL79d4f6hf9yJWfKM4PSJnWr/PlhnpPg=; b=IXs+8uVSN8z5jjeQNIKyUk/UiD2qhs3jAEI4PgdIVOrBFpQ8/cIVQV2fj7l/G5JHmSL5zS /vnBeCNBQO1ups2VQ8R8+/G+cYJfjNHRk/juypBhyXu4diW6wAjSh5QrrMR/5Aq9CTVeAP DwTdmPDto1cUCKkwTL085vYMVEL4dg4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-485-LLM_0Hd3ONqfNF2FfPx96A-1; Thu, 07 May 2020 11:54:18 -0400 X-MC-Unique: LLM_0Hd3ONqfNF2FfPx96A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0F6D18014D5; Thu, 7 May 2020 15:54:17 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (ovpn-116-3.rdu2.redhat.com [10.10.116.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 589C819C58; Thu, 7 May 2020 15:54:16 +0000 (UTC) From: Aaron Conole To: dev@openvswitch.org Date: Thu, 7 May 2020 11:54:12 -0400 Message-Id: <20200507155412.3854062-3-aconole@redhat.com> In-Reply-To: <20200507155412.3854062-1-aconole@redhat.com> References: <20200507155412.3854062-1-aconole@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Marcelo Leitner , Dmytro Linkin Subject: [ovs-dev] [PATCH 2/2] netdev-offload-tc: re-fetch block ID after probing X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" It's possible that port ordering could cause the block ID to change after enabling / detecting TC Flower support. Therefore, fetch the block_id again after probing. Fixes: edc2055a2bf7 ("netdev-offload-tc: Flush rules on ingress block when init tc flow api") Cc: Dmytro Linkin Co-authored-by: Marcelo Leitner Signed-off-by: Marcelo Leitner Signed-off-by: Aaron Conole Acked-by: Roi Dayan --- lib/netdev-offload-tc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c index 875ebef719..8864555d01 100644 --- a/lib/netdev-offload-tc.c +++ b/lib/netdev-offload-tc.c @@ -1939,6 +1939,7 @@ netdev_tc_init_flow_api(struct netdev *netdev) ovsthread_once_done(&multi_mask_once); } + block_id = get_block_id_from_netdev(netdev); error = tc_add_del_qdisc(ifindex, true, block_id, hook); if (error && error != EEXIST) {