Problems compiling new driver for PTP support

Issues related to hardware problems
Post Reply
marcelv
Posts: 10
Joined: 2014/09/22 07:07:35

Problems compiling new driver for PTP support

Post by marcelv » 2015/04/20 10:09:34

Hi all,

I have a system that runs on CentOS 6.6 (with the latest patches applied). I use the i386 (x86, 32-bits) version of the OS. Due to the required installation of 3rd-party software that is only available in a 32-bit version, it is currently not possible to upgrade to CentOS 7. The system has a network NIC based on the (fairly recent) Intel I210 chipset.

The system is built around the support of PTP, which is backported to the kernel in CentOS 6.6. CentOS 6.6 by default delivers the IGB driver (for my NIC) version 5.0.5-k, but this version has some issues with my specific NIC that are resolved in later versions of the driver. Now I want to recompile the driver from the original source package of version 5.2.17 on my platform (some relevant changes are done to the driver in respect with the I210 NIC), but there are some issues I cannot resolve.

The default driver as delivered in the CentOS 6.6 kernel-2.6.32-504.12.2.el6.i686.rpm package is 233000 bytes in size. When I compile the network driver following the guidelines in the README contained in the igb-5.2.17.tar.gz, I get a new igb.ko file of nearly 4 Mb. I have tested the new compiled version of the driver and using Wireshark I found that the PTP procotol is not working correctly: only SYNC-messages are seen on the network, but no FOLLOWUP-messages.

Then I compared the source of the kernel (including the driver) and the source of the original 5.0.5 driver to see if it would be possible to compile the latest driver for CentOS 6.6 in some way. I found out that the sources of the driver as part of the kernel source package are already different than the sources of the driver in the official standalone delivery package and if I could find a reason why the original driver is only 230kb and my version is nearly 4Mb. So far this has not lead to a possible source for this change in size, nor a resolution of the resolution why PTP does not work.

How can I compile the latest network driver in a way that it is compatible with the Centos 6.6 kernel-2.6.32-504.12.2.el6.i686.rpm package and it has a size comparable to the original driver? I think that it must be possible as the size of the driver for CentOS 7 (I don't know which version that one delivers though) is comparable to the 5.0.5-k driver of CentOS 6.6.

A summary of the information:
- System running CentOS 6.6 32-bit
- Installed kernel: 2.6.32-504.12.2 (latest)
- Network NIC: Intel I210
- Trying to compile driver version 5.2.17 from source which gives incorrect results

Sincerely,
Marcel Versteeg

marcelv
Posts: 10
Joined: 2014/09/22 07:07:35

Re: Problems compiling new driver for PTP support

Post by marcelv » 2015/05/04 11:53:39

Following up to my original post (the first post in this otherwise empty thread)....

I have undertaken the following steps so far to see how I can get PTP to work with CentOS 6.6 and the latest Intel driver (5.2.17) for my network card:
  1. Downloaded and compiled the PTP4Linux project to see what the differences in behavior are between the 5.0.5-k version of the IGB driver and the 5.2.17 version of the driver.
    I found out that the ptp4l application works when using it with the default CentOS 6.6 driver (version 5.0.5-k), but that it reports "timeout while polling to tx timestamp" when using it with the 5.2.17 version of the driver (as downloaded from the Intel site)
  2. Tried to compile the original 5.0.5 version of the driver (as downloaded from the Intel site) under CentOS 6.6, but this failed, due to duplicate definitions.
  3. Tried to locate any significant differences between the source code of the default 5.0.5-k version of the driver (as supplied in the CentOS 6.6 source rpm of the kernel) and the original 5.0.5 version of the driver (as downloaded from the Intel site) to see what changes could cause the driver to work with the latest CentOS 6.6 kernel. If I am able to locate these changes, I want to apply them to the original 5.2.17 version of the driver and use that patched version instead of the default 5.0.5-k driver.
Now I have the following questions:
  • How should the driver normally return the TX hardware timestamp to the kernel assigned to a package that was sent from an application? The ptp4l application uses the poll system call to wait on the sending socket, but this is the call that times out after which the message "timeout while polling to tx timestamp" is printed.
  • Up to what driver version have the changes been backported into the IGB driver that is part of the latest CentOS 6.6 kernel? I see that certain changes have been backported, i.e. with which version from the Intel driver sources can the 5.0.5-k version of the driver be compared?
  • What are the significant changes to the driver code that make PTP hardware timestamping work with the CentOS 6.6 kernel?
Any help is very much appreciated.

Marcel Versteeg

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problems compiling new driver for PTP support

Post by TrevorH » 2015/05/04 12:09:31

You know that the ELREpo Project supply a kmod-igb that contains a newer igb module? Theirs is currently 5.2.15.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

marcelv
Posts: 10
Joined: 2014/09/22 07:07:35

Re: Problems compiling new driver for PTP support

Post by marcelv » 2015/05/04 12:43:19

TrevorH wrote:You know that the ELREpo Project supply a kmod-igb that contains a newer igb module? Theirs is currently 5.2.15.
I didn't know that, but I found it and installed it on my hardware.
Unfortunately, after installing the module, the computer continuously goes through reset (after dumping memory) during the boot process of CentOS :( Now I have to see how I can recover from this.
Seems this version of the driver is not completely right for my hardware......

marcelv
Posts: 10
Joined: 2014/09/22 07:07:35

Re: Problems compiling new driver for PTP support

Post by marcelv » 2015/05/05 06:55:31

marcelv wrote:
TrevorH wrote:You know that the ELREpo Project supply a kmod-igb that contains a newer igb module? Theirs is currently 5.2.15.
I didn't know that, but I found it and installed it on my hardware.
Unfortunately, after installing the module, the computer continuously goes through reset (after dumping memory) during the boot process of CentOS :( Now I have to see how I can recover from this.
Seems this version of the driver is not completely right for my hardware......
I found out that the reset during reboot was caused by the NetworkManager daemon. Using interactive boot, I simply skipped this daemon and the system started fine.

However, when using the ptp4l program with the ELREpo version of the driver, ptp4l reported that hardware timestamping is not supported. This means that I cannot use the ELREpo version of the driver, as hardware timestamping is exactly what I need!

Thus remain the questions I posted before:
  • How should the driver normally return the TX hardware timestamp to the kernel assigned to a package that was sent from an application? The ptp4l application uses the poll system call to wait on the sending socket, but this is the call that times out after which the message "timeout while polling to tx timestamp" is printed.
  • Up to what driver version have the changes been backported into the IGB driver that is part of the latest CentOS 6.6 kernel? I see that certain changes have been backported, i.e. with which version from the Intel driver sources can the 5.0.5-k version of the driver be compared?
  • What are the significant changes to the driver code that make PTP hardware timestamping work with the CentOS 6.6 kernel?
Thank you in advance.

Marcel Versteeg

Post Reply