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=202608 header.b=mmW4pdqS; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id A060C5A0269 for ; Mon, 03 Aug 2026 05:46:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202608; t=1785728795; bh=FZjSoqTHmNygZJiodUC1YJgI+u21tDyPmBS4L/RCT2c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mmW4pdqSnV9ZyFPhKYYCCC0wGc4/ZEm5MvAlcXg7D/qGhKp03QTrvKDPwP750BZcu t98geazFSKAUi9f89JVTX6+sIHASfVZAM7GJm+enY1NUeYu0OXYU3meqafH/alLWD4 wGBObGfo6a/K3XVtyTXJ6fNhluaiZPcjQBZREqfz2UqH21sO4Z6fLuR5bvwGVg1Sm7 QgJr8M0f/u7VZxoSLqpQgXlje9c1cJLA6GA4rSpyUZFkihdjPk8GLKUva8SAkKQ4K1 4u3Xte0ujAklgONECMSmkRUcN4dXjjwRrM/hZHpV+mzy3t268tM5FPhu0kXlr8KpD4 1qXkjpyy0Pt3A== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4hD2fM1Ny9z4wFC; Mon, 03 Aug 2026 13:46:35 +1000 (AEST) Date: Mon, 3 Aug 2026 13:10:53 +1000 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH v6 05/12] arp: Pass queue pair explicitly through ARP send path Message-ID: References: <20260731161617.3550626-1-lvivier@redhat.com> <20260731161617.3550626-6-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NUQ8tpXSaJtbDT+Y" Content-Disposition: inline In-Reply-To: <20260731161617.3550626-6-lvivier@redhat.com> Message-ID-Hash: WP3NLLZ6U6KQ3WPAO3IVBL2AHJ5R6BGC X-Message-ID-Hash: WP3NLLZ6U6KQ3WPAO3IVBL2AHJ5R6BGC 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.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: --NUQ8tpXSaJtbDT+Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 31, 2026 at 06:16:10PM +0200, Laurent Vivier wrote: > Add a qpair parameter to arp(), forwarding it to tap_send_single() > instead of hardcoding QPAIR_DEFAULT, so replies go out on the same > queue pair the request arrived on. >=20 > arp_send_init_req() and arp_announce() are unsolicited, low-volume > messages with no meaningful queue pair context, so they hardcode > QPAIR_DEFAULT internally. >=20 > No functional change. >=20 > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > arp.c | 5 +++-- > arp.h | 2 +- > tap.c | 2 +- > 3 files changed, 5 insertions(+), 4 deletions(-) >=20 > diff --git a/arp.c b/arp.c > index e97c4de86a99..a12b50ff8439 100644 > --- a/arp.c > +++ b/arp.c > @@ -63,11 +63,12 @@ static bool ignore_arp(const struct ctx *c, > /** > * arp() - Check if this is a supported ARP message, reply as needed > * @c: Execution context > + * @qpair: Queue pair on which to send the reply > * @data: Single packet with Ethernet buffer > * > * Return: 1 if handled, -1 on failure > */ > -int arp(const struct ctx *c, struct iov_tail *data) > +int arp(const struct ctx *c, unsigned int qpair, struct iov_tail *data) > { > union inany_addr tgt; > struct { > @@ -112,7 +113,7 @@ int arp(const struct ctx *c, struct iov_tail *data) > memcpy(resp.am.tha, am->sha, sizeof(resp.am.tha)); > memcpy(resp.am.tip, am->sip, sizeof(resp.am.tip)); > =20 > - tap_send_single(c, QPAIR_DEFAULT, &resp, sizeof(resp)); > + tap_send_single(c, qpair, &resp, sizeof(resp)); > =20 > return 1; > } > diff --git a/arp.h b/arp.h > index 4b1f38bcec9b..5872b535635a 100644 > --- a/arp.h > +++ b/arp.h > @@ -22,7 +22,7 @@ struct arpmsg { > unsigned char tip[4]; > } __attribute__((__packed__)); > =20 > -int arp(const struct ctx *c, struct iov_tail *data); > +int arp(const struct ctx *c, unsigned int qpair, struct iov_tail *data); > void arp_send_init_req(const struct ctx *c); > void arp_announce(const struct ctx *c, struct in_addr *ip, > const unsigned char *mac); > diff --git a/tap.c b/tap.c > index 206a1c36b779..928cf5c086ee 100644 > --- a/tap.c > +++ b/tap.c > @@ -727,7 +727,7 @@ resume: > if (!eh) > continue; > if (ntohs(eh->h_proto) =3D=3D ETH_P_ARP) { > - arp(c, &data); > + arp(c, qpair, &data); > continue; > } > =20 > --=20 > 2.54.0 >=20 --=20 David Gibson (he or they) | 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 --NUQ8tpXSaJtbDT+Y Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmpwBrwACgkQzQJF27ox 2GeKRw/+NLTmPjlU8P1OP/e6xcdSK9LGtwCzvYDCAZEZAAvGkQWTB+MoZAI6FsHw oWK7QTM5QnnXYJDBtwyAITJGY7jAs7CKMFvOgRB+77/jLjUOTM0CuPTjze5NeSPd X5oy/x/T9ftWl7HlCBdkuj7eulPyNdwgNe27ub4SMvcLyRgiKSBId9wiF/yNTuYN h7Z6fodKGXHgqdHbuu3VOEM1sc/sqmfMsjjmq1gw1PDEqV+rKNf9uhr21AnhAug6 2b+X8LnRurjuEDcalAZ5hy37OdEXPsNSlDPnip6Xr/ngHBR8+ptCwmiBaVVUBo7U pK8FXc+jTCtebT6y70ZYu2J6B1dhIc3EHD52u9sIDGi2L3tD84wYP4VcQ23bKJNq ZGFSEKuf4VstiVb3MpzcB7CfH9ZGkJd932wP2AMoCRatQaRbgTmdqnJquTj/kbCQ u+MtK0xMxXZF6TleeMzfe5dBnN7FEt74LfBydLjC5uxi7PF0Y1+JnnP6G0gNPhAV n7CTgZEq5+mxWV/CWE4kzF+V+Dc5mRhRlejSBl2urfwEzmW3UNvPsArTcV2oihhv M/mmNgSV0nE/t8rnwuVo4FZGc/nqmn535SeD6mT67AcHP2brrBMpQ+tigjkhg8mQ Mem4GAcuaZ2qgCWdYkNKVaEXtJuru1dTmeGELs4sQX6up/87V2k= =V98a -----END PGP SIGNATURE----- --NUQ8tpXSaJtbDT+Y--