aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/netdevsim/ethtool.c
AgeCommit message (Collapse)AuthorFilesLines
2024-04-08netdevsim: report stats by default, like a real deviceJakub Kicinski1-0/+11
Real devices should implement qstats. Devices which support pause or FEC configuration should also report the relevant stats. nsim was missing FEC stats completely, some of the qstats and pause stats required toggling a debugfs knob. Note that the tests which used pause always initialize the setting so they shouldn't be affected by the different starting value. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-08-09net: netdevsim: use mock PHC driverVladimir Oltean1-0/+11
I'd like to make netdevsim offload tc-taprio, but currently, this Qdisc emits a ETHTOOL_GET_TS_INFO call to the driver to make sure that it has a PTP clock, so that it is reasonably capable of offloading the schedule. By using the mock PHC driver, that becomes possible. Hardware timestamping is not necessary, and netdevsim does not support packet I/O anyway. Signed-off-by: Vladimir Oltean <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2021-12-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netJakub Kicinski1-1/+4
No conflicts. Signed-off-by: Jakub Kicinski <[email protected]>
2021-12-10netdevsim: don't overwrite read only ethtool parmsFilip Pokryvka1-1/+4
Ethtool ring feature has _max_pending attributes read-only. Set only read-write attributes in nsim_set_ringparam. This patch is useful, if netdevsim device is set-up using NetworkManager, because NetworkManager sends 0 as MAX values, as it is pointless to retrieve them in extra call, because they should be read-only. Then, the device is left in incosistent state (value > MAX). Fixes: a7fc6db099b5 ("netdevsim: support ethtool ring and coalesce settings") Signed-off-by: Filip Pokryvka <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2021-11-22ethtool: extend ringparam setting/getting API with rx_buf_lenHao Chen1-2/+6
Add two new parameters kernel_ringparam and extack for .get_ringparam and .set_ringparam to extend more ring params through netlink. Signed-off-by: Hao Chen <[email protected]> Signed-off-by: Guangbin Huang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2021-09-15netdevsim: add ability to change channel countJakub Kicinski1-0/+28
For testing visibility of mq/mqprio default children. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2021-08-24ethtool: extend coalesce setting uAPI with CQE modeYufeng Mo1-2/+6
In order to support more coalesce parameters through netlink, add two new parameter kernel_coal and extack for .set_coalesce and .get_coalesce, then some extra info can return to user with the netlink API. Signed-off-by: Yufeng Mo <[email protected]> Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2021-03-31netdevsim: add FEC settings supportJakub Kicinski1-0/+36
Add support for ethtool FEC and some ethtool error injection. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-11-20netdevsim: support ethtool ring and coalesce settingsAntonio Cardace1-3/+63
Add ethtool ring and coalesce settings support for testing. Signed-off-by: Antonio Cardace <[email protected]> Reviewed-by: Michal Kubecek <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-11-20netdevsim: move ethtool pause params in separate structAntonio Cardace1-8/+8
This will help the refactoring in the next commit when coalesce and ring settings are added. Signed-off-by: Antonio Cardace <[email protected]> Reviewed-by: Michal Kubecek <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-09-26netdevsim: fix duplicated debugfs directoryJakub Kicinski1-1/+1
The "ethtool" debugfs directory holds per-netdev knobs, so move it from the device instance directory to the port directory. This fixes the following warning when creating multiple ports: debugfs: Directory 'ethtool' with parent 'netdevsim1' already present! Fixes: ff1f7c17fb20 ("netdevsim: add pause frame stats") Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-15netdevsim: add pause frame statsJakub Kicinski1-0/+64
Add minimal ethtool interface for testing ethtool pause stats. v2: add missing static on nsim_ethtool_ops Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>