forked from amzn/amzn-drivers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0025-net-ena-set-IO-ring-size-to-valid-value.patch
49 lines (42 loc) · 1.77 KB
/
0025-net-ena-set-IO-ring-size-to-valid-value.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 8efc69ce234a2684fd10c85183fba743cb0c2572 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <[email protected]>
Date: Wed, 8 Apr 2020 10:29:08 +0200
Subject: [PATCH 25/27] net/ena: set IO ring size to valid value
[ upstream commit badc3a6aa133a886a61b9e3ad666e5675f7ec3d3 ]
IO rings were configured with the maximum allowed size for the Tx/Rx
rings. However, the application could decide to create smaller rings.
This patch is using value stored in the ring instead of the value from
the adapter which is indicating the maximum allowed value.
Fixes: df238f84c0a2 ("net/ena: recreate HW IO rings on start and stop")
Change-Id: Icf9102e2aa4e7413b6620b36dd232673239b7291
Signed-off-by: Michal Krawczyk <[email protected]>
Reviewed-by: Igor Chauskin <[email protected]>
Reviewed-by: Guy Tzalik <[email protected]>
---
drivers/net/ena/ena_ethdev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 08e21c59b8..640e3dae28 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1025,16 +1025,15 @@ static int ena_create_io_queue(struct ena_ring *ring)
ena_qid = ENA_IO_TXQ_IDX(ring->id);
ctx.direction = ENA_COM_IO_QUEUE_DIRECTION_TX;
ctx.mem_queue_type = ena_dev->tx_mem_queue_type;
- ctx.queue_size = adapter->tx_ring_size;
for (i = 0; i < ring->ring_size; i++)
ring->empty_tx_reqs[i] = i;
} else {
ena_qid = ENA_IO_RXQ_IDX(ring->id);
ctx.direction = ENA_COM_IO_QUEUE_DIRECTION_RX;
- ctx.queue_size = adapter->rx_ring_size;
for (i = 0; i < ring->ring_size; i++)
ring->empty_rx_reqs[i] = i;
}
+ ctx.queue_size = ring->ring_size;
ctx.qid = ena_qid;
ctx.msix_vector = -1; /* interrupts not used */
ctx.numa_node = ring->numa_socket_id;
--
2.20.1