From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 1175C5A026F for ; Fri, 13 Oct 2023 10:48:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697186924; 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; bh=HeIB/IW+GgGj7QGJJ44YtF80yeAo0gLV8xC1Cdla1PE=; b=POq/qSnEap/4v0gSaiETPwbl1yUf8OZlGihFwdaCNi9dlRPBnYLLtIfK92nVTABvpE4Q1A Y1AWWoLyrHS3zezo0UccytOpA2WTYBLf9nI+MX7agctFnLt+DfYnuYjVzBW5w99Xwf5bAA uXkrEicShjjRFbE8PpqXppz+Z9vlw8A= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-56-9EVutz8NN3y6ac6FzgQaug-1; Fri, 13 Oct 2023 04:46:49 -0400 X-MC-Unique: 9EVutz8NN3y6ac6FzgQaug-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D53A381B192 for ; Fri, 13 Oct 2023 08:46:48 +0000 (UTC) Received: from virtlab218.virt.lab.eng.bos.redhat.com (virtlab218.virt.lab.eng.bos.redhat.com [10.19.152.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id B7B73C15BBC; Fri, 13 Oct 2023 08:46:48 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH] tcp: Remove remaining declaration of tcp_l2_mh Date: Fri, 13 Oct 2023 10:45:45 +0200 Message-ID: <20231013084545.1968825-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: 5MJA3DWLKL4IMI2PGHTJC22UL4JJ2J3R X-Message-ID-Hash: 5MJA3DWLKL4IMI2PGHTJC22UL4JJ2J3R 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 , sbrivio@redhat.com 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: Use of tcp_l2_mh has been removed in commit 38fbfdbcb95d, but its declaration and initialization are always in the code. Remove them as they are useless. Fixes: 38fbfdbcb95d ("tcp: Get rid of iov with cached MSS, drop sendmmsg(), add deferred flush") Cc: sbrivio@redhat.com Signed-off-by: Laurent Vivier --- tcp.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tcp.c b/tcp.c index 945023c5b442..386cd015be1c 100644 --- a/tcp.c +++ b/tcp.c @@ -515,8 +515,6 @@ static struct iovec tcp6_l2_iov [TCP_FRAMES_MEM]; static struct iovec tcp4_l2_flags_iov [TCP_FRAMES_MEM]; static struct iovec tcp6_l2_flags_iov [TCP_FRAMES_MEM]; -static struct mmsghdr tcp_l2_mh [TCP_FRAMES_MEM]; - /* sendmsg() to socket */ static struct iovec tcp_iov [UIO_MAXIOV]; @@ -3143,7 +3141,6 @@ static void tcp_sock_refill_init(const struct ctx *c) */ int tcp_init(struct ctx *c) { - int i; #ifndef HAS_GETRANDOM int dev_random = open("/dev/random", O_RDONLY); unsigned int random_read = 0; @@ -3172,9 +3169,6 @@ int tcp_init(struct ctx *c) exit(EXIT_FAILURE); } - for (i = 0; i < ARRAY_SIZE(tcp_l2_mh); i++) - tcp_l2_mh[i] = (struct mmsghdr) { .msg_hdr.msg_iovlen = 1 }; - if (c->ifi4) tcp_sock4_iov_init(c); -- 2.41.0