Bug 842439

Summary: NIC driver always has reference count of 0 even when several interface using the driver are up
Product: Red Hat Enterprise Linux 6 Reporter: Gordan Bobic <gordan>
Component: kernelAssignee: John Feeney <jfeeney>
Status: CLOSED NOTABUG QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.5   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-14 16:40:11 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:

Description Gordan Bobic 2012-07-23 21:01:26 UTC
Description of problem:
NIC driver always has reference count of 0 when using kernel modules that ship with the kernel. Tested with multiple NIC drivers/cards (sky2, e1000, tg3) and all exhibit the same behaviour.

Using an external kernel module (e.g. dkms provided by the NIC manufacturer) doesn't exhibit the problem.

Version-Release number of selected component (if applicable):
Checked on the following kernel versions:
2.6.32-220.23.1.el6.x86_64
2.6.32-220.17.1.el6.x86_64

Likely applies to older versions as well.

How reproducible:
Every time.

Steps to Reproduce:
When a kernel module that comes with the kernel is used:
# lsmod | grep tg3
tg3                   140883  0 

When a 3rd party kernel module is used:
# lsmod | grep sk98lin
sk98lin               185391  1 


Expected results:
Reference count on the driver module should be equal to the number of NICs in the system that use the driver. Current behaviour allows the kernel driver to be unloaded without downing the network interface which could have unexpected side effects.

Comment 2 RHEL Program Management 2012-12-14 08:31:50 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 3 John Feeney 2013-01-10 20:45:15 UTC
Gordan,
I do not believe you are correct in stating the ref count should reflect the
number of interfaces configured. My understanding is that because network 
devices need to be hot plugged, the ref count purposely remains at zero. I 
would suggest that you check the ref count on an out-of-box drivers from the
specific vendors for the drivers you referenced (tg3, e1000, sky2) if you want
to make a true comparison, rather than comparing them to sk98lin. Apples to apples, so to speak. Perhaps, sk98lin has it wrong and this is not due to the
fact it is an external kernel module.

Comment 4 Gordan Bobic 2013-01-12 13:57:55 UTC
It would appear you are right. I just checked on a vanilla kernel.org kernel, and NIC driver ref counts are 0 on those, too.

Comment 5 John Feeney 2013-01-14 16:40:11 UTC
Okay, thanks for checking. I suppose what would appear to be intuitive on
face value is not that way it is when you take in all the variables, such as
how to deal with hotplug as in this case.

I will close this bz as NOTABUG.