From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 19A455A0282 for ; Thu, 22 Feb 2024 06:56:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1708581366; bh=TtKIjR3OyXl2A+JIKCOK/CesdClShUjOp52KZIQzeYg=; h=From:To:Cc:Subject:Date:From; b=SiuNR1cbfBLPYH7g5UubNZD+9mVl/NAnQkTu4lqGtNvSlI4Zh+8tvj+JP1Xi0pNaM 4lTUnhr2iSou6ENw2ft1Em6kRCw2qqr7omz/5QGphzIpO3wHM4+2ciRVlggOqIm5K1 aWzMlIvF6IaDgkaSpyoTIP7y3NGZPBYmFQbMx+FaFOhuGOur2EXx9SXOsohc3JC+i5 3q1Sttn+yp59AqGqOr+71LCPmyIQiiox9HmVbJU9IUWKRhqvafDnq07OQZtRWQK+kr 4WyBaSmEW+r8HLLDiznnNhVFuHK242DFyLFxOghR4mazGl/6KGibB3i/xn7HskQRhO 8Kvi99OOFMicQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4TgMny2Q6hz4wcr; Thu, 22 Feb 2024 16:56:06 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio , Laurent Vivier Subject: [PATCH 0/6] Allow more use of iovecs in pcap and tap interfaces Date: Thu, 22 Feb 2024 16:55:56 +1100 Message-ID: <20240222055602.1872516-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.43.2 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: FENTWOK744R6A6ALYQHIYPNOHEQYXXU5 X-Message-ID-Hash: FENTWOK744R6A6ALYQHIYPNOHEQYXXU5 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: Laurent, sorry I didn't spot this earlier. While working on other stuff I stumbled across these patches I wrote quite a while back (part of a larger series on indefinite hiatus). The first two patches have some overlap with the preliminary iovec patches in the vhost-user series (and will certainly conflict). I do think the pcap interface here is slightly better than the one in the vhost-user series, although I did ack that. Stefano, if you've already applied / run tests for Laurent's series then go ahead with it; I'll rework this on top of those. David Gibson (6): util: Add helper to find offset into io vector pcap: Update pcap_frame() to take an iovec and offset util: Add write_remainder() helper pcap: Handle short writes in pcap_frame() pcap: Allow pcap_frame() and pcap_multiple() to take multi-buffer frames tap: Use write_remainder() in tap_send_frames_passt() pcap.c | 54 ++++++++++++++++++++++++++++-------------------------- pcap.h | 3 ++- tap.c | 42 +++++++++--------------------------------- util.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ util.h | 2 ++ 5 files changed, 96 insertions(+), 60 deletions(-) -- 2.43.2