<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/net/rxrpc/ar-ack.c, branch dev</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2015-03-01T18:40:23+00:00</updated>
<entry>
<title>rxrpc: don't multiply with HZ twice</title>
<updated>2015-03-01T18:40:23+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2015-02-28T10:51:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=765dd3bb44711b4ba36c1e06f9c4b7bfe73ffef7'/>
<id>urn:sha1:765dd3bb44711b4ba36c1e06f9c4b7bfe73ffef7</id>
<content type='text'>
rxrpc_resend_timeout has an initial value of 4 * HZ; use it as-is.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rxrpc: terminate retrans loop when sending of skb fails</title>
<updated>2015-03-01T18:40:23+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2015-02-28T10:51:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c03ae533a9c4de83a35105f9bfd7152d916b4680'/>
<id>urn:sha1:c03ae533a9c4de83a35105f9bfd7152d916b4680</id>
<content type='text'>
Typo, 'stop' is never set to true.
Seems intent is to not attempt to retransmit more packets after sendmsg
returns an error.

This change is based on code inspection only.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>af_rxrpc: Expose more RxRPC parameters via sysctls</title>
<updated>2014-02-26T17:25:07+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2014-02-07T18:10:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=817913d8cd7627d9303bce97c3c339ceb0f8e199'/>
<id>urn:sha1:817913d8cd7627d9303bce97c3c339ceb0f8e199</id>
<content type='text'>
Expose RxRPC parameters via sysctls to control the Rx window size, the Rx MTU
maximum size and the number of packets that can be glued into a jumbo packet.

More info added to Documentation/networking/rxrpc.txt.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>af_rxrpc: Improve ACK production</title>
<updated>2014-02-26T17:25:07+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2014-02-07T18:58:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=9823f39a1719dce0da8a47cdd5c66ff8831f03f2'/>
<id>urn:sha1:9823f39a1719dce0da8a47cdd5c66ff8831f03f2</id>
<content type='text'>
Improve ACK production by the following means:

 (1) Don't send an ACK_REQUESTED ack immediately even if the RXRPC_MORE_PACKETS
     flag isn't set on a data packet that has also has RXRPC_REQUEST_ACK set.

     MORE_PACKETS just means that the sender just emptied its Tx data buffer.
     More data will be forthcoming unless RXRPC_LAST_PACKET is also flagged.

     It is possible to see runs of DATA packets with MORE_PACKETS unset that
     aren't waiting for an ACK.

     It is therefore better to wait a small instant to see if we can combine an
     ACK for several packets.

 (2) Don't send an ACK_IDLE ack immediately unless we're responding to the
     terminal data packet of a call.

     Whilst sending an ACK_IDLE mid-call serves to let the other side know
     that we won't be asking it to resend certain Tx buffers and that it can
     discard them, spamming it with loads of acks just because we've
     temporarily run out of data just distracts it.

 (3) Put the ACK_IDLE ack generation timeout up to half a second rather than a
     single jiffy.  Just because we haven't been given more data immediately
     doesn't mean that more isn't forthcoming.  The other side may be busily
     finding the data to send to us.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>af_rxrpc: Add sysctls for configuring RxRPC parameters</title>
<updated>2014-02-26T17:25:06+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2014-02-07T18:58:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=5873c0834f8896aa9da338b941035a2f8b29e99b'/>
<id>urn:sha1:5873c0834f8896aa9da338b941035a2f8b29e99b</id>
<content type='text'>
Add sysctls for configuring RxRPC protocol handling, specifically controls on
delays before ack generation, the delay before resending a packet, the maximum
lifetime of a call and the expiration times of calls, connections and
transports that haven't been recently used.

