netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 0/3] qede: add netpoll and per-queue coalesce support
@ 2021-02-09 21:26 Bhaskar Upadhaya
  2021-02-09 21:26 ` [PATCH v2 net-next 1/3] qede: add netpoll support for qede driver Bhaskar Upadhaya
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bhaskar Upadhaya @ 2021-02-09 21:26 UTC (permalink / raw)
  To: netdev, kuba, aelior, irusskikh; +Cc: davem, bupadhaya

This is a followup implementation after series

https://patchwork.kernel.org/project/netdevbpf/cover/1610701570-29496-1-git-send-email-bupadhaya@marvell.com/

Patch 1: Add net poll controller support to transmit kernel printks
         over UDP
Patch 2: QLogic card support multiple queues and each queue can be
         configured with respective coalescing parameters, this patch
         add per queue rx-usecs, tx-usecs coalescing parameters
Patch 3: set default per queue rx-usecs, tx-usecs coalescing parameters and
         preserve coalesce parameters across interface up and down

v2: comments from jakub
 - p1: remove poll_controller ndo and add budget 0 support in qede_poll
 - p3: preserve coalesce parameters across interface up and down

Bhaskar Upadhaya (3):
  qede: add netpoll support for qede driver
  qede: add per queue coalesce support for qede driver
  qede: preserve per queue stats across up/down of interface

 drivers/net/ethernet/qlogic/qede/qede.h       |  10 ++
 .../net/ethernet/qlogic/qede/qede_ethtool.c   | 133 +++++++++++++++++-
 drivers/net/ethernet/qlogic/qede/qede_fp.c    |   3 +-
 drivers/net/ethernet/qlogic/qede/qede_main.c  |  29 +++-
 4 files changed, 170 insertions(+), 5 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 net-next 1/3] qede: add netpoll support for qede driver
  2021-02-09 21:26 [PATCH v2 net-next 0/3] qede: add netpoll and per-queue coalesce support Bhaskar Upadhaya
@ 2021-02-09 21:26 ` Bhaskar Upadhaya
  2021-02-09 21:26 ` [PATCH v2 net-next 2/3] qede: add per queue coalesce " Bhaskar Upadhaya
  2021-02-09 21:26 ` [PATCH v2 net-next 3/3] qede: preserve per queue stats across up/down of interface Bhaskar Upadhaya
  2 siblings, 0 replies; 5+ messages in thread
From: Bhaskar Upadhaya @ 2021-02-09 21:26 UTC (permalink / raw)
  To: netdev, kuba, aelior, irusskikh; +Cc: davem, bupadhaya

handle netpoll case when qede_poll is called by
netpoll layer with budget 0

Signed-off-by: Bhaskar Upadhaya <bupadhaya@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 drivers/net/ethernet/qlogic/qede/qede_fp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c b/drivers/net/ethernet/qlogic/qede/qede_fp.c
index 70c8d3cd85c0..8c47a9d2a965 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_fp.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c
@@ -1450,7 +1450,8 @@ int qede_poll(struct napi_struct *napi, int budget)
 	rx_work_done = (likely(fp->type & QEDE_FASTPATH_RX) &&
 			qede_has_rx_work(fp->rxq)) ?
 			qede_rx_int(fp, budget) : 0;
