FreeBSD/sys/dev/vnic/nicvf_queues.c
/* Requests PF to assign and enable Qset */
Requests PF to assign and enable Qset
Requests PF to assign and enable Qset
void
nicvf_qset_config(struct nicvf *nic, boolean_t enable)
{
	union nic_mbx mbx = {};
	struct queue_set *qs;
	struct qs_cfg *qs_cfg;
	qs = nic->qs;
	if (qs == NULL) {
		device_printf(nic->dev,
		    "Qset is still not allocated, don't init queues\n");
		return;
	}
	qs->enable = enable;
	qs->vnic_id = nic->vf_id;
	mbx.qs.msg = NIC_MBOX_MSG_QS_CFG;
	mbx.qs.num = qs->vnic_id;
	mbx.qs.cfg = 0;
	qs_cfg = (struct qs_cfg *)&mbx.qs.cfg;
	if (qs->enable) {
		qs_cfg->ena = 1;
		qs_cfg->vnic = qs->vnic_id;
	}
	nicvf_send_msg_to_pf(nic, &mbx);
}
void nicvf_qset_config ( struct nicvf * nic , boolean_t enable ) { union nic_mbx mbx = { } ; struct queue_set * qs ; struct qs_cfg * qs_cfg ; qs = nic -> qs ; if ( qs == NULL ) { device_printf ( nic -> dev , " \n " ) ; return ; } qs -> enable = enable ; qs -> vnic_id = nic -> vf_id ; mbx . qs . msg = NIC_MBOX_MSG_QS_CFG ; mbx . qs . num = qs -> vnic_id ; mbx . qs . cfg = 0 ; qs_cfg = ( struct qs_cfg * ) & mbx . qs . cfg ; if ( qs -> enable ) { qs_cfg -> ena = 1 ; qs_cfg -> vnic = qs -> vnic_id ; } nicvf_send_msg_to_pf ( nic , & mbx ) ; }
Requests PF to assign and enable Qset
Requests PF to assign and enable Qset
/* Send a mailbox msg to PF to config Qset */