From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, akiyano@amazon.com, netanel@amazon.com,
gtzalik@amazon.com, irusskikh@marvell.com, f.fainelli@gmail.com,
bcm-kernel-feedback-list@broadcom.com, rmody@marvell.com,
GR-Linux-NIC-Dev@marvell.com, aelior@marvell.com,
skalluru@marvell.com, GR-everest-linux-l2@marvell.com,
opendmb@gmail.com, siva.kallam@broadcom.com,
prashant@broadcom.com, mchan@broadcom.com, dchickles@marvell.com,
sburla@marvell.com, fmanlunas@marvell.com, tariqt@mellanox.com,
vishal@chelsio.com, leedom@chelsio.com,
ulli.kroll@googlemail.com, linus.walleij@linaro.org,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 09/15] net: liquidio: reject unsupported coalescing params
Date: Mon, 9 Mar 2020 19:15:06 -0700 [thread overview]
Message-ID: <20200310021512.1861626-10-kuba@kernel.org> (raw)
In-Reply-To: <20200310021512.1861626-1-kuba@kernel.org>
Set ethtool_ops->supported_coalesce_params 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/cavium/liquidio/lio_ethtool.c | 11 +++++++++++
include/linux/ethtool.h | 5 +++++
2 files changed, 16 insertions(+)
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
index 2b27e3aad9db..16eebfc52109 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
@@ -3097,7 +3097,17 @@ static int lio_set_fecparam(struct net_device *netdev,
return 0;
}
+#define LIO_ETHTOOL_COALESCE (ETHTOOL_COALESCE_RX_USECS | \
+ ETHTOOL_COALESCE_MAX_FRAMES | \
+ ETHTOOL_COALESCE_USE_ADAPTIVE | \
+ ETHTOOL_COALESCE_RX_MAX_FRAMES_LOW | \
+ ETHTOOL_COALESCE_TX_MAX_FRAMES_LOW | \
+ ETHTOOL_COALESCE_RX_MAX_FRAMES_HIGH | \
+ ETHTOOL_COALESCE_TX_MAX_FRAMES_HIGH | \
+ ETHTOOL_COALESCE_PKT_RATE_RX_USECS)
+
static const struct ethtool_ops lio_ethtool_ops = {
+ .supported_coalesce_params = LIO_ETHTOOL_COALESCE,
.get_link_ksettings = lio_get_link_ksettings,
.set_link_ksettings = lio_set_link_ksettings,
.get_fecparam = lio_get_fecparam,
@@ -3128,6 +3138,7 @@ static const struct ethtool_ops lio_ethtool_ops = {
};
static const struct ethtool_ops lio_vf_ethtool_ops = {
+ .supported_coalesce_params = LIO_ETHTOOL_COALESCE,
.get_link_ksettings = lio_get_link_ksettings,
.get_link = ethtool_op_get_link,
.get_drvinfo = lio_get_vf_drvinfo,
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index e464c946bca4..9efeebde3514 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -211,6 +211,11 @@ bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,
ETHTOOL_COALESCE_TX_MAX_FRAMES_IRQ)
#define ETHTOOL_COALESCE_USE_ADAPTIVE \
(ETHTOOL_COALESCE_USE_ADAPTIVE_RX | ETHTOOL_COALESCE_USE_ADAPTIVE_TX)
+#define ETHTOOL_COALESCE_PKT_RATE_RX_USECS \
+ (ETHTOOL_COALESCE_USE_ADAPTIVE_RX | \
+ ETHTOOL_COALESCE_RX_USECS_LOW | ETHTOOL_COALESCE_RX_USECS_HIGH | \
+ ETHTOOL_COALESCE_PKT_RATE_LOW | ETHTOOL_COALESCE_PKT_RATE_HIGH | \
+ ETHTOOL_COALESCE_RATE_SAMPLE_INTERVAL)
/**
* struct ethtool_ops - optional netdev operations
--
2.24.1
next prev parent reply other threads:[~2020-03-10 2:15 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 2:14 [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 3 Jakub Kicinski
2020-03-10 2:14 ` [PATCH net-next 01/15] net: ena: reject unsupported coalescing params Jakub Kicinski
2020-03-10 14:16 ` Kiyanovski, Arthur
2020-03-10 18:31 ` Leon Romanovsky
2020-03-10 20:55 ` Kiyanovski, Arthur
2020-03-11 6:56 ` Leon Romanovsky
2020-03-11 7:09 ` Kiyanovski, Arthur
2020-03-10 2:14 ` [PATCH net-next 02/15] net: aquantia: reject all " Jakub Kicinski
2020-03-10 2:15 ` [PATCH net-next 03/15] net: systemport: reject " Jakub Kicinski
2020-03-10 3:58 ` Florian Fainelli
2020-03-10 3:58 ` Florian Fainelli
2020-03-10 2:15 ` [PATCH net-next 04/15] net: bnx2: " Jakub Kicinski
2020-03-10 6:21 ` Michael Chan
2020-03-10 2:15 ` [PATCH net-next 05/15] net: bnx2x: " Jakub Kicinski
2020-03-10 2:15 ` [PATCH net-next 06/15] net: bcmgenet: " Jakub Kicinski
2020-03-10 3:58 ` Florian Fainelli
2020-03-10 2:15 ` [PATCH net-next 07/15] net: tg3: " Jakub Kicinski
2020-03-10 6:16 ` Michael Chan
2020-03-10 2:15 ` [PATCH net-next 08/15] net: bna: " Jakub Kicinski
2020-03-10 2:15 ` Jakub Kicinski [this message]
2020-03-10 2:15 ` [PATCH net-next 10/15] net: mlx4: " Jakub Kicinski
2020-03-10 14:11 ` Tariq Toukan
2020-03-10 17:37 ` Jakub Kicinski
2020-03-10 2:15 ` [PATCH net-next 11/15] net: cxgb2: " Jakub Kicinski
2020-03-10 2:15 ` [PATCH net-next 12/15] net: cxgb3: " Jakub Kicinski
2020-03-10 2:15 ` [PATCH net-next 13/15] net: cxgb4: " Jakub Kicinski
2020-03-10 2:15 ` [PATCH net-next 14/15] net: cxgb4vf: " Jakub Kicinski
2020-03-10 2:15 ` [PATCH net-next 15/15] net: gemini: " Jakub Kicinski
2020-03-10 2:43 ` [PATCH net-next 00/15] ethtool: consolidate irq coalescing - part 3 David Miller
2020-03-10 3:05 ` Jakub Kicinski
2020-03-10 23:29 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2020-03-10 16:55 [PATCH net-next 09/15] net: liquidio: reject unsupported coalescing params Derek Chickles
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=20200310021512.1861626-10-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=GR-Linux-NIC-Dev@marvell.com \
--cc=GR-everest-linux-l2@marvell.com \
--cc=aelior@marvell.com \
--cc=akiyano@amazon.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=dchickles@marvell.com \
--cc=f.fainelli@gmail.com \
--cc=fmanlunas@marvell.com \
--cc=gtzalik@amazon.com \
--cc=irusskikh@marvell.com \
--cc=leedom@chelsio.com \
--cc=linus.walleij@linaro.org \
--cc=mchan@broadcom.com \
--cc=netanel@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=prashant@broadcom.com \
--cc=rmody@marvell.com \
--cc=sburla@marvell.com \
--cc=siva.kallam@broadcom.com \
--cc=skalluru@marvell.com \
--cc=tariqt@mellanox.com \
--cc=ulli.kroll@googlemail.com \
--cc=vishal@chelsio.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.