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=FvK264Np; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 12C0F5A061E for ; Tue, 11 Mar 2025 07:03:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1741673000; bh=/mvB+4jrL/QLJOSPhnLlDEYPfpYXBsQ9+/lGlw36YXA=; h=From:To:Cc:Subject:Date:From; b=FvK264NpGS2ueyDCGJvVK1WoMIwlk3fY06RnQW/ltjui4r6j1MjuJ+kgNtalPQp9O BIKIgqt8lHRGZNd4HN66eEJhv+6dqxL64I3KHYygy7Rg7a750seGa71MGRD4yR0TWq EV9ZDmy0lTvdrnDsml7X8zn5gmIOCpr+uexmntrhoTMHRcipi4fJru9XGQWUQrsSRB rpvwpTtEBSG0SHvlKARbBt7F59S2u24m0SHBj8bLejYyP/31hqp1axeVrtLH9Foomy ixbJ9Pmay6FWpZqotu7JiU3zA2sxr8z+7TN1zNI7fQ8CilCuixSSwm9JVmukYjs5IE 9r1UO8dlXaEyQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ZBjqX3nNcz4xCW; Tue, 11 Mar 2025 17:03:20 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 0/9] Improve handling of MTU limits Date: Tue, 11 Mar 2025 17:03:09 +1100 Message-ID: <20250311060318.1502861-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.48.1 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: S6TDP3OQVMPU2LX6GLXQ5BSZX4DQI4LB X-Message-ID-Hash: S6TDP3OQVMPU2LX6GLXQ5BSZX4DQI4LB 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: After considerable lead up, this corrects the handling of the --mtu option so that it will respect limits imposed by the backend tap layers, correctly accounting for L2 headers. This incorporates the earlier mode setting patches, on which the rest depend. There's been no change in those patches, there just included here for self-containedness. David Gibson (9): conf: Use the same optstring for passt and pasta modes conf: Move mode detection into helper function conf: Detect vhost-user mode earlier packet: Give explicit name to maximum packet size packet: Remove redundant TAP_BUF_BYTES define tap: Use explicit defines for maximum length of L2 frame Simplify sizing of pkt_buf pcap: Correctly set snaplen based on tap backend type conf: Limit maximum MTU based on backend frame size conf.c | 98 +++++++++++++++++++++++++++++++++++++++++--------------- conf.h | 1 + packet.c | 4 +-- packet.h | 3 ++ passt.c | 16 ++------- passt.h | 7 ++-- pcap.c | 46 +++++++++++++------------- tap.c | 39 +++++++++++++++++++--- tap.h | 26 +++++++++++++++ util.h | 3 -- 10 files changed, 168 insertions(+), 75 deletions(-) -- 2.48.1