Age | Commit message (Collapse) | Author |
|
Only the 0x01 flag (DEBUG_PARSE) for --debug is documented in the man page.
Document all debugging flags, including those which only work with netlink
interface.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
- preserve uapi/
|
|
Update to kernel v6.9.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
|
|
Add missing colon in coalesce_reply_cb()
Fixes: ec573f209dfd (netlink: settings: add netlink support for coalesce tx aggr params)
Signed-off-by: Gao Xingwang <gaoxingwang1@huawei.com>
Reviewed-by: Heng Qi <hengqi@linux.alibaba.com>
|
|
Add support for RSS input transformation [1]. Currently, only symmetric-xor
is supported. The user can set the RSS input transformation via:
# ethtool -X <dev> xfrm symmetric-xor
and sets it off (default) by:
# ethtool -X <dev> xfrm none
The status of the transformation is reported by a new section at the end
of "ethtool -x":
# ethtool -x <dev>
.
.
.
.
RSS hash function:
toeplitz: on
xor: off
crc32: off
RSS input transformation:
symmetric-xor: on
Link: https://lore.kernel.org/netdev/20231213003321.605376-1-ahmed.zaki@intel.com/
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
|
|
GTP Flow hash was added to the ice driver.
By executing "ethtool -N <dev> rx-flow-hash gtpu4t sde", RSS can include
not only the IP's src/dst but also the TEID of GTP packets.
Additionally, options <e> have been support.
These allow specification to include TEID in the hash computation.
Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
|
|
Update to kernel commit 2bd99aef1b19.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Update to kernel v6.8-rc2.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Drop the extra comma.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Update to kernel v6.7.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Add support for controlling header split (aka TCP data split) feature,
backed by kernel commit 50d73710715d ("ethtool: add SET for
TCP_DATA_SPLIT ringparam"). Command format:
ethtool -G|--set-ring devname tcp-data-split [ auto|on|off ]
"auto" is defined solely by device's driver.
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
|
|
The current sff8636_show_all_ioctl code uses a switch statement
to determine the module type, and exits directly with a return statement
when a match is found. However, when the module type cannot be matched,
the sff8636_memory_map_init_buf and sff8636_show_all_common functions
are executed. This writing style is not intuitive enough.
Therefore, this patch adding a default branch in the switch statement
to improve the readability of the code.
Signed-off-by: Hao Lan <lanhao@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
|
|
According to table 5-1 in SFF-8472 Rev. 12.4, the Identifier Values for
"GBIC" (01h) and "Module soldered to motherboard (ex: SFF)" (02h) are
supported by the specification in addition to the current one.
Therefore, adjust ethtool to invoke the SFF-8079 parser for them, which
will in turn invoke the SFF-8472 parser if the transceiver module
supports digital diagnostic monitoring.
Without this patch, the EEPROM contents of such transceiver modules will
be hex dumped instead of being parsed and printed in a human readable
format.
Fixes: 25b64c66f58d ("ethtool: Add netlink handler for getmodule (-m)")
Reported-by: Ivar Simensen <is@datarespons.no>
Closes: https://lore.kernel.org/netdev/AM0PR03MB5938EE1722EF2C75112B86F5B9B9A@AM0PR03MB5938.eurprd03.prod.outlook.com/
Tested-by: Ivar Simensen <is@datarespons.no>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
|
|
GCC 14 introduces a new -Walloc-size included in -Wextra which gives:
```
netlink/strset.c: In function ‘get_perdev_by_ifindex’:
netlink/strset.c:121:16: warning: allocation of insufficient size ‘1’ for type ‘struct perdev_strings’ with size ‘648’ [-Walloc-size]
121 | perdev = calloc(sizeof(*perdev), 1);
| ^
```
The calloc prototype is:
```
void *calloc(size_t nmemb, size_t size);
```
So, just swap the number of members and size arguments to match the prototype, as
we're initialising 1 struct of size `sizeof(*perdev)`. GCC then sees we're not
doing anything wrong. This is consistent with other use in the codebase too.
Signed-off-by: Sam James <sam@gentoo.org>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
|
|
Update to kernel v6.7-rc2.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Add three more SFF-8024 Identifier Values that according to the standard
support the Common Management Interface Specification (CMIS) memory map
so that ethtool will be able to dump, parse and print their EEPROM
contents.
Reported-by: Mark Wang <markwang@nvidia.com>
Tested-by: Mark Wang <markwang@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
|
|
We were not listing all of the uapi header files in ethtool_SOURCES
which prevented the proper construction of a distribution source
tarball. This is noticeable with older kernel headers where the build
would be breaking in such a way:
/storage/buildroot/output/arm64/host/bin/aarch64-linux-gcc
-DHAVE_CONFIG_H -I. -I./uapi -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wextra
-D_POSIX_C_SOURCE=200809L -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=2 -std=gnu11 -c -o
netlink/rings.o netlink/rings.c
In file included from internal.h:45,
from common.c:7:
./uapi/linux/ethtool.h:1507:19: warning: implicit declaration of
function '__KERNEL_DIV_ROUND_UP' [-Wimplicit-function-declaration]
__u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];
^~~~~~~~~~~~~~~~~~~~~
./uapi/linux/ethtool.h:1507:8: error: variably modified 'queue_mask'
at file scope
__u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];
^~~~~~~~~~
make[3]: *** [Makefile:1410: common.o] Error 1
make[3]: *** Waiting for unfinished jobs....
Fixes: da2beb7afc25 ("update UAPI header copies")
Reported-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
|
Update to kernel v6.6-rc1.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
When reverse searching the list in rmgr for a free location the last
slot (first slot searched) in the list needs special care as it might
not span the full word length. This is done by building a bit-mask
covering the not-active parts of the last word and using that to judge
if there is a free location in the last word or not. Once that is known
searching in the last slot, or to skip it, can be done by the same
algorithm as for the other slots in the list.
There is a bug in creating the bit-mask for the non-active parts of the
last slot where the 0-indexed nature of bit addressing is not taken into
account when shifting. This leads to a one-off bug, fix it.
Fixes: 8d63f72ccdcb ("Add RX packet classification interface")
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Cc: Alexander Duyck <alexanderduyck@meta.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
|
|
Add support pretty printer for the registers of hns3 driver.
This printer supports PF and VF, and is compatible with hns3
drivers of earlier versions.
Sample output:
$ ethtool -d eth1
[cmdq_regs]
comm_nic_csq_baseaddr_l : 0x48168000
comm_nic_csq_baseaddr_h : 0x00000000
comm_nic_csq_depth : 0x00000080
comm_nic_csq_tail : 0x00000050
comm_nic_csq_head : 0x00000050
comm_nic_crq_baseaddr_l : 0x48170000
comm_nic_crq_baseaddr_h : 0x00000000
comm_nic_crq_depth : 0x00000080
comm_nic_crq_tail : 0x00000000
comm_nic_crq_head : 0x00000000
comm_vector0_cmdq_src : 0x00000000
comm_cmdq_intr_sts : 0x00000000
comm_cmdq_intr_en : 0x00000002
comm_cmdq_intr_gen : 0x00000000
[common_regs]
misc_vector_base : 0x00000001
pf_other_int : 0x00000040
misc_reset_sts : 0x00000000
misc_vector_int_sts : 0x00000000
global_reset : 0x00000000
fun_rst_ing : 0x00000000
gro_en : 0x00000001
...
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
|
|
Update to kernel v6.5.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Currently, nl_sset treats any negative value returned by nl_parser
(including -EOPNOTSUPP) as `1`. Consequently, netlink_run_handler
directly calls exit without returning to main and invoking do_sset
through ioctl_init.
To fallback to do_sset, this commit allows nl_sset return -EOPNOTSUPP.
Fixes: 6c19c0d559c8 ("netlink: use genetlink ops information to decide about fallback")
Signed-off-by: Gang Li <gang.li@linux.dev>
|
|
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Update to kernel v6.4.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
nl_parse_lookup_u8 handler is used with duplex_values defined as
lookup_entry_u32. While it still works on little endian machines,
duplex is always 0 (DUPLEX_HALF) on big endian ones...
Fixes: 392b12e38747 ("netlink: add netlink handler for sset (-s)")
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
|
|
Report whether Loss of Lock, of Signal and Tx Faults were detected.
Print "None" in case no lane has the problem, and per-lane "Yes" /
"No" if at least one of the lanes reports true.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
|
|
Report whether Loss of Lock, of Signal and Tx Faults were detected.
Print "None" in case no lane has the problem, and per-lane "Yes" /
"No" if at least one of the lanes reports true.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
|
|
Macros NETLINK_GENERIC and __KERNEL_DIV_ROUND_UP are now provided in UAPI
header copies so that we no longer need to check if they are defined and
provide fallback definitions.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
The C11 standard guarantees strtol() function to be provided. As we require
C11 now, the autoconf check is no longer necessary.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Recently added check for C11 compiler only defined macro AX_CHECK_STDC with
the check but did not use it so that no check was actually performed.
Fixes: 31b7b5ec7edd ("Require a compiler with support for C11 features")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
To allow building on systems with old or missing autoconf-archive package,
add local copies of macros AX_CHECK_COMPILE_FLAG and AX_APPEND_FLAG. These
are needed for AX_CHECK_STDC.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
The build time check for definition of __be16 and __be32 types and their
fallback definitions are no longer needed since we added a sanitized copy
of linux/types.h which does provide these types (and __be64 which we also
need). These were provided to fix build on older systems with outdated
system <linux/types.h>
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Just like the kernel, which has been using -std=gnu11 for about a year,
we also require a C11 compiler for ethtool.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
|
|
|
|
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Fixes issues that were originally found using gcc's static analyzer. The
flags used to invoke the analyzer are given below.
Upon manual review of the results and discussion of the previous patch
'[PATCH ethtool 3/3] Fix potential null-pointer deference issues.', it
was determined that when using a kernel lacking the execve patch ( see
https://github.com/gregkh/linux/commit/dcd46d897adb70d63e025f175a00a89797d31a43),
it is possible for argc to be 0 and argp to be an array with only a
single NULL entry. This scenario would cause ethtool to read beyond the
bounds of the argp array. However, this scenario should not be possible
for any Linux kernel released within the last two years should have the
execve patch applied.
CFLAGS=-march=native -O2 -pipe -fanalyzer \
-Werror=analyzer-va-arg-type-mismatch \
-Werror=analyzer-va-list-exhausted \
-Werror=analyzer-va-list-leak \
-Werror=analyzer-va-list-use-after-va-end
CXXCFLAGS=-march=native -O2 \
-pipe -fanalyzer \
-Werror=analyzer-va-arg-type-mismatch \
-Werror=analyzer-va-list-exhausted \
-Werror=analyzer-va-list-leak \
-Werror=analyzer-va-list-use-after-va-end
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
GCC version is gcc (Gentoo 13.1.0-r1 p1) 13.1.0
Additional Information:
https://patchwork.kernel.org/project/netdevbpf/patch/20221208011122.2343363-8-jesse.brandeburg@intel.com/
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
|
|
Update to kernel v6.4-rc1.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Shay Agroskin:
This patchset adds a new sub-configuration to ethtool get/set queue
params (ethtool -g) called 'tx-push-buf-len'.
This configuration specifies the maximum number of bytes of a
transmitted packet a driver can push directly to the underlying
device ('push' mode). The motivation for pushing some of the bytes to
the device has the advantages of
- Allowing a smart device to take fast actions based on the packet's
header
- Reducing latency for small packets that can be copied completely into
the device
This new param is practically similar to tx-copybreak value that can be
set using ethtool's tunable but conceptually serves a different purpose.
While tx-copybreak is used to reduce the overhead of DMA mapping and
makes no sense to use if less than the whole segment gets copied,
tx-push-buf-len allows to improve performance by analyzing the packet's
data (usually headers) before performing the DMA operation.
The configuration can be queried and set using the commands:
$ ethtool -g [interface]
# ethtool -G [interface] tx-push-buf-len [number of bytes]
|
|
This attribute, which is part of ethtool's ring param configuration
allows the user to specify the maximum number of the packet's payload
that can be written directly to the device.
Example usage:
# ethtool -G [interface] tx-push-buf-len [number of bytes]
Signed-off-by: Shay Agroskin <shayagr@amazon.com>
|
|
Update to kernel commit 233eb4e786b5.
Signed-off-by: Shay Agroskin <shayagr@amazon.com>
|
|
ethtool is not exiting non-0 when -N fails. e.g.,
$ sudo ethtool -N eth0 flow-type tcp4 src-ip 1.2.3.4 action 3 loc 1023
rmgr: Cannot insert RX class rule: No such device
$ echo $?
0
Update rxclass_rule_ins to return err.
Fixes: 8d63f72ccdcb ("Add RX packet classification interface")
Cc: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
Acked-by: Alexander Duyck <alexanderduyck@fb.com>
|
|
Nicolas Vinton:
This patch series provides updates to correct issues found by gcc -fanalyze. The
issues were found by specifying the following flags when building:
CFLAGS="-march=native -O2 -pipe -fanalyzer -Werror=analyzer-va-arg-type-mismatch
-Werror=analyzer-va-list-exhausted -Werror=analyzer-va-list-leak
-Werror=analyzer-va-list-use-after-va-end"
CXXCFLAGS="-march=native -O2 -pipe -fanalyzer
-Werror=analyzer-va-arg-type-mismatch
-Werror=analyzer-va-list-exhausted
-Werror=analyzer-va-list-leak
-Werror=analyzer-va-list-use-after-va-end"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
GCC version is gcc (Gentoo 13.1.0-r1 p1) 13.1.0
|
|
Found via gcc -fanalyzer. In the function nl_sfeatures() malloc() is
called to allocate a block of memory; however, that memory block is
never explictily freed.
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
|
|
Found via gcc -fanalyzer. When using the non-standard FAM syntax:
uint32_t req_mask[0];
gcc-13 with the -fanalyzer flag generates an internal compiler error.
Updating the syntax to use the standard C syntax:
uint32_t req_mask[];
works around the gcc bug.
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
|
|
PLCA support threw the PLCA commands as required into the initial
support check at the start of nl_gset(). That's not correct.
The initial check (AFAIU) queries for the base support in the kernel
i.e. support for the commands which correspond to ioctls.
If those are not available (presumably very old kernel or kernel
without ethtool-netlink) we're better off using the ioctl.
For new functionality, however, falling back to ioctl
is counterproductive. New functionality (like PLCA) isn't
supported via the ioctl, anyway, and we're losing all the other
netlink-only functionality (I noticed that the link down statistics
are gone).
After much deliberation I decided to add a second check for
command support in gset_request(). Seems cleanest and if any
of the non-required commands narrows the capabilities (e.g.
does not support dump) we should just skip it too. Falling
back to ioctl would again be a regression.
Fixes: cf02fc1b1095 ("add support for IEEE 802.3cg-2019 Clause 148")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
Michal Kubecek:
On multiple occasion, build on older systems with system <linux/...>
headers missing definitions or later changes failed which we either worked
around by adding conditional defines or fixed by adding a sanitized copy of
such header to uapi/ directory.
To prevent these problems, add sanitized copies of all uapi headers that we
include from any source file or from an already present uapi header copy
(and repeat the process recursively). For this purpose, add the update
scripts to the repository, update it to add missing files automatically and
run the update.
|