ena module for Driver Update Program
CentOS Sources
2019-01-09 fc384122a7a805dde4dbbf3c4c4ef94a5ca0f2fe
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
49
50
51
52
53
54
55
56
57
58
59
60
Date: Tue, 30 Oct 2018 13:25:43 -0400
From: linville@redhat.com
To: rhkernel-list@redhat.com
Cc: Lin Liu <linl@redhat.com>
Subject: [RHEL7 28/28] net: ena: enable Low Latency Queues
 
From: "John W. Linville" <linville@redhat.com>
 
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1633418
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=18850510
 
Use the new API to enable usage of LLQ.
 
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 9fd255928d7ffb56d8466fab3331d0b2f40aa8c7)
Signed-off-by: John W. Linville <linville@redhat.com>
---
 drivers/net/ethernet/amazon/ena/ena_netdev.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)
 
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 56088a906ab2..b095c4e05b15 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -3016,20 +3016,10 @@ static int ena_calc_io_queue_num(struct pci_dev *pdev,
     int io_sq_num, io_queue_num;
 
     /* In case of LLQ use the llq number in the get feature cmd */
-    if (ena_dev->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV) {
-        io_sq_num = get_feat_ctx->max_queues.max_legacy_llq_num;
-
-        if (io_sq_num == 0) {
-            dev_err(&pdev->dev,
-                "Trying to use LLQ but llq_num is 0. Fall back into regular queues\n");
-
-            ena_dev->tx_mem_queue_type =
-                ENA_ADMIN_PLACEMENT_POLICY_HOST;
-            io_sq_num = get_feat_ctx->max_queues.max_sq_num;
-        }
-    } else {
+    if (ena_dev->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV)
+        io_sq_num = get_feat_ctx->llq.max_llq_num;
+    else
         io_sq_num = get_feat_ctx->max_queues.max_sq_num;
-    }
 
     io_queue_num = min_t(int, num_online_cpus(), ENA_MAX_NUM_IO_QUEUES);
     io_queue_num = min_t(int, io_queue_num, io_sq_num);
@@ -3232,7 +3222,7 @@ static int ena_calc_queue_size(struct pci_dev *pdev,
 
     if (ena_dev->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV)
         queue_size = min_t(u32, queue_size,
-                   get_feat_ctx->max_queues.max_legacy_llq_depth);
+                   get_feat_ctx->llq.max_llq_depth);
 
     queue_size = rounddown_pow_of_two(queue_size);
 
-- 
2.17.1