netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arjun Roy <arjunroy@google.com>
To: David Ahern <dsahern@gmail.com>
Cc: Leon Romanovsky <leon@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Arjun Roy <arjunroy.kdev@gmail.com>,
	David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Soheil Hassas Yeganeh <soheil@google.com>
Subject: Re: [net-next v2 2/2] tcp: Add receive timestamp support for receive zerocopy.
Date: Mon, 1 Feb 2021 18:20:23 -0800	[thread overview]
Message-ID: <CAOFY-A2y20N9mUDgknbqM=tR0SA6aS6aTjyybggWNa8uY2=U_Q@mail.gmail.com> (raw)
In-Reply-To: <ad3d4a29-b6c1-c6d2-3c0f-fff212f23311@gmail.com>

On Mon, Feb 1, 2021 at 6:06 PM David Ahern <dsahern@gmail.com> wrote:
>
> On 1/24/21 11:15 PM, Leon Romanovsky wrote:
> > On Fri, Jan 22, 2021 at 10:55:45PM -0700, David Ahern wrote:
> >> On 1/22/21 9:07 PM, Jakub Kicinski wrote:
> >>> On Wed, 20 Jan 2021 16:41:48 -0800 Arjun Roy wrote:
> >>>> diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
> >>>> index 768e93bd5b51..b216270105af 100644
> >>>> --- a/include/uapi/linux/tcp.h
> >>>> +++ b/include/uapi/linux/tcp.h
> >>>> @@ -353,5 +353,9 @@ struct tcp_zerocopy_receive {
> >>>>    __u64 copybuf_address;  /* in: copybuf address (small reads) */
> >>>>    __s32 copybuf_len; /* in/out: copybuf bytes avail/used or error */
> >>>>    __u32 flags; /* in: flags */
> >>>> +  __u64 msg_control; /* ancillary data */
> >>>> +  __u64 msg_controllen;
> >>>> +  __u32 msg_flags;
> >>>> +  /* __u32 hole;  Next we must add >1 u32 otherwise length checks fail. */
> >>>
> >>> Well, let's hope nobody steps on this landmine.. :)
> >>>
> >>
> >> Past suggestions were made to use anonymous declarations - e.g., __u32
> >> :32; - as a way of reserving the space for future use. That or declare
> >> '__u32 resvd', check that it must be 0 and makes it available for later
> >> (either directly or with a union).
> >
> > This is the schema (reserved field without union) used by the RDMA UAPIs from
> > the beginning (>20 years already) and it works like a charm.
> >
> > Highly recommend :).
> >
>
> agreed.
>
> Arjun: would you mind following up with a patch to make this hole
> explicit and usable for the next extension? Thanks,

Will do.

-Arjun

  reply	other threads:[~2021-02-02  2:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21  0:41 [net-next v2 0/2] tcp: add CMSG+rx timestamps to rx. zerocopy Arjun Roy
2021-01-21  0:41 ` [net-next v2 1/2] tcp: Remove CMSG magic numbers for tcp_recvmsg() Arjun Roy
2021-01-21  0:41 ` [net-next v2 2/2] tcp: Add receive timestamp support for receive zerocopy Arjun Roy
2021-01-23  4:07   ` Jakub Kicinski
2021-01-23  5:55     ` David Ahern
2021-01-25  6:15       ` Leon Romanovsky
2021-02-02  2:06         ` David Ahern
2021-02-02  2:20           ` Arjun Roy [this message]
2021-02-02  6:52             ` Leon Romanovsky
2021-02-04 23:03               ` Arjun Roy
2021-02-05  0:00                 ` Jakub Kicinski
2021-02-05  1:32                   ` Arjun Roy

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='CAOFY-A2y20N9mUDgknbqM=tR0SA6aS6aTjyybggWNa8uY2=U_Q@mail.gmail.com' \
    --to=arjunroy@google.com \
    --cc=arjunroy.kdev@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=soheil@google.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.
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 NNTP newsgroup(s).