src/dpdk/drivers/net/bnxt/bnxt_hwrm.c
static void
bnxt_fill_vf_func_cfg_req_new(struct bnxt *bp,
			      struct hwrm_func_vf_resource_cfg_input *req,
			      int num_vfs)
{
	req->max_rsscos_ctx = rte_cpu_to_le_16(bp->max_rsscos_ctx /
					       (num_vfs + 1));
	req->min_rsscos_ctx = req->max_rsscos_ctx;
	req->max_stat_ctx = rte_cpu_to_le_16(bp->max_stat_ctx / (num_vfs + 1));
	req->min_stat_ctx = req->max_stat_ctx;
	req->max_cmpl_rings = rte_cpu_to_le_16(bp->max_cp_rings /
					       (num_vfs + 1));
	req->min_cmpl_rings = req->max_cmpl_rings;
	req->max_tx_rings = rte_cpu_to_le_16(bp->max_tx_rings / (num_vfs + 1));
	req->min_tx_rings = req->max_tx_rings;
	req->max_rx_rings = rte_cpu_to_le_16(bp->max_rx_rings / (num_vfs + 1));
	req->min_rx_rings = req->max_rx_rings;
	req->max_l2_ctxs = rte_cpu_to_le_16(bp->max_l2_ctx / (num_vfs + 1));
	req->min_l2_ctxs = req->max_l2_ctxs;
	/* TODO: For now, do not support VMDq/RFS on VFs. */
	req->max_vnics = rte_cpu_to_le_16(1);
	req->min_vnics = req->max_vnics;
	req->max_hw_ring_grps = rte_cpu_to_le_16(bp->max_ring_grps /
						 (num_vfs + 1));
	req->min_hw_ring_grps = req->max_hw_ring_grps;
	req->flags =
	 rte_cpu_to_le_16(HWRM_FUNC_VF_RESOURCE_CFG_INPUT_FLAGS_MIN_GUARANTEED);
}
/* min values are the guaranteed resources and max values are subject
 * to availability. The strategy for now is to keep both min & max
 * values the same.
 */
min values are the guaranteed resources and max values are subject
to availability. The strategy for now is to keep both min & max
values the same.
min values are the guaranteed resources and max values are subject to availability . The strategy for now is to keep both min & max values the same .
static void
bnxt_fill_vf_func_cfg_req_new(struct bnxt *bp,
			      struct hwrm_func_vf_resource_cfg_input *req,
			      int num_vfs)
{
	req->max_rsscos_ctx = rte_cpu_to_le_16(bp->max_rsscos_ctx /
					       (num_vfs + 1));
	req->min_rsscos_ctx = req->max_rsscos_ctx;
	req->max_stat_ctx = rte_cpu_to_le_16(bp->max_stat_ctx / (num_vfs + 1));
	req->min_stat_ctx = req->max_stat_ctx;
	req->max_cmpl_rings = rte_cpu_to_le_16(bp->max_cp_rings /
					       (num_vfs + 1));
	req->min_cmpl_rings = req->max_cmpl_rings;
	req->max_tx_rings = rte_cpu_to_le_16(bp->max_tx_rings / (num_vfs + 1));
	req->min_tx_rings = req->max_tx_rings;
	req->max_rx_rings = rte_cpu_to_le_16(bp->max_rx_rings / (num_vfs + 1));
	req->min_rx_rings = req->max_rx_rings;
	req->max_l2_ctxs = rte_cpu_to_le_16(bp->max_l2_ctx / (num_vfs + 1));
	req->min_l2_ctxs = req->max_l2_ctxs;
	req->max_vnics = rte_cpu_to_le_16(1);
	req->min_vnics = req->max_vnics;
	req->max_hw_ring_grps = rte_cpu_to_le_16(bp->max_ring_grps /
						 (num_vfs + 1));
	req->min_hw_ring_grps = req->max_hw_ring_grps;
	req->flags =
	 rte_cpu_to_le_16(HWRM_FUNC_VF_RESOURCE_CFG_INPUT_FLAGS_MIN_GUARANTEED);
}
static void bnxt_fill_vf_func_cfg_req_new ( struct bnxt * bp , struct hwrm_func_vf_resource_cfg_input * req , int num_vfs ) { req -> max_rsscos_ctx = rte_cpu_to_le_16 ( bp -> max_rsscos_ctx / ( num_vfs + 1 ) ) ; req -> min_rsscos_ctx = req -> max_rsscos_ctx ; req -> max_stat_ctx = rte_cpu_to_le_16 ( bp -> max_stat_ctx / ( num_vfs + 1 ) ) ; req -> min_stat_ctx = req -> max_stat_ctx ; req -> max_cmpl_rings = rte_cpu_to_le_16 ( bp -> max_cp_rings / ( num_vfs + 1 ) ) ; req -> min_cmpl_rings = req -> max_cmpl_rings ; req -> max_tx_rings = rte_cpu_to_le_16 ( bp -> max_tx_rings / ( num_vfs + 1 ) ) ; req -> min_tx_rings = req -> max_tx_rings ; req -> max_rx_rings = rte_cpu_to_le_16 ( bp -> max_rx_rings / ( num_vfs + 1 ) ) ; req -> min_rx_rings = req -> max_rx_rings ; req -> max_l2_ctxs = rte_cpu_to_le_16 ( bp -> max_l2_ctx / ( num_vfs + 1 ) ) ; req -> min_l2_ctxs = req -> max_l2_ctxs ; req -> max_vnics = rte_cpu_to_le_16 ( 1 ) ; req -> min_vnics = req -> max_vnics ; req -> max_hw_ring_grps = rte_cpu_to_le_16 ( bp -> max_ring_grps / ( num_vfs + 1 ) ) ; req -> min_hw_ring_grps = req -> max_hw_ring_grps ; req -> flags = rte_cpu_to_le_16 ( HWRM_FUNC_VF_RESOURCE_CFG_INPUT_FLAGS_MIN_GUARANTEED ) ; }
min values are the guaranteed resources and max values are subject
 to availability.
min values are the guaranteed resources and max values are subject to availability .
/* TODO: For now, do not support VMDq/RFS on VFs. */