From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: mkubecek@suse.cz, thomas.lendacky@amd.com, benve@cisco.com,
_govind@gmx.com, pkaustub@cisco.com, peppe.cavallaro@st.com,
alexandre.torgue@st.com, joabreu@synopsys.com,
snelson@pensando.io, yisen.zhuang@huawei.com,
salil.mehta@huawei.com, jeffrey.t.kirsher@intel.com,
jacob.e.keller@intel.com, alexander.h.duyck@linux.intel.com,
michael.chan@broadcom.com, saeedm@mellanox.com, leon@kernel.org,
netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 10/12] mlx5: reject unsupported coalescing params
Date: Tue, 3 Mar 2020 19:54:59 -0800 [thread overview]
Message-ID: <20200304035501.628139-11-kuba@kernel.org> (raw)
In-Reply-To: <20200304035501.628139-1-kuba@kernel.org>
Set ethtool_ops->coalesce_types to let the core reject
unsupported coalescing parameters.
This driver did not previously reject unsupported parameters.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +++
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 6 ++++++
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 3 +++
3 files changed, 12 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 06f6f08ff5eb..739a0771944a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -1965,6 +1965,9 @@ static int mlx5e_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
}
const struct ethtool_ops mlx5e_ethtool_ops = {
+ .coalesce_types = ETHTOOL_COALESCE_USECS |
+ ETHTOOL_COALESCE_MAX_FRAMES |
+ ETHTOOL_COALESCE_USE_ADAPTIVE,
.get_drvinfo = mlx5e_get_drvinfo,
.get_link = ethtool_op_get_link,
.get_strings = mlx5e_get_strings,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 1a8897f80547..abb8071e58c5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -376,6 +376,9 @@ static int mlx5e_uplink_rep_set_link_ksettings(struct net_device *netdev,
}
static const struct ethtool_ops mlx5e_rep_ethtool_ops = {
+ .coalesce_types = ETHTOOL_COALESCE_USECS |
+ ETHTOOL_COALESCE_MAX_FRAMES |
+ ETHTOOL_COALESCE_USE_ADAPTIVE,
.get_drvinfo = mlx5e_rep_get_drvinfo,
.get_link = ethtool_op_get_link,
.get_strings = mlx5e_rep_get_strings,
@@ -392,6 +395,9 @@ static const struct ethtool_ops mlx5e_rep_ethtool_ops = {
};
static const struct ethtool_ops mlx5e_uplink_rep_ethtool_ops = {
+ .coalesce_types = ETHTOOL_COALESCE_USECS |
+ ETHTOOL_COALESCE_MAX_FRAMES |
+ ETHTOOL_COALESCE_USE_ADAPTIVE,
.get_drvinfo = mlx5e_uplink_rep_get_drvinfo,
.get_link = ethtool_op_get_link,
.get_strings = mlx5e_rep_get_strings,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c
index 90cb50fe17fd..0deeed70f128 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c
@@ -235,6 +235,9 @@ static int mlx5i_get_link_ksettings(struct net_device *netdev,
}
const struct ethtool_ops mlx5i_ethtool_ops = {
+ .coalesce_types = ETHTOOL_COALESCE_USECS |
+ ETHTOOL_COALESCE_MAX_FRAMES |
+ ETHTOOL_COALESCE_USE_ADAPTIVE,
.get_drvinfo = mlx5i_get_drvinfo,
.get_strings = mlx5i_get_strings,
.get_sset_count = mlx5i_get_sset_count,
--
2.24.1
next prev parent reply other threads:[~2020-03-04 3:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 3:54 [PATCH net-next 00/12] ethtool: consolidate parameter checking for irq coalescing Jakub Kicinski
2020-03-04 3:54 ` [PATCH net-next 01/12] ethtool: add infrastructure for centralized checking of coalescing parameters Jakub Kicinski
2020-03-04 14:54 ` Andrew Lunn
2020-03-04 15:19 ` Michal Kubecek
2020-03-04 15:22 ` Andrew Lunn
2020-03-04 18:11 ` Jakub Kicinski
2020-03-04 3:54 ` [PATCH net-next 02/12] xgbe: let core reject the unsupported " Jakub Kicinski
2020-03-04 3:54 ` [PATCH net-next 03/12] enic: " Jakub Kicinski
2020-03-04 3:54 ` [PATCH net-next 04/12] stmmac: " Jakub Kicinski
2020-03-04 3:54 ` [PATCH net-next 05/12] nfp: " Jakub Kicinski
2020-03-04 3:54 ` [PATCH net-next 06/12] ionic: " Jakub Kicinski
2020-03-04 4:22 ` Shannon Nelson
2020-03-04 3:54 ` [PATCH net-next 07/12] hisilicon: " Jakub Kicinski
2020-03-04 3:54 ` [PATCH net-next 08/12] ice: " Jakub Kicinski
2020-03-04 4:24 ` Jakub Kicinski
2020-03-04 3:54 ` [PATCH net-next 09/12] bnxt: reject unsupported coalescing params Jakub Kicinski
2020-03-04 3:54 ` Jakub Kicinski [this message]
2020-03-04 3:55 ` [PATCH net-next 11/12] e1000e: " Jakub Kicinski
2020-03-04 3:55 ` [PATCH net-next 12/12] virtio_net: " Jakub Kicinski
2020-03-04 4:07 ` Jakub Kicinski
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=20200304035501.628139-11-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=_govind@gmx.com \
--cc=alexander.h.duyck@linux.intel.com \
--cc=alexandre.torgue@st.com \
--cc=benve@cisco.com \
--cc=davem@davemloft.net \
--cc=jacob.e.keller@intel.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=joabreu@synopsys.com \
--cc=leon@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=pkaustub@cisco.com \
--cc=saeedm@mellanox.com \
--cc=salil.mehta@huawei.com \
--cc=snelson@pensando.io \
--cc=thomas.lendacky@amd.com \
--cc=yisen.zhuang@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.