FreeBSD/sys/dev/cxgbe/t4_sge.c
static inline u_int
txpkt_len16(u_int nsegs, u_int tso)
{
	u_int n;

	MPASS(nsegs > 0);

	nsegs--; /* first segment is part of ulptx_sgl */
	n = sizeof(struct fw_eth_tx_pkt_wr) + sizeof(struct cpl_tx_pkt_core) +
	    sizeof(struct ulptx_sgl) + 8 * ((3 * nsegs) / 2 + (nsegs & 1));
	if (tso)
		n += sizeof(struct cpl_tx_pkt_lso_core);

	return (howmany(n, 16));
}
/*
 * len16 for a txpkt WR with a GL.  Includes the firmware work request header.
 */
len16 for a txpkt WR with a GL.  Includes the firmware work request header.
len16 for a txpkt WR with a GL . Includes the firmware work request header .
static inline u_int
txpkt_len16(u_int nsegs, u_int tso)
{
	u_int n;
	MPASS(nsegs > 0);
	nsegs--; 
	n = sizeof(struct fw_eth_tx_pkt_wr) + sizeof(struct cpl_tx_pkt_core) +
	    sizeof(struct ulptx_sgl) + 8 * ((3 * nsegs) / 2 + (nsegs & 1));
	if (tso)
		n += sizeof(struct cpl_tx_pkt_lso_core);
	return (howmany(n, 16));
}
static inline u_int txpkt_len16 ( u_int nsegs , u_int tso ) { u_int n ; MPASS ( nsegs > 0 ) ; nsegs -- ; n = sizeof ( struct fw_eth_tx_pkt_wr ) + sizeof ( struct cpl_tx_pkt_core ) + sizeof ( struct ulptx_sgl ) + 8 * ( ( 3 * nsegs ) / 2 + ( nsegs & 1 ) ) ; if ( tso ) n += sizeof ( struct cpl_tx_pkt_lso_core ) ; return ( howmany ( n , 16 ) ) ; }
len16 for a txpkt WR with a GL.
len16 for a txpkt WR with a GL .
/* first segment is part of ulptx_sgl */