From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016ce01.pphosted.com (mx0b-0016ce01.pphosted.com [67.231.156.153]) by dpdk.org (Postfix) with ESMTP id 9348EB33E for ; Sat, 3 Dec 2016 03:44:12 +0100 (CET) Received: from pps.filterd (m0085408.ppops.net [127.0.0.1]) by mx0b-0016ce01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id uB32fn6V019097 for ; Fri, 2 Dec 2016 18:44:12 -0800 Received: from avcashub1.qlogic.com ([198.186.0.117]) by mx0b-0016ce01.pphosted.com with ESMTP id 26ya8v7tpd-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 02 Dec 2016 18:44:12 -0800 Received: from avluser01.qlc.com (10.1.113.203) by qlc.com (10.1.4.192) with Microsoft SMTP Server id 14.3.235.1; Fri, 2 Dec 2016 18:44:11 -0800 Received: (from hpatil@localhost) by avluser01.qlc.com (8.14.4/8.14.4/Submit) id uB32iBVm013527; Fri, 2 Dec 2016 18:44:11 -0800 From: Harish Patil To: CC: , Harish Patil Date: Fri, 2 Dec 2016 18:43:59 -0800 Message-ID: <1480733039-13046-7-git-send-email-harish.patil@qlogic.com> X-Mailer: git-send-email 1.7.10.3 In-Reply-To: <1480733039-13046-1-git-send-email-harish.patil@qlogic.com> References: <1480733039-13046-1-git-send-email-harish.patil@qlogic.com> MIME-Version: 1.0 Content-Type: text/plain disclaimer: bypass X-Proofpoint-Virus-Version: vendor=nai engine=5800 definitions=8367 signatures=670762 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1612030043 Subject: [dpdk-dev] [PATCH 7/7] net/qede: restrict maximum queues for PF/VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2016 02:44:12 -0000 Fix to adverstise max_rx_queues by taking into account the number of PF connections instead of returning max_queues supported by the HW. Fixes: 2ea6f76a ("qede: add core driver") Signed-off-by: Harish Patil --- drivers/net/qede/qede_ethdev.c | 13 ++++++++++--- drivers/net/qede/qede_ethdev.h | 3 +++ drivers/net/qede/qede_main.c | 5 ----- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 10abb8b..9c2a5ea 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -973,8 +973,15 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev) dev_info->max_rx_pktlen = (uint32_t)ETH_TX_MAX_NON_LSO_PKT_LEN; dev_info->rx_desc_lim = qede_rx_desc_lim; dev_info->tx_desc_lim = qede_tx_desc_lim; - dev_info->max_rx_queues = (uint16_t)QEDE_MAX_RSS_CNT(qdev); + + if (IS_PF(edev)) + dev_info->max_rx_queues = (uint16_t)RTE_MIN( + QEDE_MAX_RSS_CNT(qdev), QEDE_PF_NUM_CONNS / 2); + else + dev_info->max_rx_queues = (uint16_t)RTE_MIN( + QEDE_MAX_RSS_CNT(qdev), ECORE_MAX_VF_CHAINS_PER_PF); dev_info->max_tx_queues = dev_info->max_rx_queues; + dev_info->max_mac_addrs = qdev->dev_info.num_mac_addrs; dev_info->max_vfs = 0; dev_info->reta_size = ECORE_RSS_IND_TABLE_SIZE; @@ -2015,9 +2022,9 @@ int qede_dev_filter_ctrl(struct rte_eth_dev *eth_dev, static void qede_update_pf_params(struct ecore_dev *edev) { struct ecore_pf_params pf_params; - /* 32 rx + 32 tx */ + memset(&pf_params, 0, sizeof(struct ecore_pf_params)); - pf_params.eth_pf_params.num_cons = 64; + pf_params.eth_pf_params.num_cons = QEDE_PF_NUM_CONNS; qed_ops->common->update_pf_params(edev, &pf_params); } diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h index bd85ba3..95e06ef 100644 --- a/drivers/net/qede/qede_ethdev.h +++ b/drivers/net/qede/qede_ethdev.h @@ -115,6 +115,9 @@ extern char fw_file[]; +/* Number of PF connections - 32 RX + 32 TX */ +#define QEDE_PF_NUM_CONNS (64) + /* Port/function states */ enum qede_dev_state { QEDE_DEV_INIT, /* Init the chip and Slowpath */ diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c index b7202c8..2c88329 100644 --- a/drivers/net/qede/qede_main.c +++ b/drivers/net/qede/qede_main.c @@ -399,11 +399,6 @@ static int qed_slowpath_start(struct ecore_dev *edev, if (edev->num_hwfns > 1) { ecore_vf_get_num_rxqs(&edev->hwfns[1], &queues); info->num_queues += queues; - /* Restrict 100G VF to advertise 16 queues till the - * required support is available to go beyond 16. - */ - info->num_queues = RTE_MIN(info->num_queues, - ECORE_MAX_VF_CHAINS_PER_PF); } ecore_vf_get_num_vlan_filters(&edev->hwfns[0], -- 1.8.3.1