[PATCH net-next 0/1] rxrpc: Remove use of skbs from AFS [ver #2]

2016-08-30 Thread David Howells
und 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-20160830-2v2 David --- David Howells (1): rxrpc: Don't expose s

Re: [PATCH net-next] rxrpc: Remove use of skbs from AFS

2016-08-30 Thread David Howells
Sorry about this, stgit mail is playing silly devils and not inserting the patch numbers if there's a cover letter but only one patch:-/ David

[PATCH net-next] rxrpc: Remove use of skbs from AFS

2016-08-30 Thread David Howells
und 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-20160830-2v2 David --- David Howells (1): rxrpc: Don't expose s

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

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 <

[PATCH net-next] rxrpc: Remove use of skbs from AFS

2016-08-30 Thread David Howells
for AFS. The patch 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-20160830-2 David --- David Howells (1

[PATCH net-next 6/8] rxrpc: Provide a way for AFS to ask for the peer address of a call

2016-08-30 Thread David Howells
, this allows us to hide any canonicalisation inside AF_RXRPC for when IPv6 support is added. Also propagate this through to afs_find_server() and issue a warning if we can't handle the address family yet. Signed-off-by: David Howells <dhowe...@redhat.com> --- Documentation/networking/rxrpc.txt

[PATCH net-next 8/8] rxrpc: Pass struct socket * to more rxrpc kernel interface functions

2016-08-30 Thread David Howells
() rxrpc_kernel_get_error_number() rxrpc_kernel_free_skb() rxrpc_kernel_data_consumed() unmodified as they're all about to be removed (and, in any case, don't touch the socket). Signed-off-by: David Howells <dhowe...@redhat.com> --- Documentation/networking/rxrpc.txt | 11 ---

[PATCH net-next 5/8] afs: Need linux/random.h

2016-08-30 Thread David Howells
We should #include linux/random.h to use get_random(). Signed-off-by: David Howells <dhowe...@redhat.com> --- fs/afs/main.c |1 + 1 file changed, 1 insertion(+) diff --git a/fs/afs/main.c b/fs/afs/main.c index 35de0c04729f..0b187ef3b5b7 100644 --- a/fs/afs/main.c +++ b/fs/afs/

[PATCH net-next 1/8] rxrpc: Fix a potential NULL-pointer deref in rxrpc_abort_calls

2016-08-30 Thread David Howells
The call pointer in a channel on a connection will be NULL if there's no active call on that channel. rxrpc_abort_calls() needs to check for this before trying to take the call's state_lock. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/conn_event.c

[PATCH net-next 3/8] rxrpc: Trace rxrpc_call usage

2016-08-30 Thread David Howells
Add a trace event for debuging rxrpc_call struct usage. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h | 39 ++ net/rxrpc/ar-internal.h | 19 ++--- net/rxrpc/call_accept.c |5 +- net/rxrpc/call_event.c

[PATCH net-next 7/8] rxrpc: Use call->peer rather than going to the connection

2016-08-30 Thread David Howells
Use call->peer rather than call->conn->params.peer as call->conn may become NULL. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_event.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/

[PATCH net-next 4/8] afs: Miscellaneous simple cleanups

2016-08-30 Thread David Howells
Remove one #ifndef'd-out variable and a couple of excessive blank lines. Signed-off-by: David Howells <dhowe...@redhat.com> --- fs/afs/cmservice.c |6 -- 1 file changed, 6 deletions(-) diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index 85737e96ab8b..ca32d891bbc3 100644 --

[PATCH net-next 2/8] rxrpc: Calls should only have one terminal state

2016-08-30 Thread David Howells
Condense the terminal states of a call state machine to a single state, plus a separate completion type value. The value is then set, along with error and abort code values, only when the call is transitioned to the completion state. Helpers are provided to simplify this. Signed-off-by: David

[PATCH net-next 0/8] rxrpc: Preparation for removal of use of skbs from AFS

2016-08-30 Thread David Howells
owells/linux-fs.git/log/?h=rxrpc-rewrite Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160830-1 David --- David Howells (8): rxrpc: Fix a potential NULL-pointer deref in rxrpc_abort_calls rxrpc: Calls should only ha

Re: [PATCH net-next 0/2] rxrpc: Preparation for removal of use of skbs from AFS

2016-08-30 Thread David Howells
Oops. Please ignore this, I just sent the first and last patches, not the range :-( David

[PATCH net-next 0/2] rxrpc: Preparation for removal of use of skbs from AFS

2016-08-30 Thread David Howells
owells/linux-fs.git/log/?h=rxrpc-rewrite Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160830-1 David --- David Howells (2): rxrpc: Fix a potential NULL-pointer deref in rxrpc_abort_calls rxrpc: Pass struct socket * t

[PATCH net-next 2/2] rxrpc: Pass struct socket * to more rxrpc kernel interface functions

2016-08-30 Thread David Howells
() rxrpc_kernel_get_error_number() rxrpc_kernel_free_skb() rxrpc_kernel_data_consumed() unmodified as they're all about to be removed (and, in any case, don't touch the socket). Signed-off-by: David Howells <dhowe...@redhat.com> --- Documentation/networking/rxrpc.txt | 11 ---

[PATCH net-next 1/2] rxrpc: Fix a potential NULL-pointer deref in rxrpc_abort_calls

2016-08-30 Thread David Howells
The call pointer in a channel on a connection will be NULL if there's no active call on that channel. rxrpc_abort_calls() needs to check for this before trying to take the call's state_lock. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/conn_event.c

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

2016-08-28 Thread David Howells
This is fixed by: commit 2266ffdef5737fdfa96005204fc5606dbd559956 subject: rxrpc: Fix conn-based retransmit which is in net-next. David

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

2016-08-27 Thread David Howells
gt; Fixes: 18bfeba50dfd ("rxrpc: Perform terminal call ACK/ABORT retransmission > from conn processor") > --- > Cc: David Howells <dhowe...@redhat.com> > Cc: "David S. Miller" <da...@davemloft.net> > Cc: netdev@vger.kernel.org > > net/rxrpc/in

[PATCH net-next 1/2] rxrpc: Fix conn-based retransmit

2016-08-24 Thread David Howells
is available to us, go direct instead. Also, the ACK packet to be retransmitted needs three octets of padding between the soft ack list and the ackinfo. Fixes: 18bfeba50dfd0c8ee420396f2570f16a0bdbd7de ("rxrpc: Perform terminal call ACK/ABORT retransmission from conn processor") Signed-off

[PATCH net-next 2/2] rxrpc: Improve management and caching of client connection objects

2016-08-24 Thread David Howells
nns of them around. Note that I combined the Tx wait queue with the channel grant wait queue to save space as only one of these should be in use at once. Note also that, for the moment, the service connection cache still uses the old connection management code. Signed-off-by: David Howells <

[PATCH net-next 0/2] rxrpc: Add better client conn management strategy

2016-08-24 Thread David Howells
-fs.git rxrpc-rewrite-20160824-2 David --- David Howells (2): rxrpc: Dup the main conn list for the proc interface rxrpc: Improve management and caching of client connection objects net/rxrpc/ar-internal.h | 58 ++- net/rxrpc/call_event.c |4 net/rxrpc/call_object.c

[PATCH net-next 1/2] rxrpc: Dup the main conn list for the proc interface

2016-08-24 Thread David Howells
find them to dispatch calls. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |2 ++ net/rxrpc/conn_client.c |1 + net/rxrpc/conn_object.c |3 +++ net/rxrpc/conn_service.c |1 + net/rxrpc/proc.c |8 5 files chang

[PATCH net-next 2/2] rxrpc: Make /proc/net/rxrpc_calls safer

2016-08-24 Thread David Howells
Make /proc/net/rxrpc_calls safer by stashing a copy of the peer pointer in the rxrpc_call struct and checking in the show routine that the peer pointer, the socket pointer and the local pointer obtained from the socket pointer aren't NULL before we use them. Signed-off-by: David Howells <dh

[PATCH net-next 0/2] rxrpc: More fixes

2016-08-24 Thread David Howells
lls/linux-fs.git rxrpc-rewrite-20160824-1 David --- David Howells (2): rxrpc: Fix conn-based retransmit rxrpc: Make /proc/net/rxrpc_calls safer net/rxrpc/ar-internal.h |4 +++- net/rxrpc/call_object.c |3 +++ net/rxrpc/conn_client.c |1 + net/rxrpc/conn_event.c |

[PATCH net-next 2/3] rxrpc: Calculate serial skew on packet reception

2016-08-23 Thread David Howells
removes some unnecessary atomic ops. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |7 --- net/rxrpc/call_event.c | 18 ++ net/rxrpc/input.c | 37 +++-- net/rxrpc/proc.c|2 +- net

[PATCH net-next 1/3] rxrpc: Set connection expiry on idle, not put

2016-08-23 Thread David Howells
). The time is also preset in the connection allocator in case the connection never gets used. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h | 11 +-- net/rxrpc/conn_object.c | 42 +- 2 files changed, 26 insertions(

[PATCH net-next 0/3] rxrpc: Miscellaneous improvements

2016-08-23 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-20160823-2 David --- David Howells (3): rxrpc: Set connection expiry on idle, not put

[PATCH net-next 3/3] rxrpc: Perform terminal call ACK/ABORT retransmission from conn processor

2016-08-23 Thread David Howells
on a connection). Further, if a packet's callNumber is before the last_call ID or a packet is aimed at successfully completed service call then that packet is discarded and ignored. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |7 ++- net/rxrpc/conn_e