-	if (rx_work_done < budget) {
+	/* Handle case where we are called by netpoll with a budget of 0 */
+	if (rx_work_done < budget || !budget) {
 		if (!qede_poll_is_more_work(fp)) {
 			napi_complete_done(napi, rx_work_done);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 net-next 2/3] qede: add per queue coalesce support for qede driver
  2021-02-09 21:26 [PATCH v2 net-next 0/3] qede: add netpoll and per-queue coalesce support Bhaskar Upadhaya
  2021-02-09 21:26 ` [PATCH v2 net-next 1/3] qede: add netpoll support for qede driver Bhaskar Upadhaya
@ 2021-02-09 21:26 ` Bhaskar Upadhaya
  2021-02-10  8:57   ` [kbuild] " Dan Carpenter
  2021-02-09 21:26 ` [PATCH v2 net-next 3/3] qede: preserve per queue stats across up/down of interface Bhaskar Upadhaya
  2 siblings, 1 reply; 5+ messages in thread
From: Bhaskar Upadhaya @ 2021-02-09 21:26 UTC (permalink / raw)
  To: netdev, kuba, aelior, irusskikh; +Cc: davem, bupadhaya

per queue coalescing allows better and more finegrained control
over interrupt rates.

Signed-off-by: Bhaskar Upadhaya <bupadhaya@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 .../net/ethernet/qlogic/qede/qede_ethtool.c   | 123 ++++++++++++++++++
 1 file changed, 123 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index bedbb85a179a..522736968496 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
@@ -2105,6 +2105,125 @@ static int qede_get_dump_data(struct net_device *dev,
 	return rc;
 }
 
+static int qede_set_per_coalesce(struct net_device *dev,
+				 u32 queue,
+				 struct ethtool_coalesce *coal)
+{
+	struct qede_dev *edev = netdev_priv(dev);
+	struct qede_fastpath *fp;
+	u16 rxc, txc;
+	int rc = 0;
+
+	if (coal->rx_coalesce_usecs > QED_COALESCE_MAX ||
+	    coal->tx_coalesce_usecs > QED_COALESCE_MAX) {
+		DP_INFO(edev,
+			"Can't support requested %s coalesce value [max supported value %d]\n",
+			coal->rx_coalesce_usecs > QED_COALESCE_MAX ? "rx"
+								   : "tx",
+			QED_COALESCE_MAX);
+		return -EINVAL;
+	}
+
+	rxc = (u16)coal->rx_coalesce_usecs;
+	txc = (u16)coal->tx_coalesce_usecs;
+
+	__qede_lock(edev);
+	if (queue >= edev->num_queues) {
+		DP_INFO(edev, "Invalid queue\n");
+		rc = -EINVAL;
+		goto out;
+	}
+
+	if (edev->state != QEDE_STATE_OPEN) {
+		rc = -EINVAL;
+		goto out;
+	}
+
+	fp = &edev->fp_array[queue];
+
+	if (edev->fp_array[queue].type & QEDE_FASTPATH_RX) {
+		rc = edev->ops->common->set_coalesce(edev->cdev,
+						     rxc, 0,
+						     fp->rxq->handle);
+		if (rc) {
+			DP_INFO(edev,
+				"Set RX coalesce error, rc = %d\n", rc);
+			goto out;
+		}
+	}
+
+	if (edev->fp_array[queue].type & QEDE_FASTPATH_TX) {
+		rc = edev->ops->common->set_coalesce(edev->cdev,
+						     0, txc,
+						     fp->txq->handle);
+		if (rc) {
+			DP_INFO(edev,
+				"Set TX coalesce error, rc = %d\n", rc);
+			goto out;
+		}
+	}
+out:
+	__qede_unlock(edev);
+
+	return rc;
+}
+
+static int qede_get_per_coalesce(struct net_device *dev,
+				 u32 queue,
+				 struct ethtool_coalesce *coal)
+{
+	void *rx_handle = NULL, *tx_handle = NULL;
+	struct qede_dev *edev = netdev_priv(dev);
+	u16 rx_coal, tx_coal, rc = 0;
+	struct qede_fastpath *fp;
+
+	rx_coal = QED_DEFAULT_RX_USECS;
+	tx_coal = QED_DEFAULT_TX_USECS;
+
+	memset(coal, 0, sizeof(struct ethtool_coalesce));
+
+	__qede_lock(edev);
+	if (queue >= edev->num_queues) {
+		DP_INFO(edev, "Invalid queue\n");
+		rc = -EINVAL;
+		goto out;
+	}
+
+	if (edev->state != QEDE_STATE_OPEN) {
+		rc = -EINVAL;
+		goto out;
+	}
+
+	fp = &edev->fp_array[queue];
+
+	if (fp->type & QEDE_FASTPATH_RX)
+		rx_handle = fp->rxq->handle;
+
+	rc = edev->ops->get_coalesce(edev->cdev, &rx_coal,
+				     rx_handle);
+	if (rc) {
+		DP_INFO(edev, "Read Rx coalesce error\n");
+		goto out;
+	}
+
+	fp = &edev->fp_array[queue];
+	if (fp->type & QEDE_FASTPATH_TX)
+		tx_handle = fp->txq->handle;
+
+	rc = edev->ops->get_coalesce(edev->cdev, &tx_coal,
+				      tx_handle);
+	if (rc)
+		DP_INFO(edev, "Read Tx coalesce error\n");
+
+out:
+	__qede_unlock(edev);
+
+	coal->rx_coalesce_usecs = rx_coal;
+	coal->tx_coalesce_usecs = tx_coal;
+
+	return rc;
+}
+
 static const struct ethtool_ops qede_ethtool_ops = {
 	.supported_coalesce_params	= ETHTOOL_COALESCE_USECS,
 	.get_link_ksettings		= qede_get_link_ksettings,
@@ -2148,6 +2267,8 @@ static const struct ethtool_ops qede_ethtool_ops = {
 	.set_fecparam			= qede_set_fecparam,
 	.get_tunable			= qede_get_tunable,
 	.set_tunable			= qede_set_tunable,
+	.get_per_queue_coalesce		= qede_get_per_coalesce,
+	.set_per_queue_coalesce		= qede_set_per_coalesce,
 	.flash_device			= qede_flash_device,
 	.get_dump_flag			= qede_get_dump_flag,
 	.get_dump_data			= qede_get_dump_data,
@@ -2177,6 +2298,8 @@ static const struct ethtool_ops qede_vf_ethtool_ops = {
 	.set_rxfh			= qede_set_rxfh,
 	.get_channels			= qede_get_channels,
 	.set_channels			= qede_set_channels,
+	.get_per_queue_coalesce		= qede_get_per_coalesce,
+	.set_per_queue_coalesce		= qede_set_per_coalesce,
 	.get_tunable			= qede_get_tunable,
 	.set_tunable			= qede_set_tunable,
 };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 net-next 3/3] qede: preserve per queue stats across up/down of interface
  2021-02-09 21:26 [PATCH v2 net-next 0/3] qede: add netpoll and per-queue coalesce support Bhaskar Upadhaya
  2021-02-09 21:26 ` [PATCH v2 net-next 1/3] qede: add netpoll support for qede driver Bhaskar Upadhaya
  2021-02-09 21:26 ` [PATCH v2 net-next 2/3] qede: add per queue coalesce " Bhaskar Upadhaya
@ 2021-02-09 21:26 ` Bhaskar Upadhaya
  2 siblings, 0 replies; 5+ messages in thread
From: Bhaskar Upadhaya @ 2021-02-09 21:26 UTC (permalink / raw)
  To: netdev, kuba, aelior, irusskikh; +Cc: davem, bupadhaya

Here we do the initialization of coalescing values on load.
per queue coalesce values are also restored across up/down of
ethernet interface.

Signed-off-by: Bhaskar Upadhaya <bupadhaya@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
---
 drivers/net/ethernet/qlogic/qede/qede.h       | 10 +++++++
 .../net/ethernet/qlogic/qede/qede_ethtool.c   | 16 ++++++----
 drivers/net/ethernet/qlogic/qede/qede_main.c  | 29 +++++++++++++++++--
 3 files changed, 48 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qede/qede.h b/drivers/net/ethernet/qlogic/qede/qede.h
index 3efc5899f656..2e62a2c4eb63 100644
--- a/drivers/net/ethernet/qlogic/qede/qede.h
+++ b/drivers/net/ethernet/qlogic/qede/qede.h
@@ -168,6 +168,12 @@ struct qede_dump_info {
 	u32 args[QEDE_DUMP_MAX_ARGS];
 };
 
+struct qede_coalesce {
+	bool isvalid;
+	u16 rxc;
+	u16 txc;
+};
+
 struct qede_dev {
 	struct qed_dev			*cdev;
 	struct net_device		*ndev;
@@ -194,6 +200,7 @@ struct qede_dev {
 	((edev)->dev_info.common.dev_type == QED_DEV_TYPE_AH)
 
 	struct qede_fastpath		*fp_array;
+	struct qede_coalesce            *coal_entry;
 	u8				req_num_tx;
 	u8				fp_num_tx;
 	u8				req_num_rx;
@@ -581,6 +588,9 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto,
 			    struct flow_cls_offload *f);
 
 void qede_forced_speed_maps_init(void);
+int qede_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal);
+int qede_set_per_coalesce(struct net_device *dev, u32 queue,
+			  struct ethtool_coalesce *coal);
 
 #define RX_RING_SIZE_POW	13
 #define RX_RING_SIZE		((u16)BIT(RX_RING_SIZE_POW))
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index 522736968496..f3bc9b9cfccc 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
@@ -819,8 +819,7 @@ static int qede_get_coalesce(struct net_device *dev,
 	return rc;
 }
 
-static int qede_set_coalesce(struct net_device *dev,
-			     struct ethtool_coalesce *coal)
+int qede_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal)
 {
 	struct qede_dev *edev = netdev_priv(dev);
 	struct qede_fastpath *fp;
@@ -855,6 +854,8 @@ static int qede_set_coalesce(struct net_device *dev,
 					"Set RX coalesce error, rc = %d\n", rc);
 				return rc;
 			}
+			edev->coal_entry[i].rxc = rxc;
+			edev->coal_entry[i].isvalid = true;
 		}
 
 		if (edev->fp_array[i].type & QEDE_FASTPATH_TX) {
@@ -874,6 +875,8 @@ static int qede_set_coalesce(struct net_device *dev,
 					"Set TX coalesce error, rc = %d\n", rc);
 				return rc;
 			}
+			edev->coal_entry[i].txc = txc;
+			edev->coal_entry[i].isvalid = true;
 		}
 	}
 
@@ -2105,9 +2108,8 @@ static int qede_get_dump_data(struct net_device *dev,
 	return rc;
 }
 
-static int qede_set_per_coalesce(struct net_device *dev,
-				 u32 queue,
-				 struct ethtool_coalesce *coal)
+int qede_set_per_coalesce(struct net_device *dev, u32 queue,
+			  struct ethtool_coalesce *coal)
 {
 	struct qede_dev *edev = netdev_priv(dev);
 	struct qede_fastpath *fp;
@@ -2150,6 +2152,8 @@ static int qede_set_per_coalesce(struct net_device *dev,
 				"Set RX coalesce error, rc = %d\n", rc);
 			goto out;
 		}
+		edev->coal_entry[queue].rxc = rxc;
+		edev->coal_entry[queue].isvalid = true;
 	}
 
 	if (edev->fp_array[queue].type & QEDE_FASTPATH_TX) {
@@ -2161,6 +2165,8 @@ static int qede_set_per_coalesce(struct net_device *dev,
 				"Set TX coalesce error, rc = %d\n", rc);
 			goto out;
 		}
+		edev->coal_entry[queue].txc = txc;
+		edev->coal_entry[queue].isvalid = true;
 	}
 out:
 	__qede_unlock(edev);
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index 4bf94797aac5..4d952036ba82 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -904,6 +904,7 @@ static int qede_alloc_fp_array(struct qede_dev *edev)
 {
 	u8 fp_combined, fp_rx = edev->fp_num_rx;
 	struct qede_fastpath *fp;
+	void *mem;
 	int i;
 
 	edev->fp_array = kcalloc(QEDE_QUEUE_CNT(edev),
@@ -913,6 +914,15 @@ static int qede_alloc_fp_array(struct qede_dev *edev)
 		goto err;
 	}
 
+	mem = krealloc(edev->coal_entry, QEDE_QUEUE_CNT(edev) *
+		       sizeof(*edev->coal_entry), GFP_KERNEL);
+	if (!mem) {
+		DP_ERR(edev, "coalesce entry allocation failed\n");
+		kfree(edev->coal_entry);
+		goto err;
+	}
+	edev->coal_entry = mem;
+
 	fp_combined = QEDE_QUEUE_CNT(edev) - fp_rx - edev->fp_num_tx;
 
 	/* Allocate the FP elements for Rx queues followed by combined and then
@@ -1320,8 +1330,10 @@ static void __qede_remove(struct pci_dev *pdev, enum qede_remove_mode mode)
 	 * [e.g., QED register callbacks] won't break anything when
 	 * accessing the netdevice.
 	 */
-	if (mode != QEDE_REMOVE_RECOVERY)
+	if (mode != QEDE_REMOVE_RECOVERY) {
+		kfree(edev->coal_entry);
 		free_netdev(ndev);
+	}
 
 	dev_info(&pdev->dev, "Ending qede_remove successfully\n");
 }
@@ -2328,8 +2340,9 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode,
 		     bool is_locked)
 {
 	struct qed_link_params link_params;
+	struct ethtool_coalesce coal = {};
 	u8 num_tc;
-	int rc;
+	int rc, i;
 
 	DP_INFO(edev, "Starting qede load\n");
 
@@ -2390,6 +2403,18 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode,
 
 	edev->state = QEDE_STATE_OPEN;
 
+	coal.rx_coalesce_usecs = QED_DEFAULT_RX_USECS;
+	coal.tx_coalesce_usecs = QED_DEFAULT_TX_USECS;
+
+	for_each_queue(i) {
+		if (edev->coal_entry[i].isvalid) {
+			coal.rx_coalesce_usecs = edev->coal_entry[i].rxc;
+			coal.tx_coalesce_usecs = edev->coal_entry[i].txc;
+		}
+		__qede_unlock(edev);
+		qede_set_per_coalesce(edev->ndev, i, &coal);
+		__qede_lock(edev);
+	}
 	DP_INFO(edev, "Ending successfully qede load\n");
 
 	goto out;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [kbuild] Re: [PATCH v2 net-next 2/3] qede: add per queue coalesce support for qede driver
  2021-02-09 21:26 ` [PATCH v2 net-next 2/3] qede: add per queue coalesce " Bhaskar Upadhaya
@ 2021-02-10  8:57   ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2021-02-10  8:57 UTC (permalink / raw)
  To: kbuild, Bhaskar Upadhaya, netdev, kuba, aelior, irusskikh
  Cc: lkp, kbuild-all, davem, bupadhaya

[-- Attachment #1: Type: text/plain, Size: 4924 bytes --]

Hi Bhaskar,

url:    https://github.com/0day-ci/linux/commits/Bhaskar-Upadhaya/qede-add-netpoll-and-per-queue-coalesce-support/20210210-080747 
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git  6626a0266566c5aea16178c5e6cd7fc4db3f2f56
config: i386-randconfig-m021-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:2188 qede_get_per_coalesce() warn: assigning (-22) to unsigned variable 'rc'

Old smatch warnings:
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:2193 qede_get_per_coalesce() warn: assigning (-22) to unsigned variable 'rc'

vim +/rc +2188 drivers/net/ethernet/qlogic/qede/qede_ethtool.c

75a56157c75052 Bhaskar Upadhaya 2021-02-09  2171  static int qede_get_per_coalesce(struct net_device *dev,
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2172  				 u32 queue,
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2173  				 struct ethtool_coalesce *coal)
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2174  {
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2175  	void *rx_handle = NULL, *tx_handle = NULL;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2176  	struct qede_dev *edev = netdev_priv(dev);
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2177  	u16 rx_coal, tx_coal, rc = 0;

"rc" needs to be int.

75a56157c75052 Bhaskar Upadhaya 2021-02-09  2178  	struct qede_fastpath *fp;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2179  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2180  	rx_coal = QED_DEFAULT_RX_USECS;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2181  	tx_coal = QED_DEFAULT_TX_USECS;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2182  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2183  	memset(coal, 0, sizeof(struct ethtool_coalesce));
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2184  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2185  	__qede_lock(edev);
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2186  	if (queue >= edev->num_queues) {
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2187  		DP_INFO(edev, "Invalid queue\n");
75a56157c75052 Bhaskar Upadhaya 2021-02-09 @2188  		rc = -EINVAL;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2189  		goto out;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2190  	}
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2191  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2192  	if (edev->state != QEDE_STATE_OPEN) {
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2193  		rc = -EINVAL;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2194  		goto out;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2195  	}
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2196  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2197  	fp = &edev->fp_array[queue];
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2198  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2199  	if (fp->type & QEDE_FASTPATH_RX)
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2200  		rx_handle = fp->rxq->handle;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2201  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2202  	rc = edev->ops->get_coalesce(edev->cdev, &rx_coal,
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2203  				     rx_handle);
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2204  	if (rc) {
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2205  		DP_INFO(edev, "Read Rx coalesce error\n");
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2206  		goto out;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2207  	}
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2208  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2209  	fp = &edev->fp_array[queue];
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2210  	if (fp->type & QEDE_FASTPATH_TX)
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2211  		tx_handle = fp->txq->handle;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2212  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2213  	rc = edev->ops->get_coalesce(edev->cdev, &tx_coal,
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2214  				      tx_handle);
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2215  	if (rc)
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2216  		DP_INFO(edev, "Read Tx coalesce error\n");
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2217  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2218  out:
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2219  	__qede_unlock(edev);
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2220  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2221  	coal->rx_coalesce_usecs = rx_coal;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2222  	coal->tx_coalesce_usecs = tx_coal;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2223  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2224  	return rc;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2225  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org 

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37136 bytes --]

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-10  9:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 21:26 [PATCH v2 net-next 0/3] qede: add netpoll and per-queue coalesce support Bhaskar Upadhaya
2021-02-09 21:26 ` [PATCH v2 net-next 1/3] qede: add netpoll support for qede driver Bhaskar Upadhaya
2021-02-09 21:26 ` [PATCH v2 net-next 2/3] qede: add per queue coalesce " Bhaskar Upadhaya
2021-02-10  8:57   ` [kbuild] " Dan Carpenter
2021-02-09 21:26 ` [PATCH v2 net-next 3/3] qede: preserve per queue stats across up/down of interface Bhaskar Upadhaya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).