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.
_______________________________________________
general mailing list
general@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to