From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id E84ECA0AC5 for ; Mon, 27 May 2019 10:35:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CFB823237; Mon, 27 May 2019 10:35:44 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id A51932C30 for ; Mon, 27 May 2019 10:35:43 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4R8ZQNK003374; Mon, 27 May 2019 01:35:42 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=gKJnRd5a1PdtsNQ9IgdJSh+uJMxLlJNlhLVmAkzmvzI=; b=rWaIcbPFp1VfN1vBWttUxA1qm5DdP+otydHCCb8jf53NiaY8mKmVJTgocQBlYlqX/KNZ Su9gO6UL/iNPGe/dVyZe2F8O2WcL4nQAT7pchDGnwThFolWXle05PouVO4u8YCNajcPK VZO7eiLF+Q4aE+wMtUDockM+IxnHkNdrbwcyUYauzz6o7ZjXpSBiUnvfyFB2jFN3AUjh OLgD87xTLn4wAjJFWnuoIkzWpsrFXl1M7y2VUbFHFLJuMLqZ9IB1pmBLmOUVBVHXOUei SmwH4quuIEB3fgA6R+ZEJiyoNUDg2uQEl6lsqCcZjalrFIg06q00N9MflG8KR4bA2ZVC Zg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2sqwjwarkk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 27 May 2019 01:35:42 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 27 May 2019 01:35:42 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 27 May 2019 01:35:42 -0700 Received: from dc7-eodlnx05.marvell.com (dc7-eodlnx05.marvell.com [10.28.113.55]) by maili.marvell.com (Postfix) with ESMTP id E1DB63F7048; Mon, 27 May 2019 01:35:39 -0700 (PDT) From: Sunil Kumar Kori To: , , , , , CC: , Sunil Kumar Kori Date: Mon, 27 May 2019 14:05:28 +0530 Message-ID: <1558946129-5816-2-git-send-email-skori@marvell.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1558946129-5816-1-git-send-email-skori@marvell.com> References: <1558946129-5816-1-git-send-email-skori@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-27_06:, , signatures=0 Subject: [dpdk-dev] [PATCH 1/2] lib/librte_ethdev: add in default value of rte_eth_dev_info 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" rte_eth_dev_info structure exposes, nb_seg_max & nb_mtu_seg_max to provide maximum number of supported segments for a given platform. Defining UINT16_MAX as default value of above mentioned variables to expose support of infinite/maximum segments. Based on above values, application can decide best size for buffers while creating mbuf pool. Signed-off-by: Sunil Kumar Kori --- lib/librte_ethdev/rte_ethdev.c | 2 ++ lib/librte_ethdev/rte_ethdev.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index d7cfa3d..6933757 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -2543,6 +2543,8 @@ struct rte_eth_dev * .nb_max = UINT16_MAX, .nb_min = 0, .nb_align = 1, + .nb_seg_max = UINT16_MAX, + .nb_mtu_seg_max = UINT16_MAX, }; RTE_ETH_VALID_PORTID_OR_RET(port_id); diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 1f35e1d..6bd30b1 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -2333,6 +2333,8 @@ int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, * .nb_max = UINT16_MAX, * .nb_min = 0, * .nb_align = 1, + * .nb_seg_max = UINT16_MAX, + * .nb_mtu_seg_max = UINT16_MAX, * }; * * device = dev->device -- 1.8.3.1