Hi!

I'm currently running PF_RING 5.2.0 with the bundled tg3-3.102 driver on a 
server running Debian 6 (x64). For a few reasons I wan't to upgrade to a newer 
PF_RING release (or even the SVN). However, in all versions above 5.2.0, the 
bundled tg3-3.102 driver fails to compile.

First, just a minor issue: it seems to now be found under the path 
"drivers/PF_RING_aware/2.6.x/Broadcom/...". This should be 
"drivers/PF_RING_aware/Broadcom". Easily solved though, and isn't the root 
cause of the issues I'm experiencing, just a side note.

Here's the output from the make:

---
sh makeflags.sh /lib/modules/2.6.32-5-amd64/source > tg3_flags.h
make -C /lib/modules/2.6.32-5-amd64/build 
SUBDIRS=/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102
 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
  CC [M]  
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/tg3.o
In file included from 
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/tg3.c:67:
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/tg3.h:2814:1:
 warning: "PHY_ID_BCM5411" redefined
In file included from 
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/tg3.c:36:
/usr/src/linux-headers-2.6.32-5-common/include/linux/brcmphy.h:7:1: warning: 
this is the location of the previous definition
In file included from 
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/tg3.c:73:
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/../../../../../kernel/linux/pf_ring.h:522:81:
 error: missing binary operator before token "("
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/tg3.c: 
In function 'tg3_rx':
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/tg3.c:4646:
 warning: passing argument 4 of 'hook->ring_handler' makes pointer from integer 
without a cast
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/tg3.c:4646:
 error: too few arguments to function 'hook->ring_handler'
make[4]: *** 
[/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/tg3.o]
 Error 1
make[3]: *** 
[_module_/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102]
 Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'
make: *** [default] Error 2
---

The following line can sort of be ignored:

---
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/../../../../../kernel/linux/pf_ring.h:522:81:
 error: missing binary operator before token "("
---

Checking in pf_ring.h, this line is the offender:

---
#if defined(I82599_HW_FILTERING_SUPPORT) && (LINUX_VERSION_CODE < 
KERNEL_VERSION(2,6,40))
---

Since I'm running 2.6.32, I omitted the kernel version check:

---
#if defined(I82599_HW_FILTERING_SUPPORT)
---

This got rid of the line in the make output above, but the make still fails 
with what can be described as the "real" error here:

---
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/tg3.c:4646:
 warning: passing argument 4 of 'hook->ring_handler' makes pointer from integer 
without a cast
/usr/local/src/PF_RING-6641/drivers/PF_RING_aware/broadcom/tg3/tg3-3.102/tg3.c:4646:
 error: too few arguments to function 'hook->ring_handler'
---

Comparing the code from the tg3 driver bundled with PF_RING 5.2.0 it hasn't 
changed at all, so I don't know why it's complaining regarding that function 
since it's identical as the one in 5.2.0. Before I noticed they were identical 
I tried to simply copy the code (the whole tg3 directory) from my 5.2.0 
directory to the one where I grabbed the SVN (6641) to. But with the same 
error, naturally. I'm no programmer, but I'm guessing something in the PF_RING 
header files or such are triggering this condition.

Any ideas?

Regards,

Johan
_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to