Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1488487
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next 8/9] rxrpc: Reduce the number of PING ACKs sent |
| Date | 2016-09-22 02:50 +0200 |
| Message-ID | <sk0n8-7Ht-11@gated-at.bofh.it> (permalink) |
| References | <sk0dr-7E9-3@gated-at.bofh.it> |
| Organization | Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 |
We don't want to send a PING ACK for every new incoming call as that just
adds to the network traffic. Instead, we send a PING ACK to the first
three that we receive and then once per second thereafter.
This could probably be made adjustable in future.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/input.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index c121949de3c8..cbb5d53f09d7 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -44,9 +44,12 @@ static void rxrpc_send_ping(struct rxrpc_call *call, struct sk_buff *skb,
int skew)
{
struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
+ ktime_t now = skb->tstamp;
- rxrpc_propose_ACK(call, RXRPC_ACK_PING, skew, sp->hdr.serial,
- true, true);
+ if (call->peer->rtt_usage < 3 ||
+ ktime_before(ktime_add_ms(call->peer->rtt_last_req, 1000), now))
+ rxrpc_propose_ACK(call, RXRPC_ACK_PING, skew, sp->hdr.serial,
+ true, true);
}
/*
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 0/9] rxrpc: Preparation for slow-start algorithm David Howells <dhowells@redhat.com> - 2016-09-22 02:40 +0200
[PATCH net-next 3/9] rxrpc: Add per-peer RTT tracker David Howells <dhowells@redhat.com> - 2016-09-22 02:40 +0200
Re: [PATCH net-next 3/9] rxrpc: Add per-peer RTT tracker kbuild test robot <lkp@intel.com> - 2016-09-22 06:40 +0200
[PATCH net-next 2/9] rxrpc: Add re-sent Tx annotation David Howells <dhowells@redhat.com> - 2016-09-22 02:40 +0200
[PATCH net-next 1/9] rxrpc: Don't store the rxrpc header in the Tx queue sk_buffs David Howells <dhowells@redhat.com> - 2016-09-22 02:40 +0200
[PATCH net-next 5/9] rxrpc: Expedite ping response transmission David Howells <dhowells@redhat.com> - 2016-09-22 02:50 +0200
[PATCH net-next 6/9] rxrpc: Add ktime_sub_ms() David Howells <dhowells@redhat.com> - 2016-09-22 02:50 +0200
[PATCH net-next 4/9] rxrpc: Send pings to get RTT data David Howells <dhowells@redhat.com> - 2016-09-22 02:50 +0200
[PATCH net-next 8/9] rxrpc: Reduce the number of PING ACKs sent David Howells <dhowells@redhat.com> - 2016-09-22 02:50 +0200
[PATCH net-next 7/9] rxrpc: Obtain RTT data by requesting ACKs on DATA packets David Howells <dhowells@redhat.com> - 2016-09-22 02:50 +0200
[PATCH net-next 9/9] rxrpc: Reduce the number of ACK-Requests sent David Howells <dhowells@redhat.com> - 2016-09-22 02:50 +0200
Re: [PATCH net-next 9/9] rxrpc: Reduce the number of ACK-Requests sent kbuild test robot <lkp@intel.com> - 2016-09-22 07:30 +0200
Re: [PATCH net-next 0/9] rxrpc: Preparation for slow-start algorithm David Howells <dhowells@redhat.com> - 2016-09-22 10:20 +0200
csiph-web