summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/proc.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-08-23 15:27:25 +0100
committerDavid Howells <dhowells@redhat.com>2016-08-23 16:02:35 +0100
commit563ea7d5d4eaf0ff63ddcaf8ed849eb88bb5738d (patch)
tree0a440b2f02e5a16d30058aa8b0f8fb10e8584b35 /net/rxrpc/proc.c
parentf51b4480021c470d1f5e8066ccc7c10513bd4e37 (diff)
downloadlinux-stable-563ea7d5d4eaf0ff63ddcaf8ed849eb88bb5738d.tar.gz
linux-stable-563ea7d5d4eaf0ff63ddcaf8ed849eb88bb5738d.tar.bz2
linux-stable-563ea7d5d4eaf0ff63ddcaf8ed849eb88bb5738d.zip
rxrpc: Calculate serial skew on packet reception
Calculate the serial number skew in the data_ready handler when a packet has been received and a connection looked up. The skew is cached in the sk_buff's priority field. The connection highest received serial number is updated at this time also. This can be done without locks or atomic instructions because, at this point, the code is serialised by the socket. This generates more accurate skew data because if the packet is offloaded to a work queue before this is determined, more packets may come in, bumping the highest serial number and thereby increasing the apparent skew. This also removes some unnecessary atomic ops. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/proc.c')
-rw-r--r--net/rxrpc/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/proc.c b/net/rxrpc/proc.c
index f92de18b5893..31b7f36a39cb 100644
--- a/net/rxrpc/proc.c
+++ b/net/rxrpc/proc.c
@@ -165,7 +165,7 @@ static int rxrpc_connection_seq_show(struct seq_file *seq, void *v)
rxrpc_conn_states[conn->state],
key_serial(conn->params.key),
atomic_read(&conn->serial),
- atomic_read(&conn->hi_serial));
+ conn->hi_serial);
return 0;
}