Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 462352

Summary: [RHEL-5.2] e1000e module doesn't implement SIOETHTOOL ETHTOOL_GPERMADDR
Product: Red Hat Enterprise Linux 5 Reporter: Flavio Leitner <fleitner>
Component: kernelAssignee: Flavio Leitner <fleitner>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: agospoda, cward, dzickus, jesse.brandeburg, peterm, qcai, syeghiay, tao, yshao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 08:45:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 502010    
Attachments:
Description Flags
test program
none
proposed patch none

Description Flavio Leitner 2008-09-15 16:13:12 UTC
Description of problem:

Intel NICs 82571 – 82573, 82562, 82566 or 80003eslan used the e1000 module till RHEL 5.1.  With RHEL 5.2 they use the e1000e module.  e1000 implemets the above ioctl whereas e1000e doesn't.

How reproducible:
Always

Steps to Reproduce:
On a system with any of the above NICs, upgrade from kernel 2.6.9-18.53* to kernel-2.6.9-18.92*

Compile attached code which uses the ETHTOOL_GPERMADDR ioctl.

Actual results:
Program exits with "Can't do ioctl: Operation not supported"

Expected results:
ioctl should be supported.

Additional info:
The solution would be simply adding the 'get_perm_addr' to e1000e module but 
there is an upstream commit turning this operation generic for all drivers
and so, its a more complete solution for all network drivers.

commit 313674afa8fdced2fe79f50f38e1c387b63d8790
Author: Matthew Wilcox <matthew>
Date:   Tue Jul 31 14:00:29 2007 -0700

    [NET]: ethtool_perm_addr only has one implementation

    All drivers implement ethtool get_perm_addr the same way -- by calling
    the generic function.  So we can inline the generic function into the
    caller and avoid going through the drivers.

    Signed-off-by: Matthew Wilcox <matthew>
    Signed-off-by: David S. Miller <davem>

Comment 1 Flavio Leitner 2008-09-15 16:14:49 UTC
Created attachment 316756 [details]
test program

Comment 2 Flavio Leitner 2008-09-15 16:19:42 UTC
Created attachment 316757 [details]
proposed patch

Comment 3 Andy Gospodarek 2009-02-09 22:27:02 UTC
We can remove references to it, but we really can't remove get_perm_addr from struct ethtool_ops.  Something like this would probably (unfortuately) be better:

--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -1941,6 +1941,7 @@ static struct ethtool_ops e1000_ethtool_ops = {
        .get_ethtool_stats      = e1000_get_ethtool_stats,
        .get_coalesce           = e1000_get_coalesce,
        .set_coalesce           = e1000_set_coalesce,
+       .get_perm_addr          = ethtool_op_get_perm_addr,
 };
 
 void e1000e_set_ethtool_ops(struct net_device *netdev)

Another alternative would be to modify ethtool_get_perm_addr so it calls the get_perm_addr op if it exists and if not, it calls ethtool_op_get_perm_addr (or mimics the functionality).  Then you could remove all the points where get_perm_addr is set in individual drivers, but you would not break anyone who is a customer and using a driver we don't ship natively.

Comment 4 Issue Tracker 2009-02-10 20:30:38 UTC
You're correct. I think your alternative idea is better (more closer to
upstream)
but I'm okay with any one of those.

Flavio


This event sent from IssueTracker by fleitner 
 issue 198245

Comment 5 RHEL Program Management 2009-02-16 15:36:03 UTC
Updating PM score.

Comment 10 RHEL Program Management 2009-04-08 12:28:31 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 11 Don Zickus 2009-05-06 17:14:33 UTC
in kernel-2.6.18-144.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 13 Chris Ward 2009-07-03 18:08:08 UTC
~~ Attention - RHEL 5.4 Beta Released! ~~

RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!

If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.

Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.

Questions can be posted to this bug or your customer or partner representative.

Comment 14 lixiao 2009-07-31 09:34:23 UTC
I have reproduced this bug on kernel 2.6.18-128 and verified it on kernel 2.6.18-159.The bug's patch is on kernel2.6.18-143.
I have tested on Intel NICs 82573, 82566 and 80003ES2LAN which used the e1000e module. On 2.6.18-128 kernel ,when you run the test code ,you will get "Can't do ioctl: Operation not supported".On kernel 2.6.18-159,the result is good!

Comment 16 errata-xmlrpc 2009-09-02 08:45:20 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2009-1243.html