From patchwork Tue Jan 24 15:16:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Adri=C3=A1n_Moreno?= X-Patchwork-Id: 1731262 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.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=csmxHhbj; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P1VvZ5YgRz23h0 for ; Wed, 25 Jan 2023 02:17:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 049F340C8B; Tue, 24 Jan 2023 15:17:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 049F340C8B Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=csmxHhbj X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RaVdCaCI1OB4; Tue, 24 Jan 2023 15:17:25 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 40C8440641; Tue, 24 Jan 2023 15:17:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 40C8440641 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 19CEEC0032; Tue, 24 Jan 2023 15:17:24 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id C11F1C002D for ; Tue, 24 Jan 2023 15:17:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 9B0B260AA7 for ; Tue, 24 Jan 2023 15:17:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9B0B260AA7 Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=csmxHhbj X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FUI7F_9YHRyr for ; Tue, 24 Jan 2023 15:17:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org EB9BA60864 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id EB9BA60864 for ; Tue, 24 Jan 2023 15:17:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674573440; 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=qU/XbhTOgr8pB6ZqVFq8MSAeGj3pCPg8PbKjTnA0BjA=; b=csmxHhbjA3Nc9ED5jxIe7I+xngYE3MZfeOZPWaAOr4MTJlTWkwIzjURVyKC3/B2ruQoXwy PJDQ6EVBO7KBhgR6KRypGKZwTICNHOXGJxE0J8y2azS+9NO5wcC5vkFRJzlrZbYlGnGQcX vw8Y3UTIh/sxro557okbXtYBOrpCVhw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-427-8b3mkKBrO_itKm7KQaDxNg-1; Tue, 24 Jan 2023 10:17:18 -0500 X-MC-Unique: 8b3mkKBrO_itKm7KQaDxNg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D79DA281721F for ; Tue, 24 Jan 2023 15:16:40 +0000 (UTC) Received: from antares.redhat.com (unknown [10.39.194.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id D3B14492B00; Tue, 24 Jan 2023 15:16:39 +0000 (UTC) From: =?utf-8?q?Adri=C3=A1n_Moreno?= To: dev@openvswitch.org Date: Tue, 24 Jan 2023 16:16:30 +0100 Message-Id: <20230124151632.695912-5-amorenoz@redhat.com> In-Reply-To: <20230124151632.695912-1-amorenoz@redhat.com> References: <20230124151632.695912-1-amorenoz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v1 4/6] controller: set sampling port to OFP_NONE for drops 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" From: Adrian Moreno The default zero value would likely match an existing openflow port and end up generating a sample with wrong output interface information. Since in this case we're sampling in the middle of the pipeline, the correct value for sampling port is OFP_NONE. Fixes: a42c808f30b4 ("northd: add drop sampling") Signed-off-by: Adrian Moreno --- controller/physical.c | 1 + 1 file changed, 1 insertion(+) diff --git a/controller/physical.c b/controller/physical.c index cb2cddb9f..e718268ea 100644 --- a/controller/physical.c +++ b/controller/physical.c @@ -843,6 +843,7 @@ put_drop(const struct physical_debug *debug, uint8_t table_id, os->collector_set_id = debug->collector_set_id; os->obs_domain_id = (debug->obs_domain_id << 24); os->obs_point_id = table_id; + os->sampling_port = OFPP_NONE; } }