Open GoogleCodeExporter opened 9 years ago
I have pushed some fixes to the next branch. Can you please check whether the
issue is solved now?
Original comment by giuseppe.lettieri73
on 16 Oct 2014 at 9:42
Hi Giuseppe:
Thanks for the update, netmap_lin.ko now compiles fine.
However, I ran into issue building e1000e drivers
[devuser@UTraffic9 LINUX]$ make
make -C /lib/modules/2.6.32-431.20.3.el6.x86_64/build
M=/home/devuser/Documents/netmap/LINUX
EXTRA_CFLAGS='-I/home/devuser/Documents/netmap/LINUX
-I/home/devuser/Documents/netmap/LINUX
-I/home/devuser/Documents/netmap/LINUX/../sys
-I/home/devuser/Documents/netmap/LINUX/../sys/dev -DCONFIG_NETMAP
-Wno-unused-but-set-variable -DCONFIG_NETMAP_GENERIC -DCONFIG_NETMAP_MONITOR
-DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE' modules CONFIG_NETMAP=m
make[1]: Entering directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
Building modules, stage 2.
MODPOST 1 modules
WARNING: could not find /home/devuser/Documents/netmap/LINUX/.netmap_mem2.o.cmd
for /home/devuser/Documents/netmap/LINUX/netmap_mem2.o
make[1]: Leaving directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
cp -Rp
/home/devuser/rpmbuild/BUILD/kernel-2.6.32-431.20.3.el6/linux-2.6.32-431.20.3.el
6.x86_64/drivers/net/e1000e .
if [ -f patches/diff--e1000e--20620--20623 ]; then patch --posix --quiet
--force -p1 < patches/diff--e1000e--20620--20623; fi
I have attached the reject file
Original comment by morph...@gmail.com
on 16 Oct 2014 at 5:42
Attachments:
Yes, unfortunately we rely only on the Torvalds kernel version to select the
drivers patch, so we fail when the linux distribution has heavily patched
drivers on its own. If you don't need the e1000e driver, you can add
--no-driver=e1000e
to ./configure. I think igb also fails, and then you can add --no-driver=igb.
If you need those drivers, I think you need to figure out where to put the
rejects in the actual driver code that you have.
By the way, please note that the netmap module is now called 'netmap.ko'.
Original comment by giuseppe.lettieri73
on 16 Oct 2014 at 5:55
Hi Giuseppe:
Thanks. I also noticed that despite adding in multiple "no-driver" options to
the configure script, the drivers.mak file is actually empty, so no ixgbe files
will be copied and patched, as a result, only the netmap.ko is built.
[devuser@UTraffic9 LINUX]$ ./configure --driver=ixgbe
--kernel-sources=/home/devuser/rpmbuild/BUILD/kernel-2.6.32-431.20.3.el6/linux-2
.6.32-431.20.3.el6.x86_64
kernel directory /lib/modules/2.6.32-431.20.3.el6.x86_64/build
linux version 20620 [2.6.32]
module file netmap.ko
subsystems generic monitor pipe vale
kernel sources
/home/devuser/rpmbuild/BUILD/kernel-2.6.32-431.20.3.el6/linux-2.6.32-431.20.3.el
6.x86_64
drivers ixgbe
Candidate patches for this kernel:
diff--e1000--20620--99999
diff--e1000e--20620--20623
diff--r8169.c--20620--20625
[devuser@UTraffic9 LINUX]$ cat drivers.mak
.PHONY: get-drivers clean-drivers
get-drivers:
clean-drivers:
[devuser@UTraffic9 LINUX]$ make
make -C /lib/modules/2.6.32-431.20.3.el6.x86_64/build
M=/home/devuser/Documents/netmap/LINUX
EXTRA_CFLAGS='-I/home/devuser/Documents/netmap/LINUX
-I/home/devuser/Documents/netmap/LINUX
-I/home/devuser/Documents/netmap/LINUX/../sys
-I/home/devuser/Documents/netmap/LINUX/../sys/dev -DCONFIG_NETMAP
-Wno-unused-but-set-variable -DCONFIG_NETMAP_GENERIC -DCONFIG_NETMAP_MONITOR
-DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE' modules CONFIG_NETMAP=m
make[1]: Entering directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
CC [M] /home/devuser/Documents/netmap/LINUX/netmap_mem2.o
CC [M] /home/devuser/Documents/netmap/LINUX/netmap_mbq.o
CC [M] /home/devuser/Documents/netmap/LINUX/netmap_vale.o
CC [M] /home/devuser/Documents/netmap/LINUX/netmap_offloadings.o
CC [M] /home/devuser/Documents/netmap/LINUX/netmap_pipe.o
CC [M] /home/devuser/Documents/netmap/LINUX/netmap_monitor.o
CC [M] /home/devuser/Documents/netmap/LINUX/netmap_generic.o
CC [M] /home/devuser/Documents/netmap/LINUX/netmap_common.o
CC [M] /home/devuser/Documents/netmap/LINUX/netmap_linux.o
LD [M] /home/devuser/Documents/netmap/LINUX/netmap.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: could not find /home/devuser/Documents/netmap/LINUX/.netmap_mem2.o.cmd
for /home/devuser/Documents/netmap/LINUX/netmap_mem2.o
CC /home/devuser/Documents/netmap/LINUX/netmap.mod.o
LD [M] /home/devuser/Documents/netmap/LINUX/netmap.ko.unsigned
NO SIGN [M] /home/devuser/Documents/netmap/LINUX/netmap.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
make -C /lib/modules/2.6.32-431.20.3.el6.x86_64/build
M=/home/devuser/Documents/netmap/LINUX
EXTRA_CFLAGS='-I/home/devuser/Documents/netmap/LINUX
-I/home/devuser/Documents/netmap/LINUX
-I/home/devuser/Documents/netmap/LINUX/../sys
-I/home/devuser/Documents/netmap/LINUX/../sys/dev -DCONFIG_NETMAP
-Wno-unused-but-set-variable -DCONFIG_NETMAP_GENERIC -DCONFIG_NETMAP_MONITOR
-DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE' modules O_DRIVERS="" \
NETMAP_DRIVER_SUFFIX=
make[1]: Entering directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
Building modules, stage 2.
MODPOST 0 modules
make[1]: Leaving directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
Anyhow, I modified the drivers.mak and added the get and clean stubs
get-ixgbe:
cp -Rp /home/apcon/rpmbuild/BUILD/kernel-2.6.32-431.20.3.el6/linux-2.6.32-431.20.3.el6.x86_64/drivers/net/ixgbe .
if [ -f patches/diff--ixgbe--20626--30000 ]; then patch --posix --quiet --force -p1 < patches/diff--ixgbe--20626--30000; fi
if [ -f drv-subdir.mak ]; then mv ixgbe/Makefile ixgbe/orig.mak; cp drv-subdir.mak ixgbe/Makefile; fi
touch get-ixgbe
clean-ixgbe:
rm -rf ixgbe get-ixgbe
However, the successive patch still failed
cp -p /home/apcon/Documents/ixgbe-3.22.3/src/* ixgbe
if [ -f patches/diff--ixgbe--20626--30000 ]; then patch --posix --quiet --force
-p1 < patches/diff--ixgbe--20626--30000; fi
5 out of 8 hunks FAILED -- saving rejects to file ixgbe/ixgbe_main.c.rej
make: *** [get-ixgbe] Error 1
I also tried it against Intel's official release with no success
(https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=14687)
I'm going to try to manually patch this one.
Original comment by morgan.y...@gmail.com
on 16 Oct 2014 at 10:13
I didn't mention above that i added in an option in the configure script
"driver=" to only build the driver specified, vs adding multiple "no-drivers"
stubs
Original comment by morgan.y...@gmail.com
on 16 Oct 2014 at 10:14
Please note that the version numbers are in hex. E.g., 20626 is 2.6.38. Your
'driver.mak' was empty because we don't have any patch for ixgbe before
(Torvarld's) kernel 20625, i.e., 2.6.37. If you create a working patch, please
share it :)
Re the --driver option, I think I will steal the idea. Maybe something like the
following:
--no-drivers # do not build any driver
--no-drivers=drv1[,drv2[,..]] # do not build the given drivers
--drivers=drv1[,drv2[,...]] # only build the given drivers
Original comment by giuseppe.lettieri73
on 17 Oct 2014 at 7:31
The latest commits contain an (untested) backport of the ixgbe modifications
down to linux 2.6.32. They are always based on Torvald's kernel, and therefore
may still not apply cleanly to Red Hat/CentOS kernels, but they may be a good
starting point for you.
Original comment by giuseppe.lettieri73
on 17 Oct 2014 at 3:22
Hi Giuseppe:
Interestingly, using patch diff-ixgbe-30500-30900 as a base (with some other
small changes), I was able to patch the official intel ixgbe driver to compile
on centos 6.5 (downloaded from
https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=14687)
I'm down to a warning for kc_simple_write, which is included in kcompat.h
(which is not included in linus kernel source of ixgbe)
make -C /lib/modules/2.6.32-431.20.3.el6.x86_64/build
M=/home/devuser/Documents/netmap/LINUX
EXTRA_CFLAGS='-I/home/devuser/Documents/netmap/LINUX
-I/home/devuser/Documents/netmap/LINUX
-I/home/devuser/Documents/netmap/LINUX/../sys
-I/home/devuser/Documents/netmap/LINUX/../sys/dev -DCONFIG_NETMAP
-Wno-unused-but-set-variable -DCONFIG_NETMAP_GENERIC -DCONFIG_NETMAP_MONITOR
-DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE' modules CONFIG_IXGBE=m
O_DRIVERS="ixgbe/" \
NETMAP_DRIVER_SUFFIX=
make[1]: Entering directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_main.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_common.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_api.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_param.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_lib.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_ethtool.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/kcompat.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_82598.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_82599.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_x540.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_sriov.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_mbx.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_dcb.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_dcb_82598.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_dcb_82599.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_sysfs.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_procfs.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_phy.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_dcb_nl.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_fcoe.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_debugfs.o
CC [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe_ptp.o
LD [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "_kc_simple_write_to_buffer"
[/home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe.ko] undefined!
CC /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe.mod.o
LD [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe.ko.unsigned
NO SIGN [M] /home/devuser/Documents/netmap/LINUX/ixgbe/ixgbe.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.32-431.20.3.el6.x86_64'
By examining the code, I'm not seeing anything obvious, so i'm thinking, would
this be related to the netmap/LINUX/Makefile as kcompat itself does not exist
on the linus linux kernel ixgbe source? Or maybe i'm just missing something
very obvious?
I have attached the modified ixgbe_main.c against the official intel release
3.22.3
Original comment by morgan.y...@gmail.com
on 22 Oct 2014 at 7:47
Attachments:
uploaded the wrong file, below is most recent
Original comment by morgan.y...@gmail.com
on 22 Oct 2014 at 7:57
Attachments:
I think you should use the Intel provided makefile, since it passes additional
flags to gcc. You can try the following:
NETMAP=/path/to/netmap/dir
cd $NETMAP/LINUX
./configure --no-drivers
make
(now patch the Intel ixgbe driver in its own directory and cd where its
Makefile is)
cp $NETMAP/Module.symvers .
make CFLAGS_EXTRA="$(cd $NETMAP; make +EXTRA_CFLAGS)"
The strange 'make +EXTRA_CFLAGS' simply prints our own EXTRA_CFLAGS, with the
needed included paths and macro definitions. The Intel Makefile will add
CFLAGS_EXTRA to its own EXTRA_CFLAGS before passing it to the kernel build.
Original comment by giuseppe.lettieri73
on 22 Oct 2014 at 3:28
forgot to say: your ixgbe_main_mod.c looks fine, so the problem now is not in
the patching.
Original comment by giuseppe.lettieri73
on 22 Oct 2014 at 3:40
I have this same issue on Centos 6.6:
-bash-4.1$ make
make -C /lib/modules/2.6.32-504.el6.x86_64/build
SUBDIRS=/usr/src/ixgbe-zc-3.22.3 modules
make[1]: Entering directory `/usr/src/kernels/2.6.32-504.el6.x86_64'
/usr/src/ixgbe-zc-3.22.3/Makefile:221: using config
/lib/modules/2.6.32-504.el6.x86_64/build/include/linux/autoconf.h
CC [M] /usr/src/ixgbe-zc-3.22.3/ixgbe_debugfs.o
LD [M] /usr/src/ixgbe-zc-3.22.3/ixgbe_zc.o
Building modules, stage 2.
/usr/src/ixgbe-zc-3.22.3/Makefile:221: using config
/lib/modules/2.6.32-504.el6.x86_64/build/include/linux/autoconf.h
MODPOST 1 modules
WARNING: "_kc_simple_write_to_buffer" [/usr/src/ixgbe-zc-3.22.3/ixgbe_zc.ko]
undefined!
CC /usr/src/ixgbe-zc-3.22.3/ixgbe_zc.mod.o
LD [M] /usr/src/ixgbe-zc-3.22.3/ixgbe_zc.ko.unsigned
NO SIGN [M] /usr/src/ixgbe-zc-3.22.3/ixgbe_zc.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.32-504.el6.x86_64'
Original comment by bhi...@gmail.com
on 2 Dec 2014 at 11:10
(Note that I'm building a different fork of ixgbe, but it appears to be the
same compilation failure as above.)
Original comment by bhi...@gmail.com
on 2 Dec 2014 at 11:12
Have you tried the compilation method I proposed in #10?
Original comment by giuseppe.lettieri73
on 12 Dec 2014 at 1:26
I successfully compiled ixgbe native driver version 3.23.2.1 from sourceforge
e1000e project using method in #10 and patch in attachment. Thanks for
explaination
Original comment by vadimj...@gmail.com
on 31 Mar 2015 at 7:42
Attachments:
Hi,
guiseppe can you p[lease help me i am using a dual port card with e1000 driver
in netmap mode one of the port is working just fine while the other port is not
delivering the packets to host stack as i have created separate host ring for
each port.
p1p1 is working as per my need while p1p2 is not doing what i need
Original comment by mati.ur....@ciscom.pk
on 14 May 2015 at 7:34
Original issue reported on code.google.com by
morgan.y...@gmail.com
on 16 Oct 2014 at 12:04