FreeBSD/sys/dev/ixl/ixl_txrx.c
/*
** Find mbuf chains passed to the driver 
** that are 'sparse', using more than 8
** mbufs to deliver an mss-size chunk of data
*/
Find mbuf chains passed to the driver
that are 'sparse', using more than 8
mbufs to deliver an mss-size chunk of data
Find mbuf chains passed to the driver that are ' sparse ' using more than 8 mbufs to deliver an mss - size chunk of data
static inline bool
ixl_tso_detect_sparse(struct mbuf *mp)
{
	struct mbuf	*m;
	int		num = 0, mss;
	bool		ret = FALSE;
	mss = mp->m_pkthdr.tso_segsz;
	for (m = mp->m_next; m != NULL; m = m->m_next) {
		num++;
		mss -= m->m_len;
		if (mss < 1)
			break;
		if (m->m_next == NULL)
			break;
	}
	if (num > IXL_SPARSE_CHAIN)
		ret = TRUE;
	return (ret);
}
static inline bool ixl_tso_detect_sparse ( struct mbuf * mp ) { struct mbuf * m ; int num = 0 , mss ; bool ret = FALSE ; mss = mp -> m_pkthdr . tso_segsz ; for ( m = mp -> m_next ; m != NULL ; m = m -> m_next ) { num ++ ; mss -= m -> m_len ; if ( mss < 1 ) break ; if ( m -> m_next == NULL ) break ; } if ( num > IXL_SPARSE_CHAIN ) ret = TRUE ; return ( ret ) ; }
Find mbuf chains passed to the driver
that are 'sparse', using more than 8
mbufs to deliver an mss-size chunk of data
Find mbuf chains passed to the driver that are ' sparse ' using more than 8 mbufs to deliver an mss - size chunk of data