[PATCH net-next 9/9] rxrpc: Reduce the number of ACK-Requests sent

2016-09-21 Thread David Howells
be made tunable in future. Note that from this point, the RXRPC_REQUEST_ACK flag is set on DATA packets as we transmit them and not stored statically in the sk_buff. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |1 + net/rxrpc/output.c

[PATCH net-next 0/9] rxrpc: Preparation for slow-start algorithm

2016-09-21 Thread David Howells
/dhowells/linux-fs.git rxrpc-rewrite-20160922 David --- David Howells (9): rxrpc: Don't store the rxrpc header in the Tx queue sk_buffs rxrpc: Add re-sent Tx annotation rxrpc: Add per-peer RTT tracker rxrpc: Send pings to get RTT data rxrpc: Expedite ping

[PATCH net-next 4/9] rxrpc: Send pings to get RTT data

2016-09-21 Thread David Howells
that RTT determination can be observed. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |7 +-- net/rxrpc/input.c | 48 ++- net/rxrpc/misc.c| 11 ++- net/rxrpc/output.c

[PATCH net-next 2/9] rxrpc: Add re-sent Tx annotation

2016-09-21 Thread David Howells
Add a Tx-phase annotation for packet buffers to indicate that a buffer has already been retransmitted. This will be used by future congestion management. Re-retransmissions of a packet don't affect the congestion window managment in the same way as initial retransmissions. Signed-off-by: David

[PATCH net-next 3/9] rxrpc: Add per-peer RTT tracker

2016-09-21 Thread David Howells
transmissions to elicit a response for RTT purposes and one to log responses that contribute RTT data. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h | 61 ++ net/rxrpc/ar-internal.h | 25 ++--- net/rxrpc/

[PATCH net-next 00/11] rxrpc: Tracepoint addition and improvement

2016-09-17 Thread David Howells
/dhowells/linux-fs.git rxrpc-rewrite-20160917-2 David --- David Howells (11): rxrpc: Print the packet type name in the Rx packet trace rxrpc: Add some additional call tracing rxrpc: Add connection tracepoint and client conn state tracepoint rxrpc: Add a tracepoint

[PATCH net-next 02/11] rxrpc: Add some additional call tracing

2016-09-17 Thread David Howells
Add additional call tracepoint points for noting call-connected, call-released and connection-failed events. Also fix one tracepoint that was using an integer instead of the corresponding enum value as the point type. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rx

[PATCH net-next 04/11] rxrpc: Add a tracepoint to follow the life of a packet in the Tx buffer

2016-09-17 Thread David Howells
Add a tracepoint to follow the insertion of a packet into the transmit buffer, its transmission and its rotation out of the buffer. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h | 26 ++ net/rxrpc/ar-internal.h

[PATCH net-next 11/11] rxrpc: Add config to inject packet loss

2016-09-17 Thread David Howells
Add a configuration option to inject packet loss by discarding approximately every 8th packet received and approximately every 8th DATA packet transmitted. Note that no locking is used, but it shouldn't really matter. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/K

[PATCH net-next 05/11] rxrpc: Add a tracepoint to log received ACK packets

2016-09-17 Thread David Howells
Add a tracepoint to log information from received ACK packets. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h | 26 ++ net/rxrpc/input.c|2 ++ 2 files changed, 28 insertions(+) diff --git a/include/trace/

[PATCH net-next 08/11] rxrpc: Add a tracepoint to follow what recvmsg does

2016-09-17 Thread David Howells
Add a tracepoint to follow what recvmsg does within AF_RXRPC. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h | 34 ++ net/rxrpc/ar-internal.h | 17 + net/rxrpc/misc.c

[PATCH net-next 10/11] rxrpc: Improve skb tracing

2016-09-17 Thread David Howells
) A pair of 'lost' events are added, along with rxrpc_lose_skb() for packet loss injection recording. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h | 12 +++--- net/rxrpc/af_rxrpc.c |5 ++-- net/rxrpc/ar-internal.h

[PATCH net-next 09/11] rxrpc: Remove printks from rxrpc_recvmsg_data() to fix uninit var

