Netdev List
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>,
	Mat Martineau <mathew.j.martineau@linux.intel.com>
Cc: netdev@vger.kernel.org, Maxim Galaganov <max@internet.ru>,
	davem@davemloft.net, matthieu.baerts@tessares.net,
	mptcp@lists.linux.dev
Subject: Re: [PATCH net-next 10/10] mptcp: support TCP_CORK and TCP_NODELAY
Date: Tue, 07 Dec 2021 11:37:35 +0100	[thread overview]
Message-ID: <82d10189f1ca99ccba4c161884d446cbb3246ce9.camel@redhat.com> (raw)
In-Reply-To: <20211206173023.72aca8f9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On Mon, 2021-12-06 at 17:30 -0800, Jakub Kicinski wrote:
> On Fri,  3 Dec 2021 14:35:41 -0800 Mat Martineau wrote:
> > +static int mptcp_setsockopt_sol_tcp_nodelay(struct mptcp_sock *msk, sockptr_t optval,
> > +					    unsigned int optlen)
> > +{
> > +	struct mptcp_subflow_context *subflow;
> > +	struct sock *sk = (struct sock *)msk;
> > +	int val;
> > +
> > +	if (optlen < sizeof(int))
> > +		return -EINVAL;
> > +
> > +	if (copy_from_sockptr(&val, optval, sizeof(val)))
> > +		return -EFAULT;
> 
> Should we check that optval is not larger than sizeof(int) or if it is
> that the rest of the buffer is zero? Or for the old school options we
> should stick to the old school behavior?

I think it's useful if we keep the MPTCP socket options binary API as
close as possible to the plain TCP ones: that allows for seamless
switching existing TCP application to MPTCP with no code changes.

Old school, please ;)

Cheers,

Paolo 


  parent reply	other threads:[~2021-12-07 10:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 22:35 [PATCH net-next 00/10] mptcp: New features for MPTCP sockets and netlink PM Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 01/10] mptcp: add TCP_INQ cmsg support Mat Martineau
2021-12-07  1:14   ` Jakub Kicinski
2021-12-03 22:35 ` [PATCH net-next 02/10] selftests: mptcp: add TCP_INQ support Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 03/10] mptcp: add SIOCINQ, OUTQ and OUTQNSD ioctls Mat Martineau
2021-12-07  1:16   ` Jakub Kicinski
2021-12-07 10:21     ` Florian Westphal
2021-12-07 10:30     ` Paolo Abeni
2021-12-03 22:35 ` [PATCH net-next 04/10] selftests: mptcp: add inq test case Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 05/10] mptcp: allow changing the "backup" bit by endpoint id Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 06/10] mptcp: getsockopt: add support for IP_TOS Mat Martineau
2021-12-07  1:25   ` Jakub Kicinski
2021-12-03 22:35 ` [PATCH net-next 07/10] selftests: mptcp: check IP_TOS in/out are the same Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 08/10] tcp: expose __tcp_sock_set_cork and __tcp_sock_set_nodelay Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 09/10] mptcp: expose mptcp_check_and_set_pending Mat Martineau
2021-12-03 22:35 ` [PATCH net-next 10/10] mptcp: support TCP_CORK and TCP_NODELAY Mat Martineau
2021-12-07  1:30   ` Jakub Kicinski
2021-12-07 10:19     ` Florian Westphal
2021-12-07 10:37     ` Paolo Abeni [this message]
2021-12-07 20:40 ` [PATCH net-next 00/10] mptcp: New features for MPTCP sockets and netlink PM patchwork-bot+netdevbpf

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=82d10189f1ca99ccba4c161884d446cbb3246ce9.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=max@internet.ru \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    /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