diff mbox series

[net-next,3/3] qede: set default per queue rx/tx usecs coalescing parameters

Message ID 1610701570-29496-4-git-send-email-bupadhaya@marvell.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series qede: add netpoll and per-queue coalesce support | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 2 maintainers not CCed: GR-everest-linux-l2@marvell.com davem@davemloft.net
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 32 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Bhaskar Upadhaya Jan. 15, 2021, 9:06 a.m. UTC
Here we do the initialization of coalescing values on load.
Although the default device values are the same - explicit
config is better visible.

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         | 1 +
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 3 +--
 drivers/net/ethernet/qlogic/qede/qede_main.c    | 4 ++++
 3 files changed, 6 insertions(+), 2 deletions(-)

Comments

Jakub Kicinski Jan. 17, 2021, 2:28 a.m. UTC | #1
On Fri, 15 Jan 2021 01:06:10 -0800 Bhaskar Upadhaya wrote:
> Here we do the initialization of coalescing values on load.
> Although the default device values are the same - explicit
> config is better visible.

Can you also make the driver store the settings across ifdown / ifup
and allow the settings to be checked while the interface is down, 
while at it?
Igor Russkikh Jan. 17, 2021, 4:37 p.m. UTC | #2
>> Here we do the initialization of coalescing values on load.
>> Although the default device values are the same - explicit
>> config is better visible.
> 
> Can you also make the driver store the settings across ifdown / ifup
> and allow the settings to be checked while the interface is down, 
> while at it?

Good suggestion, we'll implement that.

Thanks,
   Igor
diff mbox series

Patch

diff --git a/drivers/net/ethernet/qlogic/qede/qede.h b/drivers/net/ethernet/qlogic/qede/qede.h
index ac12e5beb596..5270c9226b8b 100644
--- a/drivers/net/ethernet/qlogic/qede/qede.h
+++ b/drivers/net/ethernet/qlogic/qede/qede.h
@@ -581,6 +581,7 @@  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);
 
 #ifdef CONFIG_NET_POLL_CONTROLLER
 void qede_poll_controller(struct net_device *dev);
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index 522736968496..e094a6ef299c 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;
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index 2ff6c49de745..3eb821f55ccb 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -2337,6 +2337,7 @@  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;
 
@@ -2399,6 +2400,9 @@  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;
+	qede_set_coalesce(edev->ndev, &coal);
 	DP_INFO(edev, "Ending successfully qede load\n");
 
 	goto out;