MPTCP Linux Development
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Paolo Abeni <pabeni@redhat.com>
Cc: mptcp@lists.01.org
Subject: [MPTCP] Re: [PATCH mptcp-next 2/9] mptcp: setsockopt: handle SO_KEEPALIVE and SO_PRIORITY
Date: Fri, 19 Mar 2021 13:35:36 +0100	[thread overview]
Message-ID: <20210319123536.GF22603@breakpoint.cc> (raw)
In-Reply-To: <c4092e153876000c736bd5ba93a0f9edc240399d.camel@redhat.com>

Paolo Abeni <pabeni@redhat.com> wrote:
> > +static void mptcp_so_keepalive(struct mptcp_sock *msk, int val)
> > +{
> > +	struct mptcp_subflow_context *subflow;
> > +	struct sock *sk = (struct sock *)msk;
> > +
> > +	lock_sock(sk);
> > +
> > +	mptcp_for_each_subflow(msk, subflow) {
> > +		struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
> > +		bool slow = lock_sock_fast(ssk);
> 
> Can we reduce the code duplication moving this chunk - msk lock, loop
> across the subflows - in mptcp_setsockopt_sol_socket_int() ? the main
> switch will be inside the for each loop.
> 
> We will end-up acquiring the ssk sock lock more then once/more than
> strictily required, but perhaps a bunch of line less ??? WDYT?

No idea.  I tried it first and thought it was ugly.
_______________________________________________
mptcp mailing list -- mptcp@lists.01.org
To unsubscribe send an email to mptcp-leave@lists.01.org

  reply	other threads:[~2021-03-19 12:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 16:38 [MPTCP] [RFC PATCH mptcp-next 0/9] initial SOL_SOCKET support Florian Westphal
2021-03-17 16:38 ` [MPTCP] [PATCH mptcp-next 1/9] mptcp: add skeleton to sync msk socket options to subflows Florian Westphal
2021-03-19 11:33   ` [MPTCP] " Paolo Abeni
2021-03-19 12:34     ` Florian Westphal
2021-03-19 14:36       ` Paolo Abeni
2021-03-17 16:38 ` [MPTCP] [PATCH mptcp-next 2/9] mptcp: setsockopt: handle SO_KEEPALIVE and SO_PRIORITY Florian Westphal
2021-03-19 11:43   ` [MPTCP] " Paolo Abeni
2021-03-19 12:35     ` Florian Westphal [this message]
2021-03-17 16:38 ` [MPTCP] [PATCH mptcp-next 3/9] mptcp: setsockopt: handle receive/send buffer and device bind Florian Westphal
2021-03-19 11:44   ` [MPTCP] " Paolo Abeni
2021-03-19 12:37     ` Florian Westphal
2021-03-17 16:38 ` [MPTCP] [PATCH mptcp-next 8/9] mptcp: sockopt: add TCP_CONGESTION Florian Westphal
2021-03-19 11:54   ` [MPTCP] " Paolo Abeni
2021-03-19 12:19   ` Paolo Abeni
2021-03-17 16:38 ` [MPTCP] [PATCH mptcp-next 9/9] mptcp: sockopt: handle TCP_INFO Florian Westphal
2021-03-19 12:00   ` [MPTCP] " Paolo Abeni

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=20210319123536.GF22603@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=mptcp@lists.01.org \
    --cc=pabeni@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox