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 3C6FF5A005E for ; Thu, 5 Jan 2023 05:26:31 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4NnYM80svpz4xyK; Thu, 5 Jan 2023 15:26:28 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1672892788; bh=cCM5zJS8nU+pTvhaebeJPEDP0hPQAEwVm/BNy8Yx/ZE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j6N3v/6gj0VHJhyXBGhw9PuBrtlByRsVJCt5bkuyxbXYYKnCSRSlQbWoxrjDoG7nM lAa8JWpSaCS0uyF8klRFpaU53j60s9ja8ItU8c4t1DCqEhuxu4myCAdt5YUZ/iqEqY ge6JaWMMJZBBGAWbZBU0BCUrjHeX+pg5+Lvo5C4k= Date: Thu, 5 Jan 2023 15:25:28 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v3 6/8] udp: Unify udp_sock_handler_splice() with udp_sock_handler() Message-ID: References: <20230104054426.120668-1-david@gibson.dropbear.id.au> <20230104054426.120668-7-david@gibson.dropbear.id.au> <20230104184438.2e43da08@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Jd0k7DY7lf+Rmvpc" Content-Disposition: inline In-Reply-To: <20230104184438.2e43da08@elisabeth> Message-ID-Hash: AG2RTJAIMZBTAT4WVTTCGWWFSR2LNVV3 X-Message-ID-Hash: AG2RTJAIMZBTAT4WVTTCGWWFSR2LNVV3 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: passt-dev@passt.top 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: --Jd0k7DY7lf+Rmvpc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 04, 2023 at 06:44:38PM +0100, Stefano Brivio wrote: > On Wed, 4 Jan 2023 16:44:24 +1100 > David Gibson wrote: [snip] > > /** > > * udp_update_hdr4() - Update headers for one IPv4 datagram > > * @c: Execution context > > @@ -944,32 +898,53 @@ void udp_sock_handler(const struct ctx *c, union = epoll_ref ref, uint32_t events, > > const struct timespec *now) > > { > > /* For not entirely clear reasons (data locality?) pasta gets > > - * better throughput if we receive the datagrams one at a > > - * time. > > + * better throughput if we receive tap datagrams one at a > > + * atime. For small splice datagrams throughput is slightly > > + * better if we do batch, but it's slightly worse for large > > + * splice datagrams. Since we don't know before we receive > > + * whether we'll use tap or splice, always go one at a time > > + * for pasta mode. > > */ > > ssize_t n =3D (c->mode =3D=3D MODE_PASST ? UDP_MAX_FRAMES : 1); > > in_port_t dstport =3D ref.r.p.udp.udp.port; > > bool v6 =3D ref.r.p.udp.udp.v6; > > - struct mmsghdr *sock_mmh; > > + struct mmsghdr *mmh_recv; > > + unsigned int i, m; > > + ssize_t n; >=20 > This doesn't build, you're redefining 'n' after the new version of 4/8. Wow, that was super sloppy of me, sorry. I'm going to blame not being quite back into it after the holiday. For whatever reason my brain just skipped over even the most rudimentary testing here. > I could drop this on merge (the rest of the series would be ready to > merge) but as you usually prefer to respin anyway, I'll wait for that. Yeah, I'll send a respin short. Tested, this time :). --=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 --Jd0k7DY7lf+Rmvpc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoULxWu4/Ws0dB+XtgypY4gEwYSIFAmO2UQ4ACgkQgypY4gEw YSLS8A//bAUL1z01uOqRlJnKzAUS4c1gV0+R6eecnI9ytTT1fidj808riITOTr4Y GrjJg0BAfZ8GW76o78tKyRAh0gbgbn51rvhvKgIYDVbI7OfwLem+AoUjsJxBb/dw 6hqK1wuaQxbkYdzbCMg+WBaEIa+H/OraAqaL2B77fZA22e/rEFcnecHQvGNW3Htr SN/vHla0lBt6ZGmaJOhGkv072+Z36xlE1QBaZzYur26w4Vt7XAMf+vXP2yeDUhd+ 55he2yU2s2H9Jy3W0X05Hoz27GZzPnyfN1gxmSA5y/Xwyks9PxLvQcS0KEdwLmbE 9mfWVDoWIhtABe9UzwtIzhWSYcvLCyKzpl27dB0R2xIi/4R/H+RMNGKpONc6N8rO 1xtS3khn/QVAucUGW10FOUv6txD34PF8+iNaPrY6mMj4VtBnQAoAlkHIfHOwF9Fb T3nm0YwBNXZYq5pN+8XNPn+JlVQntNuqc6kvqSSYjteIu7b6ZkZ+unJ8Usi0CmMt o6YLaa49A30RPHJTEpiMWj90k9VQ/A6i7F7blFiBYxrhWUBFXF7UltJ+0mWeM5CM buGXQbdjdKtsq3vDwoj2y9grLq7DKS1PkKNxXq1/zLmxP3ZyE29hoQutN3eCFY1s 6tu8a3EnIYPGfQHkJ0VQO894k+nZIudxUdntW1G7oCjWPveU7OM= =vW6/ -----END PGP SIGNATURE----- --Jd0k7DY7lf+Rmvpc--