]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qed*: Reduce the memory footprint for Rx path
authorSudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
Fri, 21 Oct 2016 08:43:42 +0000 (04:43 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 05:00:03 +0000 (21:00 -0800)
Orabug: 25477939

With the current default values for Rx path i.e., 8 queues of 8Kb entries
each with 4Kb size, interface will consume 256Mb for Rx. The default values
causing the driver probe to fail when the system memory is low. Based on
the perforamnce results, rx-ring count value of 1Kb gives the comparable
performance with Rx coalesce timeout of 12 seconds. Updating the default
values.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 0e191827383a6503a3bc547e63c74ff093f450f5)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/qlogic/qed/qed_main.c
drivers/net/ethernet/qlogic/qede/qede.h
include/linux/qed/qed_if.h

index a6d606455d77d6cd794108bac72917319527e4f5..7e02a4c76cd7df2a2fcb24af7a9e7f9ab5cae532 100644 (file)
@@ -878,6 +878,7 @@ static int qed_slowpath_start(struct qed_dev *cdev,
                }
        }
 
+       cdev->rx_coalesce_usecs = QED_DEFAULT_RX_USECS;
        rc = qed_nic_setup(cdev);
        if (rc)
                goto err;
index 52e3feefa2b768908fe03525d8ad52d8e8155132..d3cce5a09c8e8a016eb3110e0a5e35d8e950a3d2 100644 (file)
@@ -353,7 +353,7 @@ void qede_update_rx_prod(struct qede_dev *edev, struct qede_rx_queue *rxq);
 #define RX_RING_SIZE           ((u16)BIT(RX_RING_SIZE_POW))
 #define NUM_RX_BDS_MAX         (RX_RING_SIZE - 1)
 #define NUM_RX_BDS_MIN         128
-#define NUM_RX_BDS_DEF         NUM_RX_BDS_MAX
+#define NUM_RX_BDS_DEF         ((u16)BIT(10) - 1)
 
 #define TX_RING_SIZE_POW       13
 #define TX_RING_SIZE           ((u16)BIT(TX_RING_SIZE_POW))
index f9ae903bbb8445c8d44c8531f2ebd1a47cc05f25..8978a60371f4372160d1372510dad00b1c4a76ed 100644 (file)
@@ -146,6 +146,7 @@ enum qed_led_mode {
 #define DIRECT_REG_RD(reg_addr) readl((void __iomem *)(reg_addr))
 
 #define QED_COALESCE_MAX 0xFF
+#define QED_DEFAULT_RX_USECS 12
 
 /* forward */
 struct qed_dev;