From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: David Miller <davem@davemloft.net>,
network dev <netdev@vger.kernel.org>,
Neil Horman <nhorman@tuxdriver.com>
Subject: Re: [PATCH RFC v4 0/5] SCTP: Event skb list overhaul.
Date: Thu, 14 Mar 2019 09:04:32 -0300 [thread overview]
Message-ID: <20190314120432.GJ13343@localhost.localdomain> (raw)
In-Reply-To: <CADvbK_f-OB+_vPxefcCKAM=hMVNYRDp+wYv+xYz9agRmaEmNLw@mail.gmail.com>
On Thu, Mar 14, 2019 at 03:51:59PM +0800, Xin Long wrote:
> On Thu, Mar 14, 2019 at 9:23 AM Marcelo Ricardo Leitner
> <marcelo.leitner@gmail.com> wrote:
> >
> > On Wed, Mar 13, 2019 at 01:06:21PM -0300, Marcelo Ricardo Leitner wrote:
> > > On Mon, Mar 11, 2019 at 08:09:19PM -0700, David Miller wrote:
> > > >
> > > > This patch series eliminates the explicit reference to the skb list
> > > > implementation via skb->prev dereferences.
> > > >
> > > > The approach used is to pass a non-empty skb list around instead of an
> > > > event skb object which may or may not be on a list.
> > > >
> > > > I'd like to thank Marcelo Leitner, Xin Long, and Neil Horman for
> > > > reviewing previous versions of this series.
> > > >
> > > > Testing would be very much appreciated, in addition to the review of
> > > > course.
> > > >
> > > > v3 --> v4: Fix the logic in patch #4 so that we don't miss cases
> > > > where we should add event to the on-stack temp list.
> > > >
> > > > Signed-off-by: David S. Miller <davem@davemloft.net>
> > >
> > > Code review LGTM too.
> > > Running some tests, should be done by the end of the day.
> >
> > Tests were good with the exception of one unrelated issue. ACK from my
> > side thus.
> >
> >
> > Xin, would you mind carrying forward this fix? I think we need to fix
> > the other sockopts too. Thanks!
> Sure, it seems to affect quite a few socket opts.
Thanks.
> Somehow I made sense of it before.
For me too :-)
> So with this patch, asoc_id will be completed ignored by TCP type socket?
Yes. It already is when looking for the asoc, by sctp_id2assoc(). Just
need to re-ignore it if there is no asoc yet.
>
> >
> > ---8<---
> >
> > From ddba48476b343dce84a82036e7914a1f7ac3f0c8 Mon Sep 17 00:00:00 2001
> > Message-Id: <ddba48476b343dce84a82036e7914a1f7ac3f0c8.1552526507.git.marcelo.leitner@gmail.com>
> > From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> > Date: Wed, 13 Mar 2019 22:13:52 -0300
> > Subject: [PATCH] net/sctp: fix ignoring asoc_id for tcp-style sockets on
> > setsockopt
> >
> > Currently if the user pass an invalid asoc_id to SCTP_DEFAULT_SEND_PARAM
> > on a TCP-style socket, it will silently ignore the new parameters.
> > That's because after not finding an asoc, it is checking asoc_id against
> > the known values of CURRENT/FUTURE/ALL values and that fails to match.
> >
> > IOW, if the user supplies an invalid asoc id or not, it should either
> > match the current asoc or the socket itself so that it will inherit
> > these later. Fixes it by forcing asoc_id to SCTP_FUTURE_ASSOC in case it
> > is a TCP-style socket without an asoc, so that the values get set on the
> > socket.
> >
> > Fixes: 707e45b3dc5a ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_DEFAULT_SEND_PARAM sockopt")
> > Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> > ---
> > net/sctp/socket.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> > index 533207dbeae955604a6304a8f67b65c9f580fd05..85205a2d9a7dc5c289a94bf4672b240040cbb546 100644
> > --- a/net/sctp/socket.c
> > +++ b/net/sctp/socket.c
> > @@ -3024,6 +3024,9 @@ static int sctp_setsockopt_default_send_param(struct sock *sk,
> > return 0;
> > }
> >
> > + if (sctp_style(sk, TCP))
> > + info.sinfo_assoc_id = SCTP_FUTURE_ASSOC;
> > +
> > if (info.sinfo_assoc_id == SCTP_FUTURE_ASSOC ||
> > info.sinfo_assoc_id == SCTP_ALL_ASSOC) {
> > sp->default_stream = info.sinfo_stream;
> > --
> > 2.20.1
> >
prev parent reply other threads:[~2019-03-14 12:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 3:09 [PATCH RFC v4 0/5] SCTP: Event skb list overhaul David Miller
2019-03-13 11:21 ` Neil Horman
2019-03-13 16:06 ` Marcelo Ricardo Leitner
2019-03-14 1:23 ` Marcelo Ricardo Leitner
2019-03-14 7:51 ` Xin Long
2019-03-14 12:04 ` Marcelo Ricardo Leitner [this message]
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=20190314120432.GJ13343@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=davem@davemloft.net \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.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).