From: Bhaskar Upadhaya <bupadhaya@marvell.com>
To: <netdev@vger.kernel.org>, <kuba@kernel.org>, <aelior@marvell.com>,
<irusskikh@marvell.com>
Cc: <bupadhaya@marvell.com>
Subject: [PATCH net-next 3/3] qede: set default per queue rx/tx usecs coalescing parameters
Date: Fri, 15 Jan 2021 01:06:10 -0800 [thread overview]
Message-ID: <1610701570-29496-4-git-send-email-bupadhaya@marvell.com> (raw)
In-Reply-To: <1610701570-29496-1-git-send-email-bupadhaya@marvell.com>
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(-)
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;
--
2.17.1
next prev parent reply other threads:[~2021-01-15 9:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 9:06 [PATCH net-next 0/3] qede: add netpoll and per-queue coalesce support Bhaskar Upadhaya
2021-01-15 9:06 ` [PATCH net-next 1/3] qede: add netpoll support for qede driver Bhaskar Upadhaya
2021-01-17 2:26 ` Jakub Kicinski
2021-01-17 16:35 ` [EXT] " Igor Russkikh
2021-01-18 19:10 ` Jakub Kicinski
2021-01-15 9:06 ` [PATCH net-next 2/3] qede: add per queue coalesce " Bhaskar Upadhaya
2021-01-15 9:06 ` Bhaskar Upadhaya [this message]
2021-01-17 2:28 ` [PATCH net-next 3/3] qede: set default per queue rx/tx usecs coalescing parameters Jakub Kicinski
2021-01-17 16:37 ` [EXT] " Igor Russkikh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1610701570-29496-4-git-send-email-bupadhaya@marvell.com \
--to=bupadhaya@marvell.com \
--cc=aelior@marvell.com \
--cc=irusskikh@marvell.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).