src/sys/dev/cxgbe/t4_sge.c
/*
 * SGE wants the buffer to be at least 64B and then a multiple of 16.  Its
 * address mut be 16B aligned.  If padding is in 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 pad boundary here, it is up to the buffer
 * allocation code to make sure the start of the buffer is aligned.
 */
SGE wants the buffer to be at least 64B and then a multiple of 16.  Its
address mut be 16B aligned.  If padding is in 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 pad boundary here, it is up to the buffer
allocation code to make sure the start of the buffer is aligned.
SGE wants the buffer to be at least 64B and then a multiple of 16 . Its address mut be 16B aligned . If padding is in 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 pad boundary here it is up to the buffer allocation code to make sure the start of the buffer is aligned .
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 .