[PATCH net-next 0/5] rxrpc: Cleanups

2016-08-23 Thread David Howells
: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160823-1 David --- David Howells (5): rxrpc: Remove RXRPC_CALL_PROC_BUSY rxrpc: Tidy up the rxrpc_call struct a bit rxrpc: When clearing a socket, clear the call sets in the right order

[PATCH net-next 1/5] rxrpc: Remove RXRPC_CALL_PROC_BUSY

2016-08-23 Thread David Howells
Remove RXRPC_CALL_PROC_BUSY as work queue items are now 100% non-reentrant. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |1 - net/rxrpc/call_event.c |6 -- 2 files changed, 7 deletions(-) diff --git a/net/rxrpc/ar-internal.h b/net/rx

[PATCH net-next 5/5] rxrpc: Use a tracepoint for skb accounting debugging

2016-08-23 Thread David Howells
Use a tracepoint to log various skb accounting points to help in debugging refcounting errors. Signed-off-by: David Howells <dhowe...@redhat.com> --- include/trace/events/rxrpc.h | 56 ++ net/rxrpc/af_rxrpc.c |1 + net/rxrpc/ar-inte

[PATCH net-next 3/5] rxrpc: When clearing a socket, clear the call sets in the right order

2016-08-23 Thread David Howells
could possibly move from sequreq to acceptq whilst we're clearing up. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_object.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c

