Skip to content

Commit caf4838

Browse files
committed
Merge branch 'ethtool-consolidate-irq-coalescing-other-drivers'
Jakub Kicinski says: ==================== ethtool: consolidate irq coalescing - other drivers Convert more drivers following the groundwork laid in a recent patch set [1]. The aim of the effort is to consolidate irq coalescing parameter validation in the core. This set converts all the drivers outside of drivers/net/ethernet. Only vmxnet3 them was checking unsupported parameters. The aim is to merge this via the net-next tree so we can convert all drivers and make the checking mandatory. [1] https://lore.kernel.org/netdev/[email protected]/ ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents ae9e82c + fad9930 commit caf4838

File tree

7 files changed

+11
-21
lines changed

7 files changed

+11
-21
lines changed

arch/um/drivers/vector_kern.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,6 +1508,7 @@ static int vector_set_coalesce(struct net_device *netdev,
15081508
}
15091509

15101510
static const struct ethtool_ops vector_net_ethtool_ops = {
1511+
.supported_coalesce_params = ETHTOOL_COALESCE_TX_USECS,
15111512
.get_drvinfo = vector_net_get_drvinfo,
15121513
.get_link = ethtool_op_get_link,
15131514
.get_ts_info = ethtool_op_get_ts_info,

drivers/infiniband/ulp/ipoib/ipoib_ethtool.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ static int ipoib_get_link_ksettings(struct net_device *netdev,
213213
}
214214

215215
static const struct ethtool_ops ipoib_ethtool_ops = {
216+
.supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS |
217+
ETHTOOL_COALESCE_RX_MAX_FRAMES,
216218
.get_link_ksettings = ipoib_get_link_ksettings,
217219
.get_drvinfo = ipoib_get_drvinfo,
218220
.get_coalesce = ipoib_get_coalesce,

drivers/net/tun.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3546,6 +3546,7 @@ static int tun_set_coalesce(struct net_device *dev,
35463546
}
35473547

35483548
static const struct ethtool_ops tun_ethtool_ops = {
3549+
.supported_coalesce_params = ETHTOOL_COALESCE_RX_MAX_FRAMES,
35493550
.get_drvinfo = tun_get_drvinfo,
35503551
.get_msglevel = tun_get_msglevel,
35513552
.set_msglevel = tun_set_msglevel,

drivers/net/usb/r8152.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6345,6 +6345,7 @@ static int rtl8152_set_ringparam(struct net_device *netdev,
63456345
}
63466346

63476347
static const struct ethtool_ops ops = {
6348+
.supported_coalesce_params = ETHTOOL_COALESCE_USECS,
63486349
.get_drvinfo = rtl8152_get_drvinfo,
63496350
.get_link = ethtool_op_get_link,
63506351
.nway_reset = rtl8152_nway_reset,

drivers/net/vmxnet3/vmxnet3_ethtool.c

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -780,27 +780,6 @@ vmxnet3_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec)
780780
if (!VMXNET3_VERSION_GE_3(adapter))
781781
return -EOPNOTSUPP;
782782

783-
if (ec->rx_coalesce_usecs_irq ||
784-
ec->rx_max_coalesced_frames_irq ||
785-
ec->tx_coalesce_usecs ||
786-
ec->tx_coalesce_usecs_irq ||
787-
ec->tx_max_coalesced_frames_irq ||
788-
ec->stats_block_coalesce_usecs ||
789-
ec->use_adaptive_tx_coalesce ||
790-
ec->pkt_rate_low ||
791-
ec->rx_coalesce_usecs_low ||
792-
ec->rx_max_coalesced_frames_low ||
793-
ec->tx_coalesce_usecs_low ||
794-
ec->tx_max_coalesced_frames_low ||
795-
ec->pkt_rate_high ||
796-
ec->rx_coalesce_usecs_high ||
797-
ec->rx_max_coalesced_frames_high ||
798-
ec->tx_coalesce_usecs_high ||
799-
ec->tx_max_coalesced_frames_high ||
800-
ec->rate_sample_interval) {
801-
return -EINVAL;
802-
}
803-
804783
if ((ec->rx_coalesce_usecs == 0) &&
805784
(ec->use_adaptive_rx_coalesce == 0) &&
806785
(ec->tx_max_coalesced_frames == 0) &&
@@ -891,6 +870,9 @@ vmxnet3_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec)
891870
}
892871

893872
static const struct ethtool_ops vmxnet3_ethtool_ops = {
873+
.supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS |
874+
ETHTOOL_COALESCE_MAX_FRAMES |
875+
ETHTOOL_COALESCE_USE_ADAPTIVE_RX,
894876
.get_drvinfo = vmxnet3_get_drvinfo,
895877
.get_regs_len = vmxnet3_get_regs_len,
896878
.get_regs = vmxnet3_get_regs,

drivers/net/wireless/ath/wil6210/ethtool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ static int wil_ethtoolops_set_coalesce(struct net_device *ndev,
9595
}
9696

9797
static const struct ethtool_ops wil_ethtool_ops = {
98+
.supported_coalesce_params = ETHTOOL_COALESCE_USECS,
9899
.get_drvinfo = cfg80211_get_drvinfo,
99100
.get_coalesce = wil_ethtoolops_get_coalesce,
100101
.set_coalesce = wil_ethtoolops_set_coalesce,

drivers/staging/qlge/qlge_ethtool.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ static void ql_set_msglevel(struct net_device *ndev, u32 value)
714714
}
715715

716716
const struct ethtool_ops qlge_ethtool_ops = {
717+
.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
718+
ETHTOOL_COALESCE_MAX_FRAMES,
717719
.get_drvinfo = ql_get_drvinfo,
718720
.get_wol = ql_get_wol,
719721
.set_wol = ql_set_wol,

0 commit comments

Comments
 (0)