[Bug 1035734] New: struct net_device does not have the member 'last_rx'
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734 Bug ID: 1035734 Summary: struct net_device does not have the member 'last_rx' Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.3 Hardware: x86-64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-maintainers@forge.provo.novell.com Reporter: manfred.h@gmx.net QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Looking at kernel sources in GIT (e.g. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree...) one can see that "struct net_device" still carries the member "last_rx"; however, the files provided with kernel-{devel,default-devel,syms}-4.4.59-1.1 have this line stripped off. FWIW, this is also the case with the current kernel for 42.3, i.e. 4.4.60 AFAIK, this member will only be removed beginning with Linux kernel 4.11 Please check which patch erroneously removes the entry. Thx. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734
Manfred Hollstein
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734#c2
--- Comment #2 from Manfred Hollstein
(In reply to Manfred Hollstein from comment #0)
Looking at kernel sources in GIT (e.g. <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/ tree/include/linux/netdevice.h?id=refs/tags/v4.4.59>) one can see that "struct net_device" still carries the member "last_rx";
That's upstream stable-4.4.y, for openSUSE 42.3 kernel, you should check
http://kernel.opensuse.org/cgit/kernel/tree/?h=openSUSE-42.3
Yeah, I know and I did and found the offending patch myself. But, when SUSE's kernels remove members which still exist in upstream kernels with the same version number, it makes it difficult to compile out-of-tree drivers such as broadcom-wl.
AFAIK, this member will only be removed beginning with Linux kernel 4.11
In upstream. Our kernels contain a lot of backports, e.g. the openSUSE-42.3 branch has more than 13400 patches at the moment. One of them is backport of mainline commit
4a7c972644c1 net: Remove usage of net_device last_rx member
which removes last_rx member from struct net_device.
Yep, saw that, but I still think this is not correct.
Please check which patch erroneously removes the entry. Thx.
It's patches.drivers/net-Remove-usage-of-net_device-last_rx-member.patch but it's not "erroneously", it's on purpose, as part of SLE12 SP3 backports which openSUSE 42.3 kernel inherits.
Added Benjamin (who did the backport) to Cc so that he can explain the details if he wishes so.
What exactly is the problem? Does it break build of some third party module?
See above. broadcom-wl's usage of ->last_rx can surely be wrapped into some proper #if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 10, 0)) skb->dev->last_rx = jiffies; #endif but this fails for the 42.3 kernel, of course. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734#c3
--- Comment #3 from Takashi Iwai
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734#c5
--- Comment #5 from Manfred Hollstein
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734#c6
--- Comment #6 from Manfred Hollstein
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734#c7
Manfred Hollstein
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734
http://bugzilla.opensuse.org/show_bug.cgi?id=1035734#c8
--- Comment #8 from Benjamin Poirier
Michal and Takashi, thanks for your explanation. In the meantime I also realized what Michal was describing and added a patch to the broadcom-wl driver to eliminate updating the usage of last_rx; haven't tested it yet,
I agree that removing uneeded updates of last_rx is the right thing to do. I had a quick look at the broadcom-wl source. The driver falls in the category of those that were writing to last_rx but not reading it. Moreover, it only does so in monitor mode. So it seems safe to remove the write. Thanks for updating this out-of-tree driver. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com