[PATCH net-next 4/5] rxrpc: Drop channel number field from rxrpc_call struct

2016-08-23 Thread David Howells
Drop the channel number (channel) field from the rxrpc_call struct to reduce the size of the call struct. The field is redundant: if the call is attached to a connection, the channel can be obtained from there by AND'ing with RXRPC_CHANNELMASK. Signed-off-by: David Howells <dhowe...@redhat.

[PATCH net-next 2/5] rxrpc: Tidy up the rxrpc_call struct a bit

2016-08-23 Thread David Howells
that can go. (3) Move what remains of the data that were used for hashing up in the struct to be with the channel number. (4) Get rid of the local pointer. We can get at this via the socket struct and we only use this in the procfs viewer. Signed-off-by: David Howells <dhowe...@redhat.

How best to {en,de}crypt between sk_buff and iov_iter?

2016-08-10 Thread David Howells
Is there a good way to encrypt data held in an iov_iter directly into an sk_buff and decrypt data held in an sk_buff back into an iov_iter? What I would like to avoid is: (a) Invoking skb_cow_data() to potentially take an unnecessary copy of the data I shouldn't need to change, but I need

[PATCH net 0/6] rxrpc: Miscellaneous fixes

2016-08-09 Thread David Howells
David --- Arnd Bergmann (1): rxrpc: fix uninitialized pointer dereference in debug code David Howells (5): rxrpc: Need to flag call as being released on connect failure rxrpc: Don't access connection from call if pointer is NULL rxrpc: Once packet posted in data_ready, don't

