# Porting BGE Driver to IFLIB...Help!



## Nolli9 (Jul 16, 2019)

Can anyone help me port the BGE driver (interest on the 1000mb) to the IFLib so it would support Netmap? I have access to the BGE source code and a suggestion to look here for instance of how to: https://reviews.freebsd.org/D18761

I looked at the example, and it's overwhelming to say the least as I am merely an end user/half-super user. How to start? BGE is not supported in FreeBSD 12.


----------



## SirDice (Jul 16, 2019)

I may have mixed up igb(4) and bge(4) on your first thread but I'm pretty sure bge(4) is supported on 12.0. It may not use iflib(4) but it should work nonetheless.


----------



## Nolli9 (Jul 16, 2019)

SirDice said:


> I may have mixed up igb(4) and bge(4) on your first thread but I'm pretty sure bge(4) is supported on 12.0. It may not use iflib(4) but it should work nonetheless.


The way to get it to work with Netmap is to port it to IFLib...do one starts with iflib(4)? Okay, it seems that one needs to create a Diff then place the original drive code in...correct so far?


----------



## Phishfry (Jul 17, 2019)

I really respect what you are trying to do. Please understand that the forum is mostly user level help.
For true developer help you really need to ask on our mailing lists. Here is the networking list:


			FreeBSD Mailing lists: subscription for freebsd-net
		

Good Luck and be persistant. Sometimes mailing list post get ignored if not clear on the subject.
Be polite and you might get the actual driver maintainer to help you. Have you considered emailing the maintainer.
Maybe this work is almost done. So check there to see if feasible and if any WIP.


----------



## Phishfry (Jul 17, 2019)

I did a cursory check of the bge source code. Found in /usr/src/sys/dev/bge/
In the header the copyright is assigned to WindRiver.
Intel bought WindRiver so I don't know who the developer is to email. Intel is not supporting bge !!!
So send out an message on the mailing list. Ask if Netmap can be ported to bge.


----------



## SirDice (Jul 17, 2019)

Nolli9 said:


> The way to get it to work with Netmap is to port it to IFLib.


Don't get me wrong but you're describing the issue incorrectly. You're blanketly stating that bge(4) doesn't work. It does work, just not in the way you want/need it. That's a huge difference.


----------



## Nolli9 (Jul 17, 2019)

Phishfry said:


> I really respect what you are trying to do. Please understand that the forum is mostly user level help.
> For true developer help you really need to ask on our mailing lists. Here is the networking list:
> 
> 
> ...



Thank you Phishfry for responding...thank you, I have embarked on a journey into a dark place without a flashlight...it's just a steep learning curve and now realize I need to take baby steps.



Phishfry said:


> I did a cursory check of the bge source code. Found in /usr/src/sys/dev/bge/
> In the header the copyright is assigned to WindRiver.
> Intel bought WindRiver so I don't know who the developer is to email. Intel is not supporting bge !!!
> So send out an message on the mailing list. Ask if Netmap can be ported to bge.



I did contacted Mr Bill Paul - WindRiver and got a cute response that makes one laugh out aloud...he hasn't looked at his driver for 15yrs. Also, I am in continual contact with the Netmap creator, and he has been very helpful despite my naivety. He confirmed the portability and that's all that is needed.


----------



## Nolli9 (Jul 17, 2019)

SirDice said:


> Don't get me wrong but you're describing the issue incorrectly. You're blanketly stating that bge(4) doesn't work. It does work, just not in the way you want/need it. That's a huge difference.



Yes SirDice, you're correct...the BGE driver does work with both FreeBSD 11.2 and 12...just not with Netmap to allow Suricata/Snort to work in inline mode taking advantage of high speed efficiency. In my case, I am re-purposing a 2011 Mac Mini server that uses the thunderbolt to Ethernet adapter, a BGE interface by Broadcom.


----------