More info added in Documentation/networking/rxrpc.txt.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>rxrpc: out of bound read in debug code</title>
<updated>2014-01-22T01:02:52+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-01-20T10:28:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=08d4d217dff89707471b26348d97258016fcb8ed'/>
<id>urn:sha1:08d4d217dff89707471b26348d97258016fcb8ed</id>
<content type='text'>
Smatch complains because we are using an untrusted index into the
rxrpc_acks[] array.  It's just a read and it's only in the debug code,
but it's simple enough to add a check and fix it.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: cleanup unsigned to unsigned int</title>
<updated>2012-04-15T16:44:40+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-04-15T05:58:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=95c961747284a6b83a5e2d81240e214b0fa3464d'/>
<id>urn:sha1:95c961747284a6b83a5e2d81240e214b0fa3464d</id>
<content type='text'>
Use of "unsigned int" is preferred to bare "unsigned" in net tree.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fix assignment of 0/1 to bool variables.</title>
<updated>2011-12-20T03:27:29+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2011-12-19T13:56:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=3db1cd5c05f35fb43eb134df6f321de4e63141f2'/>
<id>urn:sha1:3db1cd5c05f35fb43eb134df6f321de4e63141f2</id>
<content type='text'>
DaveM said:
   Please, this kind of stuff rots forever and not using bool properly
   drives me crazy.

Joe Perches &lt;joe@perches.com&gt; gave me the spatch script:

	@@
	bool b;
	@@
	-b = 0
	+b = false
	@@
	bool b;
	@@
	-b = 1
	+b = true

I merely installed coccinelle, read the documentation and took credit.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window()</title>
<updated>2011-05-19T22:34:37+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-05-19T22:34:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=504f284a713c46c6ecf975fbd20af00f4e205f5b'/>
<id>urn:sha1:504f284a713c46c6ecf975fbd20af00f4e205f5b</id>
<content type='text'>
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>RxRPC: Fix a potential deadlock between the call resend_timer and state_lock</title>
<updated>2010-08-05T04:53:16+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2010-08-04T02:34:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=3b5bac2bdea1de832bdd8e2c904ab7c9479ff9ed'/>
<id>urn:sha1:3b5bac2bdea1de832bdd8e2c904ab7c9479ff9ed</id>
<content type='text'>
RxRPC can potentially deadlock as rxrpc_resend_time_expired() wants to get
call-&gt;state_lock so that it can alter the state of an RxRPC call.  However, its
caller (call_timer_fn()) has an apparent lock on the timer struct.

The problem is that rxrpc_resend_time_expired() isn't permitted to lock
call-&gt;state_lock as this could cause a deadlock against rxrpc_send_abort() as
that takes state_lock and then attempts to delete the resend timer by calling
del_timer_sync().

The deadlock can occur because del_timer_sync() will sit there forever waiting
for rxrpc_resend_time_expired() to return, but the latter may then wait for
call-&gt;state_lock, which rxrpc_send_abort() holds around del_timer_sync()...

This leads to a warning appearing in the kernel log that looks something like
the attached.

It should be sufficient to simply dispense with the locks.  It doesn't matter
if we set the resend timer expired event bit and queue the event processor
whilst we're changing state to one where the resend timer is irrelevant as the
event can just be ignored by the processor thereafter.

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.35-rc3-cachefs+ #115
-------------------------------------------------------
swapper/0 is trying to acquire lock:
 (&amp;call-&gt;state_lock){++--..}, at: [&lt;ffffffffa00200d4&gt;] rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]

but task is already holding lock:
 (&amp;call-&gt;resend_timer){+.-...}, at: [&lt;ffffffff8103b675&gt;] run_timer_softirq+0x182/0x2a5

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (&amp;call-&gt;resend_timer){+.-...}:
       [&lt;ffffffff810560bc&gt;] __lock_acquire+0x889/0x8fa
       [&lt;ffffffff81056184&gt;] lock_acquire+0x57/0x6d
       [&lt;ffffffff8103bb9c&gt;] del_timer_sync+0x3c/0x86
       [&lt;ffffffffa002bb7a&gt;] rxrpc_send_abort+0x50/0x97 [af_rxrpc]
       [&lt;ffffffffa002bdd9&gt;] rxrpc_kernel_abort_call+0xa1/0xdd [af_rxrpc]
       [&lt;ffffffffa0061588&gt;] afs_deliver_to_call+0x129/0x368 [kafs]
       [&lt;ffffffffa006181b&gt;] afs_process_async_call+0x54/0xff [kafs]
       [&lt;ffffffff8104261d&gt;] worker_thread+0x1ef/0x2e2
       [&lt;ffffffff81045f47&gt;] kthread+0x7a/0x82
       [&lt;ffffffff81002cd4&gt;] kernel_thread_helper+0x4/0x10

