diff options
author | David Howells <dhowells@redhat.com> | 2016-08-23 15:27:25 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-08-23 16:02:35 +0100 |
commit | 563ea7d5d4eaf0ff63ddcaf8ed849eb88bb5738d (patch) | |
tree | 0a440b2f02e5a16d30058aa8b0f8fb10e8584b35 /net/rxrpc/skbuff.c | |
parent | f51b4480021c470d1f5e8066ccc7c10513bd4e37 (diff) | |
download | op-kernel-dev-563ea7d5d4eaf0ff63ddcaf8ed849eb88bb5738d.zip op-kernel-dev-563ea7d5d4eaf0ff63ddcaf8ed849eb88bb5738d.tar.gz |
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/skbuff.c')
-rw-r--r-- | net/rxrpc/skbuff.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/rxrpc/skbuff.c b/net/rxrpc/skbuff.c index d28058a..fbd8c74 100644 --- a/net/rxrpc/skbuff.c +++ b/net/rxrpc/skbuff.c @@ -53,9 +53,9 @@ static void rxrpc_request_final_ACK(struct rxrpc_call *call) /* * drop the bottom ACK off of the call ACK window and advance the window */ -static void rxrpc_hard_ACK_data(struct rxrpc_call *call, - struct rxrpc_skb_priv *sp) +static void rxrpc_hard_ACK_data(struct rxrpc_call *call, struct sk_buff *skb) { + struct rxrpc_skb_priv *sp = rxrpc_skb(skb); int loop; u32 seq; @@ -91,8 +91,8 @@ static void rxrpc_hard_ACK_data(struct rxrpc_call *call, * its Tx bufferage. */ _debug("send Rx idle ACK"); - __rxrpc_propose_ACK(call, RXRPC_ACK_IDLE, sp->hdr.serial, - false); + __rxrpc_propose_ACK(call, RXRPC_ACK_IDLE, + skb->priority, sp->hdr.serial, false); } spin_unlock_bh(&call->lock); @@ -125,7 +125,7 @@ void rxrpc_kernel_data_consumed(struct rxrpc_call *call, struct sk_buff *skb) ASSERTCMP(sp->hdr.seq, >, call->rx_data_eaten); call->rx_data_recv = sp->hdr.seq; - rxrpc_hard_ACK_data(call, sp); + rxrpc_hard_ACK_data(call, skb); } EXPORT_SYMBOL(rxrpc_kernel_data_consumed); |