public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top, Laurent Vivier <lvivier@redhat.com>
Subject: Re: [PATCH] tcp_vu: head_cnt need not be global
Date: Tue, 18 Feb 2025 16:30:42 +0100	[thread overview]
Message-ID: <20250218163042.205ff4b8@elisabeth> (raw)
In-Reply-To: <20250218025013.1035148-1-david@gibson.dropbear.id.au>

On Tue, 18 Feb 2025 13:50:13 +1100
David Gibson <david@gibson.dropbear.id.au> wrote:

> head_cnt is a global variable which tracks how many entries in head[] are
> currently used.  The fact that it's global obscures the fact that the
> lifetime over which it has a meaningful value is quite short: a single
> call to of tcp_vu_data_from_sock().
> 
> Make it a local to tcp_vu_data_from_sock() to make that lifetime clearer.
> We keep the head[] array global for now - although technically it has the
> same valid lifetime - because it's large enough we might not want to put
> it on the stack.
> 
> Cc: Laurent Vivier <lvivier@redhat.com>
> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Applied.

-- 
Stefano


      parent reply	other threads:[~2025-02-18 15:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18  2:50 [PATCH] tcp_vu: head_cnt need not be global David Gibson
2025-02-18  8:01 ` Laurent Vivier
2025-02-18 10:22   ` Stefano Brivio
2025-02-20 10:06   ` David Gibson
2025-02-18 15:30 ` Stefano Brivio [this message]

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=20250218163042.205ff4b8@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=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).