Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1953847

Summary: [ethtool] The `NLM_F_MULTI` should be used for `NLM_F_DUMP`
Product: Red Hat Enterprise Linux 8 Reporter: Gris Ge <fge>
Component: kernelAssignee: Antoine Tenart <atenart>
kernel sub component: Networking QA Contact: Tianhao <tizhao>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: low CC: atenart, atragler, brdeoliv, jiji, kzhang, network-qe, sukulkar, tizhao, yuma
Version: 8.4Flags: pm-rhel: mirror+
Target Milestone: beta   
Target Release: 8.5   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-4.18.0-313.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 19:14:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Reproduce C code none

Description Gris Ge 2021-04-27 05:53:16 UTC
Created attachment 1775845 [details]
Reproduce C code

Description of problem:

When using `NLM_F_DUMP` to dump ethtool information for all interfaces, the replied netlink message is not using `NLM_F_MULTI` flag.

Version-Release number of selected component (if applicable):
kernel-4.18.0-304.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1. sudo dnf install -y gcc libnl3-devel
2. gcc -o test -I/usr/include/libnl3 test.c  -L/usr/lib64 -lnl-3 -lnl-genl-3
3. ./test

Actual results:

The nl_message reply of ethtool features dump is not using NLM_F_MULTI

Expected results:

The nl_message reply of ethtool features dump is using NLM_F_MULTI

Additional info:

The test C code is showing route rule dumping is using NLM_F_MULTI

Comment 1 Antoine Tenart 2021-05-05 09:04:42 UTC
A fix was sent upstream by Fernando,

https://lore.kernel.org/netdev/20210504224714.7632-1-ffmancera@riseup.net/T/#u

Comment 2 Antoine Tenart 2021-05-10 14:21:24 UTC
Opened a MR,

https://gitlab.com/redhat/rhel/src/kernel/rhel-8/-/merge_requests/534

Comment 6 Tianhao 2021-06-03 15:12:08 UTC
Are the following outputs expected?

before fix:
[root@dell-per7515-01 ~]# ./test 
Dumping route rule
Got nl message with flags: 2(MULTI)
Got nl message with flags: 2(MULTI)
Dumping ethtool pause
Got family ID of ethtool 20
Got nl message with flags: 0()
Got nl message with flags: 0()
Got nl message with flags: 0()
Got nl message with flags: 0()
Got nl message with flags: 0()


after fix:
[root@dell-per7515-01 ~]# ./test 
Dumping route rule
Got nl message with flags: 2(MULTI)
Got nl message with flags: 2(MULTI)
Dumping ethtool pause
Got family ID of ethtool 20
Got nl message with flags: 2(MULTI)
Got nl message with flags: 2(MULTI)
Got nl message with flags: 2(MULTI)
Got nl message with flags: 2(MULTI)
Got nl message with flags: 2(MULTI)
Got nl message with flags: 2(MULTI)
Got nl message with flags: 2(MULTI)
Got nl message with flags: 2(MULTI)
Got nl message with flags: 2(MULTI)
Got nl message with flags: 2(MULTI)
^C

Comment 7 Antoine Tenart 2021-06-03 15:16:34 UTC
(In reply to Tianhao from comment #6)
> Are the following outputs expected?
> 
> before fix:
> [root@dell-per7515-01 ~]# ./test 
> Dumping route rule
> Got nl message with flags: 2(MULTI)
> Got nl message with flags: 2(MULTI)
> Dumping ethtool pause
> Got family ID of ethtool 20
> Got nl message with flags: 0()
> Got nl message with flags: 0()
> Got nl message with flags: 0()
> Got nl message with flags: 0()
> Got nl message with flags: 0()
> 
> 
> after fix:
> [root@dell-per7515-01 ~]# ./test 
> Dumping route rule
> Got nl message with flags: 2(MULTI)
> Got nl message with flags: 2(MULTI)
> Dumping ethtool pause
> Got family ID of ethtool 20
> Got nl message with flags: 2(MULTI)
> Got nl message with flags: 2(MULTI)
> Got nl message with flags: 2(MULTI)
> Got nl message with flags: 2(MULTI)
> Got nl message with flags: 2(MULTI)
> Got nl message with flags: 2(MULTI)
> Got nl message with flags: 2(MULTI)
> Got nl message with flags: 2(MULTI)
> Got nl message with flags: 2(MULTI)
> Got nl message with flags: 2(MULTI)
> ^C

Yes, this shows the fix worked as expected. Thanks!

Comment 8 Tianhao 2021-06-04 01:43:57 UTC
Ethtool basic tests passed on the kernel-4.18.0-305.3.el8.mr534_210510_1425.

Based on comment #6 and comment #7, set TESTED.

Comment 12 Tianhao 2021-06-21 05:56:59 UTC
Done code check.
The ethtool tests are done in pre-testing.
Set verified based on the results.

Comment 14 errata-xmlrpc 2021-11-09 19:14:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: kernel security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4356