[openib-general] using VAPI and CMAPI in kernel module.
von Wyl
Tue Oct 5 05:46:31 PDT 2004
Hi,
I'm trying to compile a kernel module which use the VAPI and (maybe) the
CMAPI. And when I compile a file with an inclusion of vapi.h I got this :
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:481:
error: parse error before '*' token
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:481:
warning: function declaration isn't a prototype
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:501:
error: parse error before '*' token
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:502:
warning: function declaration isn't a prototype
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:
In function `MOSAL_time_compare':
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:503:
error: `ts1' undeclared (first use in this function)
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:503:
error: (Each undeclared identifier is reported only once
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:503:
error: for each function it appears in.)
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:503:
error: `ts2' undeclared (first use in this function)
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:
At top level:
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:527:
error: parse error before '*' token
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:527:
error: parse error before '*' token
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:528:
warning: return type defaults to `int'
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:528:
warning: function declaration isn't a prototype
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:
In function `MOSAL_time_add_usec':
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:529:
error: `ts' undeclared (first use in this function)
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:529:
error: `usecs' undeclared (first use in this function)
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:
At top level:
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:553:
error: parse error before '*' token
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:554:
warning: function declaration isn't a prototype
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:
In function `MOSAL_time_init':
/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/mosal_timer.h:555:
error: `ts' undeclared (first use in this function)
the file is simply :
#include <linux/module.h>
#include <linux/kernel.h>
#include <vapi.h>
int init_hello(void)
{
printk(KERN_NOTICE "Hello, world\n");
return 0;
}
void cleanup_hello(void)
{
printk(KERN_ALERT "Goodbye, cruel world\n");
}
module_init(init_hello);
module_exit(cleanup_hello);
and the Makefile :
KDIR = /lib/modules/$(shell uname -r)/build/
EXTRA_CFLAGS
:=-I/usr/src/linux-2.6.7/drivers/infiniband/hw/mellanox-hca/include/ -O2
-Wall
obj-m += exemple01.o
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
clean :
rm -rf *~ *.o *.ko
If someone tried something like that befor could he send me some very
simple examples?
I'm using the openIB stack on a 2.6.7 kernel.
Thanks...
More information about the openib-general mailing list