All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw at strlen.de>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [RFC 6/7] add mptcp_subflow_shutdown
Date: Mon, 25 Nov 2019 13:23:23 +0100	[thread overview]
Message-ID: <20191125122323.GA795@breakpoint.cc> (raw)
In-Reply-To: f10b15f98f58b168624f3a2366ea5e9cae4975c8.camel@redhat.com

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

Paolo Abeni <pabeni(a)redhat.com> wrote:
> On Mon, 2019-11-25 at 03:15 +0100, Florian Westphal wrote:
> > +static void mptcp_subflow_shutdown(struct sock *ssk, int how)
> > +{
> > +	lock_sock(ssk);
> > +
> > +	switch (ssk->sk_state) {
> > +	case TCP_LISTEN:
> > +		if (!(how & RCV_SHUTDOWN))
> > +			break;
> > +		/* fall through */
> > +	case TCP_SYN_SENT:
> > +		tcp_disconnect(ssk, O_NONBLOCK);
> > +		break;
> > +	default:
> > +		ssk->sk_shutdown |= how;
> > +		tcp_shutdown(ssk, how);
> > +		break;
> > +	}
> > +
> > +	/* Wake up anyone sleeping in poll. */
> > +	ssk->sk_state_change(ssk);
> > +	release_sock(ssk);
> > +}
> 
> I think we can move this one can be moved to subflow.c.
> 
> Yep, it will lose the 'static' scope, but protocol.c is becoming quite
> big...

Yes, but its still small compared to e.g. tcp_input.c.

> WDYT?

I like static scope. For every visible symbol one needs to check where
else it might be used before making changes to it...

             reply	other threads:[~2019-11-25 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 12:23 Florian Westphal [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-11-25 14:58 [MPTCP] Re: [RFC 6/7] add mptcp_subflow_shutdown Paolo Abeni
2019-11-25 12:09 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=20191125122323.GA795@breakpoint.cc \
    --to=unknown@example.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.