Skip to content

sctp: Implement Stream Interleave: The I-DATA Chunk Supporting User Message Interleaving

Xin Long linux-sctp netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest12 patches 17 repliesIn review
  2. v112 patches 11 repliesSuperseded

Changes in v2 from the cover letter

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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12sctp: add stream interleave enable members and sockoptinclude/net/netns/sctp.h include/net/sctp/structs.h include/uapi/linux/sctp.h +1 more+94 -20 replies
2/12sctp: add asoc intl_enable negotiation during 4 shakehandsinclude/linux/sctp.h net/sctp/sm_make_chunk.c+19 -20 replies
3/12sctp: add basic structures and make chunk function for idatainclude/linux/sctp.h include/net/sctp/sm.h include/net/sctp/structs.h +1 more+26 -00 replies
4/12sctp: implement make_datafrag for sctp_stream_interleaveinclude/net/sctp/sm.h include/net/sctp/stream_interleave.h include/net/sctp/structs.h +5 more+149 -2116 replies
5/12sctp: implement assign_number for sctp_stream_interleaveinclude/net/sctp/constants.h include/net/sctp/sctp.h include/net/sctp/sm.h +6 more+83 -140 replies
6/12sctp: implement validate_data for sctp_stream_interleaveinclude/net/sctp/sm.h include/net/sctp/stream_interleave.h include/net/sctp/structs.h +3 more+62 -140 replies
7/12sctp: implement ulpevent_data for sctp_stream_interleaveinclude/net/sctp/stream_interleave.h include/net/sctp/structs.h include/net/sctp/ulpevent.h +4 more+451 -110 replies
8/12sctp: implement enqueue_event for sctp_stream_interleaveinclude/net/sctp/stream_interleave.h net/sctp/associola.c net/sctp/chunk.c +3 more+12 -70 replies
9/12sctp: implement renege_events for sctp_stream_interleaveinclude/net/sctp/stream_interleave.h include/net/sctp/ulpqueue.h net/sctp/sm_sideeffect.c +2 more+119 -100 replies
10/12sctp: implement start_pd for sctp_stream_interleaveinclude/net/sctp/stream_interleave.h net/sctp/sm_sideeffect.c net/sctp/stream_interleave.c+4 -10 replies
11/12sctp: implement abort_pd for sctp_stream_interleaveinclude/net/sctp/stream_interleave.h include/net/sctp/ulpevent.h include/uapi/linux/sctp.h +4 more+112 -60 replies
12/12sctp: add support for the process of unordered idatainclude/net/sctp/structs.h include/net/sctp/ulpqueue.h net/sctp/socket.c +2 more+392 -280 replies

Reviews trailers per patch

All 12 patches have a Reviewed-by or Acked-by.

PatchMarcelo Ricardo LeitnerNeil Horman
1/12A-b A-b
2/12A-b A-b
3/12A-b A-b
4/12A-b A-b
5/12A-b A-b
6/12A-b A-b
7/12A-b A-b
8/12A-b A-b
9/12A-b A-b
10/12A-b A-b
11/12A-b A-b
12/12A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCHv2 net-next 00/12] sctp: Implement Stream Interleave: The I-DATA Chunk Supporting User Message Interleaving

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
Signature · 1 line
2.1.0