<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sctp/chunk.c, branch linux-4.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-09-30T06:07:05Z</updated>
<entry>
<title>sctp: change to check peer prsctp_capable when using prsctp polices</title>
<updated>2016-09-30T06:07:05Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-09-28T18:37:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be4947bf46cb0e7a7d089e03c61bab35f1e695ce'/>
<id>urn:sha1:be4947bf46cb0e7a7d089e03c61bab35f1e695ce</id>
<content type='text'>
Now before using prsctp polices, sctp uses asoc-&gt;prsctp_enable to
check if prsctp is enabled. However asoc-&gt;prsctp_enable is set only
means local host support prsctp, sctp should not abandon packet if
peer host doesn't enable prsctp.

So this patch is to use asoc-&gt;peer.prsctp_capable to check if prsctp
is enabled on both side, instead of asoc-&gt;prsctp_enable, as asoc's
peer.prsctp_capable is set only when local and peer both enable prsctp.

Fixes: a6c2f792873a ("sctp: implement prsctp TTL policy")
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 prsctp_param from sctp_chunk</title>
<updated>2016-09-30T06:07:05Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-09-28T18:37:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0605483f6ace1f6b63e397c819a115ddcd13af0d'/>
<id>urn:sha1:0605483f6ace1f6b63e397c819a115ddcd13af0d</id>
<content type='text'>
Now sctp uses chunk-&gt;prsctp_param to save the prsctp param for all the
prsctp polices, we didn't need to introduce prsctp_param to sctp_chunk.
We can just use chunk-&gt;sinfo.sinfo_timetolive for RTX and BUF polices,
and reuse msg-&gt;expires_at for TTL policy, as the prsctp polices and old
expires policy are mutual exclusive.

This patch is to remove prsctp_param from sctp_chunk, and reuse msg's
expires_at for TTL and chunk's sinfo.sinfo_timetolive for RTX and BUF
polices.

Note that sctp can't use chunk's sinfo.sinfo_timetolive for TTL policy,
as it needs a u64 variables to save the expires_at time.

This one also fixes the "netperf-Throughput_Mbps -37.2% regression"
issue.

Fixes: a6c2f792873a ("sctp: implement prsctp TTL policy")
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: implement prsctp PRIO policy</title>
<updated>2016-07-11T20:25:39Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-07-09T11:47:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8dbdf1f5b09cb22560e7c7173b52fe3c631046bd'/>
<id>urn:sha1:8dbdf1f5b09cb22560e7c7173b52fe3c631046bd</id>
<content type='text'>
prsctp PRIO policy is a policy to abandon lower priority chunks when
asoc doesn't have enough snd buffer, so that the current chunk with
higher priority can be queued successfully.

Similar to TTL/RTX policy, we will set the priority of the chunk to
prsctp_param with sinfo-&gt;sinfo_timetolive in sctp_set_prsctp_policy().
So if PRIO policy is enabled, msg-&gt;expire_at won't work.

asoc-&gt;sent_cnt_removable will record how many chunks can be checked to
remove. If priority policy is enabled, when the chunk is queued into
the out_queue, we will increase sent_cnt_removable. When the chunk is
moved to abandon_queue or dequeue and free, we will decrease
sent_cnt_removable.

In sctp_sendmsg, we will check if there is enough snd buffer for current
msg and if sent_cnt_removable is not 0. Then try to abandon chunks in
sctp_prune_prsctp when sendmsg from the retransmit/transmited queue, and
free chunks from out_queue in right order until the abandon+free size &gt;
msg_len - sctp_wfree. For the abandon size, we have to wait until it
sends FORWARD TSN, receives the sack and the chunks are really freed.

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: implement prsctp RTX policy</title>
<updated>2016-07-11T20:25:39Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-07-09T11:47:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01aadb3af6e1b10970c1f7e510b5097c8f725d64'/>
<id>urn:sha1:01aadb3af6e1b10970c1f7e510b5097c8f725d64</id>
<content type='text'>
prsctp RTX policy is a policy to abandon chunks when they are
retransmitted beyond the max count.

This patch uses sent_count to count how many times one chunk has
been sent, and prsctp_param is the max rtx count, which is from
sinfo-&gt;sinfo_timetolive in sctp_set_prsctp_policy(). So similar
to TTL policy, if RTX policy is enabled, msg-&gt;expire_at won't
work.

