From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202502 header.b=e5CSFIZm; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 3BFB15A0620 for ; Tue, 01 Apr 2025 10:57:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1743497832; bh=KsdSslSwxO6G6GGFb5kYKaNKPV9Q8AM5DKMA9L592GE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e5CSFIZmShsFrKfeXlojyMNLEnwflhgpAJkPxKlioBQo6+62mtf0/aGdYIIIzobXO MQ2i0vV/pFmYo9cBBderMgaMhURd3vMcIpIBRUL0bfYxxKn2Uh/R8yZgTkvUBfBMnH ND5APihzNVf/Geerz0l9rOYuTrhm+ZZFt6rIVd+ai3LfhlqgMN17/DRQFxMyLVUYmz TiAx91rhyBjZ6ty+BGjo35mLu8fU+CW6HzHnOlChgtdmiWolz9KYZXuXW/fZuMrMMv MDwNSX686y69abkGtb5+zNsn/dQshpZWteOmg/SfOVtOXFgZ6ZJCvhliqJfInZb0mX Jc2F7swHGUpKw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ZRhhS2cfvz4x8Z; Tue, 1 Apr 2025 19:57:12 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 1/3] udp: Remove redundant udp_at_sidx() call in udp_tap_handler() Date: Tue, 1 Apr 2025 19:57:08 +1100 Message-ID: <20250401085710.2950538-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250401085710.2950538-1-david@gibson.dropbear.id.au> References: <20250401085710.2950538-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: QDHL57E7K3FAZB2YP3OZ6RJLWUQQ5T6D X-Message-ID-Hash: QDHL57E7K3FAZB2YP3OZ6RJLWUQQ5T6D X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: We've already have a pointer to the UDP flow in variable uflow, we can just re-use it. Signed-off-by: David Gibson --- udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udp.c b/udp.c index 39431d72..ac168db9 100644 --- a/udp.c +++ b/udp.c @@ -907,7 +907,7 @@ int udp_tap_handler(const struct ctx *c, uint8_t pif, } toside = flowside_at_sidx(tosidx); - s = udp_at_sidx(tosidx)->s[tosidx.sidei]; + s = uflow->s[tosidx.sidei]; ASSERT(s >= 0); pif_sockaddr(c, &to_sa, &sl, topif, &toside->eaddr, toside->eport); -- 2.49.0