2016-09-17 Thread David Howells
Remove _enter/_debug/_leave calls from rxrpc_recvmsg_data() of which one uses an uninitialised variable. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/recvmsg.c |8 1 file changed, 8 deletions(-) diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c

[PATCH net-next 06/11] rxrpc: Add a tracepoint to log ACK transmission

2016-09-17 Thread David Howells
Add a tracepoint to log information about ACK transmission. Signed-off-by: David Howels --- include/trace/events/rxrpc.h | 30 ++ net/rxrpc/conn_event.c |3 +++ net/rxrpc/output.c |7 ++- 3 files changed, 39

[PATCH net-next 03/11] rxrpc: Add connection tracepoint and client conn state tracepoint

2016-09-17 Thread David Howells
Add a pair of tracepoints, one to track rxrpc_connection struct ref counting and the other to track the client connection cache state. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h | 60 +++ net/rxrpc/ar-internal.h

[PATCH net-next 10/14] rxrpc: Fix the parsing of soft-ACKs

2016-09-17 Thread David Howells
. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/input.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index f0d9115b9b7e..c1f83d22f9b7 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c @@ -384,7 +384,7 @@

[PATCH net-next 07/11] rxrpc: Add a tracepoint to follow packets in the Rx buffer

2016-09-17 Thread David Howells
Add a tracepoint to follow the life of packets that get added to a call's receive buffer. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h | 33 + net/rxrpc/ar-internal.h | 12 net/rxrpc/call_ac

[PATCH net-next 05/14] rxrpc: Record calls that need to be accepted

2016-09-17 Thread David Howells
Record calls that need to be accepted using sk_acceptq_added() otherwise the backlog counter goes negative because sk_acceptq_removed() is called. This causes the preallocator to malfunction. Calls that are preaccepted by AFS within the kernel aren't affected by this. Signed-off-by: David

[PATCH net-next 02/14] rxrpc: Move the check of rx_pkt_offset from rxrpc_locate_data() to caller

2016-09-17 Thread David Howells
Move the check of rx_pkt_offset from rxrpc_locate_data() to the caller, rxrpc_recvmsg_data(), so that it's more clear what's going on there. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/recvmsg.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff

[PATCH net-next 01/11] rxrpc: Print the packet type name in the Rx packet trace

2016-09-17 Thread David Howells
Print a symbolic packet type name for each valid received packet in the trace output, not just a number. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h |5 +++-- net/rxrpc/ar-internal.h |6 +++--- 2 files changed, 6 insertions(+), 5 del

[PATCH net-next 11/14] rxrpc: Fix retransmission algorithm

2016-09-17 Thread David Howells
as the continue-statements skip them. Without this, if there are any positive acks within the loop, the do-loop will cycle forever because the counter increment is never done. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_event.c | 12 1 file chan

[PATCH net-next 08/14] rxrpc: Call rxrpc_release_call() on error in rxrpc_new_client_call()

2016-09-17 Thread David Howells
are conditional. Without this, we miss some of the cleanup. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_object.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_ob

[PATCH net-next 06/14] rxrpc: Purge the to_be_accepted queue on socket release

2016-09-17 Thread David Howells
Purge the queue of to_be_accepted calls on socket release. Note that purging sock_calls doesn't release the ref owned by to_be_accepted. Probably the sock_calls list is redundant given a purges of the recvmsg_q, the to_be_accepted queue and the calls tree. Signed-off-by: David Howells <dh

[PATCH net-next 04/14] rxrpc: Fix handling of the last packet in rxrpc_recvmsg_data()

2016-09-17 Thread David Howells
phase has been ended. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/input.c |4 +++- net/rxrpc/recvmsg.c | 49 + 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c

[PATCH net-next 12/14] rxrpc: Don't transmit an ACK if there's no reason set

2016-09-17 Thread David Howells
Don't transmit an ACK if call->ackr_reason in unset. There's the possibility of a race between recvmsg() sending an ACK and the background processing thread trying to send the same one. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/output.c |5 + 1 file c

[PATCH net-next 14/14] rxrpc: Fix the basic transmit DATA packet content size at 1412 bytes

