From patchwork Mon May 27 08:35:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kumar Kori X-Patchwork-Id: 53706 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EAD03F94; Mon, 27 May 2019 10:35:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 9C390A49 for ; Mon, 27 May 2019 10:35:41 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4R8Zb4t010104; Mon, 27 May 2019 01:35:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=e8PhrC5l5TIz9tA2qPQ0RHQlckZ6PRb2D/xyvJdgqyg=; b=QiJVVCbm7cF3vkrXivO48LuCIyWfg6f3wV03XB5puTavHIAvUBpvc7YMc/nY0+9KxQVZ tjYPKUPYOkYc8/TQjmRsBN5Qv4TjuB2fVK3jPDOkT3XaQn/Un3AuhJ4/UN6THC8+83YD QOWwj1wGg1sMcSmXCAp3eb5hg4MEYYWDq2TL5sfzno3nL+6Rh1+Wwk18A2rJzOKQ6EuR CWsZKkRsIycGaVnGH5x2Y31PWRzzENdX3yeYzWOI2aBkDAQJb2Za1cCNq4w5cJ96nWo4 iZgBnP75PvK+OI+A5qiSsC0gBkKd9xK8+2iB7OeQGjW/F9tLz+Tsn2XEJ+s7MNnmhvsf Sw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2sr7e491vs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 27 May 2019 01:35:40 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 27 May 2019 01:35:39 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 27 May 2019 01:35:39 -0700 Received: from dc7-eodlnx05.marvell.com (dc7-eodlnx05.marvell.com [10.28.113.55]) by maili.marvell.com (Postfix) with ESMTP id 876893F7041; Mon, 27 May 2019 01:35:37 -0700 (PDT) From: Sunil Kumar Kori To: , , , , , CC: , Sunil Kumar Kori Date: Mon, 27 May 2019 14:05:27 +0530 Message-ID: <1558946129-5816-1-git-send-email-skori@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-27_06:, , signatures=0 Subject: [dpdk-dev] [PATCH 0/2] Enabling default mbuf segments support 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 segments supported by the platform but API does not provide any default value as well as no show case of above mentioned fields while creating mbuf pool. Also in absence of this, there may be a gap bewteen application configuration and PMD capabilities. Consider below mentioned points: Point 1: - PMD may support N or infinte segments. So no defined value is assigned to represent infinite value. Point 2: - PMD supports n segments at max and exposed the same to application. - But application didn't created mbuf pool accoding to maximum supported segments so it may be that to support larger packet, application needs more segments than PMD's capability. So packet transmission operation may be discarded by the PMD. Patch set implenments default value and their usage in testpmd to provide a show case. It will help application to create mbuf pool with correct buffer size so that application can cater all sized packets properly. Sunil Kumar Kori (2): lib/librte_ethdev: add in default value of rte_eth_dev_info app/testpmd: creating mbuf pool based on maximum supported segments app/test-pmd/testpmd.c | 21 +++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.c | 2 ++ lib/librte_ethdev/rte_ethdev.h | 2 ++ 3 files changed, 25 insertions(+)