<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sctp/output.c, branch linux-4.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-11-02T19:03:13Z</updated>
<entry>
<title>sctp: clean up sctp_packet_transmit</title>
<updated>2016-11-02T19:03:13Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-10-31T16:49:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4ff952a7e11e51789949ed738c3c9455e5fd6c0'/>
<id>urn:sha1:e4ff952a7e11e51789949ed738c3c9455e5fd6c0</id>
<content type='text'>
After adding sctp gso, sctp_packet_transmit is a quite big function now.

This patch is to extract the codes for packing packet to sctp_packet_pack
from sctp_packet_transmit, and add some comments, simplify the err path by
freeing auth chunk when freeing packet chunk_list in out path and freeing
head skb early if it fails to pack packet.

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>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-10-30T16:42:58Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2016-10-30T16:42:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27058af401e49d88a905df000dd26f443fcfa8ce'/>
<id>urn:sha1:27058af401e49d88a905df000dd26f443fcfa8ce</id>
<content type='text'>
Mostly simple overlapping changes.

For example, David Ahern's adjacency list revamp in 'net-next'
conflicted with an adjacency list traversal bug fix in 'net'.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: fix the panic caused by route update</title>
<updated>2016-10-26T21:32:19Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-10-23T17:01:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ecc515d7238f2cffac839069d56dc271141defa0'/>
<id>urn:sha1:ecc515d7238f2cffac839069d56dc271141defa0</id>
<content type='text'>
Commit 7303a1475008 ("sctp: identify chunks that need to be fragmented
at IP level") made the chunk be fragmented at IP level in the next round
if it's size exceed PMTU.

But there still is another case, PMTU can be updated if transport's dst
expires and transport's pmtu_pending is set in sctp_packet_transmit. If
the new PMTU is less than the chunk, the same issue with that commit can
be triggered.

So we should drop this packet and let it retransmit in another round
where it would be fragmented at IP level.

This patch is to fix it by checking the chunk size after PMTU may be
updated and dropping this packet if it's size exceed PMTU.

Fixes: 90017accff61 ("sctp: Add GSO support")
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@txudriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: remove the old ttl expires policy</title>
<updated>2016-10-13T13:44:14Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-10-08T03:40:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8ae808eb853e3789b81b8a502cdf22bb01b76880'/>
<id>urn:sha1:8ae808eb853e3789b81b8a502cdf22bb01b76880</id>
<content type='text'>
The prsctp polices include ttl expires policy already, we should remove
the old ttl expires codes, and just adjust the new polices' codes to be
compatible with the old one for users.

This patch is to remove all the old expires codes, and if prsctp polices
are not set, it will still set msg's expires_at and check the expires in
sctp_check_abandoned.

Note that asoc-&gt;prsctp_enable is set by default, so users can't feel any
difference even if they use the old expires api in userspace.

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: reuse sent_count to avoid retransmitted chunks for RTT measurements</title>
<updated>2016-10-13T13:44:13Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-10-08T03:36:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc6ac9bccf6b9814d37932e86a92f8e6a92960dc'/>
<id>urn:sha1:cc6ac9bccf6b9814d37932e86a92f8e6a92960dc</id>
<content type='text'>
Now sctp uses chunk-&gt;resent to record if a chunk is retransmitted, for
RTT measurements with retransmitted DATA chunks. chunk-&gt;sent_count was
introduced to record how many times one chunk has been sent for prsctp
RTX policy before. We actually can know if one chunk is retransmitted
by checking chunk-&gt;sent_count is greater than 1.

This patch is to remove resent from sctp_chunk and reuse sent_count
to avoid retransmitted chunks for RTT measurements.

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: rename WORD_TRUNC/ROUND macros</title>
<updated>2016-09-22T07:13:26Z</updated>
<author>
<name>Marcelo Ricardo Leitner</name>
</author>
<published>2016-09-21T11:45:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2f036a97271cf5811ee754bf321a29a814577f9'/>
<id>urn:sha1:e2f036a97271cf5811ee754bf321a29a814577f9</id>
<content type='text'>
To something more meaningful these days, specially because this is
working on packet headers or lengths and which are not tied to any CPU
arch but to the protocol itself.

So, WORD_TRUNC becomes SCTP_TRUNC4 and WORD_ROUND becomes SCTP_PAD4.

Reported-by: David Laight &lt;David.Laight@ACULAB.COM&gt;
Reported-by: David Miller &lt;davem@davemloft.net&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: not return ENOMEM err back in sctp_packet_transmit</title>
<updated>2016-09-19T02:02:33Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-09-13T18:04:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41001faf95faaff7c4f4f93c6bb544ee227ad0cc'/>
<id>urn:sha1:41001faf95faaff7c4f4f93c6bb544ee227ad0cc</id>
<content type='text'>
As David and Marcelo's suggestion, ENOMEM err shouldn't return back to
user in transmit path. Instead, sctp's retransmit would take care of
the chunks that fail to send because of ENOMEM.

This patch is only to do some release job when alloc_skb fails, not to
return ENOMEM back any more.

Besides, it also cleans up sctp_packet_transmit's err path, and fixes
some issues in err path:

 - It didn't free the head skb in nomem: path.
 - No need to check nskb in no_route: path.
 - It should goto err: path if alloc_skb fails for head.
 - Not all the NOMEMs should free nskb.

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: save transmit error to sk_err in sctp_outq_flush</title>
<updated>2016-09-19T02:02:32Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-09-13T18:04:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=645194409b0634a43890ec27c491c368b3bffc07'/>
<id>urn:sha1:645194409b0634a43890ec27c491c368b3bffc07</id>
<content type='text'>
Every time when sctp calls sctp_outq_flush, it sends out the chunks of
control queue, retransmit queue and data queue. Even if some trunks are
failed to transmit, it still has to flush all the transports, as it's
the only chance to clean that transmit_list.

So the latest transmit error here should be returned back. This transmit
error is an internal error of sctp stack.

I checked all the places where it uses the transmit error (the return
value of sctp_outq_flush), most of them are actually just save it to
sk_err.

Except for sctp_assoc/endpoint_bh_rcv, they will drop the chunk if
it's failed to send a REPLY, which is actually incorrect, as we can't
be sure the error that sctp_outq_flush returns is from sending that
REPLY.

So it's meaningless for sctp_outq_flush to return error back.

This patch is to save transmit error to sk_err in sctp_outq_flush, the
new error can update the old value. Eventually, sctp_wait_for_* would
check for it.

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: identify chunks that need to be fragmented at IP level</title>
<updated>2016-09-10T02:18:33Z</updated>
<author>
<name>Marcelo Ricardo Leitner</name>
</author>
<published>2016-09-08T09:54:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7303a1475008bee5c3e82a06a282568415690d72'/>
<id>urn:sha1:7303a1475008bee5c3e82a06a282568415690d72</id>
<content type='text'>
Previously, without GSO, it was easy to identify it: if the chunk didn't
fit and there was no data chunk in the packet yet, we could fragment at
IP level. So if there was an auth chunk and we were bundling a big data
chunk, it would fragment regardless of the size of the auth chunk. This
also works for the context of PMTU reductions.

But with GSO, we cannot distinguish such PMTU events anymore, as the
packet is allowed to exceed PMTU.

So we need another check: to ensure that the chunk that we are adding,
actually fits the current PMTU. If it doesn't, trigger a flush and let
it be fragmented at IP level in the next round.

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: fix the issue sctp requeue auth chunk incorrectly</title>
<updated>2016-07-31T05:06:22Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-07-30T05:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1aa25ec227a4be21515594f485b0f4985109f0d8'/>
<id>urn:sha1:1aa25ec227a4be21515594f485b0f4985109f0d8</id>
<content type='text'>
sctp needs to queue auth chunk back when we know that we are going
to generate another segment. But commit f1533cce60d1 ("sctp: fix
panic when sending auth chunks") requeues the last chunk processed
which is probably not the auth chunk.

It causes panic when calculating the MAC in sctp_auth_calculate_hmac(),
as the incorrect offset of the auth chunk in skb-&gt;data.

This fix is to requeue it by using packet-&gt;auth.

Fixes: f1533cce60d1 ("sctp: fix panic when sending auth chunks")
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>
