From: Vu P. <vu...@me...> - 2008-01-29 08:24:01
|
Bart Van Assche wrote: > On Jan 28, 2008 6:07 PM, Vu Pham <hu...@ya...> wrote: >> On srpt readme file, the prerequisite is install SCST BEFORE >> ofed-1.3 or like Vlad warning "recompiling ofed" if you >> install scst after install ofed. > > This is what will happen if someone installs Linux kernel headers + > SCST + OFED in this order: > 1. Linux kernel headers matching the running kernel are installed in > /usr/src/linux-.../include or equivalent, and a symbolic link to the > kernel headers is created in /lib/modules/$(uname -r)/build/include. > 2. By building and installing SCST, SCST modules are installed in > /lib/modules/$(uname -r)/extra and SCST kernel headers are installed > in /usr/local/include, a.o. SCST's scsi_tgt.h header file, the > interface between SCST and mid-level SCSI drivers. > 3. Next, OFED kernel modules are being built. During this process the > SRP target module is compiled with the header file > drivers/infiniband/ulp/srpt/scsi_tgt.h. The version of this file > distributed with OFED 1.3 is incompatible with the one distributed > with the latest version of SCST. Or: the kernel will probably crash as > soon as one starts using the SRP target module, even if he or she > followed the above outlined "official" build procedure. Including > /usr/local/include/scsi_tgt.h in the SRP target module is not an > option -- kernel modules must not include userspace headers, except > for the well known exceptions like <stdarg.h>. > There are two include paths. The first one is /usr/local/include/scst and the second one are drivers/infiniband/ulp/srpt. Therefore, building srpt in ofed will always use the /usr/local/include/scst path first and if you already install scst then there won't be any problem As you already know /usr/local/include/scst/scsi_tgt.h is not userspace header. SCST is not part of kernel yet; srpt is also not part of kernel > All this trouble can be avoided by distributing the SRP target code > with SCST instead of with OFED. The same problem would appear if someone use different ofed versions > > Furthermore, all kernel headers that define inter-module interfaces > should reside in <kernel source root dir>/include/<subdir>/... The > SRP target breaks this convention by having a private copy of an > inter-module interface in a local directory > (drivers/infiniband/ulp/srpt/scsi_tgt.h). Once again srpt is not part of kernel; therefore, it breaks certain kernel rule. We'll fix it if scst is official part of kernel > > >> here is one of the reason srpt is part of ofed not scst: >> >> SCST is GPL >> ofed + srpt is GPL or BSD > > This is not an issue -- if you have a look at the Linux kernel, you > will see that all source files are licensed under at least the GPLv2 > and some source files are licensed under GPLv2 + one or more other > licenses, e.g. BSD. > I know that; however, I don't know if SCST has ok with double license or not -vu |