From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH 01/11] util: sock_l4() determine protocol from epoll type rather than the reverse
Date: Fri, 5 Jul 2024 09:51:37 +1000 [thread overview]
Message-ID: <Zoc1iYUJMw7TQHVR@zatzit> (raw)
In-Reply-To: <20240704231925.7f663869@elisabeth>
[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]
On Thu, Jul 04, 2024 at 11:19:25PM +0200, Stefano Brivio wrote:
> On Thu, 4 Jul 2024 14:58:25 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
>
> > sock_l4() creates a socket of the given IP protocol number, and adds it to
> > the epoll state. Currently it determines the correct tag for the epoll
> > data based on the protocol. However, we have some future cases where we
> > might want different semantics, and therefore epoll types, for sockets of
> > the same protocol. So, change sock_l4() to take the epoll type as an
> > explicit parameter, and determine the protocol from that.
>
> The interface is a bit surprising, but I guess it makes later changes
> much more convenient, so be it.
Yes. For the new UDP flow design, I have both "listening" and "reply"
sockets which are basically the same at the kernel level, but need
different epoll information.
> Just one nit:
>
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> > ---
> > epoll_type.h | 41 +++++++++++++++++++++++++++++++++++++++++
> > icmp.c | 2 +-
> > passt.h | 32 --------------------------------
> > tcp.c | 10 +++++-----
> > udp.c | 12 ++++++------
> > util.c | 48 ++++++++++++++++++++++++++----------------------
> > util.h | 3 ++-
> > 7 files changed, 81 insertions(+), 67 deletions(-)
> > create mode 100644 epoll_type.h
> >
> > diff --git a/epoll_type.h b/epoll_type.h
> > new file mode 100644
> > index 00000000..42e876e5
> > --- /dev/null
> > +++ b/epoll_type.h
> > @@ -0,0 +1,41 @@
> > +/* SPDX-License-Identifier: GPL-2.0-or-later
> > + * Copyright Red Hat
> > + * Author: Davd Gibson <david@gibson.dropbear.id.au>
>
> I'm fairly sure it's spellt David. :)
Oops, fixed :).
--
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:[~2024-07-05 0:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 4:58 [PATCH 00/11] Preliminaries for UDP flow support David Gibson
2024-07-04 4:58 ` [PATCH 01/11] util: sock_l4() determine protocol from epoll type rather than the reverse David Gibson
2024-07-04 21:19 ` Stefano Brivio
2024-07-04 23:51 ` David Gibson [this message]
2024-07-04 4:58 ` [PATCH 02/11] flow: Add flow_sidx_valid() helper David Gibson
2024-07-04 4:58 ` [PATCH 03/11] udp: Pass full epoll reference through more of sock handler path David Gibson
2024-07-04 21:20 ` Stefano Brivio
2024-07-04 23:54 ` David Gibson
2024-07-04 4:58 ` [PATCH 04/11] udp: Rename IOV and mmsghdr arrays David Gibson
2024-07-04 21:20 ` Stefano Brivio
2024-07-05 0:00 ` David Gibson
2024-07-04 4:58 ` [PATCH 05/11] udp: Unify udp[46]_mh_splice David Gibson
2024-07-04 4:58 ` [PATCH 06/11] udp: Unify udp[46]_l2_iov David Gibson
2024-07-04 4:58 ` [PATCH 07/11] udp: Don't repeatedly initialise udp[46]_eth_hdr David Gibson
2024-07-04 4:58 ` [PATCH 08/11] udp: Move some more of sock_handler tasks into sub-functions David Gibson
2024-07-04 4:58 ` [PATCH 09/11] udp: Consolidate datagram batching David Gibson
2024-07-05 9:10 ` Stefano Brivio
2024-07-05 9:36 ` David Gibson
2024-07-04 4:58 ` [PATCH 10/11] contrib: Add program to document and test assumptions about SO_REUSEADDR David Gibson
2024-07-04 21:21 ` Stefano Brivio
2024-07-05 0:06 ` David Gibson
2024-07-05 8:33 ` Stefano Brivio
2024-07-05 9:49 ` David Gibson
2024-07-04 4:58 ` [PATCH 11/11] contrib: Test behaviour of zero length datagram recv()s 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=Zoc1iYUJMw7TQHVR@zatzit \
--to=david@gibson.dropbear.id.au \
--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).