X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fqede%2Fbase%2Fecore_dev.c;h=8b7d1da0e48842d8987b67329c4ef3c774c0b4eb;hb=5bbda46be387a3b05e7c5e7bc3bc1dbdd129b9a5;hp=1d906b73f3ad95630d7ad3bd24375f58cbb4f7ba;hpb=e0685050ffe1da2a8b71614e55eb488bc6f5acb3;p=dpdk.git diff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c index 1d906b73f3..8b7d1da0e4 100644 --- a/drivers/net/qede/base/ecore_dev.c +++ b/drivers/net/qede/base/ecore_dev.c @@ -542,11 +542,14 @@ enum _ecore_status_t ecore_resc_alloc(struct ecore_dev *p_dev) /* Allocate Memory for the Queue->CID mapping */ for_each_hwfn(p_dev, i) { struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i]; + u32 num_tx_conns = RESC_NUM(p_hwfn, ECORE_L2_QUEUE); + int tx_size, rx_size; /* @@@TMP - resc management, change to actual required size */ - int tx_size = sizeof(struct ecore_hw_cid_data) * - RESC_NUM(p_hwfn, ECORE_L2_QUEUE); - int rx_size = sizeof(struct ecore_hw_cid_data) * + if (p_hwfn->pf_params.eth_pf_params.num_cons > num_tx_conns) + num_tx_conns = p_hwfn->pf_params.eth_pf_params.num_cons; + tx_size = sizeof(struct ecore_hw_cid_data) * num_tx_conns; + rx_size = sizeof(struct ecore_hw_cid_data) * RESC_NUM(p_hwfn, ECORE_L2_QUEUE); p_hwfn->p_tx_cids = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,