2016-09-17 Thread David Howells
kernel_sendmsg() is invoked. That way, jumbo packets can be assembled on the spur of the moment for (re-)transmission. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/sendmsg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/sendmsg.c b/net

[PATCH net-next 09/14] rxrpc: Fix unexposed client conn release

2016-09-17 Thread David Howells
onn to be moved into the inactive state and deleted if it isn't resurrected before the final put is called. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/conn_client.c |1 - 1 file changed, 1 deletion(-) diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_clien

[PATCH net-next 13/14] rxrpc: Be consistent about switch value in rxrpc_send_call_packet()

2016-09-17 Thread David Howells
rxrpc_send_call_packet() should use type in both its switch-statements rather than using pkt->whdr.type. This might give the compiler an easier job of uninitialised variable checking. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/output.c |2 +- 1 file c

[PATCH net-next 07/14] rxrpc: Fix the putting of client connections

2016-09-17 Thread David Howells
, but discarded, due to a race with another process that set up a parallel connection, which was then shared instead. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/conn_client.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/net

[PATCH net-next 00/14] rxrpc: Fixes & miscellany

2016-09-17 Thread David Howells
-20160917-1 David --- David Howells (14): rxrpc: Remove some whitespace. rxrpc: Move the check of rx_pkt_offset from rxrpc_locate_data() to caller rxrpc: Check the return value of rxrpc_locate_data() rxrpc: Fix handling of the last packet in rxrpc_recvmsg_data() rxrpc

[PATCH net-next 01/14] rxrpc: Remove some whitespace.

2016-09-17 Thread David Howells
Remove a tab that's on a line that should otherwise be blank. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_event.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index 61432049869b..9367c3

[PATCH net-next 03/14] rxrpc: Check the return value of rxrpc_locate_data()

2016-09-17 Thread David Howells
Check the return value of rxrpc_locate_data() in rxrpc_recvmsg_data(). Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/recvmsg.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c index 0d085f5cf1bf..1edf2c

[PATCH net-next] rxrpc: Make IPv6 support conditional on CONFIG_IPV6

