<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sctp/stream_interleave.c, branch linux-4.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-02-16T21:32:37Z</updated>
<entry>
<title>sctp: remove the left unnecessary check for chunk in sctp_renege_events</title>
<updated>2018-02-16T21:32:37Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2018-02-16T09:18:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ab2323ca184168c288f7355fc19ec0838efc20c'/>
<id>urn:sha1:9ab2323ca184168c288f7355fc19ec0838efc20c</id>
<content type='text'>
Commit fb23403536ea ("sctp: remove the useless check in
sctp_renege_events") forgot to remove another check for
chunk in sctp_renege_events.

Dan found this when doing a static check.

This patch is to remove that check, and also to merge
two checks into one 'if statement'.

Fixes: fb23403536ea ("sctp: remove the useless check in sctp_renege_events")
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
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: fix some copy-paste errors for file comments</title>
<updated>2018-02-14T19:18:32Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2018-02-13T11:29:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fae8b6f4a6be42372f8b7ffda39c3ca2cd951dc1'/>
<id>urn:sha1:fae8b6f4a6be42372f8b7ffda39c3ca2cd951dc1</id>
<content type='text'>
This patch is to fix the file comments in stream.c and
stream_interleave.c

v1-&gt;v2:
  rephrase the comment for stream.c according to Neil's suggestion.

Fixes: a83863174a61 ("sctp: prepare asoc stream for stream reconf")
Fixes: 0c3f6f655487 ("sctp: implement make_datafrag for sctp_stream_interleave")
Signed-off-by: Xin Long &lt;lucien.xin@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: remove the useless check in sctp_renege_events</title>
<updated>2018-02-12T16:41:05Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2018-02-12T10:31:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb23403536eabe81ee90d32cb3051030b871d988'/>
<id>urn:sha1:fb23403536eabe81ee90d32cb3051030b871d988</id>
<content type='text'>
Remove the 'if (chunk)' check in sctp_renege_events for idata process,
as all renege commands are generated in sctp_eat_data and it can't be
NULL.

The same thing we already did for common data in sctp_ulpq_renege.

Fixes: 94014e8d871a ("sctp: implement renege_events for sctp_stream_interleave")
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 handle_ftsn for sctp_stream_interleave</title>
<updated>2017-12-15T18:52:22Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-12-14T16:41:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de60fe9105431f504de9f8793b1da237a7d7f7ed'/>
<id>urn:sha1:de60fe9105431f504de9f8793b1da237a7d7f7ed</id>
<content type='text'>
handle_ftsn is added as a member of sctp_stream_interleave, used to skip
ssn for data or mid for idata, called for SCTP_CMD_PROCESS_FWDTSN cmd.

sctp_handle_iftsn works for ifwdtsn, and sctp_handle_fwdtsn works for
fwdtsn. Note that different from sctp_handle_fwdtsn, sctp_handle_iftsn
could do stream abort pd.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo R. Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: implement report_ftsn for sctp_stream_interleave</title>
<updated>2017-12-15T18:52:22Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-12-14T16:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47b20a88566f89dd0cc80c46f59ce0a12259d404'/>
<id>urn:sha1:47b20a88566f89dd0cc80c46f59ce0a12259d404</id>
<content type='text'>
report_ftsn is added as a member of sctp_stream_interleave, used to
skip tsn from tsnmap, remove old events from reasm or lobby queue,
and abort pd for data or idata, called for SCTP_CMD_REPORT_FWDTSN
cmd and asoc reset.

sctp_report_iftsn works for ifwdtsn, and sctp_report_fwdtsn works
for fwdtsn. Note that sctp_report_iftsn doesn't do asoc abort_pd,
as stream abort_pd will be done when handling ifwdtsn. But when
ftsn is equal with ftsn, which means asoc reset, asoc abort_pd has
to be done.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo R. Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: implement validate_ftsn for sctp_stream_interleave</title>
<updated>2017-12-15T18:52:22Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-12-14T16:41:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0fc2ea922c8ad5520c80f03facbf396c81dce802'/>
<id>urn:sha1:0fc2ea922c8ad5520c80f03facbf396c81dce802</id>
<content type='text'>
validate_ftsn is added as a member of sctp_stream_interleave, used to
validate ssn/chunk type for fwdtsn or mid (message id)/chunk type for
ifwdtsn, called in sctp_sf_eat_fwd_tsn, just as validate_data.

If this check fails, an abort packet will be sent, as said in section
2.3.1 of RFC8260.

As ifwdtsn and fwdtsn chunks have different length, it also defines
ftsn_chunk_len for sctp_stream_interleave to describe the chunk size.
Then it replaces all sizeof(struct sctp_fwdtsn_chunk) with
sctp_ftsnchk_len.

It also adds the process for ifwdtsn in rx path. As Marcelo pointed
out, there's no need to add event table for ifwdtsn, but just share
prsctp_chunk_event_table with fwdtsn's. It would drop fwdtsn chunk
for ifwdtsn and drop ifwdtsn chunk for fwdtsn by calling validate_ftsn
in sctp_sf_eat_fwd_tsn.

After this patch, the ifwdtsn can be accepted.

Note that this patch also removes the sctp.intl_enable check for
idata chunks in sctp_chunk_event_lookup, as it will do this check
in validate_data later.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo R. Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: implement generate_ftsn for sctp_stream_interleave</title>
<updated>2017-12-15T18:52:21Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-12-14T16:41:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e0c3b73cec1b943affde91b3c412ad8266b4694'/>
<id>urn:sha1:8e0c3b73cec1b943affde91b3c412ad8266b4694</id>
<content type='text'>
generate_ftsn is added as a member of sctp_stream_interleave, used to
create fwdtsn or ifwdtsn chunk according to abandoned chunks, called
in sctp_retransmit and sctp_outq_sack.

sctp_generate_iftsn works for ifwdtsn, and sctp_generate_fwdtsn is
still used for making fwdtsn.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo R. Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: add support for the process of unordered idata</title>
<updated>2017-12-11T16:23:05Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-12-08T13:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=132282386f5d0eff7a84a119599216b5f9e9bfc6'/>
<id>urn:sha1:132282386f5d0eff7a84a119599216b5f9e9bfc6</id>
<content type='text'>
Unordered idata process is more complicated than unordered data:

 - It has to add mid into sctp_stream_out to save the next mid value,
   which is separated from ordered idata's.

 - To support pd for unordered idata, another mid and pd_mode need to
   be added to save the message id and pd state in sctp_stream_in.

 - To make  unordered idata reasm easier, it adds a new event queue
   to save frags for idata.

The patch mostly adds the samilar reasm functions for unordered idata
as ordered idata's, and also adjusts some other codes on assign_mid,
abort_pd and ulpevent_data for idata.

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 abort_pd for sctp_stream_interleave</title>
<updated>2017-12-11T16:23:05Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-12-08T13:04:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65f5e357839e40817aead853d7a7f61ff828b52b'/>
<id>urn:sha1:65f5e357839e40817aead853d7a7f61ff828b52b</id>
<content type='text'>
abort_pd is added as a member of sctp_stream_interleave, used to abort
partial delivery for data or idata, called in sctp_cmd_assoc_failed.

Since stream interleave allows to do partial delivery for each stream
at the same time, sctp_intl_abort_pd for idata would be very different
from the old function sctp_ulpq_abort_pd for data.

Note that sctp_ulpevent_make_pdapi will support per stream in this
patch by adding pdapi_stream and pdapi_seq in sctp_pdapi_event, as
described in section 6.1.7 of RFC6458.

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 start_pd for sctp_stream_interleave</title>
<updated>2017-12-11T16:23:05Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-12-08T13:04:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be4e0ce10dc64b9a8aae42ec3dbd906022f91ec5'/>
<id>urn:sha1:be4e0ce10dc64b9a8aae42ec3dbd906022f91ec5</id>
<content type='text'>
start_pd is added as a member of sctp_stream_interleave, used to
do partial_delivery for data or idata when datalen &gt;= asoc-&gt;rwnd
in sctp_eat_data. The codes have been done in last patches, but
they need to be extracted into start_pd, so that it could be used
for SCTP_CMD_PART_DELIVER cmd as well.

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>
</feed>
