From patchwork Fri May 15 20:36:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 1291626 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.138; helo=whitealder.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=aMjh1cZB; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49P0Z54QvQz9sTH for ; Sat, 16 May 2020 06:36:45 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1846088FBB; Fri, 15 May 2020 20:36:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LCeGqHbc0m4V; Fri, 15 May 2020 20:36:38 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id C0F7488FA4; Fri, 15 May 2020 20:36:38 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id AFE85C088F; Fri, 15 May 2020 20:36:38 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4E7C2C016F for ; Fri, 15 May 2020 20:36:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 36A872EF15 for ; Fri, 15 May 2020 20:36:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xWpUNY92zmtp for ; Fri, 15 May 2020 20:36:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by silver.osuosl.org (Postfix) with ESMTPS id 582C32EF63 for ; Fri, 15 May 2020 20:36:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589574990; 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=GJo40vGzt0MPNa/fgZKASqdL1gQDUrY8R38lgDmurq0=; b=aMjh1cZBCwl1fxYWxpOKoUlD9W+IYe8vauuecRCKWnD1GOcueeK1oLcDIBy6iRmONBjy91 3vjczQGd/+sYzSIcykRbjUT8J4YvhOIuF4UT2+mWIUo0cXQKIuTFvxpZh96txDFSS16vll yKUWBloLv+CIw12JNI7RyPuhyJZ8E8Q= 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-177-SPFhSJhoOLm2ZV_otUSPEQ-1; Fri, 15 May 2020 16:36:28 -0400 X-MC-Unique: SPFhSJhoOLm2ZV_otUSPEQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DCEEA8018A1; Fri, 15 May 2020 20:36:26 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (ovpn-117-20.rdu2.redhat.com [10.10.117.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E8255D9D3; Fri, 15 May 2020 20:36:25 +0000 (UTC) From: Aaron Conole To: dev@openvswitch.org Date: Fri, 15 May 2020 16:36:19 -0400 Message-Id: <20200515203619.1044803-3-aconole@redhat.com> In-Reply-To: <20200515203619.1044803-1-aconole@redhat.com> References: <20200515203619.1044803-1-aconole@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Marcelo Leitner , Dmytro Linkin , Ilya Maximets Subject: [ovs-dev] [PATCH v2 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 block_id could changes after the probe for block support. Therefore, fetch the block_id again after the probe. Fixes: edc2055a2bf7 ("netdev-offload-tc: Flush rules on ingress block when init tc flow api") Cc: Dmytro Linkin Co-authored-by: Marcelo Leitner Acked-by: Roi Dayan Signed-off-by: Marcelo Leitner Signed-off-by: Aaron Conole --- lib/netdev-offload-tc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c index 875ebef719..e188e63e56 100644 --- a/lib/netdev-offload-tc.c +++ b/lib/netdev-offload-tc.c @@ -1931,6 +1931,8 @@ netdev_tc_init_flow_api(struct netdev *netdev) if (ovsthread_once_start(&block_once)) { probe_tc_block_support(ifindex); + /* Need to re-fetch block id as it depends on feature availability. */ + block_id = get_block_id_from_netdev(netdev); ovsthread_once_done(&block_once); }