Then in sctp_chunk_abandoned, this patch checks if chunk-&gt;sent_count
is bigger than chunk-&gt;prsctp_param to abandon this chunk.

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: implement prsctp TTL policy</title>
<updated>2016-07-11T20:25:39Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-07-09T11:47:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6c2f792873aff332a4689717c3cd6104f46684c'/>
<id>urn:sha1:a6c2f792873aff332a4689717c3cd6104f46684c</id>
<content type='text'>
prsctp TTL policy is a policy to abandon chunks when they expire
at the specific time in local stack. It's similar with expires_at
in struct sctp_datamsg.

This patch uses sinfo-&gt;sinfo_timetolive to set the specific time for
TTL policy. sinfo-&gt;sinfo_timetolive is also used for msg-&gt;expires_at.
So if prsctp_enable or TTL policy is not enabled, msg-&gt;expires_at
still works as before.

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: snmp: kill various STATS_USER() helpers</title>
<updated>2016-04-28T02:48:22Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2016-04-27T23:44:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6aef70a851ac77967992340faaff33f44598f60a'/>
<id>urn:sha1:6aef70a851ac77967992340faaff33f44598f60a</id>
<content type='text'>
In the old days (before linux-3.0), SNMP counters were duplicated,
one for user context, and one for BH context.

After commit 8f0ea0fe3a03 ("snmp: reduce percpu needs by 50%")
we have a single copy, and what really matters is preemption being
enabled or disabled, since we use this_cpu_inc() or __this_cpu_inc()
respectively.

We therefore kill SNMP_INC_STATS_USER(), SNMP_ADD_STATS_USER(),
NET_INC_STATS_USER(), NET_ADD_STATS_USER(), SCTP_INC_STATS_USER(),
SNMP_INC_STATS64_USER(), SNMP_ADD_STATS64_USER(), TCP_ADD_STATS_USER(),
UDP_INC_STATS_USER(), UDP6_INC_STATS_USER(), and XFRM_INC_STATS_USER()

Following patches will rename __BH helpers to make clear their
usage is not tied to BH being disabled.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: allow sctp_transmit_packet and others to use gfp</title>
<updated>2016-03-14T02:29:07Z</updated>
<author>
<name>Marcelo Ricardo Leitner</name>
</author>
<published>2016-03-10T21:33:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cea8768f333e3f0bc231d8b815aa4a9e63fa990c'/>
<id>urn:sha1:cea8768f333e3f0bc231d8b815aa4a9e63fa990c</id>
<content type='text'>
Currently sctp_sendmsg() triggers some calls that will allocate memory
with GFP_ATOMIC even when not necessary. In the case of
sctp_packet_transmit it will allocate a linear skb that will be used to
construct the packet and this may cause sends to fail due to ENOMEM more
often than anticipated specially with big MTUs.

This patch thus allows it to inherit gfp flags from upper calls so that
it can use GFP_KERNEL if it was triggered by a sctp_sendmsg call or
similar. All others, like retransmits or flushes started from BH, are
still allocated using GFP_ATOMIC.

In netperf tests this didn't result in any performance drawbacks when
memory is not too fragmented and made it trigger ENOMEM way less often.

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 unused sctp_datamsg_free()</title>
<updated>2016-02-17T20:41:54Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-02-15T06:28:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1cd4d5c4326a7ed3bb0e346bd7d20f5057a80ae6'/>
<id>urn:sha1:1cd4d5c4326a7ed3bb0e346bd7d20f5057a80ae6</id>
<content type='text'>
Since commit 8b570dc9f7b6 ("sctp: only drop the reference on the datamsg
after sending a msg") used sctp_datamsg_put in sctp_sendmsg, instead of
sctp_datamsg_free, this function has no use in sctp.

So we will remove 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>switch sctp_user_addto_chunk() and sctp_datamsg_from_user() to passing iov_iter</title>
<updated>2014-11-24T10:16:40Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-11-15T06:11:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0eb093e794452791b0f932a0120f410f614ad82'/>
<id>urn:sha1:e0eb093e794452791b0f932a0120f410f614ad82</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>sctp: fix checkpatch errors with space required or prohibited</title>
<updated>2013-12-26T18:47:47Z</updated>
<author>
<name>wangweidong</name>
</author>
<published>2013-12-23T04:16:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cb3f837ba95d7774978e86fc17ddf970cf7d15a4'/>
<id>urn:sha1:cb3f837ba95d7774978e86fc17ddf970cf7d15a4</id>
<content type='text'>
fix checkpatch errors while the space is required or prohibited
to the "=,()++..."

Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Wang Weidong &lt;wangweidong1@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