2016-09-17 Thread David Howells
erence to >> `ip6_route_output_flags' Reported-by: kbuild test robot <fengguang...@intel.com> Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/Kconfig|7 +++ net/rxrpc/af_rxrpc.c |7 ++- net/rxrpc/conn_object.c |2 ++ net/rxrpc/local_object.c |

[PATCH net-next 0/4] rxrpc: Support IPv6 [ver #2]

2016-09-14 Thread David Howells
/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160913-2 David --- David Howells (4): rxrpc: Create an address for sendmsg() to bind unbound socket with rxrpc: Don't specify protocol to when creating transport socket rxrpc: Use rxrpc_extract_addr_from_skb() rather

[PATCH net-next 2/4] rxrpc: Don't specify protocol to when creating transport socket [ver #2]

2016-09-14 Thread David Howells
Pass 0 as the protocol argument when creating the transport socket rather than IPPROTO_UDP. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/local_object.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/local_object.c b/net

[PATCH net-next 1/4] rxrpc: Create an address for sendmsg() to bind unbound socket with [ver #2]

2016-09-14 Thread David Howells
and SOCK_DGRAM as the default. For anything else, bind() must be used. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/af_rxrpc.c | 12 1 file changed, 12 insertions(+) diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 25d00ded24bc..741b0d

[PATCH net-next 3/4] rxrpc: Use rxrpc_extract_addr_from_skb() rather than doing this manually [ver #2]

2016-09-14 Thread David Howells
There are two places that want to transmit a packet in response to one just received and manually pick the address to reply to out of the sk_buff. Make them use rxrpc_extract_addr_from_skb() instead so that IPv6 is handled automatically. Signed-off-by: David Howells <dhowe...@redhat.

[PATCH net-next 4/4] rxrpc: Add IPv6 support [ver #2]

2016-09-14 Thread David Howells
to some of the RPC calls. Note that a good portion of this patch is replacing "%pI4:%u" in print statements with "%pISpc" which is able to handle both protocols and print the port. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/Kconfig|7

Re: [PATCH net-next 0/4] rxrpc: Support IPv6

2016-09-14 Thread David Howells
David Howells <dhowe...@redhat.com> wrote: > Here is a set of patches that add IPv6 support. They need to be applied on > top of the just-posted miscellaneous fix patches. They are: This subset needs to be made to depend on CONFIG_IPV6. David

[PATCH net-next 1/4] rxrpc: Create an address for sendmsg() to bind unbound socket with

2016-09-13 Thread David Howells
and SOCK_DGRAM as the default. For anything else, bind() must be used. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/af_rxrpc.c | 12 1 file changed, 12 insertions(+) diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 25d00ded24bc..741b0d

[PATCH net-next 3/4] rxrpc: Use rxrpc_extract_addr_from_skb() rather than doing this manually

2016-09-13 Thread David Howells
There are two places that want to transmit a packet in response to one just received and manually pick the address to reply to out of the sk_buff. Make them use rxrpc_extract_addr_from_skb() instead so that IPv6 is handled automatically. Signed-off-by: David Howells <dhowe...@redhat.

[PATCH net-next 2/4] rxrpc: Don't specify protocol to when creating transport socket

2016-09-13 Thread David Howells
Pass 0 as the protocol argument when creating the transport socket rather than IPPROTO_UDP. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/local_object.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/local_object.c b/net

[PATCH net-next 4/4] rxrpc: Add IPv6 support

2016-09-13 Thread David Howells
to some of the RPC calls. Note that a good portion of this patch is replacing "%pI4:%u" in print statements with "%pISpc" which is able to handle both protocols and print the port. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/af_rxrpc.c

[PATCH net-next 0/4] rxrpc: Support IPv6

2016-09-13 Thread David Howells
://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160913-2 David --- David Howells (4): rxrpc: Create an address for sendmsg() to bind unbound socket with rxrpc: Don't specify protocol to when creating transport socket rxrpc: Use

[PATCH net-next 07/10] rxrpc: Allow tx_winsize to grow in response to an ACK

2016-09-13 Thread David Howells
Allow tx_winsize to grow when the ACK info packet shows a larger receive window at the other end rather than only permitting it to shrink. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/input.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH net-next 09/10] rxrpc: Fix prealloc refcounting

2016-09-13 Thread David Howells
as that entails doing cleanup in softirq context, but it's unlikely as there are several refs held elsewhere, at least one of which must be put by someone in process context calling rxrpc_release_call(). However, it's not a problem if we do have to do that. Signed-off-by: David Howells <dh

[PATCH net-next 01/10] rxrpc: Make sure we initialise the peer hash key

2016-09-13 Thread David Howells
Peer records created for incoming connections weren't getting their hash key set. This meant that incoming calls wouldn't see more than one DATA packet - which is not a problem for AFS CM calls with small request data blobs. Signed-off-by: David Howells <dhowe...@redhat.com> --- net

[PATCH net-next 03/10] rxrpc: The IDLE ACK packet should use rxrpc_idle_ack_delay

2016-09-13 Thread David Howells
The IDLE ACK packet should use the rxrpc_idle_ack_delay setting when the timer is set for it. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_event.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_e

[PATCH net-next 10/10] rxrpc: Correctly initialise, limit and transmit call->rx_winsize

2016-09-13 Thread David Howells
ket that lie beyond the receive window when the first packet of the jumbo is within the window. Just discard the excess subpackets instead. This allows the receive window to be opened up right to the buffer size less one for the dead slot. Signed-off-by: David Howells <dhowe...@redhat.com> ---

[PATCH net-next 06/10] rxrpc: Use skb->len not skb->data_len

2016-09-13 Thread David Howells
et (we think it's not there and just ignore it). Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/input.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index a707d5952164..5958ef8ba2a0 100644 --- a/net/r

[PATCH net-next 05/10] rxrpc: Add missing unlock in rxrpc_call_accept()

2016-09-13 Thread David Howells
Add a missing unlock in rxrpc_call_accept() in the path taken if there's no call to wake up. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_accept.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/rxrpc/call_accept.c b/net

[PATCH net-next 04/10] rxrpc: Requeue call for recvmsg if more data

2016-09-13 Thread David Howells
userspace might end up sleeping forever otherwise, despite there being data available. This is not a problem provided the userspace buffer is big enough or it empties the buffer completely before more data comes in. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/recvmsg.c

[PATCH net-next 08/10] rxrpc: Adjust the call ref tracepoint to show kernel API refs

2016-09-13 Thread David Howells
separately at the moment. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/af_rxrpc.c|2 +- net/rxrpc/ar-internal.h |2 ++ net/rxrpc/call_accept.c |3 ++- net/rxrpc/call_object.c |2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/net

[PATCH net-next 02/10] rxrpc: Add missing wakeup on Tx window rotation

2016-09-13 Thread David Howells
that it doesn't get full. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/input.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index afeba98004b1..a707d5952164 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c @@ -59,6

[PATCH net-next 00/10] rxrpc: Miscellaneous fixes

2016-09-13 Thread David Howells
/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160913-1 David --- David Howells (10): rxrpc: Make sure we initialise the peer hash key rxrpc: Add missing wakeup on Tx window rotation rxrpc: The IDLE ACK packet should use rxrpc_idle_ack_delay rxrpc

[PATCH net-next 6/7] rxrpc: Preallocate peers, conns and calls for incoming service requests

2016-09-08 Thread David Howells
and the awkward manual accept stage to be bypassed. Signed-off-by: David Howells <dhowe...@redhat.com> --- fs/afs/rxrpc.c | 71 ++ include/net/af_rxrpc.h | 10 ++ net/rxrpc/af_rxrpc.c | 16 ++- net/rxrpc/ar-internal.h | 32 ++ net/rxrpc/call_accept.c

[PATCH net-next 4/7] rxrpc: Remove skb_count from struct rxrpc_call

2016-09-08 Thread David Howells
Remove the sk_buff count from the rxrpc_call struct as it's less useful once we stop queueing sk_buffs. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h | 10 +++--- net/rxrpc/ar-internal.h |1 - net/rxrpc/call_object.c

[PATCH net-next 2/7] rxrpc: Update protocol definitions slightly

2016-09-08 Thread David Howells
RXRPC_JUMBO_SUBPKTLEN which is the total of the amount of data in a non-terminal subpacket plus the following secondary header for the next packet included in the jumbo packet. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/rxrpc/packet.h |8 +--- 1 file chan

[PATCH net-next 0/7] rxrpc: Rewrite data and ack handling

2016-09-08 Thread David Howells
/log/?h=rxrpc-rewrite Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160908 David --- David Howells (7): rxrpc: Fix ASSERTCMP and ASSERTIFCMP to handle signed values rxrpc: Update protocol definitions slightly

[PATCH net-next 5/7] rxrpc: Add tracepoints to record received packets and end of data_ready

2016-09-08 Thread David Howells
Add two tracepoints: (1) Record the RxRPC protocol header of packets retrieved from the UDP socket by the data_ready handler. (2) Record the outcome of the data_ready handler. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h

[PATCH net-next 1/7] rxrpc: Fix ASSERTCMP and ASSERTIFCMP to handle signed values

2016-09-08 Thread David Howells
values in struct rxrpc_call and struct rxrpc_connection can't be bitfields as __typeof__ can't handle them. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/net/rx

[PATCH net-next 3/7] rxrpc: Convert rxrpc_local::services to an hlist

2016-09-08 Thread David Howells
Convert the rxrpc_local::services list to an hlist so that it can be accessed under RCU conditions more readily. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/af_rxrpc.c | 10 +- net/rxrpc/ar-internal.h |4 ++-- net/rxrpc/call_accept.c |2 +- net

[PATCH net-next 2/2] rxrpc: Add tracepoint for working out where aborts happen

2016-09-07 Thread David Howells
the circumstances when it aborts a call. Signed-off-by: David Howells <dhowe...@redhat.com> --- fs/afs/rxrpc.c | 17 --- include/net/af_rxrpc.h |3 + include/trace/events/rxrpc.h | 29 +++ net/rxrpc/ar-internal.h | 14 - net/rxrpc/call_e

[PATCH net-next 0/2] rxrpc: Local abort tracepoint

2016-09-07 Thread David Howells
/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-rewrite Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160904-2 David --- David Howells (2): rxrpc: Fix returns of call completion helpers rxrpc: Add tracepoint

[PATCH net-next 1/2] rxrpc: Fix returns of call completion helpers

2016-09-07 Thread David Howells
rxrpc_set_call_completion() returns bool, not int, so the ret variable should match this. rxrpc_call_completed() and __rxrpc_call_completed() should return the value of rxrpc_set_call_completion(). Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h

[PATCH net-next 0/1] rxrpc: Local abort tracepoint

2016-09-07 Thread David Howells
Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160904-2 David --- David Howells (1): rxrpc: Add tracepoint for working out where aborts happen fs/afs/rxrpc.c | 17 --- include/net/af_rxrpc.h

[PATCH net-next 4/8] rxrpc: Use call->peer rather than call->conn->params.peer

2016-09-07 Thread David Howells
Use call->peer rather than call->conn->params.peer to avoid the possibility of call->conn being NULL and, whilst we're at it, check it for NULL before we access it. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_object.c |8 +--- 1 file changed,

[PATCH net-next 1/8] rxrpc: Whitespace cleanup

2016-09-07 Thread David Howells
Remove some whitespace. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index bb342f5fe7e4..ad702f9f8d1f 100644 --- a/net/rxrpc/ar-inte

[PATCH net-next 5/8] rxrpc: Cache the security index in the rxrpc_call struct

2016-09-07 Thread David Howells
Cache the security index in the rxrpc_call struct so that we can get at it even when the call has been disconnected and the connection pointer cleared. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |1 + net/rxrpc/call_object.c |1 + net

[PATCH net-next 8/8] rxrpc: Calls shouldn't hold socket refs

2016-09-07 Thread David Howells
is disconnected. (5) Get rid of the dead call expiry setting as there's no longer a timer to set. (6) rxrpc_destroy_all_calls() can just check that the call list is empty. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/af_rxrpc.c|4 - net/rxrpc/ar-inte

[PATCH net-next 0/8] rxrpc: Overhaul call refcounting

2016-09-07 Thread David Howells
on the branch): http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-rewrite Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160907-1 David --- David Howells (8): rxrpc: Whitespace cleanup

[PATCH net-next 7/8] rxrpc: Use rxrpc_is_service_call() rather than rxrpc_conn_is_service()

2016-09-07 Thread David Howells
Use rxrpc_is_service_call() rather than rxrpc_conn_is_service() if the call is available just in case call->conn is NULL. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/input.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/inpu

[PATCH net-next 6/8] rxrpc: Pass the connection pointer to rxrpc_post_packet_to_call()

2016-09-07 Thread David Howells
Pass the connection pointer to rxrpc_post_packet_to_call() as the call might get disconnected whilst we're looking at it, but the connection pointer determined by rxrpc_data_read() is guaranteed by RCU for the duration of the call. Signed-off-by: David Howells <dhowe...@redhat.com> ---

[PATCH net-next 2/8] rxrpc: Delete unused rxrpc_kernel_free_skb()

2016-09-07 Thread David Howells
Delete rxrpc_kernel_free_skb() as it's unused. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/skbuff.c | 13 - 1 file changed, 13 deletions(-) diff --git a/net/rxrpc/skbuff.c b/net/rxrpc/skbuff.c index 9752f8b1fdd0..a546a2ba6341 100644 --- a/net/rxrpc/sk

[PATCH net-next 3/8] rxrpc: Improve the call tracking tracepoint

2016-09-07 Thread David Howells
-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h | 11 +++--- net/rxrpc/af_rxrpc.c |2 +- net/rxrpc/ar-internal.h | 22 ++- net/rxrpc/call_accept.c | 10 - net/rxrpc/call_event.c |2 +- net/rxrpc/call_ob

Re: [PATCH] rxrpc: remove duplicate 'error' variable

2016-09-06 Thread David Howells
Arnd Bergmann wrote: > The rxrpc_process_call function has debug code to print a failure code, > but instead of printing the code from the rxrpc_call structure, it > prints an uninitialized variable: > > net/rxrpc/call_event.c: In function 'rxrpc_process_call': >

Re: [PATCH] rxrpc: initialize sched to false to ensure it is not a garbage value

2016-09-05 Thread David Howells
Colin King wrote: > From: Colin Ian King > > sched will be uninitialized (and contain a garbage value) in the case > where call->state >= RXRPC_CALL_DEAD; fix this by initializing sched > to false to avoid an inadvertent call to

Re: [PATCH net-next 4/9] rxrpc: Randomise epoch and starting client conn ID values

2016-09-05 Thread David Howells
[cc'ing Jeff Altman for comment] David Laight wrote: > > Create a random epoch value rather than a time-based one on startup and set > > the top bit to indicate that this is the case. > > Why set the top bit? > There is nothing to stop the time (in seconds) from having

[PATCH net-next 6/9] fs/afs/vlocation: Remove deprecated create_singlethread_workqueue

2016-09-04 Thread David Howells
tipriy...@gmail.com> Signed-off-by: David Howells <dhowe...@redhat.com> --- fs/afs/vlocation.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c index 52976785a32c..45a86396fd2d 100644 --- a/fs/afs/vlocation.c +++ b/fs/afs/

[PATCH net-next 4/9] rxrpc: Randomise epoch and starting client conn ID values

2016-09-04 Thread David Howells
Create a random epoch value rather than a time-based one on startup and set the top bit to indicate that this is the case. Also create a random starting client connection ID value. This will be incremented from here as new client connections are created. Signed-off-by: David Howells <dh

[PATCH net-next 7/9] fs/afs/rxrpc: Remove deprecated create_singlethread_workqueue

2016-09-04 Thread David Howells
hridhar <bhaktipriy...@gmail.com> Signed-off-by: David Howells <dhowe...@redhat.com> --- fs/afs/rxrpc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index 244896baf241..37608be52abd 100644 --- a/fs/afs/rxrpc.c +++ b/fs/af

[PATCH net-next 8/9] fs/afs/callback: Remove deprecated create_singlethread_workqueue

2016-09-04 Thread David Howells
orkqueue is being used on a memory reclaim path, WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar <bhaktipriy...@gmail.com> Signed-off-by: David Howells <dhowe...@redhat.com> --- fs/afs/callback.c |4 ++-- 1 file changed, 2 i

[PATCH net-next 5/9] rxrpc: Don't change the epoch

2016-09-04 Thread David Howells
It seems the local epoch should only be changed on boot, so remove the code that changes it for client connections. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/conn_client.c | 32 1 file changed, 8 insertions(+), 24 deletions(-)

[PATCH net-next 9/9] fs/afs/flock: Remove deprecated create_singlethread_workqueue

2016-09-04 Thread David Howells
haktipriya Shridhar <bhaktipriy...@gmail.com> Signed-off-by: David Howells <dhowe...@redhat.com> --- fs/afs/flock.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/afs/flock.c b/fs/afs/flock.c index d91a9c9cfbd0..3191dff2c156 100644 --- a/fs/afs/flock.c +++

[PATCH net-next 1/3] rxrpc: Split sendmsg from packet transmission code

2016-09-04 Thread David Howells
Split the sendmsg code from the packet transmission code (mostly to be found in output.c). Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/Makefile |1 net/rxrpc/ar-internal.h |9 - net/rxrpc/misc.c|5 net/rxrpc/output.c

[PATCH net-next 3/3] rxrpc Move enum rxrpc_command to sendmsg.c

2016-09-04 Thread David Howells
Move enum rxrpc_command to sendmsg.c as it's now only used in that file. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |7 --- net/rxrpc/sendmsg.c |7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/net/rxrpc/ar-inte

[PATCH net-next 3/9] rxrpc: The client call state must be changed before attachment to conn

2016-09-04 Thread David Howells
control. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_object.c |2 -- net/rxrpc/conn_client.c |4 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c index 57e00fc9cff2..65691742199b 100644 ---

[PATCH net-next 2/3] rxrpc: Rearrange net/rxrpc/sendmsg.c

2016-09-04 Thread David Howells
Rearrange net/rxrpc/sendmsg.c to be in a more logical order. This makes it easier to follow and eliminates forward declarations. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/sendmsg.c | 1006 +-- 1 file changed, 501 inse

[PATCH net-next 0/3] rxrpc: Split output code from sendmsg code

2016-09-04 Thread David Howells
rxrpc-rewrite-20160904-2 David --- David Howells (3): rxrpc: Split sendmsg from packet transmission code rxrpc: Rearrange net/rxrpc/sendmsg.c rxrpc Move enum rxrpc_command to sendmsg.c net/rxrpc/Makefile |1 net/rxrpc/ar-internal.h | 16 - net/rxrpc/misc.c

[PATCH net-next 1/9] rxrpc: fix undefined behavior in rxrpc_mark_call_released

2016-09-04 Thread David Howells
d' may be used uninitialized in this function [-Werror=maybe-uninitialized] This sets the 'sched' variable to zero to restore the previous behavior. Signed-off-by: Arnd Bergmann <a...@arndb.de> Fixes: f5c17aaeb2ae ("rxrpc: Calls should only have one terminal state") Signed-off-by

[PATCH net-next 2/9] rxrpc: Fix uninitialised variable warning

2016-09-04 Thread David Howells
ot;, error); ^ Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_event.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index de72de662044..4754c7fb6242 100644

[PATCH net-next 0/9] rxrpc: Small fixes

2016-09-04 Thread David Howells
create_singlethread_workqueue fs/afs/callback: Remove deprecated create_singlethread_workqueue fs/afs/flock: Remove deprecated create_singlethread_workqueue David Howells (4): rxrpc: Fix uninitialised variable warning rxrpc: The client call state must be changed before attachment

Re: [PATCH net-next 1/1] rxrpc: Don't expose skbs to in-kernel users [ver #2]

2016-09-02 Thread David Howells
David Miller wrote: > Ok, I tried this one instead. If no warnings, I'll push it to net-next. Thanks, David

Re: [PATCH net-next] rxrpc: Don't expose skbs to in-kernel users

2016-09-01 Thread David Howells
David Miller wrote: > Actually, reverted, this adds a new warning to the build: > > net/rxrpc/recvmsg.c: In function ‘rxrpc_kernel_recv_data’: > net/rxrpc/recvmsg.c:531:1: warning: label ‘need_more_data’ defined but not > used [-Wunused-label] > need_more_data: > ^ >

Re: [PATCH 2/2] rxrpc: fix undefined behavior in rxrpc_mark_call_released

2016-08-31 Thread David Howells
Arnd Bergmann wrote: > Right, sorry about that. Do you want me to resend the fixed version, > or do you apply and fix it yourself? I can fix it up myself. I'll pull it into my tree when I've finished doing the fixing up I'm currently working on. David

Re: [PATCH 3/5] rxrpc: fix last_call processing

2016-08-31 Thread David Howells
Arnd Bergmann wrote: > I'll follow up with the fixes, both of which are rather > straightforward. Are they both in? [PATCH 2/2] rxrpc: fix undefined behavior in rxrpc_mark_call_released David

Re: [PATCH 2/2] rxrpc: fix undefined behavior in rxrpc_mark_call_released

2016-08-31 Thread David Howells
Is there a 1/2 somewhere? I don't see it. David

Re: [PATCH 2/2] rxrpc: fix undefined behavior in rxrpc_mark_call_released

2016-08-31 Thread David Howells
Arnd Bergmann wrote: > + } else { > + sched = 0; That should be false, not 0, btw. David

Re: [PATCH 2/2] rxrpc: fix undefined behavior in rxrpc_mark_call_released

2016-08-31 Thread David Howells
Arnd Bergmann wrote: > gcc -Wmaybe-initialized correctly points out a newly introduced bug > through which we can end up calling rxrpc_queue_call() for a dead > connection: How do you turn that on from within the Kbuild system? David

[PATCH net-next 1/1] rxrpc: Don't expose skbs to in-kernel users [ver #2]

2016-08-30 Thread David Howells
ing handed over to the in-kernel user. To process the queue internally, a temporary function, temp_deliver_data() has been added. This will be replaced with common code between the rxrpc_recvmsg() path and the kernel_rxrpc_recv_data() path in a future patch. Signed-off-by: David Howells <

<    1   2   3   4   5   6   7   8   9   >