netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xin Long <lucien.xin@gmail.com>
To: network dev <netdev@vger.kernel.org>, linux-sctp@vger.kernel.org
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	davem@davemloft.net
Subject: [PATCHv2 net-next 00/12] sctp: Implement Stream Interleave: The I-DATA Chunk Supporting User Message Interleaving
Date: Fri,  8 Dec 2017 21:03:57 +0800	[thread overview]
Message-ID: <cover.1512738021.git.lucien.xin@gmail.com> (raw)

Stream Interleave would be Implemented in two Parts:

   1. The I-DATA Chunk Supporting User Message Interleaving
   2. Interaction with Other SCTP Extensions

Overview in section 1.1 of RFC8260 for Part 1:

   This document describes a new chunk carrying payload data called
   I-DATA.  This chunk incorporates the properties of the current SCTP
   DATA chunk, all the flags and fields except the Stream Sequence
   Number (SSN), and also adds two new fields in its chunk header -- the
   Fragment Sequence Number (FSN) and the Message Identifier (MID).  The
   FSN is only used for reassembling all fragments that have the same
   MID and the same ordering property.  The TSN is only used for the
   reliable transfer in combination with Selective Acknowledgment (SACK)
   chunks.

   In addition, the MID is also used for ensuring ordered delivery
   instead of using the stream sequence number (the I-DATA chunk omits
   an SSN).

As the 1st part of Stream Interleave Implementation, this patchset adds
an ops framework named sctp_stream_interleave with a bunch of stuff that
does lots of things needed somewhere.

Then it defines sctp_stream_interleave_0 to work for normal DATA chunks
and sctp_stream_interleave_1 for I-DATA chunks.

With these functions, hundreds of if-else checks for the different process
on I-DATA chunks would be avoided. Besides, very few codes could be shared
in these two function sets.

In this patchset, it adds some basic variables, structures and socket
options firstly, then implement these functions one by one to add the
procedures for ordered idata gradually, at last adjusts some codes to
make them work for unordered idata.

To make it safe to be implemented and also not break the normal data
chunk process, this feature can't be enabled to use until all stream
interleave codes are completely accomplished.

v1 -> v2:
  - fixed a checkpatch warning that a blank line was missed.
  - avoided a kbuild warning reported from gcc-4.9.

Xin Long (12):
  sctp: add stream interleave enable members and sockopt
  sctp: add asoc intl_enable negotiation during 4 shakehands
  sctp: add basic structures and make chunk function for idata
  sctp: implement make_datafrag for sctp_stream_interleave
  sctp: implement assign_number for sctp_stream_interleave
  sctp: implement validate_data for sctp_stream_interleave
  sctp: implement ulpevent_data for sctp_stream_interleave
  sctp: implement enqueue_event for sctp_stream_interleave
  sctp: implement renege_events for sctp_stream_interleave
  sctp: implement start_pd for sctp_stream_interleave
  sctp: implement abort_pd for sctp_stream_interleave
  sctp: add support for the process of unordered idata

 include/linux/sctp.h                 |   20 +
 include/net/netns/sctp.h             |    5 +-
 include/net/sctp/constants.h         |    9 +-
 include/net/sctp/sctp.h              |    4 +-
 include/net/sctp/sm.h                |   15 +-
 include/net/sctp/stream_interleave.h |   54 ++
 include/net/sctp/structs.h           |   56 +-
 include/net/sctp/ulpevent.h          |   23 +-
 include/net/sctp/ulpqueue.h          |   10 +-
 include/uapi/linux/sctp.h            |    3 +
 net/sctp/Makefile                    |    2 +-
 net/sctp/associola.c                 |    2 +-
 net/sctp/chunk.c                     |    8 +-
 net/sctp/output.c                    |    5 +-
 net/sctp/sm_make_chunk.c             |   45 +-
 net/sctp/sm_sideeffect.c             |   23 +-
 net/sctp/sm_statefuns.c              |   21 +-
 net/sctp/sm_statetable.c             |    3 +
 net/sctp/socket.c                    |  130 +++-
 net/sctp/stream.c                    |    1 +
 net/sctp/stream_interleave.c         | 1118 ++++++++++++++++++++++++++++++++++
 net/sctp/ulpevent.c                  |   15 +-
 net/sctp/ulpqueue.c                  |   23 +-
 23 files changed, 1501 insertions(+), 94 deletions(-)
 create mode 100644 include/net/sctp/stream_interleave.h
 create mode 100644 net/sctp/stream_interleave.c

-- 
2.1.0

             reply	other threads:[~2017-12-08 13:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08 13:03 Xin Long [this message]
2017-12-08 13:03 ` [PATCHv2 net-next 01/12] sctp: add stream interleave enable members and sockopt Xin Long
2017-12-08 13:03   ` [PATCHv2 net-next 02/12] sctp: add asoc intl_enable negotiation during 4 shakehands Xin Long
2017-12-08 13:04     ` [PATCHv2 net-next 03/12] sctp: add basic structures and make chunk function for idata Xin Long
2017-12-08 13:04       ` [PATCHv2 net-next 04/12] sctp: implement make_datafrag for sctp_stream_interleave Xin Long
2017-12-08 13:04         ` [PATCHv2 net-next 05/12] sctp: implement assign_number " Xin Long
2017-12-08 13:04           ` [PATCHv2 net-next 06/12] sctp: implement validate_data " Xin Long
2017-12-08 13:04             ` [PATCHv2 net-next 07/12] sctp: implement ulpevent_data " Xin Long
2017-12-08 13:04               ` [PATCHv2 net-next 08/12] sctp: implement enqueue_event " Xin Long
2017-12-08 13:04                 ` [PATCHv2 net-next 09/12] sctp: implement renege_events " Xin Long
2017-12-08 13:04                   ` [PATCHv2 net-next 10/12] sctp: implement start_pd " Xin Long
2017-12-08 13:04                     ` [PATCHv2 net-next 11/12] sctp: implement abort_pd " Xin Long
2017-12-08 13:04                       ` [PATCHv2 net-next 12/12] sctp: add support for the process of unordered idata Xin Long
2017-12-08 14:06         ` [PATCHv2 net-next 04/12] sctp: implement make_datafrag for sctp_stream_interleave David Laight
2017-12-08 14:56           ` Marcelo Ricardo Leitner
2017-12-08 15:01             ` David Laight
2017-12-08 15:15               ` 'Marcelo Ricardo Leitner'
2017-12-08 15:32                 ` David Laight
2017-12-08 16:02                   ` 'Marcelo Ricardo Leitner'
2017-12-08 15:37             ` Neil Horman
2017-12-08 16:00               ` Marcelo Ricardo Leitner
2017-12-08 16:04                 ` David Laight
2017-12-08 16:08                   ` Neil Horman
2017-12-08 20:37                     ` 'Marcelo Ricardo Leitner'
2017-12-08 16:17                 ` Xin Long
2017-12-08 16:22                   ` David Laight
2017-12-08 17:23                     ` Xin Long
2017-12-08 17:29                       ` David Laight
2017-12-08 17:37                         ` Xin Long
2017-12-11 16:23 ` [PATCHv2 net-next 00/12] sctp: Implement Stream Interleave: The I-DATA Chunk Supporting User Message Interleaving David Miller

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=cover.1512738021.git.lucien.xin@gmail.com \
    --to=lucien.xin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=marcelo.leitner@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).