src/dpdk/drivers/net/cxgbe/cxgbe_main.c
void cxgbe_configure_max_ethqsets(struct adapter *adapter)
{
	unsigned int ethqsets, reserved;

	/* We need to reserve an Ingress Queue for the Asynchronous Firmware
	 * Event Queue and 1 Control Queue per port.
	 *
	 * For each Queue Set, we'll need the ability to allocate two Egress
	 * Contexts -- one for the Ingress Queue Free List and one for the TX
	 * Ethernet Queue.
	 */
	reserved = max(adapter->params.nports, 1);
	if (is_pf4(adapter)) {
		struct pf_resources *pfres = &adapter->params.pfres;

		ethqsets = min(pfres->niqflint, pfres->nethctrl);
		if (ethqsets > (pfres->neq / 2))
			ethqsets = pfres->neq / 2;
	} else {
		struct vf_resources *vfres = &adapter->params.vfres;

		ethqsets = min(vfres->niqflint, vfres->nethctrl);
		if (ethqsets > (vfres->neq / 2))
			ethqsets = vfres->neq / 2;
	}

	ethqsets -= reserved;
	adapter->sge.max_ethqsets = ethqsets;
}
/* Figure out how many Queue Sets we can support */
Figure out how many Queue Sets we can support
Figure out how many Queue Sets we can support
void cxgbe_configure_max_ethqsets(struct adapter *adapter)
{
	unsigned int ethqsets, reserved;
	reserved = max(adapter->params.nports, 1);
	if (is_pf4(adapter)) {
		struct pf_resources *pfres = &adapter->params.pfres;
		ethqsets = min(pfres->niqflint, pfres->nethctrl);
		if (ethqsets > (pfres->neq / 2))
			ethqsets = pfres->neq / 2;
	} else {
		struct vf_resources *vfres = &adapter->params.vfres;
		ethqsets = min(vfres->niqflint, vfres->nethctrl);
		if (ethqsets > (vfres->neq / 2))
			ethqsets = vfres->neq / 2;
	}
	ethqsets -= reserved;
	adapter->sge.max_ethqsets = ethqsets;
}
void cxgbe_configure_max_ethqsets ( struct adapter * adapter ) { unsigned int ethqsets , reserved ; reserved = max ( adapter -> params . nports , 1 ) ; if ( is_pf4 ( adapter ) ) { struct pf_resources * pfres = & adapter -> params . pfres ; ethqsets = min ( pfres -> niqflint , pfres -> nethctrl ) ; if ( ethqsets > ( pfres -> neq / 2 ) ) ethqsets = pfres -> neq / 2 ; } else { struct vf_resources * vfres = & adapter -> params . vfres ; ethqsets = min ( vfres -> niqflint , vfres -> nethctrl ) ; if ( ethqsets > ( vfres -> neq / 2 ) ) ethqsets = vfres -> neq / 2 ; } ethqsets -= reserved ; adapter -> sge . max_ethqsets = ethqsets ; }
Figure out how many Queue Sets we can support
Figure out how many Queue Sets we can support
/* We need to reserve an Ingress Queue for the Asynchronous Firmware
	 * Event Queue and 1 Control Queue per port.
	 *
	 * For each Queue Set, we'll need the ability to allocate two Egress
	 * Contexts -- one for the Ingress Queue Free List and one for the TX
	 * Ethernet Queue.
	 */