[ofa-general] OFED, the backported <linux/scatterlist.h> header and sg_init_table()
Bart Van Assche
bart.vanassche at gmail.com
Sat May 2 04:46:24 PDT 2009
Hello,
Yesterday I installed OFED-1.4.1-rc4 on a CentOS 5.3 system and started
looking at the backported kernel headers. I found the following in the
header file
/usr/src/ofa_kernel-1.4.1/kernel_addons/backport/2.6.18-EL5.3/include/linux/scatterlist.h:
#define sg_init_table(a, b)
Or: sg_init_table() is defined to do nothing. I was expecting the following
however:
#define sg_init_table(sgl, nents) memset(sgl, 0, sizeof(*sgl) * nents);
The sg_init_table() function is implemented in e.g. 2.6.29 as follows:
void sg_init_table(struct scatterlist *sgl, unsigned int nents)
{
memset(sgl, 0, sizeof(*sgl) * nents);
#ifdef CONFIG_DEBUG_SG
{
unsigned int i;
for (i = 0; i < nents; i++)
sgl[i].sg_magic = SG_MAGIC;
}
#endif
sg_mark_end(&sgl[nents - 1]);
}
Does anyone know why sg_init_table() is defined such that it does nothing in
the backported OFED headers ?
Bart.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20090502/7aafbdc4/attachment.html>
More information about the general
mailing list