[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXJAmzfzdGijC4wxhC7FMeuXR-d-DVSOAxTyJVPPBVd8YeqUQ@mail.gmail.com>
Date: Mon, 27 Jan 2025 09:04:33 -0800
From: John Ousterhout <ouster@...stanford.edu>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, edumazet@...gle.com, horms@...nel.org,
kuba@...nel.org
Subject: Re: [PATCH net-next v6 03/12] net: homa: create shared Homa header files
On Mon, Jan 27, 2025 at 1:06 AM Paolo Abeni <pabeni@...hat.com> wrote:
>
> On 1/24/25 10:21 PM, John Ousterhout wrote:
> > On Thu, Jan 23, 2025 at 3:01 AM Paolo Abeni <pabeni@...hat.com> wrote:
> >>
> >> On 1/15/25 7:59 PM, John Ousterhout wrote:
> >> [...]
> >>> +/**
> >>> + * union sockaddr_in_union - Holds either an IPv4 or IPv6 address (smaller
> >>> + * and easier to use than sockaddr_storage).
> >>> + */
> >>> +union sockaddr_in_union {
> >>> + /** @sa: Used to access as a generic sockaddr. */
> >>> + struct sockaddr sa;
> >>> +
> >>> + /** @in4: Used to access as IPv4 socket. */
> >>> + struct sockaddr_in in4;
> >>> +
> >>> + /** @in6: Used to access as IPv6 socket. */
> >>> + struct sockaddr_in6 in6;
> >>> +};
> >>
> >> There are other protocol using the same struct with a different name
> >> (sctp) or a very similar struct (mptcp). It would be nice to move this
> >> in a shared header and allow re-use.
> >
> > I would be happy to do this, but I suspect it should be done
> > separately from this patch series. It's not obvious to me where such a
> > definition should go; can you suggest an appropriate place for it?
>
> Probably a new header file under include/net/. My choice for files name
> are usually not quite good, but I would go for 'sockaddr_generic.h' or
> 'sockaddr_common.h'
It's OK to have a new header file with a single ~10-line definition in it?
-John-
Powered by blists - more mailing lists