Porting BGE Driver to IFLIB...
-
@NRgia said in Porting BGE Driver to IFLIB...:
@bmeeks said in Porting BGE Driver to IFLIB...:
To actually convert a driver to use iflib, you will need to locate the driver's C source code in the FreeBSD source tree and make required changes there to replace certain routines with their iflib equivalents. This is not a trivial task, and is certainly not something an automated process is likely to accomplish for any driver.
If it can't be done by an automated process, then it requires, make config scripts, or tinkering with the driver code itself?
But I can tell you that you are wasting your time there within the netmap source code tree. The problems you are experiencing with slow speeds are within the NIC drivers themselves and their corresponding C source code. That's where the changes have to be made to convert over to iflib.
I can see by know that I hit a dead end, but what can I do, at least I'm trying to find a workaround at least.
My other choice will be to quit using Netmap.To fix the Intel driver will require modifying the Intel driver's C source code. You could probably find examples by looking at the FreeBSD NIC driver source code commits on Github and finding some that say "porting driver to iflib" or something similar. Trying to make the changes yourself, unless you are a seasoned C programmer familiar with FreeBSD hardware driver interfaces, will be a challenge.
I suggest seeing if you can find the driver's maintainer in FreeBSD and find out from him or her why the 12.1 FreeBSD branch contains an older or "bad" version of that particular driver.
-
Here is an example from the FreeBSD source code tree of the ixgbe adapter being converted to use the iflib framework: https://github.com/freebsd/freebsd/commit/4fd3548cada3b9bc2f491612804009142dea73eb. Notice that 20 source code files were changed. The link shows the
diff
output highlighting the changes. -
@bmeeks said in Porting BGE Driver to IFLIB...:
I suggest seeing if you can find the driver's maintainer in FreeBSD and find out from him or her why the 12.1 FreeBSD branch contains an older or "bad" version of that particular driver.
They aren't very responsive or helpful. I can throw some names here also from Intel, but they don't seem to care. I will try some more. Thank you
-
@NRgia said in Porting BGE Driver to IFLIB...:
@bmeeks said in Porting BGE Driver to IFLIB...:
I suggest seeing if you can find the driver's maintainer in FreeBSD and find out from him or her why the 12.1 FreeBSD branch contains an older or "bad" version of that particular driver.
They aren't very responsive or helpful. I can throw some names here also from Intel, but they don't seem to care. I will try some more. Thank you
Checkout the Github mirror link I posted. You will see that making the changes is not a trivial task.
-
@NRgia said in Porting BGE Driver to IFLIB...:
@bmeeks said in Porting BGE Driver to IFLIB...:
I suggest seeing if you can find the driver's maintainer in FreeBSD and find out from him or her why the 12.1 FreeBSD branch contains an older or "bad" version of that particular driver.
They aren't very responsive or helpful. I can throw some names here also from Intel, but they don't seem to care. I will try some more. Thank you
I think maybe I saw this guy referenced in some of your earlier posts, but he appears to be the active maintainer for the NIC stuff in FreeBSD: https://github.com/ricera. His name is Eric Joyner from Hillsboro, Oregon. Since Oregon is where Intel's research and development is located, I'm assuming this guy is possibly an Intel employee.
The real incentive for getting open-source hardware drivers fixed lies with the manufacturers since they need wider compatibility of their product in order to sell more of it. So the more operating systems that have support for their hardware, the better for them profit-wise. Thus the incentive to fix the netmap problem would logically rest more with Intel than FreeBSD itself.
-
@bmeeks said in Porting BGE Driver to IFLIB...:
I think maybe I saw this guy referenced in some of your earlier posts, but he appears to be the active maintainer for the NIC stuff in FreeBSD: https://github.com/ricera. His name is Eric Joyner from Hillsboro, Oregon. Since Oregon is where Intel's research and development is located, I'm assuming this guy is possibly an Intel employee.
I spoke with him already:
Maybe you saw him mentioned in my other thread here, in the first posts:
https://forum.netgate.com/topic/154014/netmap-not-supported-for-intel-x553-driver-in-pfsense-2-5-0Any other replies asking for a new driver or so were met with silence.
I also contacted the FreeBSD intel-ix-kmod maintainer:
Believe me I tried :)
-
@bmeeks said in Porting BGE Driver to IFLIB...:
@NRgia said in Porting BGE Driver to IFLIB...:
@bmeeks said in Porting BGE Driver to IFLIB...:
I suggest seeing if you can find the driver's maintainer in FreeBSD and find out from him or her why the 12.1 FreeBSD branch contains an older or "bad" version of that particular driver.
They aren't very responsive or helpful. I can throw some names here also from Intel, but they don't seem to care. I will try some more. Thank you
Checkout the Github mirror link I posted. You will see that making the changes is not a trivial task.
I can see, I don't know C, only Java, and even if I knew, I must understand first what to change. But it will be time consuming, not a quick fix.
-
@NRgia said in Porting BGE Driver to IFLIB...:
@bmeeks said in Porting BGE Driver to IFLIB...:
I think maybe I saw this guy referenced in some of your earlier posts, but he appears to be the active maintainer for the NIC stuff in FreeBSD: https://github.com/ricera. His name is Eric Joyner from Hillsboro, Oregon. Since Oregon is where Intel's research and development is located, I'm assuming this guy is possibly an Intel employee.
I spoke with him already:
Maybe you saw him mentioned in my other thread here, in the first posts:
https://forum.netgate.com/topic/154014/netmap-not-supported-for-intel-x553-driver-in-pfsense-2-5-0Any other replies asking for a new driver or so were met with silence.
I also contacted the FreeBSD intel-ix-kmod maintainer:
Believe me I tried :)
Hmm...curious since I saw where Eric specifically modified some of the ixgbe driver source files to port them to iflib. Of course that was in 2017.
-
What a dilemma this driver issue is, indeed! Drives me up the wall ... I can clearly see that pfSense hands-off approach is not against us ... it came with the building foundation. We should all tell Intel we're returning the hardware.
-
@NollipfSense said in Porting BGE Driver to IFLIB...:
What a dilemma this driver issue is, indeed! Drives me up the wall ... I can clearly see that pfSense hands-off approach is not against us ... it came with the building foundation. We should all tell Intel we're returning the hardware.
@NRgia and I have been in an extensive private chat today and may be on the way to a solution. He is trying a custom compile of a new driver from the lastest ports tree.
-
I have managed to compile the new driver from the new version of intel-ix-kmod that Serghey Kozlvov updated for me.
I have good news and bad news:
The good one: Netmap works in Native mode, and it seems it doesn't use iflib
The bad one: The Speed didn't improve.Guided by @bmeeks I also did some iperf tests with Suricata stopped(Netmap also stopped) with both drivers:
The tests were done from a LOCAL linux host to pfSense:
- With Intel-ix-kmod driver version 3.3.14:
Client connecting to 172.18.0.12, TCP port 5201
TCP window size: 255 KByte (default)
[ 3] local 172.18.0.10 port 44654 connected with 172.18.0.12 port 5201
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 670 MBytes 562 Mbits/sec- With FreeBSD 12.1 in-kernel driver 4.0.1-k:
Client connecting to 172.18.0.12, TCP port 5201
TCP window size: 255 KByte (default)
[ 3] local 172.18.0.10 port 44654 connected with 172.18.0.12 port 5201
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 670 MBytes 562 Mbits/secThis was not relevant to pin point the culprit, and I will try tommorrow to downgrade to pfSense 2.4.5 - FreeBSD 11.3 to see what speed will I get.
I would also like to thank @bmeeks for assistance on private chat.
I also uploaded the compiled driver for reference
if_ix_ko.zip - With Intel-ix-kmod driver version 3.3.14:
-
@bmeeks said in Porting BGE Driver to IFLIB...:
@NollipfSense said in Porting BGE Driver to IFLIB...:
What a dilemma this driver issue is, indeed! Drives me up the wall ... I can clearly see that pfSense hands-off approach is not against us ... it came with the building foundation. We should all tell Intel we're returning the hardware.
@NRgia and I have been in an extensive private chat today and may be on the way to a solution. He is trying a custom compile of a new driver from the lastest ports tree.
Awesome ... hooray, applauding!
-
@NRgia said in Porting BGE Driver to IFLIB...:
The good one: Netmap works in Native mode, and it seems it doesn't use iflib
That means or suggest it didn't make it into the kernel ... doesn't it? That behavior seems to be the old method that should work with FreeBSD 11.3.
-
@NollipfSense said in Porting BGE Driver to IFLIB...:
@NRgia said in Porting BGE Driver to IFLIB...:
The good one: Netmap works in Native mode, and it seems it doesn't use iflib
That means or suggest it didn't make it into the kernel ... doesn't it? That behavior seems to be the old method that should work with FreeBSD 11.3.
I have asked the maintainer of intel-ix-kmod here https://www.freshports.org/net/intel-ix-kmod to update the ports.
So at least for all the cards that are using this driver we now have 2 options to run NETMAP in Native mode:
- Compile from intel-ix-kmod port- And NETMAP will not use iflib
- Use the in-kernel driver, which may be old, that uses iflib
If I try the third version, downloading the driver from Intel site directly, and then compile, Netmap will not start in Native mode.
So you are right it will work with FreeBSD 11.3 also
-
Because I don't want to hijack @NollipfSense 's thread anymore I published the speed tests for pfSense 2.4.5-p1 and pfSense 2.5.0 on my initial thread here : https://forum.netgate.com/topic/154014/netmap-not-supported-for-intel-x553-driver-in-pfsense-2-5-0/40
-
@NRgia said in Porting BGE Driver to IFLIB...:
Because I don't want to hijack @NollipfSense 's thread anymore
I would not worry about it ... I left the thread open for others, such as yourself who may want to attempt the porting ... thank you for contributing!