FreeBSD/sys/dev/cxgbe/t4_sge.c
/*
 * SGE wants the buffer to be at least 64B and then a multiple of 16.  If
 * padding is is use the buffer's start and end need to be aligned to the pad
 * boundary as well.  We'll just make sure that the size is a multiple of the
 * boundary here, it is up to the buffer allocation code to make sure the start
 * of the buffer is aligned as well.
 */
SGE wants the buffer to be at least 64B and then a multiple of 16.  If
padding is is use the buffer's start and end need to be aligned to the pad
boundary as well.  We'll just make sure that the size is a multiple of the
boundary here, it is up to the buffer allocation code to make sure the start
of the buffer is aligned as well.
SGE wants the buffer to be at least 64B and then a multiple of 16 . If padding is is use the buffer ' s start and end need to be aligned to the pad boundary as well . We ' ll just make sure that the size is a multiple of the boundary here it is up to the buffer allocation code to make sure the start of the buffer is aligned as well .
static inline int
hwsz_ok(struct adapter *sc, int hwsz)
{
	int mask = fl_pad ? sc->params.sge.pad_boundary - 1 : 16 - 1;
	return (hwsz >= 64 && (hwsz & mask) == 0);
}
static inline int hwsz_ok ( struct adapter * sc , int hwsz ) { int mask = fl_pad ? sc -> params . sge . pad_boundary - 1 : 16 - 1 ; return ( hwsz >= 64 && ( hwsz & mask ) == 0 ) ; }
SGE wants the buffer to be at least 64B and then a multiple of 16.
SGE wants the buffer to be at least 64B and then a multiple of 16 .