From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v6 05/12] arp: Pass queue pair explicitly through ARP send path
Date: Mon, 3 Aug 2026 13:10:53 +1000 [thread overview]
Message-ID: <anAGvPp4cl7WITHB@zatzit> (raw)
In-Reply-To: <20260731161617.3550626-6-lvivier@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2633 bytes --]
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.
>
> arp_send_init_req() and arp_announce() are unsolicited, low-volume
> messages with no meaningful queue pair context, so they hardcode
> QPAIR_DEFAULT internally.
>
> No functional change.
>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> arp.c | 5 +++--
> arp.h | 2 +-
> tap.c | 2 +-
> 3 files changed, 5 insertions(+), 4 deletions(-)
>
> 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));
>
> - tap_send_single(c, QPAIR_DEFAULT, &resp, sizeof(resp));
> + tap_send_single(c, qpair, &resp, sizeof(resp));
>
> 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__));
>
> -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) == ETH_P_ARP) {
> - arp(c, &data);
> + arp(c, qpair, &data);
> continue;
> }
>
> --
> 2.54.0
>
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-08-03 3:46 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 16:16 [PATCH v6 00/12] vhost-user: Add multiqueue support Laurent Vivier
2026-07-31 16:16 ` [PATCH v6 01/12] tap: Remove pool parameter from tap4_handler() and tap6_handler() Laurent Vivier
2026-07-31 16:16 ` [PATCH v6 02/12] vhost-user: Advertise multiqueue support Laurent Vivier
2026-08-03 2:03 ` David Gibson
2026-07-31 16:16 ` [PATCH v6 03/12] test: Add multiqueue support to vhost-user test infrastructure Laurent Vivier
2026-07-31 16:16 ` [PATCH v6 04/12] tap: Thread queue pair through all remaining tap paths Laurent Vivier
2026-08-03 3:10 ` David Gibson
2026-07-31 16:16 ` [PATCH v6 05/12] arp: Pass queue pair explicitly through ARP send path Laurent Vivier
2026-08-03 3:10 ` David Gibson [this message]
2026-07-31 16:16 ` [PATCH v6 06/12] tcp: Pass queue pair explicitly through TCP " Laurent Vivier
2026-08-03 3:17 ` David Gibson
2026-07-31 16:16 ` [PATCH v6 07/12] udp: Pass queue pair explicitly through UDP " Laurent Vivier
2026-08-03 3:22 ` David Gibson
2026-07-31 16:16 ` [PATCH v6 08/12] dhcp/dhcpv6: Pass queue pair explicitly through DHCP " Laurent Vivier
2026-08-03 3:24 ` David Gibson
2026-07-31 16:16 ` [PATCH v6 09/12] icmp: Pass queue pair explicitly through ICMP " Laurent Vivier
2026-08-03 3:26 ` David Gibson
2026-07-31 16:16 ` [PATCH v6 10/12] ndp: Pass queue pair explicitly through NDP " Laurent Vivier
2026-08-03 3:27 ` David Gibson
2026-07-31 16:16 ` [PATCH v6 11/12] flow: Add queue pair tracking to flow management Laurent Vivier
2026-08-03 3:40 ` David Gibson
2026-07-31 16:16 ` [PATCH v6 12/12] flow: Derive epoll fd from queue pair, removing epollid field Laurent Vivier
2026-08-03 3:46 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=anAGvPp4cl7WITHB@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).