Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rxrpc: Fix injection of packet loss

Fix the code that injects packet loss for testing to make sure
call->tx_transmitted is updated.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://patch.msgid.link/20241204074710.990092-15-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

David Howells and committed by
Jakub Kicinski
cd69a07b 9e3cccd1

+11 -10
+11 -10
net/rxrpc/output.c
··· 544 544 545 545 len = rxrpc_prepare_data_packet(call, txb, n); 546 546 547 - if (IS_ENABLED(CONFIG_AF_RXRPC_INJECT_LOSS)) { 548 - static int lose; 549 - if ((lose++ & 7) == 7) { 550 - ret = 0; 551 - trace_rxrpc_tx_data(call, txb->seq, txb->serial, 552 - txb->flags, true); 553 - goto done; 554 - } 555 - } 556 - 557 547 iov_iter_kvec(&msg.msg_iter, WRITE, call->local->kvec, n, len); 558 548 559 549 msg.msg_name = &call->peer->srx.transport; ··· 567 577 } else { 568 578 rxrpc_local_dont_fragment(conn->local, true); 569 579 frag = rxrpc_tx_point_call_data_nofrag; 580 + } 581 + 582 + if (IS_ENABLED(CONFIG_AF_RXRPC_INJECT_LOSS)) { 583 + static int lose; 584 + 585 + if ((lose++ & 7) == 7) { 586 + ret = 0; 587 + trace_rxrpc_tx_data(call, txb->seq, txb->serial, 588 + txb->flags, true); 589 + goto done; 590 + } 570 591 } 571 592 572 593 retry: