The Rx/Tx ring is no longer used, so remove it.
Unified · Split
| @@ -617,21 +617,6 @@ struct rxrpc_call { · 616 unmodified lines | ||
| 617 | 617 | unsigned short rx_pkt_offset; /* Current recvmsg packet offset */ |
| 618 | 618 | unsigned short rx_pkt_len; /* Current recvmsg packet len */ |
| 619 | 619 | |
| 620 | − /* Rx/Tx circular buffer, depending on phase. | |
| 621 | − * | |
| 622 | − * In the Rx phase, packets are annotated with 0 or the number of the | |
| 623 | − * segment of a jumbo packet each buffer refers to. There can be up to | |
| 624 | − * 47 segments in a maximum-size UDP packet. | |
| 625 | − * | |
| 626 | − * In the Tx phase, packets are annotated with which buffers have been | |
| 627 | − * acked. | |
| 628 | − */ | |
| 629 | −#define RXRPC_RXTX_BUFF_SIZE 64 | |
| 630 | −#define RXRPC_RXTX_BUFF_MASK (RXRPC_RXTX_BUFF_SIZE - 1) | |
| 631 | −#define RXRPC_INIT_RX_WINDOW_SIZE 63 | |
| 632 | − struct sk_buff **rxtx_buffer; | |
| 633 | − u8 *rxtx_annotations; | |
| 634 | − | |
| 635 | 620 | /* Transmitted data tracking. */ |
| 636 | 621 | spinlock_t tx_lock; /* Transmit queue lock */ |
| 637 | 622 | struct list_head tx_buffer; /* Buffer of transmissible packets */ |
| @@ -129,16 +129,6 @@ struct rxrpc_call *rxrpc_alloc_call(struct rxrpc_sock *rx, gfp_t gfp, · 128 unmodified lines | ||
| 129 | 129 | if (!call) |
| 130 | 130 | return NULL; |
| 131 | 131 | |
| 132 | − call->rxtx_buffer = kcalloc(RXRPC_RXTX_BUFF_SIZE, | |
| 133 | − sizeof(struct sk_buff *), | |
| 134 | − gfp); | |
| 135 | − if (!call->rxtx_buffer) | |
| 136 | − goto nomem; | |
| 137 | − | |
| 138 | − call->rxtx_annotations = kcalloc(RXRPC_RXTX_BUFF_SIZE, sizeof(u8), gfp); | |
| 139 | − if (!call->rxtx_annotations) | |
| 140 | − goto nomem_2; | |
| 141 | − | |
| 142 | 132 | mutex_init(&call->user_mutex); |
| 143 | 133 | |
| 144 | 134 | /* Prevent lockdep reporting a deadlock false positive between the afs |
| @@ -183,12 +173,6 @@ struct rxrpc_call *rxrpc_alloc_call(struct rxrpc_sock *rx, gfp_t gfp, · 38 unmodified lines | ||
| 183 | 173 | call->rtt_avail = RXRPC_CALL_RTT_AVAIL_MASK; |
| 184 | 174 | atomic_inc(&rxnet->nr_calls); |
| 185 | 175 | return call; |
| 186 | − | |
| 187 | −nomem_2: | |
| 188 | − kfree(call->rxtx_buffer); | |
| 189 | −nomem: | |
| 190 | − kmem_cache_free(rxrpc_call_jar, call); | |
| 191 | − return NULL; | |
| 192 | 176 | } |
| 193 | 177 | |
| 194 | 178 | /* |
| @@ -516,12 +500,6 @@ void rxrpc_get_call(struct rxrpc_call *call, enum rxrpc_call_trace op) · 321 unmodified lines | ||
| 516 | 500 | */ |
| 517 | 501 | static void rxrpc_cleanup_ring(struct rxrpc_call *call) |
| 518 | 502 | { |
| 519 | − int i; | |
| 520 | − | |
| 521 | − for (i = 0; i < RXRPC_RXTX_BUFF_SIZE; i++) { | |
| 522 | − rxrpc_free_skb(call->rxtx_buffer[i], rxrpc_skb_cleaned); | |
| 523 | − call->rxtx_buffer[i] = NULL; | |
| 524 | − } | |
| 525 | 503 | skb_queue_purge(&call->recvmsg_queue); |
| 526 | 504 | skb_queue_purge(&call->rx_oos_queue); |
| 527 | 505 | } |
| @@ -658,8 +636,6 @@ static void rxrpc_destroy_call(struct work_struct *work) · 130 unmodified lines | ||
| 658 | 636 | |
| 659 | 637 | rxrpc_put_connection(call->conn); |
| 660 | 638 | rxrpc_put_peer(call->peer); |
| 661 | − kfree(call->rxtx_buffer); | |
| 662 | − kfree(call->rxtx_annotations); | |
| 663 | 639 | kmem_cache_free(rxrpc_call_jar, call); |
| 664 | 640 | if (atomic_dec_and_test(&rxnet->nr_calls)) |
| 665 | 641 | wake_up_var(&rxnet->nr_calls); |