Skip to content
bgoglin edited this page Jan 20, 2012 · 6 revisions

How-To use the generic Ethernet support

The CCIEth driver is located under contrib/driver/ccieth/linux and has its own build system.

It's developed for recent kernels (3.x) but it works (well, compiles, at least) from 2.6.32 to recent git snapshots. To build it, do

cd contrib/driver/ccieth/linux
autoreconf -ifv
./configure
make

If building for a custom kernel instead of the currently running one, pass the corresponding release version (what uname -r would say) or the path to the kernel source/build tree on the configure line.

./configure --with-linux-release=3.0.0-1-amd64
./configure --with-linux=/usr/src/linux-2.6.35-foobar
./configure --with-linux=/usr/src/linux-2.6.35-foobar --with-linux-build=/usr/src/linux-2.6.35-foobar-amd64

Load the driver with

insmod ccieth.ko

You should get a /dev/ccieth. Make it available to everybody with

chmod 0444 /dev/ccieth

or add a udev rule such as

KERNEL=="ccieth", MODE="0444"

Then use the following kind of config file

[eth]
driver = eth
mac = 5c:26:0a:53:da:8c

For easier debugging, the loopback interface can be used with

[loopback-eth]
driver = eth
mac = 00:00:00:00:00:00

If debugging with valgrind, pass --enable-valgrind at configure and pass --sim-hints=lax-ioctls to valgrind.

Brice's notes

Usual command-line run during development

CCI_DEBUG=all CCI_CONFIG=/home/bgoglin/.cciconfig src/tests/pingpong

Enable custom ccieth debugging during open_endpoint:

CCIETH_DEBUG=1
Clone this wiki locally