<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sctp/chunk.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-12-11T16:23:05Z</updated>
<entry>
<title>sctp: implement enqueue_event for sctp_stream_interleave</title>
<updated>2017-12-11T16:23:05Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-12-08T13:04:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9162e0ed9e238c1f1d738cb36ee59d96b097f8e1'/>
<id>urn:sha1:9162e0ed9e238c1f1d738cb36ee59d96b097f8e1</id>
<content type='text'>
enqueue_event is added as a member of sctp_stream_interleave, used to
enqueue either data, idata or notification events into user socket rx
queue.

It replaces sctp_ulpq_tail_event used in the other places with
enqueue_event.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: implement make_datafrag for sctp_stream_interleave</title>
<updated>2017-12-11T16:23:04Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-12-08T13:04:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c3f6f655487d12c7a0c16914c98c599043e88d3'/>
<id>urn:sha1:0c3f6f655487d12c7a0c16914c98c599043e88d3</id>
<content type='text'>
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-&gt;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-&gt;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 &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: do not abandon the other frags in unsent outq if one msg has outstanding frags</title>
<updated>2017-12-01T20:06:24Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-11-25T13:18:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=779edd7348878a7376c0e3d0f96485c30b5f1b7d'/>
<id>urn:sha1:779edd7348878a7376c0e3d0f96485c30b5f1b7d</id>
<content type='text'>
Now for the abandoned chunks in unsent outq, it would just free the chunks.
Because no tsn is assigned to them yet, there's no need to send fwd tsn to
peer, unlike for the abandoned chunks in sent outq.

The problem is when parts of the msg have been sent and the other frags
are still in unsent outq, if they are abandoned/dropped, the peer would
never get this msg reassembled.

So these frags in unsent outq can't be dropped if this msg already has
outstanding frags.

This patch does the check in sctp_chunk_abandoned and
sctp_prsctp_prune_unsent.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: abandon the whole msg if one part of a fragmented message is abandoned</title>
<updated>2017-12-01T20:06:24Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-11-25T13:18:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5f612969c6f965e3bd1158598e0a3b1c4f389b9'/>
<id>urn:sha1:e5f612969c6f965e3bd1158598e0a3b1c4f389b9</id>
<content type='text'>
As rfc3758#section-3.1 demands:

   A3) When a TSN is "abandoned", if it is part of a fragmented message,
       all other TSN's within that fragmented message MUST be abandoned
       at the same time.

Besides, if it couldn't handle this, the rest frags would never get
assembled in peer side.

This patch supports it by adding abandoned flag in sctp_datamsg, when
one chunk is being abandoned, set chunk-&gt;msg-&gt;abandoned as well. Next
time when checking for abandoned, go checking chunk-&gt;msg-&gt;abandoned
first.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: introduce struct sctp_stream_out_ext</title>
<updated>2017-10-03T23:27:28Z</updated>
<author>
<name>Marcelo Ricardo Leitner</name>
</author>
<published>2017-10-03T22:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f952be79cebd49d04154781d99408867a069d375'/>
<id>urn:sha1:f952be79cebd49d04154781d99408867a069d375</id>
<content type='text'>
With the stream schedulers, sctp_stream_out will become too big to be
allocated by kmalloc and as we need to allocate with BH disabled, we
cannot use __vmalloc in sctp_stream_init().

This patch moves out the stats from sctp_stream_out to
sctp_stream_out_ext, which will be allocated only when the application
tries to sendmsg something on it.

Just the introduction of sctp_stream_out_ext would already fix the issue
described above by splitting the allocation in two. Moving the stats
to it also reduces the pressure on the allocator as we will ask for less
memory atomically when creating the socket and we will use GFP_KERNEL
later.

Then, for stream schedulers, we will just use sctp_stream_out_ext.

Tested-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: remove the typedef sctp_auth_chunk_t</title>
<updated>2017-08-03T16:45:47Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-08-03T07:42:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bb96dec74543bb3ceb4ac5caf39341dadb4cb559'/>
<id>urn:sha1:bb96dec74543bb3ceb4ac5caf39341dadb4cb559</id>
<content type='text'>
This patch is to remove the typedef sctp_auth_chunk_t, and
replace with struct sctp_auth_chunk in the places where it's
using this typedef.

It is also to use sizeof(variable) instead of sizeof(type).

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: remove the typedef sctp_sack_chunk_t</title>
<updated>2017-07-24T23:01:20Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-07-23T01:34:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d4d6c61489e7e4a8944360312e572988889558a8'/>
<id>urn:sha1:d4d6c61489e7e4a8944360312e572988889558a8</id>
<content type='text'>
This patch is to remove the typedef sctp_sack_chunk_t, and
replace with struct sctp_sack_chunk in the places where it's
using this typedef.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net, sctp: convert sctp_datamsg.refcnt from atomic_t to refcount_t</title>
<updated>2017-07-04T21:35:18Z</updated>
<author>
<name>Reshetova, Elena</name>
</author>
<published>2017-07-04T12:53:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0acdfb409c82047853df1e5f3dbdbe4005c78ae'/>
<id>urn:sha1:c0acdfb409c82047853df1e5f3dbdbe4005c78ae</id>
<content type='text'>
refcount_t type and corresponding API should be
used instead of atomic_t when the variable is used as
a reference counter. This allows to avoid accidental
refcounter overflows that might lead to use-after-free
situations.

Signed-off-by: Elena Reshetova &lt;elena.reshetova@intel.com&gt;
Signed-off-by: Hans Liljestrand &lt;ishkamiel@gmail.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: David Windsor &lt;dwindsor@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: define the member stream as an object instead of pointer in asoc</title>
<updated>2017-06-02T17:56:26Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-05-31T08:36:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cee360ab4dd66fc1de33a5fa1cb418fa21c27ce3'/>
<id>urn:sha1:cee360ab4dd66fc1de33a5fa1cb418fa21c27ce3</id>
<content type='text'>
As Marcelo's suggestion, stream is a fixed size member of asoc and would
not grow with more streams. To avoid an allocation for it, this patch is
to define it as an object instead of pointer and update the places using
it, also create sctp_stream_update() called in sctp_assoc_update() to
migrate the stream info from one stream to another.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: add SCTP_PR_STREAM_STATUS sockopt for prsctp</title>
<updated>2017-04-03T21:52:35Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-04-01T09:07:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d229d48d183fbc1391908decc7d2bcf09ca2f38f'/>
<id>urn:sha1:d229d48d183fbc1391908decc7d2bcf09ca2f38f</id>
<content type='text'>
Before when implementing sctp prsctp, SCTP_PR_STREAM_STATUS wasn't
added, as it needs to save abandoned_(un)sent for every stream.

After sctp stream reconf is added in sctp, assoc has structure
sctp_stream_out to save per stream info.

This patch is to add SCTP_PR_STREAM_STATUS by putting the prsctp
per stream statistics into sctp_stream_out.

v1-&gt;v2:
  fix an indent issue.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