-&gt; #0 (&amp;call-&gt;state_lock){++--..}:
       [&lt;ffffffff81055237&gt;] validate_chain+0x727/0xd23
       [&lt;ffffffff810560bc&gt;] __lock_acquire+0x889/0x8fa
       [&lt;ffffffff81056184&gt;] lock_acquire+0x57/0x6d
       [&lt;ffffffff813e6b69&gt;] _raw_read_lock_bh+0x34/0x43
       [&lt;ffffffffa00200d4&gt;] rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
       [&lt;ffffffff8103b6e6&gt;] run_timer_softirq+0x1f3/0x2a5
       [&lt;ffffffff81036828&gt;] __do_softirq+0xa2/0x13e
       [&lt;ffffffff81002dcc&gt;] call_softirq+0x1c/0x28
       [&lt;ffffffff810049f0&gt;] do_softirq+0x38/0x80
       [&lt;ffffffff810361a2&gt;] irq_exit+0x45/0x47
       [&lt;ffffffff81018fb3&gt;] smp_apic_timer_interrupt+0x88/0x96
       [&lt;ffffffff81002893&gt;] apic_timer_interrupt+0x13/0x20
       [&lt;ffffffff810011ac&gt;] cpu_idle+0x4d/0x83
       [&lt;ffffffff813e06f3&gt;] start_secondary+0x1bd/0x1c1

other info that might help us debug this:

1 lock held by swapper/0:
 #0:  (&amp;call-&gt;resend_timer){+.-...}, at: [&lt;ffffffff8103b675&gt;] run_timer_softirq+0x182/0x2a5

stack backtrace:
Pid: 0, comm: swapper Not tainted 2.6.35-rc3-cachefs+ #115
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff81054414&gt;] print_circular_bug+0xae/0xbd
 [&lt;ffffffff81055237&gt;] validate_chain+0x727/0xd23
 [&lt;ffffffff810560bc&gt;] __lock_acquire+0x889/0x8fa
 [&lt;ffffffff810539a7&gt;] ? mark_lock+0x42f/0x51f
 [&lt;ffffffff81056184&gt;] lock_acquire+0x57/0x6d
 [&lt;ffffffffa00200d4&gt;] ? rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
 [&lt;ffffffff813e6b69&gt;] _raw_read_lock_bh+0x34/0x43
 [&lt;ffffffffa00200d4&gt;] ? rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
 [&lt;ffffffffa00200d4&gt;] rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
 [&lt;ffffffff8103b6e6&gt;] run_timer_softirq+0x1f3/0x2a5
 [&lt;ffffffff8103b675&gt;] ? run_timer_softirq+0x182/0x2a5
 [&lt;ffffffffa002007e&gt;] ? rxrpc_resend_time_expired+0x0/0x96 [af_rxrpc]
 [&lt;ffffffff810367ef&gt;] ? __do_softirq+0x69/0x13e
 [&lt;ffffffff81036828&gt;] __do_softirq+0xa2/0x13e
 [&lt;ffffffff81002dcc&gt;] call_softirq+0x1c/0x28
 [&lt;ffffffff810049f0&gt;] do_softirq+0x38/0x80
 [&lt;ffffffff810361a2&gt;] irq_exit+0x45/0x47
 [&lt;ffffffff81018fb3&gt;] smp_apic_timer_interrupt+0x88/0x96
 [&lt;ffffffff81002893&gt;] apic_timer_interrupt+0x13/0x20
 &lt;EOI&gt;  [&lt;ffffffff81049de1&gt;] ? __atomic_notifier_call_chain+0x0/0x86
 [&lt;ffffffff8100955b&gt;] ? mwait_idle+0x6e/0x78
 [&lt;ffffffff81009552&gt;] ? mwait_idle+0x65/0x78
 [&lt;ffffffff810011ac&gt;] cpu_idle+0x4d/0x83
 [&lt;ffffffff813e06f3&gt;] start_secondary+0x1bd/0x1c1

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
