From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 138445A0082 for ; Thu, 8 Dec 2022 09:55:58 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4NSSfy3T7Bz4xN6; Thu, 8 Dec 2022 19:55:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1670489754; bh=ZYUVgWSqrSuub871sHla2h/6j0holQ2TekMYHYXwgho=; h=From:To:Cc:Subject:Date:From; b=adYI489D4qkWrDIGYbYRzxm7ncwmcQ8iiqKOrCiDvVNovtTnPcvYzmAC3Pckt8ki7 T/ohocaKlfxfztXb0xAPkphJrL6tOND+7CEFoX708cpLiHyiLul2E3fpNVPfCvyQ3B Qk/4Aw1Un/3uZkjccQG0jzR66qTVayRad0zPnaSI= From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 00/10] RFC: Unify and simplify tap send path Date: Thu, 8 Dec 2022 19:55:41 +1100 Message-Id: <20221208085551.1433829-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.38.1 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: FPITHJ2FODDXBKIVXTTIAUN6PPPM5WUC X-Message-ID-Hash: FPITHJ2FODDXBKIVXTTIAUN6PPPM5WUC 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.3 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: Although we have an abstraction for the "slow path" (DHCP, NDP) guest bound packets, the TCP and UDP forwarding paths write directly to the tap fd. However, it turns out how they send frames to the tap device is more similar than it originally appears. This series unifies the low-level tap send functions for TCP and UDP, and makes some clean ups along the way. David Gibson (10): pcap: Introduce pcap_frame() helper pcap: Replace pcapm() with pcap_multiple() tcp: Combine two parts of passt tap send path together tcp: Don't keep compute total bytes in a message until we need it tcp: Improve interface to tcp_l2_buf_flush() tcp: Combine two parts of pasta tap send path together tap, tcp: Move tap send path to tap.c tcp,tap: Use different io vector bases depending on tap type udp: Use tap_send_frames() tap: Improve handling of partial frame sends pcap.c | 78 ++++++++----------------------- pcap.h | 3 +- tap.c | 108 ++++++++++++++++++++++++++++++++++++++++++ tap.h | 1 + tcp.c | 145 +++++++++++++-------------------------------------------- udp.c | 145 +++------------------------------------------------------ udp.h | 2 +- 7 files changed, 169 insertions(+), 313 deletions(-) -- 2.38.1