linux-stable/include/net/sctp
Xin Long 0c3f6f6554 sctp: implement make_datafrag for sctp_stream_interleave
To avoid hundreds of checks for the different process on I-DATA chunk,
struct sctp_stream_interleave is defined as a group of functions used
to replace the codes in some place where it needs to do different job
according to if the asoc intl_enabled is set.

With these ops, it only needs to initialize asoc->stream.si with
sctp_stream_interleave_0 for normal data if asoc intl_enable is 0,
or sctp_stream_interleave_1 for idata if asoc intl_enable is set in
sctp_stream_init.

After that, the members in asoc->stream.si can be used directly in
some special places without checking asoc intl_enable.

make_datafrag is the first member for sctp_stream_interleave, it's
used to make data or idata frags, called in sctp_datamsg_from_user.
The old function sctp_make_datafrag_empty needs to be adjust some
to fit in this ops.

Note that as idata and data chunks have different length, it also
defines data_chunk_len for sctp_stream_interleave to describe the
chunk size.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-12-11 11:23:04 -05:00
..
auth.h net, sctp: convert sctp_auth_bytes.refcnt from atomic_t to refcount_t 2017-07-04 22:35:18 +01:00
checksum.h sctp: force the params with right types for sctp csum apis 2017-11-28 11:00:13 -05:00
command.h sctp: remove the typedef sctp_verb_t 2017-08-11 10:02:44 -07:00
constants.h sctp: remove the typedef sctp_subtype_t 2017-08-06 21:33:42 -07:00
sctp.h rhashtable: Change rhashtable_walk_start to return void 2017-12-11 09:58:38 -05:00
sm.h sctp: implement make_datafrag for sctp_stream_interleave 2017-12-11 11:23:04 -05:00
stream_interleave.h sctp: implement make_datafrag for sctp_stream_interleave 2017-12-11 11:23:04 -05:00
stream_sched.h sctp: remove extern from stream sched 2017-11-28 11:00:13 -05:00
structs.h sctp: implement make_datafrag for sctp_stream_interleave 2017-12-11 11:23:04 -05:00
tsnmap.h sctp: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
ulpevent.h sctp: fix some type cast warnings introduced by stream reconf 2017-10-29 18:03:24 +09:00
ulpqueue.h sctp: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00