public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>, passt-dev@passt.top
Subject: Re: [PATCH v3 2/6] epoll_ctl: Extract epoll operations
Date: Fri, 17 Oct 2025 10:07:04 +1100	[thread overview]
Message-ID: <aPF6mCdDeIUn8M2g@zatzit> (raw)
In-Reply-To: <20251016233128.2ef96233@elisabeth>

[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]

On Thu, Oct 16, 2025 at 11:31:28PM +0200, Stefano Brivio wrote:
> On Thu,  9 Oct 2025 15:04:05 +0200
> Laurent Vivier <lvivier@redhat.com> wrote:
[snip]
> > +		union {
> > +			uint32_t flow;
> > +			flow_sidx_t flowside;
> > +			union tcp_listen_epoll_ref tcp_listen;
> > +			union udp_listen_epoll_ref udp;
> > +			uint32_t data;
> > +			int nsdir_fd;
> > +			int queue;
> > +		};
> > +	};
> > +	uint64_t u64;
> > +};
> > +static_assert(sizeof(union epoll_ref) <= sizeof(union epoll_data),
> > +	      "epoll_ref must have same size as epoll_data");
> 
> Either the comment is misleading, or it should be sizeof(...) != ...

I believe <= is correct, but the comment is misleading.  What we care
about here is that our custom structure/union fits in space available
in the epoll_event structure.  In practice it will have equal size,
but <= is what we care about.

> The rest of the patch looks good to me, I didn't finish reviewing the
> series though.
> 
> -- 
> Stefano
> 

-- 
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 --]

  reply	other threads:[~2025-10-16 23:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-09 13:04 [PATCH v3 0/6] Refactor epoll handling in preparation for multithreading Laurent Vivier
2025-10-09 13:04 ` [PATCH v3 1/6] util: Simplify epoll_del() interface to take epollfd directly Laurent Vivier
2025-10-16 21:31   ` Stefano Brivio
2025-10-09 13:04 ` [PATCH v3 2/6] epoll_ctl: Extract epoll operations Laurent Vivier
2025-10-13  4:28   ` David Gibson
2025-10-16 21:31   ` Stefano Brivio
2025-10-16 23:07     ` David Gibson [this message]
2025-10-09 13:04 ` [PATCH v3 3/6] util: Move epoll registration out of sock_l4_sa() Laurent Vivier
2025-10-13  4:47   ` David Gibson
2025-10-09 13:04 ` [PATCH v3 4/6] tcp, flow: Replace per-connection in_epoll flag with threadnb in flow_common Laurent Vivier
2025-10-15  3:54   ` David Gibson
2025-10-09 13:04 ` [PATCH v3 5/6] icmp: Use thread-based epoll management for ICMP flows Laurent Vivier
2025-10-09 13:04 ` [PATCH v3 6/6] udp: Use thread-based epoll management for UDP flows Laurent Vivier

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=aPF6mCdDeIUn8M2g@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=lvivier@redhat.com \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /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).