Using a Silicom Dual port Copper Ethernet PCI-E Intel based Bypass Server Adapter (PE2G2BPI) on Ubuntu 16.04

I recently inherited a Silicom PE2G2BPI (Dual port Copper Ethernet PCI-E Intel based Bypass Server Adapter) from a friend, and I wanted to get it working on my Ubuntu 16.04 Server to use as a non-critical firewall.

Here are the steps I took to get it working.

First, find out what it is. I had to look on the side of the card as lspci wasn't very informative.

lspci
01:00.0 Ethernet controller: Silicom Ltd. Silicom Dual port Copper Ethernet PCI-E Intel based Bypass Server Adapter (rev 06)
01:00.1 Ethernet controller: Silicom Ltd. Silicom Dual port Copper Ethernet PCI-E Intel based Bypass Server Adapter (rev 06)

First step was to request access to http://www.silicom-usa.com/download-center/.

https://unix.stackexchange.com/questions/252513/my-ethernet-card-does-not-create-any-ethx-device-how-can-i-solve-it stackexchange post also contained a set of credentials for access.

I then downloaded ftp://silicom.ftptoday.com/drivers/PxGxBP_Linux.zip, which contained the e1000bp driver I needed.

From there,

unzip PxGxBP_Linux.zip
cd PxGxBP_Linux/Linux/Drivers/Intel_e1000BPe/
tar zxvf e1000bpe-3.3.3.silc.5.60.9.tar.gz
cd e1000bpe-3.3.3.silc.5.60.9
cd src
make clean
make
sudo make install

Add the driver,

sudo modprobe e1000bpe

Now, generate a user-level executable to disable bypass

#Make the library
cd  PxGxBP_Linux/Linux/Libs/User
tar zxvf libbypass-9.0.6.tar.gz
cd libbypass-9.0.6
cd lib
make
sudo make install

#Install the executable
cd  PxGxBP_Linux/Linux/Samples/User
tar zxvf bpctl-9.0.2.tar.gz
cd bpctl-9.0.2
make
sudo make install

Now, get the interface name from /sbin/ifconfig, and disable bypass

bpctl enp1s0f0 set_bypass off

Optionally, re-enable it

bpctl enp1s0f0 set_bypass on

If you get "The interface is a slave interface or doesn't support Bypass.", try another interface on that card, e.g. enp1s0f1->enp1s0f0.

Now, lets make it disable the bypass on ethernet up.

sudo nano /bin/unbypass
#!/bin/bash

/bin/bpctl enp1s0f0 set_bypass off
sudo chmod +x /bin/unbypass

And now,

sudo nano /etc/network/interfaces
auto enp1s0f0
iface enp1s0f0 inet dhcp
pre-up /bin/unbypass

auto enp1s0f1
iface enp1s0f1 inet dhcp
pre-up /bin/unbypass

And now, try rebooting (the computer should boot in bypass mode), and the bypass should turn off when the interface starts.

I hope this helps someone save loads of time trying to get this card working!

As a sidenote, turned out my motherboard didn't have enough current capability in powered-off mode to keep the card happily powered, so there was a small pulsing clicking noise with the leds flashing on the card when the computer was turned off. I solved this by enabling ErP on my gigabyte motherboard which supposedly disables a lot of the on-when-powered-off peripherals and, completely solving my problem.

Published 2017-09-09