[PATCH net] rxrpc: Fix potential NULL-pointer exception

2017-03-02 Thread David Howells
quot;rxrpc: Fix deadlock between call creation and sendmsg/recvmsg") Reported-by: Colin Ian King Signed-off-by: David Howells --- net/rxrpc/sendmsg.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c index 75c517

[PATCH net] rxrpc: Fix potential NULL-pointer exception

2017-03-02 Thread David Howells
quot;rxrpc: Fix deadlock between call creation and sendmsg/recvmsg") Reported-by: Colin Ian King Signed-off-by: David Howells --- net/rxrpc/sendmsg.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c index 31c153

Re: rxrpc: Fix deadlock between call creation and sendmsg/recvmsg

2017-03-02 Thread David Howells
Colin Ian King wrote: > I think the following part of the patch is problematic: > > call = rxrpc_find_call_by_user_ID(rx, user_call_ID); > if (!call) { > + ret = -EBADSLT; > if (cmd != RXRPC_CMD_SEND_DATA) > - return -EBADSLT; >

[PATCH net] rxrpc: Fix deadlock between call creation and sendmsg/recvmsg

2017-02-27 Thread David Howells
om the socket lock and give it its own lock, so that we don't hang progress in other calls because we're waiting for the allocator. We probably also want to avoid calling rxrpc_notify_socket() from within the socket lock (rxrpc_accept_call()). Signed-off-by: David Howells Tested-by: Ma

[PATCH net] rxrpc: Kernel calls get stuck in recvmsg

2017-02-24 Thread David Howells
s are forthcoming until there's an abort as the ring isn't empty. The fix is to move the read of call->rx_top inside the loop - but it needs to be done before the condition is checked. Reported-by: Marc Dionne Signed-off-by: David Howells Tested-by: Marc Dionne --- net/rxrpc/

[PATCH net] rxrpc: Fix an assertion in rxrpc_read()

2017-02-24 Thread David Howells
+0x80/0x191 entry_SYSCALL64_slow_path+0x25/0x25 Signed-off-by: Marc Dionne Signed-off-by: David Howells --- net/rxrpc/key.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/key.c b/net/rxrpc/key.c index 18c737a61d80..0a4e28477ad9 100644 --- a/net/rxrpc/key.c +++ b

[PATCH net-next] rxrpc: Change module filename to rxrpc.ko

2017-02-17 Thread David Howells
-by: Marc Dionne Signed-off-by: David Howells --- Documentation/filesystems/afs.txt | 34 +- net/rxrpc/Makefile| 12 ++-- 2 files changed, 7 insertions(+), 39 deletions(-) diff --git a/Documentation/filesystems/afs.txt b/Documentation

[PATCH net-next 1/2] afs: Move UUID struct to linux/uuid.h

2017-02-10 Thread David Howells
Move the afs_uuid struct to linux/uuid.h, rename it to uuid_v1 and change the u16/u32 fields to __be16/__be32 instead so that the structure can be cast to a 16-octet network-order buffer. Signed-off-by: David Howells Reviewed-by: Arnd Bergmann request = kmalloc(sizeof(struct afs_uuid

[PATCH net-next 0/2] afs: Use system UUID generation

2017-02-10 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-20170210 David --- Arnd Bergmann (1): afs: Use core kernel UUID generation David Howells (1): afs: Move

[PATCH net-next 2/2] afs: Use core kernel UUID generation

2017-02-10 Thread David Howells
function and use generate_random_uuid() instead, which has a v4 ("completely random") UUID instead of the time-based one. Signed-off-by: Arnd Bergmann Signed-off-by: David Howells --- fs/afs/internal.h | 11 +-- fs/afs/main.c

[no subject]

2017-01-13 Thread David Howells
> -header-y += msr-index.h I see it on my desktop as /usr/include/asm/msr-index.h and it's been there at least four years - and as such it's part of the UAPI. I don't think you can remove it unless you can guarantee there are no userspace users. David

[PATCH net-next] afs: Conditionalise a new unused variable

2017-01-13 Thread David Howells
user of the variable has to be conditional because it accesses a member of a struct that is also conditional. Fixes: 91b467e0a3f5 ("afs: Make afs_readpages() fetch data in bulk") Signed-off-by: Arnd Bergmann Signed-off-by: David Howells --- fs/afs/file.c |2 ++ 1 file changed, 2

[PATCH net-next 0/4] afs: Refcount afs_call struct

2017-01-09 Thread David Howells
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20170109 David --- David Howells (4): afs: Add some tracepoints afs: Kill afs_wait_mode rxrpc: Allow listen(sock, 0) to be used to disable listening afs: Refcount the afs_call struct

[PATCH net-next 1/4] afs: Add some tracepoints

2017-01-09 Thread David Howells
done with the CM_NAME() macro. Further, the AFS call state enum needs a name so that it can be used to declare parameter types. Signed-off-by: David Howells --- fs/afs/cmservice.c | 22 ++--- fs/afs/internal.h | 21 +--- fs/afs/main.c |1 fs/afs

[PATCH net-next 3/4] rxrpc: Allow listen(sock, 0) to be used to disable listening

2017-01-09 Thread David Howells
reenabled, but must rather be closed and reopened. Signed-off-by: David Howells --- net/rxrpc/af_rxrpc.c|8 net/rxrpc/ar-internal.h |1 + net/rxrpc/call_accept.c |3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc

[PATCH net-next 4/4] afs: Refcount the afs_call struct

2017-01-09 Thread David Howells
to prevent new incoming calls from occurring and to remove the contribution of preallocated calls from afs_outstanding_calls before we wait on it. A tracepoint is also added to monitor the afs_call refcount and lifetime. Reported-by: Dan Carpenter Signed-off-by: David Howells Fixe

[PATCH net-next 2/4] afs: Kill afs_wait_mode

2017-01-09 Thread David Howells
The afs_wait_mode struct isn't really necessary. Client calls only use one of a choice of two (synchronous or the asynchronous) and incoming calls don't use the wait at all. Replace with a boolean parameter. Signed-off-by: David Howells --- fs/afs/callback.c |2 + fs/afs/

[PATCH net-next 1/2] afs: Make afs_fs_fetch_data() take a list of pages

2017-01-06 Thread David Howells
Make afs_fs_fetch_data() take a list of pages for bulk data transfer. This will allow afs_readpages() to be made more efficient. Signed-off-by: David Howells --- fs/afs/file.c | 37 ++--- fs/afs/fsclient.c | 117 ++--- fs/afs

[PATCH net-next 0/2] afs: Implement bulk read

2017-01-06 Thread David Howells
rxrpc-rewrite-20170106 David --- David Howells (2): afs: Make afs_fs_fetch_data() take a list of pages afs: Make afs_readpages() fetch data in bulk fs/afs/file.c | 168 +++-- fs/afs/fsclient.c | 117

[PATCH net-next 2/2] afs: Make afs_readpages() fetch data in bulk

2017-01-06 Thread David Howells
Make afs_readpages() use afs_vnode_fetch_data()'s new ability to take a list of pages and do a bulk fetch. Signed-off-by: David Howells --- fs/afs/file.c | 131 ++- fs/afs/volume.c |1 2 files changed, 130 insertions(+), 2 dele

[PATCH net-next 2/3] rxrpc: Add some more tracing

2017-01-05 Thread David Howells
starting a new call on a particular connection channel without first transmitting the final ACK for the previous call. Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 94 -- net/rxrpc/conn_object.c |1 net/rxrpc/input.c

[PATCH net-next 1/3] rxrpc: Fix handling of enums-to-string translation in tracing

2017-01-05 Thread David Howells
The relevant data can be found by way of tracing. Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 424 -- net/rxrpc/ar-internal.h | 194 --- net/rxrpc/call_object.c | 18 -- net/rxrpc/conn_client.c |8 -

[PATCH net-next 3/3] rxrpc: Show a call's hard-ACK cursors in /proc/net/rxrpc_calls

2017-01-05 Thread David Howells
Show a call's hard-ACK cursors in /proc/net/rxrpc_calls so that a call's progress can be more easily monitored. Signed-off-by: David Howells --- net/rxrpc/proc.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/proc.c b/net/rxrpc/pr

[PATCH net-next 0/3] rxrpc: Update tracing and proc interfaces

2017-01-05 Thread David Howells
l.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-20170105 David --- David Howells (3): rxrpc: Fix handling of enums-to-string translation in tracing

Re: [PATCH 23/39] Annotate hardware config module parameters in drivers/net/wireless/

2016-12-07 Thread David Howells
Kalle Valo wrote: > Via which tree are you planning to submit this, should I take it to > wireless-drivers or will someone else handle it? I didn't get the cover > letter so I have no idea. I'll see if I can get patch 1 (which defines the macros) in a window prior to the others - or maybe I can

[PATCH 17/39] Annotate hardware config module parameters in drivers/net/arcnet/

2016-12-01 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/arcnet/. Suggested-by: One Thousand Gnomes Signed-off-by: David Howells cc: Michael Grzeschik cc: netdev@vger.kernel.org --- drivers/net/a

[PATCH 21/39] Annotate hardware config module parameters in drivers/net/irda/

2016-12-01 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/irda/. Suggested-by: One Thousand Gnomes Signed-off-by: David Howells cc: Samuel Ortiz cc: netdev@vger.kernel.org --- drivers/net/irda/ali-i

[PATCH 19/39] Annotate hardware config module parameters in drivers/net/ethernet/

2016-12-01 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/ethernet/. Suggested-by: One Thousand Gnomes Signed-off-by: David Howells cc: Steffen Klassert cc: Jaroslav Kysela cc: netdev@vger.kernel.o

[PATCH 20/39] Annotate hardware config module parameters in drivers/net/hamradio/

2016-12-01 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/hamradio/. Suggested-by: One Thousand Gnomes Signed-off-by: David Howells cc: Thomas Sailer cc: Joerg Reuter cc: linux-h...@vger.kernel.org cc: n

[PATCH 22/39] Annotate hardware config module parameters in drivers/net/wan/

2016-12-01 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/wan/. Suggested-by: One Thousand Gnomes Signed-off-by: David Howells cc: "Jan \"Yenya\" Kasprzak" cc: netdev@vger.kernel.

[PATCH 18/39] Annotate hardware config module parameters in drivers/net/can/

2016-12-01 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/can/. Suggested-by: One Thousand Gnomes Signed-off-by: David Howells cc: Wolfgang Grandegger cc: Marc Kleine-Budde cc: linux-...@vger.kernel.o

[PATCH 23/39] Annotate hardware config module parameters in drivers/net/wireless/

2016-12-01 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/wireless/. Suggested-by: One Thousand Gnomes Signed-off-by: David Howells cc: Kalle Valo cc: linux-wirel...@vger.kernel.org cc: netdev@vger.kerne

[PATCH 12/39] Annotate hardware config module parameters in drivers/isdn/

2016-12-01 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/isdn/. Suggested-by: One Thousand Gnomes Signed-off-by: David Howells cc: Karsten Keil cc: netdev@vger.kernel.org --- drivers/isdn/hardware/avm/b1

[PATCH 16/39] Annotate hardware config module parameters in drivers/net/appletalk/

2016-12-01 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/appletalk/. Suggested-by: One Thousand Gnomes Signed-off-by: David Howells cc: Arnaldo Carvalho de Melo cc: netdev@vger.kernel.org --- driver

[PATCH net 3/4] rxrpc: Fix checking of error from ip6_route_output()

2016-10-13 Thread David Howells
ip6_route_output() doesn't return a negative error when it fails, rather the ->error field of the returned dst_entry struct needs to be checked. Reported-by: Dan Carpenter Fixes: 75b54cb57ca3 ("rxrpc: Add IPv6 support") Signed-off-by: David Howells --- net/rxrpc/peer_objec

[PATCH net 4/4] afs: call->operation_ID sometimes used as __be32 sometimes as u32

2016-10-13 Thread David Howells
call->operation_ID is sometimes being used as __be32 sometimes is being used as u32. Be consistent and settle on using as u32. Signed-off-by: David Howells operation_ID); + _enter("{CB.OP %u}", call->operation_ID); - _enter("{CB.OP %u}", opera

[PATCH net 1/4] afs: unmapping the wrong buffer

2016-10-13 Thread David Howells
From: Dan Carpenter We switched from kmap_atomic() to kmap() so the kunmap() calls need to be updated to match. Fixes: d001648ec7cf ('rxrpc: Don't expose skbs to in-kernel users [ver #2]') Signed-off-by: Dan Carpenter Signed-off-by: David Howells --- fs/afs/fsclient.c |

[PATCH net 2/4] rxrpc: Fix checker warning by not passing always-zero value to ERR_PTR()

2016-10-13 Thread David Howells
instead to the tracepoint. Fixes: a84a46d73050 ("rxrpc: Add some additional call tracing") Reported-by: Dan Carpenter Signed-off-by: David Howells --- net/rxrpc/call_object.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/call_object.c b/net/

[PATCH net-next 0/4] rxrpc: Fixes

2016-10-13 Thread David Howells
--- Dan Carpenter (1): afs: unmapping the wrong buffer David Howells (3): rxrpc: Fix checker warning by not passing always-zero value to ERR_PTR() rxrpc: Fix checking of error from ip6_route_output() afs: call->operation_ID sometimes used as __be32 sometimes as u32 fs/afs/

[PATCH net 11/13] afs: Check for fatal error when in waiting for ack state

2016-10-06 Thread David Howells
away. Signed-off-by: David Howells --- 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 59bdaa7527b6..477928b25940 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c @@ -418,7 +418,7 @@ static void afs_deliver_to_call(struct afs

[PATCH net 10/13] rxrpc: Return negative error code to kernel service

2016-10-06 Thread David Howells
In rxrpc_kernel_recv_data(), when we return the error number incurred by a failed call, we must negate it before returning it as it's stored as positive (that's what we have to pass back to userspace). Signed-off-by: David Howells --- net/rxrpc/recvmsg.c |2 +- 1 file changed, 1

[PATCH net 13/13] rxrpc: Don't request an ACK on the last DATA packet of a call's Tx phase

2016-10-06 Thread David Howells
't set the flag, OpenAFS will send a DELAY ACK that hard-ACKs the reply data, thereby allowing the call to terminate cleanly. Signed-off-by: David Howells --- net/rxrpc/output.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/net/rxrpc/output.c b/net/

[PATCH net 04/13] rxrpc: Only ping for lost reply in client call

2016-10-06 Thread David Howells
When a reply is deemed lost, we send a ping to find out the other end received all the request data packets we sent. This should be limited to client calls and we shouldn't do this on service calls. Signed-off-by: David Howells --- net/rxrpc/input.c |3 ++- 1 file changed, 2 inser

[PATCH net 09/13] rxrpc: Add missing notification

2016-10-06 Thread David Howells
The call's background processor work item needs to notify the socket when it completes a call so that recvmsg() or the AFS fs can deal with it. Without this, call expiry isn't handled. Signed-off-by: David Howells --- net/rxrpc/call_event.c |1 + 1 file changed, 1 insertion(+)

[PATCH net 12/13] rxrpc: Need to produce an ACK for service op if op takes a long time

2016-10-06 Thread David Howells
holding call->state_lock, so split the lock-getting part of the timer function out. (3) Add trace notes for the ACK we're requesting and the timer we clear. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |3 +++ net/rxrpc/call_event.c | 16 n

[PATCH net 08/13] rxrpc: Queue the call on expiry

2016-10-06 Thread David Howells
When a call expires, it must be queued for the background processor to deal with otherwise a service call that is improperly terminated will just sit there awaiting an ACK and won't expire. Signed-off-by: David Howells --- net/rxrpc/call_event.c | 10 ++ 1 file changed, 6 inser

[PATCH net 07/13] rxrpc: Partially handle OpenAFS's improper termination of calls

2016-10-06 Thread David Howells
l on that channel. If another call doesn't come along to implicitly ACK a call, then we have to time the call out. There are some bugs there that will be addressed in subsequent patches. Signed-off-by: David Howells --- net/rxrpc/input.c | 37 + 1 file ch

[PATCH net 06/13] rxrpc: Fix loss of PING RESPONSE ACK production due to PING ACKs

2016-10-06 Thread David Howells
, the other side might just sit there waiting for it and refuse to proceed otherwise. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h | 12 +--- net/rxrpc/call_event.c | 48 +++ net/rxrpc/call_object.c |1 + net/rxrpc/in

[PATCH net-next 00/13] rxrpc: Fixes

2016-10-06 Thread David Howells
/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20161004 David --- David Howells (13): rxrpc: Accesses of rxrpc_local::service need to be RCU managed rxrpc: Fix duplicate const rxrpc: Fix oops on incoming call to serviceless endpoint rxrpc: Only ping for lost

[PATCH net 01/13] rxrpc: Accesses of rxrpc_local::service need to be RCU managed

2016-10-06 Thread David Howells
struct rxrpc_local->service is marked __rcu - this means that accesses of it need to be managed using RCU wrappers. There are two such places in rxrpc_release_sock() where the value is checked and cleared. Fix this by using the appropriate wrappers. Signed-off-by: David Howells --- net/rx

[PATCH net 03/13] rxrpc: Fix oops on incoming call to serviceless endpoint

2016-10-06 Thread David Howells
If an call comes in to a local endpoint that isn't listening for any incoming calls at the moment, an oops will happen. We need to check that the local endpoint's service pointer isn't NULL before we dereference it. Signed-off-by: David Howells --- net/rxrpc/call_accept.c |

[PATCH net 05/13] rxrpc: Fix warning by splitting rxrpc_send_call_packet()

2016-10-06 Thread David Howells
=maybe-uninitialized] Reported-by: Arnd Bergmann Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |3 + net/rxrpc/call_accept.c |2 - net/rxrpc/call_event.c |6 +- net/rxrpc/call_object.c |2 - net/rxrpc/output.c | 156 ++

[PATCH net 02/13] rxrpc: Fix duplicate const

2016-10-06 Thread David Howells
Remove a duplicate const keyword. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |2 +- net/rxrpc/misc.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index d38dffd78085..4954e6e25819 100644

Re: [PATCH net-next 0/7] rxrpc: More fixes and adjustments

2016-10-04 Thread David Howells
Hi Dave, What's the procedure for sending more fixes at this point? Do I send them against net-next, since net doesn't contain the things to be fixed yet, or do I wait for net to catch up? David

Re: [PATCH] rxrpc: split up rxrpc_send_call_packet()

2016-10-01 Thread David Howells
Arnd Bergmann wrote: > Yes, good idea. We could probably share the part of the two functions that > sets the contents of the msg and pkt variables by moving it into a third > function, but I'm not sure if that actually improves readability or just > reduces the number of lines. And the ACK-sendi

Re: [PATCH] rxrpc: split up rxrpc_send_call_packet()

2016-09-30 Thread David Howells
Something like the attached. David --- commit 35510eefc29e2757c1ac46218cded2e505093fc2 Author: David Howells Date: Sat Oct 1 00:35:15 2016 +0100 rxrpc: Split rxrpc_send_call_packet() Split rxrpc_send_data_packet() to separate ACK generation (which is more complicated) from

Re: [PATCH] rxrpc: split up rxrpc_send_call_packet()

2016-09-30 Thread David Howells
Arnd Bergmann wrote: > A number of reworks went into rxrpc_send_call_packet() recently, which > introduced another warning when built with -Wmaybe-uninitialized: > > In file included from ../net/rxrpc/output.c:20:0: > net/rxrpc/output.c: In function 'rxrpc_send_call_packet': > net/rxrpc/ar-inter

[PATCH net-next 2/7] rxrpc: Switch to Congestion Avoidance mode at cwnd==ssthresh

2016-09-30 Thread David Howells
-by: David Howells --- net/rxrpc/input.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 1461d30583c9..21746f0f7ae0 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c @@ -57,7 +57,7 @@ static void

[PATCH net-next 5/7] rxrpc: Remove error from struct rxrpc_skb_priv as it is unused

2016-09-30 Thread David Howells
Remove error from struct rxrpc_skb_priv as it is no longer used. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |1 - 1 file changed, 1 deletion(-) diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index fd64a2bd1072..141c1458e719 100644 --- a/net/rxrpc/ar

[PATCH net-next 0/7] rxrpc: More fixes and adjustments

2016-09-30 Thread David Howells
s.git/log/?h=rxrpc-rewrite Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160930 David --- David Howells (7): rxrpc: Actually display the tx_data trace retransmission note rxrpc: Switch to Congestion Avoidance mode at

[PATCH net-next 1/7] rxrpc: Actually display the tx_data trace retransmission note

2016-09-30 Thread David Howells
Actually display in the tx_data trace the retransmission note added in a previous patch. Signed-off-by: David Howells --- include/trace/events/rxrpc.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h index

[PATCH net-next 4/7] rxrpc: The offset field in struct rxrpc_skb_priv is unnecessary

2016-09-30 Thread David Howells
The offset field in struct rxrpc_skb_priv is unnecessary as the value can always be calculated. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |1 - net/rxrpc/conn_event.c |3 ++- net/rxrpc/input.c | 23 --- net/rxrpc/local_event.c |3 ++- net

[PATCH net-next 7/7] rxrpc: Fix the call timer handling

2016-09-30 Thread David Howells
er setting. (4) The call timer callback can now just call rxrpc_set_timer() to handle things. (5) The call processor work function now checks the event flags rather than checking the timeouts directly. Signed-off-by: David Howells --- net/rxrpc/call_event

[PATCH net-next 6/7] rxrpc: Keep the call timeouts as ktimes rather than jiffies

2016-09-30 Thread David Howells
Keep that call timeouts as ktimes rather than jiffies so that they can be expressed as functions of RTT. Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 25 +++--- net/rxrpc/ar-internal.h |8 ++--- net/rxrpc/call_event.c | 73

[PATCH net-next 3/7] rxrpc: Reduce ssthresh to peer's receive window

2016-09-30 Thread David Howells
When we receive an ACK from the peer that tells us what the peer's receive window (rwind) is, we should reduce ssthresh to rwind if rwind is smaller than ssthresh. Signed-off-by: David Howells --- net/rxrpc/input.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/net/rxrpc/inpu

[PATCH net-next 1/6] rxrpc: Fix exclusive client connections

2016-09-29 Thread David Howells
his by checking the function parameters for the exclusive flag. Signed-off-by: David Howells --- net/rxrpc/conn_client.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c index c76a125df891..f5ee8bfa5bef 100644 --- a/net/rxrp

[PATCH net-next 2/6] rxrpc: Make Tx loss-injection go through normal return and adjust tracing

2016-09-29 Thread David Howells
epoint when losing a Tx packet as we're not altering the sk_buff refcount nor are we just seeing it after getting it off the Tx list. (4) The rxrpc_skb_tx_lost note is then no longer used so remove it. (5) rxrpc_lose_skb() no longer needs to deal with rxrpc_skb_tx_lost. Signed-o

[PATCH net-next 3/6] rxrpc: When activating client conn channels, do state check inside lock

2016-09-29 Thread David Howells
to add another state in a later patch that will restrict the number of simultaneous calls to 1 on a connection. Signed-off-by: David Howells --- net/rxrpc/conn_client.c | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/net/r

[PATCH net-next 6/6] rxrpc: Note serial number being ACK'd in the congestion management trace

2016-09-29 Thread David Howells
more use in working out how different trace lines relate. Signed-off-by: David Howells --- 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 094720dd1eaf..1461d30583c9 100644 --- a/net/rxrpc/input.c +++

[PATCH net-next 5/6] rxrpc: Request more ACKs in slow-start mode

2016-09-29 Thread David Howells
Set the request-ACK on more DATA packets whilst we're in slow start mode so that we get sufficient ACKs back to supply information to configure the window. Signed-off-by: David Howells --- net/rxrpc/output.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/rxrpc/output.c b/net/

[PATCH net-next 4/6] rxrpc: Reduce the rxrpc_local::services list to a pointer

2016-09-29 Thread David Howells
ry to talk back to your cache manager on the port you sent from (this is how file change notifications are handled). To prevent someone from stealing your CM callbacks, we don't let AF_RXRPC sockets share a UDP socket if at least one of them has a service bound. Signed-off-by: David Howells

[PATCH net-next 0/6] rxrpc: Fixes and adjustments

2016-09-29 Thread David Howells
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-20160929 David --- David Howells (6): rxrpc: Fix exclusive client connections

[PATCH net-next 2/8] rxrpc: Send an immediate ACK if we fill in a hole

2016-09-24 Thread David Howells
Send an immediate ACK if we fill in a hole in the buffer left by an out-of-sequence packet. This may allow the congestion management in the peer to avoid a retransmission if packets got reordered on the wire. Signed-off-by: David Howells --- net/rxrpc/input.c | 10 +- 1 file changed

[PATCH net-next 3/8] rxrpc: Include the last reply DATA serial number in the final ACK

2016-09-24 Thread David Howells
In a client call, include the serial number of the last DATA packet of the reply in the final ACK. Signed-off-by: David Howells --- net/rxrpc/recvmsg.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c index a7458c398b9e

[PATCH net-next 5/8] rxrpc: Delay the resend timer to allow for nsec->jiffies conv error

2016-09-24 Thread David Howells
igned-off-by: David Howells --- net/rxrpc/call_event.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index a78a92fe5d77..d5bf9ce7ec6f 100644 --- a/net/rxrpc/call_event.c +++ b/net/rxrpc/call_event.c @@ -200,8 +2

[PATCH net-next 6/8] rxrpc: Generate a summary of the ACK state for later use

2016-09-24 Thread David Howells
Generate a summary of the Tx buffer packet state when an ACK is received for use in a later patch that does congestion management. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h | 14 ++ net/rxrpc/input.c | 45 ++--- 2

[PATCH net-next 8/8] rxrpc: Implement slow-start

2016-09-24 Thread David Howells
hat its Rx window state is. Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 45 +++ net/rxrpc/ar-internal.h | 53 + net/rxrpc/call_event.c | 36 - net/rxrpc/call_object.c | 13 +++ net/rxrpc/conn_event.c |1 ne

[PATCH net-next 1/8] rxrpc: Send an ACK after every few DATA packets we receive

2016-09-24 Thread David Howells
he background thread. This should possibly be made configurable in future. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |3 +++ net/rxrpc/misc.c|1 + net/rxrpc/output.c | 25 + net/rxrpc/recvmsg.c | 13 - 4 files ch

[PATCH net-next 7/8] rxrpc: Schedule an ACK if the reply to a client call appears overdue

2016-09-24 Thread David Howells
as the IDLE ACK for the moment. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |2 ++ net/rxrpc/call_event.c |1 + net/rxrpc/input.c |8 net/rxrpc/misc.c|2 ++ 4 files changed, 13 insertions(+) diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar

[PATCH net-next 4/8] rxrpc: Reinitialise the call ACK and timer state for client reply phase

2016-09-24 Thread David Howells
: David Howells --- net/rxrpc/ar-internal.h |1 + net/rxrpc/input.c |9 + net/rxrpc/misc.c|1 + 3 files changed, 11 insertions(+) diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index e3bf9c0e3ad1..cdd35e2b40ba 100644 --- a/net/rxrpc/ar-internal.h

[PATCH net-next 0/8] rxrpc: Implement slow-start and other bits

2016-09-24 Thread David Howells
ux/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-20160924 David --- David Howells (8): rxrpc: Send an ACK after every few DATA packets we receive rxrpc: Send an immedi

Re: [PATCH net-next 08/15] rxrpc: Fix call timer

2016-09-23 Thread David Howells
Sergei Shtylyov wrote: > > + if (call->timer.expires != t || !timer_pending(&call->timer)) { > > mod_timer(&call->timer, t); > > } > >CodingStyle: {} not needed now. See patch 11. David

Re: [PATCH net-next 07/15] rxrpc: Fix accidental cancellation of scheduled resend by ACK parser

2016-09-23 Thread David Howells
Sergei Shtylyov wrote: > > case RXRPC_ACK_TYPE_NACK: > > if (anno_type == RXRPC_TX_ANNO_NAK) > > continue; > > + if (anno_type == RXRPC_TX_ANNO_RETRANS) > > + continue; > >Why not fold the

[PATCH net-next 10/15] rxrpc: Don't call the tx_ack tracepoint if don't generate an ACK

2016-09-23 Thread David Howells
e going to actually transmit something. Signed-off-by: David Howells --- net/rxrpc/output.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c index 282cb1e36d06..5c1e008a5323 100644 --- a/net/rxrpc/output.c +++ b

[PATCH net-next 03/15] rxrpc: Make sure sendmsg() is woken on call completion

2016-09-23 Thread David Howells
Make sure that sendmsg() gets woken up if the call it is waiting for completes abnormally. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |1 + 1 file changed, 1 insertion(+) diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index b13754a6dd7a..808ab750dc6b 100644

[PATCH net-next 05/15] rxrpc: Use before_eq() and friends to compare serial numbers

2016-09-23 Thread David Howells
before_eq() and friends should be used to compare serial numbers (when not checking for (non)equality) rather than casting to int, subtracting and checking the result. Signed-off-by: David Howells --- net/rxrpc/input.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net

[PATCH net-next 11/15] rxrpc: Add a tracepoint for the call timer

2016-09-23 Thread David Howells
Add a tracepoint to log call timer initiation, setting and expiry. Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 36 net/rxrpc/ar-internal.h | 13 - net/rxrpc/call_event.c |7 --- net/rxrpc/call_object.c

[PATCH net-next 09/15] rxrpc: Pass the last Tx packet marker in the annotation buffer

2016-09-23 Thread David Howells
ket header flag is now set as needed when we actually transmit the packet and may vary by retransmission. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |7 ++- net/rxrpc/input.c | 102 +++ net/rxrpc/misc.c|3 +

[PATCH net-next 00/15] rxrpc: Bug fixes and tracepoints

2016-09-23 Thread David Howells
can be found here also: 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-20160923 David --- David Howells (15): rxrpc: Preset timestamp

[PATCH net-next 12/15] rxrpc: Add data Tx tracepoint and adjust Tx ACK tracepoint

2016-09-23 Thread David Howells
Add a tracepoint to log transmission of DATA packets (including loss injection). Adjust the ACK transmission tracepoint to include the packet serial number and to line this up with the DATA transmission display. Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 50

[PATCH net-next 01/15] rxrpc: Preset timestamp on Tx sk_buffs

2016-09-23 Thread David Howells
the packet and, in future, tell the congestion management algorithm that the retransmit timer expired. Signed-off-by: David Howells --- net/rxrpc/sendmsg.c |5 + 1 file changed, 5 insertions(+) diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c index ca7c3be60ad2..ca3811bfbd17

[PATCH net-next 13/15] rxrpc: Add a tracepoint to log injected Rx packet loss

2016-09-23 Thread David Howells
Add a tracepoint to log received packets that get discarded due to Rx packet loss. Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 21 + net/rxrpc/input.c| 11 +-- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a

[PATCH net-next 06/15] rxrpc: Need to start the resend timer on initial transmission

2016-09-23 Thread David Howells
When a DATA packet has its initial transmission, we may need to start or adjust the resend timer. Without this we end up relying on being sent a NACK to initiate the resend. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |1 + net/rxrpc/call_event.c |2 +- net/rxrpc

[PATCH net-next 02/15] rxrpc: Don't send an ACK at the end of service call response transmission

2016-09-23 Thread David Howells
Don't send an IDLE ACK at the end of the transmission of the response to a service call. The service end resends DATA packets until the client sends an ACK that hard-acks all the send data. At that point, the call is complete. Signed-off-by: David Howells --- net/rxrpc/recvmsg.c |2

[PATCH net-next 07/15] rxrpc: Fix accidental cancellation of scheduled resend by ACK parser

2016-09-23 Thread David Howells
the to-be-retransmitted with a nak - which isn't. Instead, we need to let any scheduled retransmission stand if the packet was NAK'd. Note that we don't reissue a resend if the annotation is in the to-be-retransmitted state because someone else must've scheduled the resend

[PATCH net-next 04/15] rxrpc: Should be using ktime_add_ms() not ktime_add_ns()

2016-09-23 Thread David Howells
ktime_add_ms() should be used to add the resend time (in ms) rather than ktime_add_ns(). Signed-off-by: David Howells --- 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 6e2ea8f4ae75

[PATCH net-next 15/15] rxrpc: Add a tracepoint to log which packets will be retransmitted

2016-09-23 Thread David Howells
). Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 27 +++ net/rxrpc/call_event.c |2 ++ 2 files changed, 29 insertions(+) diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h index d67a8c6b085a..56475497043d 100644 --- a

[PATCH net-next 14/15] rxrpc: Add tracepoint for ACK proposal

2016-09-23 Thread David Howells
e the ACK reason number given to trace_rxrpc_rx_ack() to make sure we don't overrun the array. Signed-off-by: David Howells --- include/rxrpc/packet.h |1 + include/trace/events/rxrpc.h | 42 -- net/rxrpc/ar-internal.h

[PATCH net-next 08/15] rxrpc: Fix call timer

2016-09-23 Thread David Howells
r(). Signed-off-by: David Howells --- net/rxrpc/call_event.c | 25 ++--- net/rxrpc/call_object.c |4 ++-- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index 3a7f90a2659c..8bc5c8e37ab4 100644 --- a/net/rxrpc

[PATCH net-next 6/9] rxrpc: Add ktime_sub_ms() [ver #2]

2016-09-22 Thread David Howells
Add a ktime_sub_ms() to go with ktime_add_ms() and co. for use in AF_RXRPC RTT determination. Signed-off-by: David Howells --- include/linux/ktime.h |5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 2b6a204bd8d4..aa118bad1407 100644

<    1   2   3   4   5   6   7   8   9   10   >