public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v2 5/6] flow: Add queue pair tracking to flow management
Date: Thu, 27 Nov 2025 10:17:43 +0100	[thread overview]
Message-ID: <e494a6e9-767c-424d-9a57-caf628d1bc09@redhat.com> (raw)
In-Reply-To: <aSZ2_Bv4-a-hSwnd@zatzit>

On 11/26/25 04:41, David Gibson wrote:
>> +/**
>> + * flow_qp() - Get the queue pair for a flow
>> + * @f:		Flow to query (may be NULL)
>> + *
>> + * Return: queue pair number for the flow, or 0 if flow is NULL or has no
>> + *         valid queue pair assignment
>> + */
>> +unsigned int flow_qp(const struct flow_common *f)
>> +{
>> +	if (f == NULL || f->qpair == FLOW_QPAIR_INVALID)
> Are there any instances where you actually want to pass a NULL flow to
> this?
> 
> If you're going to return 0 anyway, why not just set f->qpair to 0 by
> default, rather than using FLOW_QPAIR_INVALID?
> 

In fact, in the multithread part I need to know if the queue pair has been set or not.
I agree that we should avoid this if possible because it takes one slot in the array. And 
as we have 16 qpairs we must use 5 bit (we need 17 values) rather than 4 bit. I'm 
reworking the multithread part, I will see if I can remove this.

Thanks,
Laurent


  reply	other threads:[~2025-11-27  9:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-21 16:58 [PATCH v2 0/6] vhost-user: Add multiqueue support Laurent Vivier
2025-11-21 16:58 ` [PATCH v2 1/6] tap: Remove pool parameter from tap4_handler() and tap6_handler() Laurent Vivier
2025-11-21 16:58 ` [PATCH v2 2/6] vhost-user: Enable multiqueue Laurent Vivier
2025-11-26  2:20   ` David Gibson
2025-11-26  8:04     ` Laurent Vivier
2025-11-21 16:58 ` [PATCH v2 3/6] vhost-user: Add queue pair parameter throughout the network stack Laurent Vivier
2025-11-26  2:35   ` David Gibson
2025-11-21 16:59 ` [PATCH v2 4/6] tap: Add queue pair parameter throughout the packet processing path Laurent Vivier
2025-11-26  3:16   ` David Gibson
2025-11-21 16:59 ` [PATCH v2 5/6] flow: Add queue pair tracking to flow management Laurent Vivier
2025-11-26  3:41   ` David Gibson
2025-11-27  9:17     ` Laurent Vivier [this message]
2025-11-28  0:53       ` David Gibson
2025-11-21 16:59 ` [PATCH v2 6/6] test: Add multiqueue support to vhost-user test infrastructure Laurent Vivier
2025-11-26  3:45   ` David Gibson
2025-11-27  9:20     ` Laurent Vivier
2025-11-28  0:54       ` 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=e494a6e9-767c-424d-9a57-caf628d1bc09@redhat.com \
    --to=lvivier@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --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).