FreeBSD/sys/dev/cxgb/cxgb_sge.c
/**
 *	init_qset_cntxt - initialize an SGE queue set context info
 *	@qs: the queue set
 *	@id: the queue set id
 *
 *	Initializes the TIDs and context ids for the queues of a queue set.
 */
initialize an SGE queue set context info
@qs: the queue set
@id: the queue set id

Initializes the TIDs and context ids for the queues of a queue set.
initialize an SGE queue set context info @qs : the queue set @id : the queue set id Initializes the TIDs and context ids for the queues of a queue set .
static void
init_qset_cntxt(struct sge_qset *qs, u_int id)
{
	qs->rspq.cntxt_id = id;
	qs->fl[0].cntxt_id = 2 * id;
	qs->fl[1].cntxt_id = 2 * id + 1;
	qs->txq[TXQ_ETH].cntxt_id = FW_TUNNEL_SGEEC_START + id;
	qs->txq[TXQ_ETH].token = FW_TUNNEL_TID_START + id;
	qs->txq[TXQ_OFLD].cntxt_id = FW_OFLD_SGEEC_START + id;
	qs->txq[TXQ_CTRL].cntxt_id = FW_CTRL_SGEEC_START + id;
	qs->txq[TXQ_CTRL].token = FW_CTRL_TID_START + id;
	mbufq_init(&qs->txq[TXQ_ETH].sendq, INT_MAX);
	mbufq_init(&qs->txq[TXQ_OFLD].sendq, INT_MAX);
	mbufq_init(&qs->txq[TXQ_CTRL].sendq, INT_MAX);
}
static void init_qset_cntxt ( struct sge_qset * qs , u_int id ) { qs -> rspq . cntxt_id = id ; qs -> fl [ 0 ] . cntxt_id = 2 * id ; qs -> fl [ 1 ] . cntxt_id = 2 * id + 1 ; qs -> txq [ TXQ_ETH ] . cntxt_id = FW_TUNNEL_SGEEC_START + id ; qs -> txq [ TXQ_ETH ] . token = FW_TUNNEL_TID_START + id ; qs -> txq [ TXQ_OFLD ] . cntxt_id = FW_OFLD_SGEEC_START + id ; qs -> txq [ TXQ_CTRL ] . cntxt_id = FW_CTRL_SGEEC_START + id ; qs -> txq [ TXQ_CTRL ] . token = FW_CTRL_TID_START + id ; mbufq_init ( & qs -> txq [ TXQ_ETH ] . sendq , INT_MAX ) ; mbufq_init ( & qs -> txq [ TXQ_OFLD ] . sendq , INT_MAX ) ; mbufq_init ( & qs -> txq [ TXQ_CTRL ] . sendq , INT_MAX ) ; }
init_qset_cntxt - initialize an SGE queue set context info
      @qs: the queue set
      @id: the queue set id
init_qset_cntxt - initialize an SGE queue set context info @qs : the queue set @id : the queue set id
/* XXX: a sane limit is needed instead of INT_MAX */