mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
The NetDIM library, currently leveraged by an array of NICs, delivers
excellent acceleration benefits. Nevertheless, NICs vary significantly
in their dim profile list prerequisites.
Specifically, virtio-net backends may present diverse sw or hw device
implementation, making a one-size-fits-all parameter list impractical.
On Alibaba Cloud, the virtio DPU's performance under the default DIM
profile falls short of expectations, partly due to a mismatch in
parameter configuration.
I also noticed that ice/idpf/ena and other NICs have customized
profilelist or placed some restrictions on dim capabilities.
Motivated by this, I tried adding new params for "ethtool -C" that provides
a per-device control to modify and access a device's interrupt parameters.
Usage
========
The target NIC is named ethx.
Assume that ethx only declares support for rx profile setting
(with DIM_PROFILE_RX flag set in profile_flags) and supports modification
of usec and pkt fields.
1. Query the currently customized list of the device
$ ethtool -c ethx
...
rx-profile:
{.usec = 1, .pkts = 256, .comps = n/a,},
{.usec = 8, .pkts = 256, .comps = n/a,},
{.usec = 64, .pkts = 256, .comps = n/a,},
{.usec = 128, .pkts = 256, .comps = n/a,},
{.usec = 256, .pkts = 256, .comps = n/a,}
tx-profile: n/a
2. Tune
$ ethtool -C ethx rx-profile 1,1,n_2,n,n_3,3,n_4,4,n_n,5,n
"n" means do not modify this field.
$ ethtool -c ethx
...
rx-profile:
{.usec = 1, .pkts = 1, .comps = n/a,},
{.usec = 2, .pkts = 256, .comps = n/a,},
{.usec = 3, .pkts = 3, .comps = n/a,},
{.usec = 4, .pkts = 4, .comps = n/a,},
{.usec = 256, .pkts = 5, .comps = n/a,}
tx-profile: n/a
3. Hint
If the device does not support some type of customized dim profiles,
the corresponding "n/a" will display.
If the "n/a" field is being modified, -EOPNOTSUPP will be reported.
Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240621101353.107425-4-hengqi@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||
|---|---|---|
| .. | ||
| caif | ||
| device_drivers | ||
| devlink | ||
| dsa | ||
| mac80211_hwsim | ||
| net_cachelines | ||
| netlink_spec | ||
| pse-pd | ||
| 6lowpan.rst | ||
| 6pack.rst | ||
| af_xdp.rst | ||
| alias.rst | ||
| arcnet-hardware.rst | ||
| arcnet.rst | ||
| atm.rst | ||
| ax25.rst | ||
| bareudp.rst | ||
| batman-adv.rst | ||
| bonding.rst | ||
| bridge.rst | ||
| can_ucan_protocol.rst | ||
| can.rst | ||
| cdc_mbim.rst | ||
| checksum-offloads.rst | ||
| dccp.rst | ||
| dctcp.rst | ||
| dns_resolver.rst | ||
| driver.rst | ||
| eql.rst | ||
| ethtool-netlink.rst | ||
| failover.rst | ||
| fib_trie.rst | ||
| filter.rst | ||
| gen_stats.rst | ||
| generic_netlink.rst | ||
| generic-hdlc.rst | ||
| gtp.rst | ||
| ieee802154.rst | ||
| ila.rst | ||
| index.rst | ||
| ioam6-sysctl.rst | ||
| ip_dynaddr.rst | ||
| ip-sysctl.rst | ||
| ipsec.rst | ||
| ipv6.rst | ||
| ipvlan.rst | ||
| ipvs-sysctl.rst | ||
| iso15765-2.rst | ||
| j1939.rst | ||
| kapi.rst | ||
| kcm.rst | ||
| l2tp.rst | ||
| lapb-module.rst | ||
| mac80211-auth-assoc-deauth.txt | ||
| mac80211-injection.rst | ||
| mctp.rst | ||
| mpls-sysctl.rst | ||
| mptcp-sysctl.rst | ||
| mptcp.rst | ||
| msg_zerocopy.rst | ||
| multi-pf-netdev.rst | ||
| multiqueue.rst | ||
| napi.rst | ||
| net_dim.rst | ||
| net_failover.rst | ||
| netconsole.rst | ||
| netdev-features.rst | ||
| netdevices.rst | ||
| netfilter-sysctl.rst | ||
| netif-msg.rst | ||
| nexthop-group-resilient.rst | ||
| nf_conntrack-sysctl.rst | ||
| nf_flowtable.rst | ||
| nfc.rst | ||
| openvswitch.rst | ||
| operstates.rst | ||
| packet_mmap.rst | ||
| page_pool.rst | ||
| phonet.rst | ||
| phy.rst | ||
| pktgen.rst | ||
| plip.rst | ||
| ppp_generic.rst | ||
| proc_net_tcp.rst | ||
| radiotap-headers.rst | ||
| rds.rst | ||
| regulatory.rst | ||
| representors.rst | ||
| rxrpc.rst | ||
| scaling.rst | ||
| sctp.rst | ||
| secid.rst | ||
| seg6-sysctl.rst | ||
| segmentation-offloads.rst | ||
| sfp-phylink.rst | ||
| skbuff.rst | ||
| smc-sysctl.rst | ||
| snmp_counter.rst | ||
| sriov.rst | ||
| statistics.rst | ||
| strparser.rst | ||
| switchdev.rst | ||
| sysfs-tagging.rst | ||
| tc-actions-env-rules.rst | ||
| tc-queue-filters.rst | ||
| tcp_ao.rst | ||
| tcp-thin.rst | ||
| team.rst | ||
| timestamping.rst | ||
| tipc.rst | ||
| tls-handshake.rst | ||
| tls-offload-layers.svg | ||
| tls-offload-reorder-bad.svg | ||
| tls-offload-reorder-good.svg | ||
| tls-offload.rst | ||
| tls.rst | ||
| tproxy.rst | ||
| tuntap.rst | ||
| udplite.rst | ||
| vrf.rst | ||
| vxlan.rst | ||
| x25-iface.rst | ||
| x25.rst | ||
| xdp-rx-metadata.rst | ||
| xfrm_device.rst | ||
| xfrm_proc.rst | ||
| xfrm_sync.rst | ||
| xfrm_sysctl.rst | ||
| xsk-tx-metadata.rst | ||