[PATCH net 2/6] rxrpc: Need to flag call as being released on connect failure

2016-08-09 Thread David Howells
at: net/rxrpc/call_object:635 Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_object.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c index e8c953c48cb8..ae057e0740f3 100644 --- a/net/rxrpc/call_object.c +++

[PATCH net 1/6] rxrpc: fix uninitialized pointer dereference in debug code

2016-08-09 Thread David Howells
rgmann <a...@arndb.de> Fixes: 372ee16386bb ("rxrpc: Fix races between skb free, ACK generation and replying") Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_object.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/rxrpc/call_object.c b/n

[PATCH net 3/6] rxrpc: Don't access connection from call if pointer is NULL

2016-08-09 Thread David Howells
them or not. This results in a NULL pointer dereference at: net/rxrpc/call_event.c:837 To fix this, skip the message pre-initialisation if there's no connection attached. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_event.c |4 1 file chan

[PATCH net 4/6] rxrpc: Once packet posted in data_ready, don't retry posting

2016-08-09 Thread David Howells
will retransmit. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/input.c |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 9e0f58edcd01..04afdc09557b 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c @@ -

[PATCH net 6/6] rxrpc: Free packets discarded in data_ready

2016-08-09 Thread David Howells
Under certain conditions, the data_ready handler will discard a packet. These need to be freed. 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 789719

[PATCH net 5/6] rxrpc: Fix a use-after-push in data_ready handler

2016-08-09 Thread David Howells
+0x1a8/0x2be [] cpuidle_enter+0x12/0x14 [] call_cpuidle+0x39/0x3b [] cpu_startup_entry+0x230/0x35d [] start_secondary+0xf4/0xf7 Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/input.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git

Re: [PATCH] [net] rxrpc: fix uninitialized pointer dereference in debug code

2016-08-08 Thread David Howells
Arnd Bergmann wrote: > A newly added bugfix caused an uninitialized variable to be > used for printing debug output. This is harmless as long > as the debug setting is disabled, but otherwise leads to an > immediate crash. > > gcc warns about this when -Wmaybe-uninitialized is

[PATCH net] rxrpc: Fix races between skb free, ACK generation and replying

2016-08-03 Thread David Howells
385 [] ? rescuer_thread+0x2d0/0x2d0 [] kthread+0xf3/0xfb [] ret_from_fork+0x1f/0x40 [] ? kthread_create_on_node+0x1cf/0x1cf Signed-off-by: David Howells <dhowe...@redhat.com> --- Documentation/networking/rxrpc.txt | 21 ++- fs/afs/cmservice.c | 78 ++

[PATCH net-next] rxrpc: checking for IS_ERR() instead of NULL

