From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=K+cFciVd; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 489A35A061C for ; Fri, 20 Mar 2026 14:51:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774014686; 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=Oq51RUPtQZYFBIhl6zPhtq3nMbF3LK2K+CCJAbZBmdY=; b=K+cFciVds9bWqMjbMBoUl18D2F+yPqKBs+xu++0djOQ6/3+HRNjJlLpjVYI1LQ6NjnZaDg tEVwrr30P+UL3VZXrvf1fo5G9fsv2rvFBTWB78RZgX6x8SY5ySJCJalTV12+f4to1gA2P+ FyP8smZrKwNix7D/A0uVGRb8E9Y17Fg= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-342-I5RyCym7NtWc33rRunsDQQ-1; Fri, 20 Mar 2026 09:51:24 -0400 X-MC-Unique: I5RyCym7NtWc33rRunsDQQ-1 X-Mimecast-MFC-AGG-ID: I5RyCym7NtWc33rRunsDQQ_1774014683 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CE9291944DC8 for ; Fri, 20 Mar 2026 13:51:23 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.45.224.233]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CF66A1800361; Fri, 20 Mar 2026 13:51:22 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH trivial 3/3] tcp_vu: Remove redundant th->doff and th->ack in tcp_vu_send_flag() Date: Fri, 20 Mar 2026 14:51:16 +0100 Message-ID: <20260320135116.575416-4-lvivier@redhat.com> In-Reply-To: <20260320135116.575416-1-lvivier@redhat.com> References: <20260320135116.575416-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: UKNdd2Z3bT4J7JdP1H4OJqu-EOhRdEYTsGdNwckKz3Q_1774014683 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: GOPPD54NIZKQIL2BKCRBRYJYQUEJD3YL X-Message-ID-Hash: GOPPD54NIZKQIL2BKCRBRYJYQUEJD3YL X-MailFrom: lvivier@redhat.com 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: Laurent Vivier 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: tcp_prepare_flags() unconditionally sets th->doff and th->ack, so setting them right after the memset() is redundant. Signed-off-by: Laurent Vivier --- tcp_vu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tcp_vu.c b/tcp_vu.c index 9c4e916b1b8d..7a348eb01248 100644 --- a/tcp_vu.c +++ b/tcp_vu.c @@ -115,8 +115,6 @@ int tcp_vu_send_flag(const struct ctx *c, struct tcp_tap_conn *conn, int flags) } memset(th, 0, sizeof(*th)); - th->doff = sizeof(*th) / 4; - th->ack = 1; seq = conn->seq_to_tap; opts = (struct tcp_syn_opts *)(th + 1); -- 2.53.0