Skip to contentSkip to conversation

Getting an Infiniband access layer in theLinux kernel

Infiniband-general Arnd Bergmann 1 participant 1 message Feb 8, 2004

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Sean

We want to continue to discuss specific details about what's needed to add the code into the kernel. Here's a list of modifications that I think are needed so far:

* Update the code to make direct calls for atomic operations.
* Verify the use of spinlock calls.
* Reformat the code for tab spacing and curly brace usage.
* Elimination of typedefs.

Some more hints:
* Understand how to use ioctls: Your current code can't possibly work in 32 bit emulation mode, e.g. when running i386 libs on ia64. You are also completely ignoring the ioctl 'command' argument.
* Try to reduce the number of necessary ioctls: 90 different commands for a single device is just overkill.
* Don't try to hide system calls behind a character device (/dev/cl_dev). Someone will find it sooner or later.
* Don't reimplement devfs (poorly), what your are trying to achieve is far easier done with a misc device and udev. call_user_mode_helper should only be used for running hotplug.
* Get rid of IN and OUT in declarations. If a pointer is const, it's an input.
* Declare functions static when they are only used in the file they are defined in. Put extern declarations into headers.
* put EXPORT_SYMBOL statements right next to the symbol, not in a seperate file.
* Information about drivers/devices should go to sysfs instead of procfs.
* Don't use vmalloc.
* aside from spinlocks and atomics, there are some more files in complib that can easily be removed by using linux primitives directly (e.g. kmalloc, list_head, semaphore, work_queue)
* Use C99 named struct initializers instead of their deprecated gcc counterparts.

Quoted 2 lines

And, yes, knowing some of these issues up front will save the trouble of submitting code that will be immediately rejected.

Right, but that should not stop you from providing a BK tree or a diff file that lets you build ibal in a linux tree. As a starting point, just drop all of ibal and complib into some tree so people can look at it without having to figure out how you are building stuff.

	Arnd <><

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAJsm/5t5GS2LDRf4RArCIAJ9JEkinmx1yeSZQGS7X6rMaDYjuZwCgl9us +7w/ZNbFl1ZAiLaIrp/rsso=
=repY
-----END PGP SIGNATURE-----