Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1485624 > unrolled thread
| Started by | David Howells <dhowells@redhat.com> |
|---|---|
| First post | 2016-09-18 01:20 +0200 |
| Last post | 2016-09-19 08:00 +0200 |
| Articles | 15 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH net-next 00/14] rxrpc: Fixes & miscellany David Howells <dhowells@redhat.com> - 2016-09-18 01:20 +0200
[PATCH net-next 09/14] rxrpc: Fix unexposed client conn release David Howells <dhowells@redhat.com> - 2016-09-18 01:20 +0200
[PATCH net-next 12/14] rxrpc: Don't transmit an ACK if there's no reason set David Howells <dhowells@redhat.com> - 2016-09-18 01:20 +0200
[PATCH net-next 07/14] rxrpc: Fix the putting of client connections David Howells <dhowells@redhat.com> - 2016-09-18 01:20 +0200
[PATCH net-next 14/14] rxrpc: Fix the basic transmit DATA packet content size at 1412 bytes David Howells <dhowells@redhat.com> - 2016-09-18 01:20 +0200
[PATCH net-next 06/14] rxrpc: Purge the to_be_accepted queue on socket release David Howells <dhowells@redhat.com> - 2016-09-18 01:20 +0200
[PATCH net-next 01/14] rxrpc: Remove some whitespace. David Howells <dhowells@redhat.com> - 2016-09-18 01:20 +0200
[PATCH net-next 03/14] rxrpc: Check the return value of rxrpc_locate_data() David Howells <dhowells@redhat.com> - 2016-09-18 01:20 +0200
[PATCH net-next 11/14] rxrpc: Fix retransmission algorithm David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
[PATCH net-next 05/14] rxrpc: Record calls that need to be accepted David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
[PATCH net-next 13/14] rxrpc: Be consistent about switch value in rxrpc_send_call_packet() David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
[PATCH net-next 02/14] rxrpc: Move the check of rx_pkt_offset from rxrpc_locate_data() to caller David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
[PATCH net-next 10/14] rxrpc: Fix the parsing of soft-ACKs David Howells <dhowells@redhat.com> - 2016-09-18 01:30 +0200
Re: [PATCH net-next 00/14] rxrpc: Fixes & miscellany David Miller <davem@davemloft.net> - 2016-09-18 13:30 +0200
Re: [PATCH net-next 00/14] rxrpc: Fixes & miscellany David Miller <davem@davemloft.net> - 2016-09-19 08:00 +0200
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:20 +0200 |
| Subject | [PATCH net-next 00/14] rxrpc: Fixes & miscellany |
| Message-ID | <six3P-mU-3@gated-at.bofh.it> |
Here are some more AF_RXRPC fix patches with a couple of miscellaneous
changes also. Fixes include:
(1) Make RxRPC IPv6 support conditional on IPv6 being available.
(2) Move the condition check in rxrpc_locate_data() into the caller and
check the error return.
(3) Fix the detection of the last received packet in recvmsg.
(4) Account calls that need acceptance and clean up any unaccepted ones if
the socket gets closed.
(5) Fix the cleanup of client connections.
(6) Fix the soft-ACK parsing and the retransmission of packets based on
those ACKs.
(7) Suppress transmission of an ACK when there's no pending ACK to
transmit because another thread stole it.
And some miscellany:
(8) Whitespace removal.
(9) Switch-value consistency in rxrpc_send_call_packet().
(10) Fix the basic transmission packet size to allow for spur-of-the-moment
jumbo DATA packet production.
The patches can be found here also (non-terminally on the branch):
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-20160917-1
David
---
David Howells (14):
rxrpc: Remove some whitespace.
rxrpc: Move the check of rx_pkt_offset from rxrpc_locate_data() to caller
rxrpc: Check the return value of rxrpc_locate_data()
rxrpc: Fix handling of the last packet in rxrpc_recvmsg_data()
rxrpc: Record calls that need to be accepted
rxrpc: Purge the to_be_accepted queue on socket release
rxrpc: Fix the putting of client connections
rxrpc: Call rxrpc_release_call() on error in rxrpc_new_client_call()
rxrpc: Fix unexposed client conn release
rxrpc: Fix the parsing of soft-ACKs
rxrpc: Fix retransmission algorithm
rxrpc: Don't transmit an ACK if there's no reason set
rxrpc: Be consistent about switch value in rxrpc_send_call_packet()
rxrpc: Fix the basic transmit DATA packet content size at 1412 bytes
net/rxrpc/call_accept.c | 2 ++
net/rxrpc/call_event.c | 14 ++++--------
net/rxrpc/call_object.c | 46 ++++++++++++++++++++---------------------
net/rxrpc/conn_client.c | 29 ++++++++++++--------------
net/rxrpc/input.c | 6 ++++-
net/rxrpc/output.c | 7 +++++-
net/rxrpc/recvmsg.c | 53 ++++++++++++++++++++++++++++++++---------------
net/rxrpc/sendmsg.c | 2 +-
8 files changed, 89 insertions(+), 70 deletions(-)
[toc] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:20 +0200 |
| Subject | [PATCH net-next 09/14] rxrpc: Fix unexposed client conn release |
| Message-ID | <six3P-mU-9@gated-at.bofh.it> |
| In reply to | #1485624 |
If the last call on a client connection is release after the connection has had a bunch of calls allocated but before any DATA packets are sent (so that it's not yet marked RXRPC_CONN_EXPOSED), an assertion will happen in rxrpc_disconnect_client_call(). af_rxrpc: Assertion failed - 1(0x1) >= 2(0x2) is false ------------[ cut here ]------------ kernel BUG at ../net/rxrpc/conn_client.c:753! This is because it's expecting the conn to have been exposed and to have 2 or more refs - but this isn't necessarily the case. Simply remove the assertion. This allows the conn to be moved into the inactive state and deleted if it isn't resurrected before the final put is called. Signed-off-by: David Howells <dhowells@redhat.com> --- net/rxrpc/conn_client.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c index 5a675c43cace..226bc910e556 100644 --- a/net/rxrpc/conn_client.c +++ b/net/rxrpc/conn_client.c @@ -721,7 +721,6 @@ void rxrpc_disconnect_client_call(struct rxrpc_call *call) } ASSERTCMP(rcu_access_pointer(chan->call), ==, call); - ASSERTCMP(atomic_read(&conn->usage), >=, 2); /* If a client call was exposed to the world, we save the result for * retransmission.
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:20 +0200 |
| Subject | [PATCH net-next 12/14] rxrpc: Don't transmit an ACK if there's no reason set |
| Message-ID | <six3P-mU-7@gated-at.bofh.it> |
| In reply to | #1485624 |
Don't transmit an ACK if call->ackr_reason in unset. There's the
possibility of a race between recvmsg() sending an ACK and the background
processing thread trying to send the same one.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/output.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c
index 06a9aca739d1..aa0507214b31 100644
--- a/net/rxrpc/output.c
+++ b/net/rxrpc/output.c
@@ -137,6 +137,11 @@ int rxrpc_send_call_packet(struct rxrpc_call *call, u8 type)
switch (type) {
case RXRPC_PACKET_TYPE_ACK:
spin_lock_bh(&call->lock);
+ if (!call->ackr_reason) {
+ spin_unlock_bh(&call->lock);
+ ret = 0;
+ goto out;
+ }
n = rxrpc_fill_out_ack(call, pkt);
call->ackr_reason = 0;
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:20 +0200 |
| Subject | [PATCH net-next 07/14] rxrpc: Fix the putting of client connections |
| Message-ID | <six3Q-mU-11@gated-at.bofh.it> |
| In reply to | #1485624 |
In rxrpc_put_one_client_conn(), if a connection has RXRPC_CONN_COUNTED set
on it, then it's accounted for in rxrpc_nr_client_conns and may be on
various lists - and this is cleaned up correctly.
However, if the connection doesn't have RXRPC_CONN_COUNTED set on it, then
the put routine returns rather than just skipping the extra bit of cleanup.
Fix this by making the extra bit of clean up conditional instead and always
killing off the connection.
This manifests itself as connections with a zero usage count hanging around
in /proc/net/rxrpc_conns because the connection allocated, but discarded,
due to a race with another process that set up a parallel connection, which
was then shared instead.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/conn_client.c | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c
index 9344a8416ceb..5a675c43cace 100644
--- a/net/rxrpc/conn_client.c
+++ b/net/rxrpc/conn_client.c
@@ -818,7 +818,7 @@ idle_connection:
static struct rxrpc_connection *
rxrpc_put_one_client_conn(struct rxrpc_connection *conn)
{
- struct rxrpc_connection *next;
+ struct rxrpc_connection *next = NULL;
struct rxrpc_local *local = conn->params.local;
unsigned int nr_conns;
@@ -834,24 +834,22 @@ rxrpc_put_one_client_conn(struct rxrpc_connection *conn)
ASSERTCMP(conn->cache_state, ==, RXRPC_CONN_CLIENT_INACTIVE);
- if (!test_bit(RXRPC_CONN_COUNTED, &conn->flags))
- return NULL;
-
- spin_lock(&rxrpc_client_conn_cache_lock);
- nr_conns = --rxrpc_nr_client_conns;
+ if (test_bit(RXRPC_CONN_COUNTED, &conn->flags)) {
+ spin_lock(&rxrpc_client_conn_cache_lock);
+ nr_conns = --rxrpc_nr_client_conns;
+
+ if (nr_conns < rxrpc_max_client_connections &&
+ !list_empty(&rxrpc_waiting_client_conns)) {
+ next = list_entry(rxrpc_waiting_client_conns.next,
+ struct rxrpc_connection, cache_link);
+ rxrpc_get_connection(next);
+ rxrpc_activate_conn(next);
+ }
- next = NULL;
- if (nr_conns < rxrpc_max_client_connections &&
- !list_empty(&rxrpc_waiting_client_conns)) {
- next = list_entry(rxrpc_waiting_client_conns.next,
- struct rxrpc_connection, cache_link);
- rxrpc_get_connection(next);
- rxrpc_activate_conn(next);
+ spin_unlock(&rxrpc_client_conn_cache_lock);
}
- spin_unlock(&rxrpc_client_conn_cache_lock);
rxrpc_kill_connection(conn);
-
if (next)
rxrpc_activate_channels(next);
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:20 +0200 |
| Subject | [PATCH net-next 14/14] rxrpc: Fix the basic transmit DATA packet content size at 1412 bytes |
| Message-ID | <six3Q-mU-17@gated-at.bofh.it> |
| In reply to | #1485624 |
Fix the basic transmit DATA packet content size at 1412 bytes so that they can be arbitrarily assembled into jumbo packets. In the future, I'm thinking of moving to keeping a jumbo packet header at the beginning of each packet in the Tx queue and creating the packet header on the spot when kernel_sendmsg() is invoked. That way, jumbo packets can be assembled on the spur of the moment for (re-)transmission. Signed-off-by: David Howells <dhowells@redhat.com> --- net/rxrpc/sendmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c index cba236575073..8bfddf4e338c 100644 --- a/net/rxrpc/sendmsg.c +++ b/net/rxrpc/sendmsg.c @@ -214,7 +214,7 @@ static int rxrpc_send_data(struct rxrpc_sock *rx, goto maybe_error; } - max = call->conn->params.peer->maxdata; + max = RXRPC_JUMBO_DATALEN; max -= call->conn->security_size; max &= ~(call->conn->size_align - 1UL);
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:20 +0200 |
| Subject | [PATCH net-next 06/14] rxrpc: Purge the to_be_accepted queue on socket release |
| Message-ID | <six3Q-mU-13@gated-at.bofh.it> |
| In reply to | #1485624 |
Purge the queue of to_be_accepted calls on socket release. Note that
purging sock_calls doesn't release the ref owned by to_be_accepted.
Probably the sock_calls list is redundant given a purges of the recvmsg_q,
the to_be_accepted queue and the calls tree.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/call_object.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c
index 22f9b0d1a138..b0ffbd9664e6 100644
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@ -476,6 +476,16 @@ void rxrpc_release_calls_on_socket(struct rxrpc_sock *rx)
_enter("%p", rx);
+ while (!list_empty(&rx->to_be_accepted)) {
+ call = list_entry(rx->to_be_accepted.next,
+ struct rxrpc_call, accept_link);
+ list_del(&call->accept_link);
+ rxrpc_abort_call("SKR", call, 0, RX_CALL_DEAD, ECONNRESET);
+ rxrpc_send_call_packet(call, RXRPC_PACKET_TYPE_ABORT);
+ rxrpc_release_call(rx, call);
+ rxrpc_put_call(call, rxrpc_call_put);
+ }
+
while (!list_empty(&rx->sock_calls)) {
call = list_entry(rx->sock_calls.next,
struct rxrpc_call, sock_link);
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:20 +0200 |
| Subject | [PATCH net-next 01/14] rxrpc: Remove some whitespace. |
| Message-ID | <six3Q-mU-19@gated-at.bofh.it> |
| In reply to | #1485624 |
Remove a tab that's on a line that should otherwise be blank.
Signed-off-by: David Howells <dhowells@redhat.com>
---
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 61432049869b..9367c3be31eb 100644
--- a/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -31,7 +31,7 @@ static void rxrpc_set_timer(struct rxrpc_call *call)
_enter("{%ld,%ld,%ld:%ld}",
call->ack_at - now, call->resend_at - now, call->expire_at - now,
call->timer.expires - now);
-
+
read_lock_bh(&call->state_lock);
if (call->state < RXRPC_CALL_COMPLETE) {
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:20 +0200 |
| Subject | [PATCH net-next 03/14] rxrpc: Check the return value of rxrpc_locate_data() |
| Message-ID | <six3Q-mU-21@gated-at.bofh.it> |
| In reply to | #1485624 |
Check the return value of rxrpc_locate_data() in rxrpc_recvmsg_data().
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/recvmsg.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c
index 0d085f5cf1bf..1edf2cf62cc5 100644
--- a/net/rxrpc/recvmsg.c
+++ b/net/rxrpc/recvmsg.c
@@ -300,10 +300,13 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call,
if (msg)
sock_recv_timestamp(msg, sock->sk, skb);
- if (rx_pkt_offset == 0)
+ if (rx_pkt_offset == 0) {
ret = rxrpc_locate_data(call, skb,
&call->rxtx_annotations[ix],
&rx_pkt_offset, &rx_pkt_len);
+ if (ret < 0)
+ goto out;
+ }
_debug("recvmsg %x DATA #%u { %d, %d }",
sp->hdr.callNumber, seq, rx_pkt_offset, rx_pkt_len);
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:30 +0200 |
| Subject | [PATCH net-next 11/14] rxrpc: Fix retransmission algorithm |
| Message-ID | <sixdw-qm-5@gated-at.bofh.it> |
| In reply to | #1485624 |
Make the retransmission algorithm use for-loops instead of do-loops and
move the counter increments into the for-statement increment slots.
Though the do-loops are slighly more efficient since there will be at least
one pass through the each loop, the counter increments are harder to get
right as the continue-statements skip them.
Without this, if there are any positive acks within the loop, the do-loop
will cycle forever because the counter increment is never done.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/call_event.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c
index 9367c3be31eb..f0cabc48a1b7 100644
--- a/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -163,8 +163,7 @@ static void rxrpc_resend(struct rxrpc_call *call)
*/
now = jiffies;
resend_at = now + rxrpc_resend_timeout;
- seq = cursor + 1;
- do {
+ for (seq = cursor + 1; before_eq(seq, top); seq++) {
ix = seq & RXRPC_RXTX_BUFF_MASK;
annotation = call->rxtx_annotations[ix];
if (annotation == RXRPC_TX_ANNO_ACK)
@@ -184,8 +183,7 @@ static void rxrpc_resend(struct rxrpc_call *call)
/* Okay, we need to retransmit a packet. */
call->rxtx_annotations[ix] = RXRPC_TX_ANNO_RETRANS;
- seq++;
- } while (before_eq(seq, top));
+ }
call->resend_at = resend_at;
@@ -194,8 +192,7 @@ static void rxrpc_resend(struct rxrpc_call *call)
* lock is dropped, it may clear some of the retransmission markers for
* packets that it soft-ACKs.
*/
- seq = cursor + 1;
- do {
+ for (seq = cursor + 1; before_eq(seq, top); seq++) {
ix = seq & RXRPC_RXTX_BUFF_MASK;
annotation = call->rxtx_annotations[ix];
if (annotation != RXRPC_TX_ANNO_RETRANS)
@@ -237,8 +234,7 @@ static void rxrpc_resend(struct rxrpc_call *call)
if (after(call->tx_hard_ack, seq))
seq = call->tx_hard_ack;
- seq++;
- } while (before_eq(seq, top));
+ }
out_unlock:
spin_unlock_bh(&call->lock);
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:30 +0200 |
| Subject | [PATCH net-next 05/14] rxrpc: Record calls that need to be accepted |
| Message-ID | <sixdw-qm-11@gated-at.bofh.it> |
| In reply to | #1485624 |
Record calls that need to be accepted using sk_acceptq_added() otherwise
the backlog counter goes negative because sk_acceptq_removed() is called.
This causes the preallocator to malfunction.
Calls that are preaccepted by AFS within the kernel aren't affected by
this.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/call_accept.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/rxrpc/call_accept.c b/net/rxrpc/call_accept.c
index 26c293ef98eb..323b8da50163 100644
--- a/net/rxrpc/call_accept.c
+++ b/net/rxrpc/call_accept.c
@@ -369,6 +369,8 @@ found_service:
if (rx->notify_new_call)
rx->notify_new_call(&rx->sk, call, call->user_call_ID);
+ else
+ sk_acceptq_added(&rx->sk);
spin_lock(&conn->state_lock);
switch (conn->state) {
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:30 +0200 |
| Subject | [PATCH net-next 13/14] rxrpc: Be consistent about switch value in rxrpc_send_call_packet() |
| Message-ID | <sixdw-qm-25@gated-at.bofh.it> |
| In reply to | #1485624 |
rxrpc_send_call_packet() should use type in both its switch-statements
rather than using pkt->whdr.type. This might give the compiler an easier
job of uninitialised variable checking.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c
index aa0507214b31..0b21ed859de7 100644
--- a/net/rxrpc/output.c
+++ b/net/rxrpc/output.c
@@ -182,7 +182,7 @@ int rxrpc_send_call_packet(struct rxrpc_call *call, u8 type)
&msg, iov, ioc, len);
if (ret < 0 && call->state < RXRPC_CALL_COMPLETE) {
- switch (pkt->whdr.type) {
+ switch (type) {
case RXRPC_PACKET_TYPE_ACK:
rxrpc_propose_ACK(call, pkt->ack.reason,
ntohs(pkt->ack.maxSkew),
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:30 +0200 |
| Subject | [PATCH net-next 02/14] rxrpc: Move the check of rx_pkt_offset from rxrpc_locate_data() to caller |
| Message-ID | <sixdx-qm-41@gated-at.bofh.it> |
| In reply to | #1485624 |
Move the check of rx_pkt_offset from rxrpc_locate_data() to the caller,
rxrpc_recvmsg_data(), so that it's more clear what's going on there.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/recvmsg.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c
index a284205b8ecf..0d085f5cf1bf 100644
--- a/net/rxrpc/recvmsg.c
+++ b/net/rxrpc/recvmsg.c
@@ -240,9 +240,6 @@ static int rxrpc_locate_data(struct rxrpc_call *call, struct sk_buff *skb,
int ret;
u8 annotation = *_annotation;
- if (offset > 0)
- return 0;
-
/* Locate the subpacket */
offset = sp->offset;
len = skb->len - sp->offset;
@@ -303,8 +300,10 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call,
if (msg)
sock_recv_timestamp(msg, sock->sk, skb);
- ret = rxrpc_locate_data(call, skb, &call->rxtx_annotations[ix],
- &rx_pkt_offset, &rx_pkt_len);
+ if (rx_pkt_offset == 0)
+ ret = rxrpc_locate_data(call, skb,
+ &call->rxtx_annotations[ix],
+ &rx_pkt_offset, &rx_pkt_len);
_debug("recvmsg %x DATA #%u { %d, %d }",
sp->hdr.callNumber, seq, rx_pkt_offset, rx_pkt_len);
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-18 01:30 +0200 |
| Subject | [PATCH net-next 10/14] rxrpc: Fix the parsing of soft-ACKs |
| Message-ID | <sixdw-qm-33@gated-at.bofh.it> |
| In reply to | #1485624 |
The soft-ACK parser doesn't increment the pointer into the soft-ACK list,
resulting in the first ACK/NACK value being applied to all the relevant
packets in the Tx queue. This has the potential to miss retransmissions
and cause excessive retransmissions.
Fix this by incrementing the pointer.
Signed-off-by: David Howells <dhowells@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 f0d9115b9b7e..c1f83d22f9b7 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -384,7 +384,7 @@ static void rxrpc_input_soft_acks(struct rxrpc_call *call, u8 *acks,
for (; nr_acks > 0; nr_acks--, seq++) {
ix = seq & RXRPC_RXTX_BUFF_MASK;
- switch (*acks) {
+ switch (*acks++) {
case RXRPC_ACK_TYPE_ACK:
call->rxtx_annotations[ix] = RXRPC_TX_ANNO_ACK;
break;
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-09-18 13:30 +0200 |
| Message-ID | <siIsh-7tY-7@gated-at.bofh.it> |
| In reply to | #1485624 |
David, could you please stop submitting two sets of series at the same time? I want people to have a single, reasonably sized, patch series in flight at one time for a given subsystem/driver/whatever. But if you send both an 14 and an 11 patch series at the same time, that defeats this entirely. Thank you.
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-09-19 08:00 +0200 |
| Message-ID | <siZMu-1sT-13@gated-at.bofh.it> |
| In reply to | #1485624 |
From: David Howells <dhowells@redhat.com> Date: Sun, 18 Sep 2016 00:17:44 +0100 > Tagged thusly: > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git > rxrpc-rewrite-20160917-1 Pulled.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web