cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 4/6] dlm: use sctp 1-to-1 API
Date: Wed, 12 Aug 2015 10:16:25 -0300	[thread overview]
Message-ID: <55CB4729.2060203@gmail.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CB794EB@AcuExch.aculab.com>

Em 12-08-2015 07:23, David Laight escreveu:
> From: Marcelo Ricardo Leitner
>> Sent: 11 August 2015 23:22
>> DLM is using 1-to-many API but in a 1-to-1 fashion. That is, it's not
>> needed but this causes it to use sctp_do_peeloff() to mimic an
>> kernel_accept() and this causes a symbol dependency on sctp module.
>>
>> By switching it to 1-to-1 API we can avoid this dependency and also
>> reduce quite a lot of SCTP-specific code in lowcomms.c.
> ...
>
> You still need to enable sctp notifications (I think the patch deleted
> that code).
> Otherwise you don't get any kind of indication if the remote system
> 'resets' (ie sends an new INIT chunk) on an existing connection.

Right, it would miss the restart event and could generate a corrupted 
tx/rx buffers by glueing parts of old messages with new ones.

> It is probably enough to treat the MSG_NOTIFICATION as a fatal error
> and close the socket.

Just so we are on the same page, you mean that after accepting the new 
association and enabling notifications on it, any further notification 
on it can be treated as fatal errors, right? Seems reasonable to me.

> This is probably a bug in the sctp stack - if a connection is reset
> but the user hasn't requested notifications then it should be
> converted to a disconnect indication and a new incoming connection.

Maybe in such case resets shouldn't be allowed at all? Because unless it 
happens on a moment of silence it will always lead to application buffer 
corruption. Checked the RFCs now but couldn't find anything restricting 
them to some condition.

Thanks,
Marcelo



  reply	other threads:[~2015-08-12 13:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1439330654.git.marcelo.leitner@gmail.com>
2015-08-11 22:22 ` [Cluster-devel] [PATCH 1/6] dlm: fix connection stealing if using SCTP Marcelo Ricardo Leitner
2015-08-11 22:22 ` [Cluster-devel] [PATCH 2/6] dlm: fix race while closing connections Marcelo Ricardo Leitner
2015-08-11 22:22 ` [Cluster-devel] [PATCH 3/6] dlm: fix not reconnecting on connecting error handling Marcelo Ricardo Leitner
2015-08-11 22:22 ` [Cluster-devel] [PATCH 4/6] dlm: use sctp 1-to-1 API Marcelo Ricardo Leitner
2015-08-12 10:23   ` David Laight
2015-08-12 13:16     ` Marcelo Ricardo Leitner [this message]
2015-08-12 15:33       ` David Laight
2015-08-12 16:42         ` Marcelo Ricardo Leitner
2015-08-13  9:37           ` Steven Whitehouse
2015-08-13 12:13             ` Marcelo Ricardo Leitner
2015-08-11 22:22 ` [Cluster-devel] [PATCH 5/6] dlm: replace BUG_ON with a less severe handling Marcelo Ricardo Leitner
2015-08-11 22:22 ` [Cluster-devel] [PATCH 6/6] dlm: fix reconnecting but not sending data Marcelo Ricardo Leitner

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=55CB4729.2060203@gmail.com \
    --to=marcelo.leitner@gmail.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).