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 85F5F5A026F for ; Thu, 14 Mar 2024 03:43:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1710384178; bh=7iJQgHUCoxGFKVcL/BvXh4GeK3lILN9krVKh2ySOCfg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KfhUGgej836noCa9VRR0C/ZsSAfi9tCXew2oMu2zKqrFQJZTwV5LaliBiAJh6TeoS BzwhuqKnDOYyXOk6WrTtXDNnjq8WHWM4qe3q/jPsJflBUeu8AFCpUefRVoSF4nt05Y JYmrWOYbtAu27CHSO1AcezpG57/Rtchwc/6346SAPeAxTt8OZ8Tri1HAhzYEngfpF0 0rAeJznw7XMMKvCgssbtPii69HskqViO31WoAVjF29f/1kM06IEFyqu9kHca2DzBFO ilZ2BGuyNrP4jvgsDgJVGsLG2q/R64q5pmMP6/N3HY6tPu9U/Vu5GRWW7PrIOTDw4g vPT76vY++PjHw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4TwBWQ3q0Mz4wcs; Thu, 14 Mar 2024 13:42:58 +1100 (AEDT) Date: Thu, 14 Mar 2024 13:22:20 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH 0/4] Some improvements to the tap send path Message-ID: References: <20240308065325.2181322-1-david@gibson.dropbear.id.au> <348a52c9-7c07-4150-b594-4743c7775be6@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yWvvc7xTsz8WI2Wh" Content-Disposition: inline In-Reply-To: Message-ID-Hash: ZAYH5VGOLPAUOIDIDLIYHAENT7KGIRK5 X-Message-ID-Hash: ZAYH5VGOLPAUOIDIDLIYHAENT7KGIRK5 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: Stefano Brivio , passt-dev@passt.top 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: --yWvvc7xTsz8WI2Wh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 11, 2024 at 12:02:08PM +0100, Laurent Vivier wrote: > On 3/8/24 13:42, David Gibson wrote: > > On Fri, Mar 08, 2024 at 09:18:48AM +0100, Laurent Vivier wrote: > > > On 3/8/24 07:53, David Gibson wrote: > > > > This series has a handful of small improvements to the tap send pat= h. > > > > See individual commit messages for the details. > > > >=20 > > > > I expect this will conflict with Laurent's upcoming work. I hope t= he > > > > conflicts won't be too bad, and indeed will set us up for less > > > > duplication there in the end. > > >=20 > > > I'm working on patch that devides TCP buffers in several buffers poin= ted out > > > by an IOV arrays and then provided to tap_send_frames(). I'm going to= base > > > my patch on this series. > > >=20 > > > The idea is: > > >=20 > > > A frame is made with 4 iovecs: > > >=20 > > > #define TCP_IOV_VNET 0 > > > #define TCP_IOV_ETH 1 > > > #define TCP_IOV_IP 2 > > > #define TCP_IOV_PAYLOAD 3 > > > #define TCP_IOV_NUM 4 > > > typedef struct iovec tap_iovec_t[TCP_IOV_NUM]; > >=20 > > General concept seems good. Unless you have a specific reason to do > > so, I'd suggest keeping VNET and ETH - i.e. L2 and everything below it > > - together. As well as just making one less buffer for each frame, I > > think that will make life easier if we want to add an L2 interface > > with non-Ethernet framing (e.g. "tun" instead of "tap"). > >=20 >=20 > In fact keeping vnet header separated from eth header makes easier to rem= ove > it from the list to pass the iovec array to pcap functions and to pasta s= end > function (can use iovec[1] and iovcount - 1). Ok, fair point. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --yWvvc7xTsz8WI2Wh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmXyX1AACgkQzQJF27ox 2GeEUA//ewSl4Q+fwPLM1OU26uhoRajwyhIBvyGP3i4eMdWTHkV9wwEbmAl0iqEO 6nRjw0zM1T5Pt64MUzRkm/vckxoleqZ+2pYdWAZQ1Amg2auNclYRkBQqFc4xWdud 4oJktsLyOMJkwuomeuBQO51XYzGDSrOUqEnYaasW4qq8uNY065YzX2r16w3IFnBy 5JKQjbSGGs5eKmRbFy++nNQXxn1Nw74yWyIKHynb3dEtc1ZrEm9qE9caxGdcZehQ wlRF6p38fPHpiTkZQyB+xktOuWLUsSe3nAOC1SBLrulN82Fe864OR1KqDuA463ex cRyYWQZ6Fl8GxFc5pu6FNkR7phoFJZCrvh1lvMXJGKdem3P3O5vTZxgTj9/NsoZk 4hghszK3YTPhcl1LCMGJSNdjaBsWAMPPkLvcY0a/HzCt684ZSFlpuvePkPqTwbf4 /ezFk26eqhnabWfKamVSfGetmqsHhd1a5Cd3XpcK0Ibj06IY0jgYLdptGo547d/b oUjuZTDBUY64d6UZ//h5gExkFHLX6e2HjKGeDfWsmEuMZDcIOV97bQWTFH8/hkJd aSPCN1ytqdVxf6TPRbRS5h7KjxwTLJZ3pVRGXu3HBe1DDUS1wOmEvGPNqW+cvTgS m1yVGEi5jsF0rqvjx2wlS7SGVy/q49R4IQsQgNEm4JUNL+X02lA= =jVny -----END PGP SIGNATURE----- --yWvvc7xTsz8WI2Wh--