2016-07-14 Thread David Howells
From: Dan Carpenter <dan.carpen...@oracle.com> The rxrpc_lookup_peer() function returns NULL on error, it never returns error pointers. Fixes: 8496af50eb38 ('rxrpc: Use RCU to access a peer's service connection tree') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-o

Re: [PATCH -next] rxrpc: Fix error handling in af_rxrpc_init()

2016-07-14 Thread David Howells
David Miller wrote: > > From: Wei Yongjun > > > > security initialized after alloc workqueue, so we should exit security > > before destroy workqueue in the error handing. > > > > Fixes: 648af7fca159 ("rxrpc: Absorb the rxkad security

Re: [GIT PULL net-next] rxrpc: Improve conn/call lookup and fix call number generation [ver #3]

2016-07-09 Thread David Howells
David Miller wrote: > I'll pull, but this is not how I want you to operate. Anyway, thanks for pulling it. David

Re: [GIT PULL net-next] rxrpc: Improve conn/call lookup and fix call number generation [ver #3]

2016-07-09 Thread David Howells
David Miller wrote: > > Can you pull this into net-next please? > > I'll pull, but this is not how I want you to operate. > > If you change stuff, you must repost the entire series. And this is > one of many reasons I want people to keep patch sets small, so that > this

Re: [PATCH net-next 04/24] rxrpc: Avoid using stack memory in SG lists in rxkad

2016-07-06 Thread David Howells
Andy Lutomirski wrote: > > From: Herbert Xu > > > > rxkad uses stack memory in SG lists which would not work if stacks were > > allocated from vmalloc memory. In fact, in most cases this isn't even > > necessary as the stack memory ends up

[GIT PULL net-next] rxrpc: Improve conn/call lookup and fix call number generation [ver #3]

2016-07-06 Thread David Howells
rpc: Kill off the call hash table (2016-07-06 11:23:54 +0100) RxRPC rewrite ---- David Howells (21): rxrpc: Fix processing of authenticated/encrypted jumbo pack

Re: [PATCH net-next 06/24] rxrpc: Dup the main conn list for the proc interface

2016-07-05 Thread David Howells
David Miller wrote: > Wouldn't it be better to just code the proc stuff to walk whatever > table the rest of the stack uses to hold all of the connections > as TCP et al. do? I should also mention that this is an intermediate step. Splitting out the procfs list makes it

Re: [PATCH net-next 05/24] rxrpc: Provide more refcount helper functions

2016-07-05 Thread David Howells
be a race with someone else trying to queue it. What will have to be done is to adjust the refcount depending on the result of the queue operation. Signed-off-by: David Howells <dhowe...@redhat.com> but not changing the patch. David

Re: [PATCH net-next 01/24] rxrpc: Fix processing of authenticated/encrypted jumbo packets

2016-07-05 Thread David Howells
Sergei Shtylyov wrote: > > When commit 0d12f8a4027d021c9cc942f09f38d28288020c5d moved to keeping the > >scripts/checkpatch.pl now enforces the common commit citing style as for > the Fixes: tag and the patch description, you need to specify the summary

Re: [PATCH net-next 06/24] rxrpc: Dup the main conn list for the proc interface

2016-07-05 Thread David Howells
David Miller wrote: > Wouldn't it be better to just code the proc stuff to walk whatever > table the rest of the stack uses to hold all of the connections > as TCP et al. do? There won't be "a table" that the rest of the stack uses. There will be more than one. Service

Re: [PATCH net-next 05/24] rxrpc: Provide more refcount helper functions

2016-07-05 Thread David Howells
David Miller wrote: > I don't see anything in this patch dealing with refcount helper functions. Good point. I split that part out and you took it already. Will amend. David

[PATCH net-next 14/24] rxrpc: Call channels should have separate call number spaces

2016-07-05 Thread David Howells
ll number for the next call (it doesn't know the server already saw the call number), but the server thinks it already has the first packet of this call (it doesn't know that the client doesn't know that it saw the call number the first time). Signed-off-by: David Howells <dhowe..

[PATCH net-next 00/24] rxrpc: Improve conn/call lookup and fix call number generation [ver #2]

2016-07-05 Thread David Howells
git/log/?h=rxrpc-rewrite Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160705 David --- David Howells (22): rxrpc: Fix processing of authenticated/encrypted jumbo packets rxrpc: Fix some sparse errors rxrpc: Ch

[PATCH net-next 01/24] rxrpc: Fix processing of authenticated/encrypted jumbo packets

2016-07-05 Thread David Howells
:33:got restricted __be16 [addressable] [usertype] _rsvd 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 f4bd57b77b93..5f26cae43069 100644 --- a/net

[PATCH net-next 13/24] rxrpc: Access socket accept queue under right lock

2016-07-05 Thread David Howells
The socket's accept queue (socket->acceptq) should be accessed under socket->call_lock, not under the connection lock. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_event.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/

[PATCH net-next 11/24] rxrpc: Release a call's connection ref on call disconnection

2016-07-05 Thread David Howells
taking from rxrpc_release_call() to rxrpc_disconnect_call() where it will be required in future. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_event.c | 10 +- net/rxrpc/call_object.c | 26 +- net/rxrpc/conn_object.c |8 +

[PATCH net-next 12/24] rxrpc: Add RCU destruction for connections and calls

2016-07-05 Thread David Howells
) and add the extra RCU barrier required for connection cleanup. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/af_rxrpc.c | 19 --- net/rxrpc/ar-internal.h |4 +++- net/rxrpc/call_object.c | 18 +++--- net/rxrpc/conn_event.c

[PATCH net-next 15/24] rxrpc: Split client connection code out into its own file

2016-07-05 Thread David Howells
Split the client-specific connection code out into its own file. It will behave somewhat differently from the service-specific connection code, so it makes sense to separate them. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |7 + net/rxrpc/conn_cl

[PATCH net-next 05/24] rxrpc: Provide more refcount helper functions

2016-07-05 Thread David Howells
Provide refcount helper functions for connections so that the code doesn't touch conn->usage directly. Also provide queueing helper functions so that the queueing of local and connection objects can be fixed later. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-i

[PATCH net-next 04/24] rxrpc: Avoid using stack memory in SG lists in rxkad

2016-07-05 Thread David Howells
inally there is no need to split a split-page buffer into two SG entries so code dealing with that has been removed. Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: Andy Lutomirski <l...@kernel.org> Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rx

[PATCH net-next 16/24] rxrpc: Split service connection code out into its own file

2016-07-05 Thread David Howells
Split the service-specific connection code out into into its own file. The client-specific code has already been split out. This will leave just the common code in the original file. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/Makefile |1 net/rx

[PATCH net-next 17/24] rxrpc: Move peer lookup from call-accept to new-incoming-conn

2016-07-05 Thread David Howells
() with rxrpc_extract_addr_from_skb() as I'm going to delete the former in the very near future. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |3 ++- net/rxrpc/call_accept.c | 31 +++ net/rxrpc/conn_service.c | 11 ++- net/rxrpc/u

[PATCH net-next 07/24] rxrpc: Turn connection #defines into enums and put outside struct def

2016-07-05 Thread David Howells
and use that in the state text array. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h | 42 ++ net/rxrpc/call_accept.c |6 +++--- net/rxrpc/conn_event.c |6 +++--- net/rxrpc/conn_object.c |4 ++-- net

[PATCH net-next 02/24] rxrpc: Fix some sparse errors

2016-07-05 Thread David Howells
/rxrpc/conn_object.c:411:21: warning: restricted __be32 degrades to integer ../net/rxrpc/conn_object.c:413:26: warning: restricted __be32 degrades to integer Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/conn_object.c |5 ++--- 1 file changed, 2 insertions(+), 3 del

[PATCH net-next 18/24] rxrpc: Maintain an extra ref on a conn for the cache list

2016-07-05 Thread David Howells
and the rb_tree ops. The rb_tree op would still need to be under the lock, however. (4) When trying to reap an old connection, we try to flip the usage count from 1 to 0. If it's not 1 at that point, then it must've come back to life temporarily and we ignore it. Signed-off-by: David

[PATCH net-next 22/24] rcu: Suppress sparse warnings for rcu_dereference_raw()

2016-07-05 Thread David Howells
inters, sparse will complain about all RCU uses. This commit therefore suppresses sparse warnings for rcu_dereference_raw(), allowing mixed-protection data structures to avoid these warnings. Reported-by: David Howells <dhowe...@redhat.com> Signed-off-by: Paul E. McKenney <paul...@lin

[PATCH net-next 24/24] rxrpc: Kill off the call hash table

2016-07-05 Thread David Howells
The call hash table is now no longer used as calls are looked up directly by channel slot on the connection, so kill it off. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h | 13 +--- net/rxrpc/call_object.c

[PATCH net-next 19/24] rxrpc: Prune the contents of the rxrpc_conn_proto struct

2016-07-05 Thread David Howells
Prune the contents of the rxrpc_conn_proto struct. Most of the fields aren't used anymore. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h | 20 +++- net/rxrpc/call_object.c |2 +- net/rxrpc/conn_client.c | 11 --- net

[PATCH net-next 21/24] Introduce rb_replace_node_rcu()

2016-07-05 Thread David Howells
Implement an RCU-safe variant of rb_replace_node() and rearrange rb_replace_node() to do things in the same order. Signed-off-by: David Howells <dhowe...@redhat.com> Acked-by: Peter Zijlstra (Intel) <pet...@infradead.org> --- include/linux/rbtree.h |2 ++ i

[PATCH net-next 23/24] rxrpc: Use RCU to access a peer's service connection tree

2016-07-05 Thread David Howells
ng, given knowledge of the hash algorithm. Peers, however, are hashed as the network address is less controllable by the client. The total number of peers will also be limited in a future commit. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h | 21

[PATCH net-next 20/24] rxrpc: Move data_ready peer lookup into rxrpc_find_connection()

2016-07-05 Thread David Howells
Move the peer lookup done in input.c by data_ready into rxrpc_find_connection(). Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |3 -- net/rxrpc/conn_object.c | 73 --- net/rxrpc/input.c

[PATCH net-next 03/24] rxrpc: Check the source of a packet to a client conn

2016-07-05 Thread David Howells
When looking up a client connection to which to route a packet, we need to check that the packet came from the correct source so that a peer can't try to muck around with another peer's connection. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/conn_object.c |4 +

[PATCH net-next 09/24] rxrpc: Move usage count getting into rxrpc_queue_conn()

2016-07-05 Thread David Howells
using RCU there so that's otherwise redundant. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |9 - net/rxrpc/call_accept.c |1 - net/rxrpc/conn_event.c |8 +--- net/rxrpc/input.c |1 - 4 files changed, 9 insertions(

[PATCH net-next 06/24] rxrpc: Dup the main conn list for the proc interface

2016-07-05 Thread David Howells
and service conns acquire their own separate connection management strategies. Whilst we're at it, use the address information stored in conn->proto when displaying through procfs rather than accessing the peer record. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-i

[PATCH net-next 10/24] rxrpc: Fix handling of connection failure in client call creation

2016-07-05 Thread David Howells
->link should be reinitialised after being deleted in rxrpc_new_client_call() - which otherwise leads to a failure later when the call cleanup attempts to delete the link again. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_object.c |4 +++- 1 file c

[PATCH net-next 08/24] rxrpc: Check that the client conns cache is empty before module removal

2016-07-05 Thread David Howells
the connections. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/af_rxrpc.c|3 +-- net/rxrpc/ar-internal.h |1 + net/rxrpc/conn_client.c | 19 +++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c

Re: [PATCH net-next 19/19] rxrpc: Use RCU to access a peer's service connection tree

2016-06-30 Thread David Howells
David Howells <dhowe...@redhat.com> wrote: > > You want rb_link_node_rcu() here. > > Should there be an rb_replace_node_rcu() also? Or I could make rb_replace_node() RCU friendly. What do you think of the attached changes (split into appropriate patches)? It's a case of

Re: [PATCH net-next 19/19] rxrpc: Use RCU to access a peer's service connection tree

2016-06-30 Thread David Howells
Peter Zijlstra wrote: > > + if (conn->proto.index_key < k.index_key) > > + p = p->rb_left; > > + else if (conn->proto.index_key > k.index_key) > > + p = p->rb_right; > > You still very

[PATCH net-next 08/19] rxrpc: Fix handling of connection failure in client call creation

2016-06-30 Thread David Howells
->link should be reinitialised after being deleted in rxrpc_new_client_call() - which otherwise leads to a failure later when the call cleanup attempts to delete the link again. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_object.c |4 +++- 1 file c

Re: [PATCH net-next 00/19] rxrpc: Improve conn/call lookup and fix call number generation

2016-06-30 Thread David Howells
Sigh. It seems I misunderstood the comment on read_seqbegin_or_lock() and failed to initialise seq in rxrpc_find_service_conn_rcu(). For some reason my compiler didn't notice, though Fengguang's magic compile farm did. So, please ignore this version of the patchset and I'll post a new set.

[PATCH net-next 05/19] rxrpc: Turn connection #defines into enums and put outside struct def

2016-06-30 Thread David Howells
and use that in the state text array. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h | 42 ++ net/rxrpc/call_accept.c |6 +++--- net/rxrpc/conn_event.c |6 +++--- net/rxrpc/conn_object.c |4 ++-- net

[PATCH net-next 07/19] rxrpc: Move usage count getting into rxrpc_queue_conn()

2016-06-30 Thread David Howells
using RCU there so that's otherwise redundant. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |9 - net/rxrpc/call_accept.c |1 - net/rxrpc/conn_event.c |8 +--- net/rxrpc/input.c |1 - 4 files changed, 9 insertions(

[PATCH net-next 06/19] rxrpc: Check that the client conns cache is empty before module removal

2016-06-30 Thread David Howells
the connections. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/af_rxrpc.c|3 +-- net/rxrpc/ar-internal.h |1 + net/rxrpc/conn_client.c | 19 +++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c

[PATCH net-next 04/19] rxrpc: Dup the main conn list for the proc interface

2016-06-30 Thread David Howells
and service conns acquire their own separate connection management strategies. Whilst we're at it, use the address information stored in conn->proto when displaying through procfs rather than accessing the peer record. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-i

[PATCH net-next 18/19] rxrpc: Move data_ready peer lookup into rxrpc_find_connection()

2016-06-30 Thread David Howells
Move the peer lookup done in input.c by data_ready into rxrpc_find_connection(). Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |3 -- net/rxrpc/conn_object.c | 73 --- net/rxrpc/input.c

[PATCH net-next 09/19] rxrpc: Release a call's connection ref on call disconnection

2016-06-30 Thread David Howells
taking from rxrpc_release_call() to rxrpc_disconnect_call() where it will be required in future. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_event.c | 10 +- net/rxrpc/call_object.c | 26 +- net/rxrpc/conn_object.c |8 +

[PATCH net-next 12/19] rxrpc: Call channels should have separate call number spaces

2016-06-30 Thread David Howells
ll number for the next call (it doesn't know the server already saw the call number), but the server thinks it already has the first packet of this call (it doesn't know that the client doesn't know that it saw the call number the first time). Signed-off-by: David Howells <dhowe..

[PATCH net-next 16/19] rxrpc: Maintain an extra ref on a conn for the cache list

2016-06-30 Thread David Howells
and the rb_tree ops. The rb_tree op would still need to be under the lock, however. (4) When trying to reap an old connection, we try to flip the usage count from 1 to 0. If it's not 1 at that point, then it must've come back to life temporarily and we ignore it. Signed-off-by: David

[PATCH net-next 15/19] rxrpc: Move peer lookup from call-accept to new-incoming-conn

2016-06-30 Thread David Howells
() with rxrpc_extract_addr_from_skb() as I'm going to delete the former in the very near future. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |3 ++- net/rxrpc/call_accept.c | 31 +++ net/rxrpc/conn_service.c | 11 ++- net/rxrpc/u

[PATCH net-next 02/19] rxrpc: Avoid using stack memory in SG lists in rxkad

2016-06-30 Thread David Howells
inally there is no need to split a split-page buffer into two SG entries so code dealing with that has been removed. Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: Andy Lutomirski <l...@kernel.org> Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rx

[PATCH net-next 19/19] rxrpc: Use RCU to access a peer's service connection tree

2016-06-30 Thread David Howells
ng, given knowledge of the hash algorithm. Peers, however, are hashed as the network address is less controllable by the client. The total number of peers will also be limited in a future commit. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h | 21

[PATCH net-next 11/19] rxrpc: Access socket accept queue under right lock

2016-06-30 Thread David Howells
The socket's accept queue (socket->acceptq) should be accessed under socket->call_lock, not under the connection lock. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/call_event.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/

[PATCH net-next 13/19] rxrpc: Split client connection code out into its own file

2016-06-30 Thread David Howells
Split the client-specific connection code out into its own file. It will behave somewhat differently from the service-specific connection code, so it makes sense to separate them. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/ar-internal.h |7 + net/rxrpc/conn_cl

[PATCH net-next 10/19] rxrpc: Add RCU destruction for connections and calls

2016-06-30 Thread David Howells
) and add the extra RCU barrier required for connection cleanup. Signed-off-by: David Howells <dhowe...@redhat.com> --- net/rxrpc/af_rxrpc.c | 19 --- net/rxrpc/ar-internal.h |4 +++- net/rxrpc/call_object.c | 15 +-- net/rxrpc/conn_object.c

<    1   2   3   4   5   6   7   8   9   >