40 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
42 #include <linux/types.h>
43 #include <linux/kernel.h>
44 #include <linux/net.h>
47 #include <linux/slab.h>
65 INIT_LIST_HEAD(&msg->
chunks);
74 sctp_datamsg_init(msg);
118 sp = sctp_sk(asoc->
base.sk);
154 sctp_datamsg_destroy(msg);
160 sctp_datamsg_hold(msg);
204 sctp_sk(asoc->
base.sk)->pf->af->net_header_len -
205 sizeof(
struct sctphdr) - sizeof(struct sctp_data_chunk);
235 list_empty(&asoc->
outqueue.retransmit) &&
244 if (first_len > max_data)
245 first_len = max_data;
248 if (msg_len >= first_len) {
249 msg_len -= first_len;
255 whole += msg_len /
max;
256 over = msg_len %
max;
259 if ((whole > 1) || (whole && over))
263 for (i=0, len=first_len; i < whole; i++) {
269 if ((i == (whole - 1)) && !over) {
290 goto errout_chunk_free;
298 sctp_datamsg_assign(msg, chunk);
332 goto errout_chunk_free;
334 sctp_datamsg_assign(msg, chunk);
370 chunk->
msg->send_failed = 1;