From patchwork Tue Dec 12 10:05:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Agarwal X-Patchwork-Id: 121493 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp3863666edb; Tue, 12 Dec 2017 02:09:01 -0800 (PST) X-Google-Smtp-Source: ACJfBouM6xQaur3eKXMmbJL737dk3Cyye0YZjIWCjC3LPwifzd4UbO8RrWVdn04zmSoRsmGURrQq X-Received: by 10.223.187.3 with SMTP id r3mr3473321wrg.34.1513073341326; Tue, 12 Dec 2017 02:09:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513073341; cv=none; d=google.com; s=arc-20160816; b=d4nw6Xn9mjkFa3GktNvqWbaGGGX0phZlcuFW5FFY0b4VXF35rbWfJfNJygirBBrZeC EoLS9O5kDJF8vy//Y4ynJ+KPPOQwU1EDXr+l2Qigv/K4P7i7MSNJWuI5lLK/LX3hbT5W DIYB6KH1oXEMcmiro6mdRc5M2l2/qXYZJdD4CwDCehW6o+WUANTC2ljaKhDZNk+X9REu R7/nHBTBdeltnyN5NUkho9Te1jr1YBBoBwPLqQLFar0wIUjEMDWEzLdkxi5wpY1dqJz/ UpTKqcKppErVuKqxNOzgOLoME6cOwfzb3bn3IMwFNTuQsAn7eA4xWxndS7w/vdhmnFHi 3EsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:cc:to:from :arc-authentication-results; bh=zchu2Mp216Qc2sWKkOn5Ovkiy1FOR3zDyBDNg0rsqaE=; b=mn7bWkfFyaQ/2GWPIDOnqaI/5NNZYKw8WCTrIS6hel5cmOM54mxWd4XmtPodRPNdPG rkQumpUPX0Jfqd6Zb0aOpDWym1NiJEoEtBhS3I3PseSzvUOod4SzKsHMMgmlYoc0KUPc Kxo3j29Sg8DMW1OlhQG4m3cksnsn33DIU1nZ0RL3y0QLgyD8f94/xQsj0B7nEGfaKKt8 vnCM5c/FPTXPVd6l28VY6WQgGdU8UdFo9b/ik/s01I2pmxRToGgjK1jcec5fdLBpCF6d VxVKx5xtxvkPNMy9j7EsetTVlu0Wf/8tPRa1Q5qacyHNscHanMW01tygAtfbJDzCW9ZW rpvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id z192si6780669wmz.197.2017.12.12.02.09.00; Tue, 12 Dec 2017 02:09:01 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 83C347CDE; Tue, 12 Dec 2017 11:08:59 +0100 (CET) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0070.outbound.protection.outlook.com [104.47.33.70]) by dpdk.org (Postfix) with ESMTP id D3F802C55 for ; Tue, 12 Dec 2017 11:08:57 +0100 (CET) Received: from CY4PR03CA0100.namprd03.prod.outlook.com (10.171.242.169) by CY1PR03MB2363.namprd03.prod.outlook.com (10.166.207.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Tue, 12 Dec 2017 10:08:56 +0000 Received: from BN1AFFO11FD044.protection.gbl (2a01:111:f400:7c10::156) by CY4PR03CA0100.outlook.office365.com (2603:10b6:910:4d::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Tue, 12 Dec 2017 10:08:56 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.168.50) smtp.mailfrom=linaro.org; intel.com; dkim=none (message not signed) header.d=none; intel.com; dmarc=fail action=none header.from=linaro.org; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 192.88.168.50 as permitted sender) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD044.mail.protection.outlook.com (10.58.52.191) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Tue, 12 Dec 2017 10:08:50 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBCA8qlC009395; Tue, 12 Dec 2017 03:08:53 -0700 From: Nikhil Agarwal To: CC: , , , Date: Tue, 12 Dec 2017 15:35:18 +0530 Message-ID: <20171212100520.20502-1-nikhil.agarwal@linaro.org> X-Mailer: git-send-email 2.9.3 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131575469304257300; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(7966004)(39380400002)(346002)(376002)(39860400002)(2980300002)(3190300001)(199004)(189003)(356003)(305945005)(59450400001)(81156014)(81166006)(8676002)(2906002)(86362001)(6666003)(8656006)(498600001)(97736004)(51416003)(5660300001)(6916009)(104016004)(36756003)(4326008)(1076002)(53936002)(68736007)(50226002)(8936002)(48376002)(50466002)(2351001)(105596002)(316002)(106466001)(54906003)(16586007)(47776003)(77096006); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2363; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD044; 1:lxRU45sagCG/DjlFj9lpYhDCa0dr0kn/o9KQyQmkd9Z1tl3X8om6xklXUviUFGOapTaLUOtBKnMr4i1nOH8q5F9Wiq603P47b4YRQhMYJ1N/ldqFTasekOhalBEsHRzA MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 489986c2-c75d-456f-1b14-08d541485780 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:CY1PR03MB2363; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2363; 3:j0SySvRO9HOJsRaQDqQEjweE2qL1HnjkD4QeZaBxsh5sfkKWQIGNwj9SXFrtyTxV1ZnqkWO9NTHoXR2GkzUhmx1XtqBqpMho72dgmEcwzSlJwBIm1CGkhze05rM3RjmxUOC+Y57VvszSklqQIR+ayXkVZa3dm2HgJn6sTTpO4PiJVmCC0VnouWodTPl5i8+ZpjNohXKnOcdHdvMhw8iNXVbBd94ORs6TlOnvEeIn/+sScyxpGIo8zYF4FjQvJyXC7rYb8i7gFILM+sb4yA0M1X19hrcioZZVkHIRE+IyZpJ2MqYCBGEkghE7CTKfoQHVM8vy+3SUDAaNfeinOtnY7kCaX5tR4O5wWP3z5oXnOvA=; 25:0+/EfFgslsMCJk+0UfdWnwZr0gObIvXIgqixwaRbyjYpZkBdU7pRiaEB5yoP0SVfWqkcG7q+QwipF7jfxi5ejFZhPRJKxVHD1XEMY+B2w5WY+R4wC8bo8PuBjshlHgLO1XvuXXV5J8Jh376kzhoEYFIcZGTBay1mam1VFQB5AlsN1K90IrGM140/DbRkvn3OL/aOxeXPFTf+p2NHsD6Tbdp+FQVBVTMmQDXkh87Pnz6TvrZPbpIrQXD4w0f2M6Yv1r1xvCPb2eidgpDCpZOmYYX6jzHy/QCHz2EryCJRfejHDH7mgJuWChY4K5c6SSatVHgNOZgJNcUydtTEEmK1JA== X-MS-TrafficTypeDiagnostic: CY1PR03MB2363: X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2363; 31:uHqprmfQtPd8wFt8R+p3QuqHIZu7KPoXUiCposBLsihW+xR7ReJqTQ9+GT3/Rb258yY53GsFnl+CdspqaEMweRx98brPnGY342F5YfVg72+n6zoHNCDSPWWDm7bkB/bU4/tD/JJ2z17LCWuYdTvPDpTK12rBGRgBDXcXIAy0ewbk5R56bqvzrj83BxiJP+uMce7ul5vjcNp9dqBVjFYZu1UT2eNtsUzSuatA+ruGPm8=; 4:5mti6izeO64wRLogoauO4Re1NpxMbeBKST6L1pjNX/QnCGyJvcfXWEa90ZoYAnH5rzNXmB4i0oFltI2KtcAB9QUtm9H/w9IotUMk+35GuqMoAZuUTk5Z8j1ewUbyanlV5+TjIUTPXLcXzZMYEQHTqY4pn3c4ScFdG55QmMgjl/avZrOHCh0bMwtvdc0EvbFo11GQYxTLdwoejy8CuO/dZvi/bWOOLPS9lcWfyKWMKmpT5NYKTMIgzzU3x4yqoDh54+oUrWwwUqUe3J/U/Dfeew== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231023)(6055026)(6096035)(20161123565025)(20161123556025)(20161123561025)(20161123563025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123559100)(201708071742011); SRVR:CY1PR03MB2363; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB2363; X-Forefront-PRVS: 051900244E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2363; 23:hWqK6/58Vz6HRejQu+tC1ORJSSC5MdzUA9CRM9hz6?=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d3vDbq6d26jRCyyOCkqc2te2wPjG05LUTxfPx6H96LYdt0fb+1TUiG0OX4soMFWTxlIktOkmQIJESwcJyMgQpdiTFAYjyjK+FJKl2p2CLuO6OM6tq/qNKRqEVC2eB8ynsxi4DiTRv10mvzRtLx9T9hsb/Qwtb+9EPlYzylGB0oYNQ3Ek5TaLnRc83grSAqK0ijHUpcmPtt7Xaay8ikcBzbZs2ZykNN4NySygl0tcZYbO3yKQ3Mfj3nM21GJtevXQmDZ5TPCO3Pxibl9he5nPj5F1HhJ51S9F5Ai4HfsRNvghFrwFiiD+WAzInlU+HA=; 5:pniDOgmfCcZlwcAo64PPotnvkauUo3tBwx/Fpn0C5ph5H9Vv3DzzUGp0Yy8UfZSFuR2Q/Z5miv8nOSjpI1+7pWaEqKe0R6IyT7HWQ4Smu8rgfMfkaS4iE0tOlj6dCr+TUnDvNkhoktNoImVMwQCc42d/Fw+j6o1/KoTC+Ngkido=; 24:tx2k05I+pwZFf/IGTmtv8iFgsIQ/BD81WDfCG0LGVe/pmtGJd9pHtSDgfyN+kSPgJwSKIBG64c3F1YF2H7ImO6p30x9EPIyrCyyQd45Dg4w=; 7:aVSCn2q8Ki5De69v3zIKz0yX6BkzYLXPauFoMj0tiZ2eXTccpVzJc9D8xP555vSDVrAKo7yE5EZH4ChSjFkJ6P9ugvJOnnZoeKjCpQQwF9RTFwlIhfjtrpoCjX4zbFelTWY8+uYL9L7Js7MRdMyBdGGNQAsEGjBBlpLzeUm0oD2SJWh0eIwE2IQuaSMhGmeShCcw00nK+Eqy6oY1Q+FTSiaW99ihO4L1gGNNY3rt2XEgGAMudSV5Sb3puygwOmx/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 10:08:50.2541 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 489986c2-c75d-456f-1b14-08d541485780 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB2363 Subject: [dpdk-dev] [PATCH 1/3] ethdev: add max burst size to device 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" Currently, if the rte_eth_rx_burst() function returns a value less than *nb_pkts*, the application will assume that no more packets are present. Some of the hw queue based hardware can only support smaller burst for RX and TX and thus break the expectation of the rx_burst API. This patch adds support to provide the maximum burst size that can be supported by a given PMD. The dev_info is being memset to '0' in rte_ethdev library. The value of '0' indicates that any value for burst size can be supported i.e. no change for existing PMDs. The application can now use the lowest available max_burst_size value for rte_eth_rx_burst. Signed-off-by: Nikhil Agarwal --- lib/librte_ether/rte_ethdev.h | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 341c2d6..3ab6f02 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1047,6 +1047,7 @@ struct rte_eth_dev_info { /** Configured number of rx/tx queues */ uint16_t nb_rx_queues; /**< Number of RX queues. */ uint16_t nb_tx_queues; /**< Number of TX queues. */ + uint16_t max_burst_size; /**< MAX burst size, 0 for no limit. */ }; /**