提交 30efa3ce 编写于 作者: D David Howells

rxrpc: Remove handling of duplicate packets in recvmsg_queue

We should not now see duplicate packets in the recvmsg_queue.  At one
point, jumbo packets that overlapped with already queued data would be
added to the queue and dealt with in recvmsg rather than in the softirq
input code, but now jumbo packets are split/cloned before being processed
by the input code and the subpackets can be discarded individually.

So remove the recvmsg-side code for handling this.
Signed-off-by: NDavid Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
上级 2ed83ed2
...@@ -228,7 +228,6 @@ static void rxrpc_rotate_rx_window(struct rxrpc_call *call) ...@@ -228,7 +228,6 @@ static void rxrpc_rotate_rx_window(struct rxrpc_call *call)
_enter("%d", call->debug_id); _enter("%d", call->debug_id);
further_rotation:
skb = skb_dequeue(&call->recvmsg_queue); skb = skb_dequeue(&call->recvmsg_queue);
rxrpc_see_skb(skb, rxrpc_skb_rotated); rxrpc_see_skb(skb, rxrpc_skb_rotated);
...@@ -250,17 +249,6 @@ static void rxrpc_rotate_rx_window(struct rxrpc_call *call) ...@@ -250,17 +249,6 @@ static void rxrpc_rotate_rx_window(struct rxrpc_call *call)
return; return;
} }
/* The next packet on the queue might entirely overlap with the one we
* just consumed; if so, rotate that away also.
*/
skb = skb_peek(&call->recvmsg_queue);
if (skb) {
sp = rxrpc_skb(skb);
if (sp->hdr.seq != call->rx_consumed &&
after_eq(call->rx_consumed, sp->hdr.seq))
goto further_rotation;
}
/* Check to see if there's an ACK that needs sending. */ /* Check to see if there's an ACK that needs sending. */
acked = atomic_add_return(call->rx_consumed - old_consumed, acked = atomic_add_return(call->rx_consumed - old_consumed,
&call->ackr_nr_consumed); &call->ackr_nr_consumed);
...@@ -318,11 +306,6 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call, ...@@ -318,11 +306,6 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call,
sp = rxrpc_skb(skb); sp = rxrpc_skb(skb);
seq = sp->hdr.seq; seq = sp->hdr.seq;
if (after_eq(call->rx_consumed, seq)) {
kdebug("obsolete %x %x", call->rx_consumed, seq);
goto skip_obsolete;
}
if (!(flags & MSG_PEEK)) if (!(flags & MSG_PEEK))
trace_rxrpc_receive(call, rxrpc_receive_front, trace_rxrpc_receive(call, rxrpc_receive_front,
sp->hdr.serial, seq); sp->hdr.serial, seq);
...@@ -373,7 +356,6 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call, ...@@ -373,7 +356,6 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call,
break; break;
} }
skip_obsolete:
/* The whole packet has been transferred. */ /* The whole packet has been transferred. */
if (sp->hdr.flags & RXRPC_LAST_PACKET) if (sp->hdr.flags & RXRPC_LAST_PACKET)
ret = 1; ret = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册