mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: v9fs@lists.linux.dev, Eric Van Hensbergen <ericvh@kernel.org>,
	Latchesar Ionkov <lucho@ionkov.net>,
	Dominique Martinet <asmadeus@codewreck.org>,
	Christian Schoenebeck <linux_oss@crudebyte.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 9p/xen: Use flexible array for data rings
Date: Wed, 27 May 2026 12:07:08 +0200	[thread overview]
Message-ID: <16cfa5c6-a09c-4d45-93e6-074260f530c6@suse.com> (raw)
In-Reply-To: <CAKxU2N-t6mjfGPmeRq3ychV0XKULhwOvq7EVQHtjG2eQ=KDGpQ@mail.gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1312 bytes --]

On 27.05.26 08:38, Rosen Penev wrote:
> On Tue, May 26, 2026 at 10:39 PM Jürgen Groß <jgross@suse.com> wrote:
>>
>> On 19.05.26 03:57, Rosen Penev wrote:
>>> Store the fixed set of Xen 9p data rings in the frontend private
>>> allocation instead of allocating a separate rings array.
>>>
>>> This keeps the data ring storage tied to the frontend lifetime and
>>> simplifies the allocation and cleanup paths.
>>>
>>> Assisted-by: Codex:GPT-5.5
>>> Signed-off-by: Rosen Penev <rosenp@gmail.com>
>>> ---
>>>    net/9p/trans_xen.c | 68 ++++++++++++++++++++--------------------------
>>>    1 file changed, 30 insertions(+), 38 deletions(-)
>>>
>>> diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
>>> index f9fb2db7a066..5a110d71d18c 100644
>>> --- a/net/9p/trans_xen.c
>>> +++ b/net/9p/trans_xen.c
>>> @@ -55,7 +55,7 @@ struct xen_9pfs_front_priv {
>>>        char *tag;
>>>        struct p9_client *client;
>>>
>>> -     struct xen_9pfs_dataring *rings;
>>> +     struct xen_9pfs_dataring rings[];
>>
>> Any reason not to use rings[XEN_9PFS_NUM_RINGS] instead of a flex array?
>>
>> The number of rings is a compile time constant, after all!
> flexibility really. I don't know if this will ever change.

If it ever changes we can still switch to a flex array.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2026-05-27 10:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19  1:57 Rosen Penev
2026-05-27  5:39 ` Jürgen Groß
2026-05-27  6:38   ` Rosen Penev
2026-05-27 10:07     ` Jürgen Groß [this message]
2026-09-13  9:51   ` Dominique Martinet
2026-09-13 19:44     ` Rosen Penev

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=16cfa5c6-a09c-4d45-93e6-074260f530c6@suse.com \
    --to=jgross@suse.com \
    --cc=asmadeus@codewreck.org \
    --cc=ericvh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_oss@crudebyte.com \
    --cc=lucho@ionkov.net \
    --cc=rosenp@gmail.com \
    --cc=v9fs@lists.linux.dev \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®