summaryrefslogtreecommitdiff
path: root/python/vyos/ethtool.py
AgeCommit message (Collapse)Author
2023-09-19firewall: ethernet: T4502: Add interface offload node and verify interface ↵sarthurdev
supports HW flowtable offload - Add required offload setting for interfaces + flowtable offload (hw-tc-offload) - Verification of interface support for hardware offloaded flowtables
2023-07-14T5195: vyos.util -> vyos.utils package refactoring (#2093)Christian Breunig
* T5195: move run, cmd, call, rc_cmd helper to vyos.utils.process * T5195: use read_file and write_file implementation from vyos.utils.file Changed code automatically using: find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import read_file$/from vyos.utils.file import read_file/g' {} + find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import write_file$/from vyos.utils.file import write_file/g' {} + * T5195: move chmod* helpers to vyos.utils.permission * T5195: use colon_separated_to_dict from vyos.utils.dict * T5195: move is_systemd_service_* to vyos.utils.process * T5195: fix boot issues with missing imports * T5195: move dict_search_* helpers to vyos.utils.dict * T5195: move network helpers to vyos.utils.network * T5195: move commit_* helpers to vyos.utils.commit * T5195: move user I/O helpers to vyos.utils.io
2023-06-27T1797: Add initial vpp configurationViacheslav Hletenko
Add initial configuration mode for VPP (PoC) set vpp cpu corelist-workers '2' set vpp cpu main-core '1' set vpp interface eth1 num-rx-desc '256' set vpp interface eth1 num-rx-queues '512' set vpp interface eth1 num-tx-desc '256' set vpp interface eth1 num-tx-queues '512' set vpp interface eth1 pci '0000:02:00.0' set vpp interface eth1 rx-mode 'polling' set vpp interface eth2 pci '0000:08:00.0' Limitation: - 'set vpp interface ethX pci auto' works only per first commit, then interface detached from default stack and creates tun interface 'ethX' to communicate with default stack. In this case we can't get PCI address via ethtool for 'tun' interfaces. But we can set pci address manualy. - Interface sync between default stack and VPP-DPDK stack After vpp change it doesn't trigger iproute2 for changes (should be written later) I.e. if we change something in vpp per each commit it restarts vpp.service it gets empty interface config as we don't configure vpp directly and it should be configured via iproute2 But then if we do any change on interface (for example description) it gets IP address, MTU, state, etc.
2023-06-14T5290: Failing commits for SR-IOV interfaces using ixgbevf driver due to ↵cuongdt1994
change speed/duplex settings This is the same problem as reported in T4297. By definition it is not possible to change speed and duplex settings at SR-IOV virtual functions driven by ixgbevf driver. I think the solution is the same as well, that is to add 'ixgbevf' into _drivers_without_speed_duplex_flow in /usr/lib/python3/dist-packages/vyos/ethtool.py. It fixed the problem for me with Intel x520 NICs.
2023-05-06ethernet: T3891: fix always true expression on auto-negotiationChristian Breunig
Commit f2ecc9710d49 ("ethernet: T3891: honor auto-negotiation support per NIC") added an if statement that always evaluated to True.
2023-05-04ethernet: T3891: honor auto-negotiation support per NICChristian Breunig
Not all drivers/NICs or combination of NIC + transceiver support auto- negotiation. The current auto-negotiation capability is evaluated and taken into account when applying spped/duplex settings. If auto-negotiation is not supported - we skip the setting to avoid errors during configuration.
2023-03-13T2516: Exclude veth interfaces from duplex and speed checkViacheslav Hletenko
Exclude interfaces with 'veth' driver from duplex and speed check
2023-01-27vyos.ethtool: T4963: improve driver name detectionMartin Böh
The previous solution did not work for drivers that were no modules. e.g compiled with a kernel config set to CONFIG_VIRTIO_NET=y
2022-04-11vyos.ethtool: T4327: add Hyper-V NIC driver to speed/duplex ignore listChristian Poessinger
2022-03-11[Ethtool] T4297: Update drivers supporting speed/flow/duplexDaniel Berlin
The iavf, ice, and i40e drivers do not support speed, flow, or duplex control using ethtool. As a result, interface configuration changes fail to commit when using those drivers. This patch fixes that by correctly marking those drivers as not supporting those controls.
2022-02-13ethernet: T4242: speed/duplex can never be switched back to auto/autoChristian Poessinger
2021-10-24vyos.ethtool: T3935: relax __init__() when driver name is not detectedChristian Poessinger
In addition to commit 0b414bcd ("vyos.ethtool: T3874: do not throw exception if adapter has issues with autoneg") we should also not care too strict when locating the driver name. This might cause false positives.
2021-09-30vyos.ethtool: T3874: do not throw exception if adapter has issues with autonegChristian Poessinger
Instead of throwing an exception when an adapters autoneg capabilities can not be detected, just pretend it does not support autoneg.
2021-09-10ethtool: T3802: extend check_speed_duplex() implementation to support 'auto'Christian Poessinger
(cherry picked from commit 3037661951d0e5d1f6264f886781b7ddc019329e)
2021-09-10ethernet: T3802: use only one implementation for get_driver_name()Christian Poessinger
Move the two implementations to get the driver name of a NIC from ethernet.py and ethtool.py to only ethtool.py. (cherry picked from commit 07840977834816b69fa3b366817d90f44b5dc7a7)
2021-09-10ethernet: T3802: check if driver supports changing flow-control settingsChristian Poessinger
(cherry picked from commit 1572edd2cef355710d1129907d3e49451a6c31d4)
2021-08-31vyos.ethtool: T3163: ring-buffer values should be stored as stringChristian Poessinger
Commit 29082959 ("ethernet: T3163: only change ring-buffer settings if required") added a delta-check code for the ring buffer values, unfortunately this was never properly evaluated as str() and int() got compared resulting always in an unequal result.
2021-08-31vyos.ethtool: T3163: purify code to read and change flow-control settingsChristian Poessinger
It makes no sense to have a parser for the ethtool values in ethtool.py and ethernet.py - one instance ios more then enough!
2021-08-31ethernet: T3163: only change ring-buffer settings if requiredChristian Poessinger
Only update the RX/TX ring-buffer settings if they are different from the ones currently programmed to the hardware. There is no need to write the same value to the hardware again - this could cause traffic disruption on some NICs.
2021-08-31vyos.ethtool: T3163: purify code to read current speed and duplex settingsChristian Poessinger
It makes no sense to have a parser for the ethtool value sin ethtool.py and ethernet.py - one instance ios more then enough!
2021-08-31ethernet: T2241: check if interface supports changing speed/duplex settingsChristian Poessinger
Not all interface drivers have the ability to change the speed and duplex settings. Known drivers with this limitation are vmxnet3, virtio_net and xen_netfront. If this driver is detected, an error will be presented to the user.
2021-08-31vyos.ethtool: T3163: use long option names when calling the ethtool binrayChristian Poessinger
This makes understanding the code easier what is "really" called without opening the man page.
2021-08-30ethernet: T3787: remove deprecated UDP fragmentation offloading optionChristian Poessinger
Deprecated in the Linux Kernel by commit 08a00fea6de277df12ccfadc21 ("net: Remove references to NETIF_F_UFO from ethtool."). (cherry picked from commit f5e46ee6cc2b6c1c1869e26beca4ccd5bf52b62f)
2021-08-30vyos.ethtool: T3163: remove test and debug method get_rx_vlan_offload()Christian Poessinger
2021-08-29vyos.ethtool: T3163: add check_speed_duplex() methodChristian Poessinger
Add a new method which supports checking if the desired speed and duplex setting is actually supported by the underlaying network interface card. >>> from vyos.ethtool import Ethtool >>> tmp = Ethtool('eth0') >>> tmp.check_speed_duplex('100', 'full') False >>> tmp.check_speed_duplex('1000', 'full') True
2021-08-29vyos.ethtool: T3163: prefix class internal data structures with _Christian Poessinger
2021-08-29vyos.ethtool: T3163: drop obsoleted is_fixed_lro() methodChristian Poessinger
Commit d22f97af ("vyos.ethtool: T3163: rename unused methods for offload validation") reworked the entire class on how data should be presented to the user, but forgot to drop the is_fixed_lro() method.
2021-08-28vyos.ethtool: T3163: rename unused methods for offload validationChristian Poessinger
2021-06-22vyos.ethtool: T3645: fix compatibility with latest ethtool versionChristian Poessinger
Ethtool version used on Debian Bullseye changed the output format from 0 -> n/a. As we are only interested in the tx/rx keys we do not care about RX Mini/Jumbo.
2021-02-24ethernet: T3163: fix typos in vyos.ethtool commentsChristian Poessinger
2021-02-24ethernet: T3163: not all NIC drivers support ring-buffer configurationChristian Poessinger
In addition to commit cf1156a60e ("ethernet: T3163: probe driver for maximum rx/tx ring-buffer size") this extends the logic in a way as not every driver supports setting the buffers at all so it will properly error out. When invoking "ethtool -g" both stdout and stderr are captured and no exception is raised if it's an unsupported driver feature. The verify() section will inform the user about the illegal operation.
2021-02-21ethernet: T3163: probe driver for maximum rx/tx ring-buffer sizeChristian Poessinger
2021-02-20vyos.ethtool: import helper classChristian Poessinger
This helper class could be used to interact and retrieve information from ethtool. It is not used so far in production code.