From patchwork Tue Jan 30 22:14:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Pattrick X-Patchwork-Id: 1893140 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=GTBRACwD; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TPfc14djzz23fD for ; Wed, 31 Jan 2024 09:14:57 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 1157341EC2; Tue, 30 Jan 2024 22:14:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 1157341EC2 Authentication-Results: smtp4.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=GTBRACwD X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u-2jGj7N7vzM; Tue, 30 Jan 2024 22:14:53 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 8671D41E7C; Tue, 30 Jan 2024 22:14:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 8671D41E7C Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9D6B6C0DD3; Tue, 30 Jan 2024 22:14:51 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1B3B3C0037 for ; Tue, 30 Jan 2024 22:14:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id DD14442ED7 for ; Tue, 30 Jan 2024 22:14:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org DD14442ED7 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GTBRACwD 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 cnMeg-ZZYGPy for ; Tue, 30 Jan 2024 22:14:47 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 0EE5042EDD for ; Tue, 30 Jan 2024 22:14:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 0EE5042EDD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706652886; 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=VAn0GfWJrp7OKprRTmQV02/VEFm06V4JKApgfVGbIBk=; b=GTBRACwDnYwRjyhwKInWxNv0Ikf4vjZE0kz55Mfee4csS6ydS5SZXEAE0Icpxok9FJeYfJ bAS6ptFk5WKk2QUKIVBa89rQPp8QpjqjFJihPrlqUUh8ESGLyAD4sHNe2beT+AhIh7ZbGY hoKwY7/A8J6ej1EVpNTSuXgjRnR+/6w= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-622-RdS7lt0BNmaxn11Crof-pw-1; Tue, 30 Jan 2024 17:14:44 -0500 X-MC-Unique: RdS7lt0BNmaxn11Crof-pw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7C2AD83B82A for ; Tue, 30 Jan 2024 22:14:44 +0000 (UTC) Received: from mpattric.remote.csb (unknown [10.22.10.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 271D0492BC6; Tue, 30 Jan 2024 22:14:44 +0000 (UTC) From: Mike Pattrick To: dev@openvswitch.org Date: Tue, 30 Jan 2024 17:14:39 -0500 Message-Id: <20240130221439.24297-4-mkp@redhat.com> In-Reply-To: <20240130221439.24297-1-mkp@redhat.com> References: <20240130221439.24297-1-mkp@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v2 4/4] ofproto-dpif-monitor: Remove unneeded calls to clear packets. 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" Currently the monitor will call dp_packet_clear() on the dp_packet that is shared amongst BFD, LLDP, and CFM. However, all of these packets are created with eth_compose(), which already calls dp_packet_clear(). Signed-off-by: Mike Pattrick Reviewed-by: David Marchand --- ofproto/ofproto-dpif-monitor.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/ofproto/ofproto-dpif-monitor.c b/ofproto/ofproto-dpif-monitor.c index bb0e49091..5132f9c95 100644 --- a/ofproto/ofproto-dpif-monitor.c +++ b/ofproto/ofproto-dpif-monitor.c @@ -275,19 +275,16 @@ monitor_mport_run(struct mport *mport, struct dp_packet *packet) long long int lldp_wake_time = LLONG_MAX; if (mport->cfm && cfm_should_send_ccm(mport->cfm)) { - dp_packet_clear(packet); cfm_compose_ccm(mport->cfm, packet, mport->hw_addr); ofproto_dpif_send_packet(mport->ofport, false, packet); } if (mport->bfd && bfd_should_send_packet(mport->bfd)) { bool oam; - dp_packet_clear(packet); bfd_put_packet(mport->bfd, packet, mport->hw_addr, &oam); ofproto_dpif_send_packet(mport->ofport, oam, packet); } if (mport->lldp && lldp_should_send_packet(mport->lldp)) { - dp_packet_clear(packet); lldp_put_packet(mport->lldp, packet, mport->hw_addr); ofproto_dpif_send_packet(mport->ofport, false, packet); }