WSL2-Linux-Kernel/drivers/net
Muhammad Husaini Zulkifli d645206e9b igc: Expose tx-usecs coalesce setting to user
[ Upstream commit 1703b2e0de ]

When users attempt to obtain the coalesce setting using the
ethtool command, current code always returns 0 for tx-usecs.
This is because I225/6 always uses a queue pair setting, hence
tx_coalesce_usecs does not return a value during the
igc_ethtool_get_coalesce() callback process. The pair queue
condition checking in igc_ethtool_get_coalesce() is removed by
this patch so that the user gets information of the value of tx-usecs.

Even if i225/6 is using queue pair setting, there is no harm in
notifying the user of the tx-usecs. The implementation of the current
code may have previously been a copy of the legacy code i210.
Since I225 has the queue pair setting enabled, tx-usecs will always adhere
to the user-set rx-usecs value. An error message will appear when the user
attempts to set the tx-usecs value for the input parameters because,
by default, they should only set the rx-usecs value.

This patch also adds the helper function to get the
previous rx coalesce value similar to tx coalesce.

How to test:
User can get the coalesce value using ethtool command.

Example command:
Get: ethtool -c <interface>

Previous output:

rx-usecs: 3
rx-frames: n/a
rx-usecs-irq: n/a
rx-frames-irq: n/a

tx-usecs: 0
tx-frames: n/a
tx-usecs-irq: n/a
tx-frames-irq: n/a

New output:

rx-usecs: 3
rx-frames: n/a
rx-usecs-irq: n/a
rx-frames-irq: n/a

tx-usecs: 3
tx-frames: n/a
tx-usecs-irq: n/a
tx-frames-irq: n/a

Fixes: 8c5ad0dae9 ("igc: Add ethtool support")
Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20230919170331.1581031-1-anthony.l.nguyen@intel.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-06 13:18:08 +02:00
..
appletalk
arcnet net: arcnet: Do not call kfree_skb() under local_irq_disable() 2023-09-19 12:22:34 +02:00
bonding bonding: fix macvlan over alb bond support 2023-08-30 16:18:15 +02:00
caif
can can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM 2023-09-19 12:22:32 +02:00
dsa net: dsa: sja1105: hide all multicast addresses from "bridge fdb show" 2023-09-19 12:23:03 +02:00
ethernet igc: Expose tx-usecs coalesce setting to user 2023-10-06 13:18:08 +02:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154
ipa
ipvlan ipvlan: Fix a reference count leak warning in ipvlan_ns_exit() 2023-08-30 16:18:14 +02:00
mctp
mdio
netdevsim
pcs
phy net: phy: broadcom: stub c45 read/write for 54810 2023-08-26 14:23:34 +02:00
plip
ppp
slip
team team: fix null-ptr-deref when team device type is changed 2023-10-06 13:18:08 +02:00
usb r8152: check budget for r8152_poll() 2023-09-19 12:23:03 +02:00
vmxnet3
vxlan vxlan: generalize vxlan_parse_gpe_hdr and remove unused args 2023-09-19 12:22:27 +02:00
wan
wireguard wireguard: allowedips: expand maximum node depth 2023-08-16 18:21:57 +02:00
wireless wifi: mac80211_hwsim: drop short frames 2023-09-23 11:09:56 +02:00
wwan
xen-netback xen/netback: Fix buffer overrun triggered by unusual packet 2023-08-08 19:58:35 +02:00
Kconfig
LICENSE.SRC
Makefile vxlan: move to its own directory 2023-08-03 10:22:34 +02:00
Space.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c Revert "net: macsec: preserve ingress frame ordering" 2023-09-19 12:22:30 +02:00
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c net: tap_open(): set sk_uid from current_fsuid() 2023-08-11 15:13:57 +02:00
thunderbolt.c
tun.c drivers: net: prevent tun_build_skb() to exceed the packet size limit 2023-08-16 18:22:01 +02:00
veth.c veth: Fixing transmit return status for dropped packets 2023-09-19 12:22:58 +02:00
virtio_net.c virtio-net: set queues after driver_ok 2023-08-26 14:23:38 +02:00
vrf.c
vsockmon.c
xen-netfront.c