mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
0c3f6f6554
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>
26 lines
749 B
Makefile
26 lines
749 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for SCTP support code.
|
|
#
|
|
|
|
obj-$(CONFIG_IP_SCTP) += sctp.o
|
|
obj-$(CONFIG_NET_SCTPPROBE) += sctp_probe.o
|
|
obj-$(CONFIG_INET_SCTP_DIAG) += sctp_diag.o
|
|
|
|
sctp-y := sm_statetable.o sm_statefuns.o sm_sideeffect.o \
|
|
protocol.o endpointola.o associola.o \
|
|
transport.o chunk.o sm_make_chunk.o ulpevent.o \
|
|
inqueue.o outqueue.o ulpqueue.o \
|
|
tsnmap.o bind_addr.o socket.o primitive.o \
|
|
output.o input.o debug.o stream.o auth.o \
|
|
offload.o stream_sched.o stream_sched_prio.o \
|
|
stream_sched_rr.o stream_interleave.o
|
|
|
|
sctp_probe-y := probe.o
|
|
|
|
sctp-$(CONFIG_SCTP_DBG_OBJCNT) += objcnt.o
|
|
sctp-$(CONFIG_PROC_FS) += proc.o
|
|
sctp-$(CONFIG_SYSCTL) += sysctl.o
|
|
|
|
sctp-$(subst m,y,$(CONFIG_IPV6)) += ipv6.o
|