From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0072.outbound.protection.outlook.com [104.47.37.72]) by dpdk.org (Postfix) with ESMTP id 92C851B19B for ; Thu, 28 Sep 2017 14:20:00 +0200 (CEST) Received: from CY1PR03CA0028.namprd03.prod.outlook.com (10.174.128.38) by MWHPR03MB2702.namprd03.prod.outlook.com (10.168.207.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 28 Sep 2017 12:19:59 +0000 Received: from BL2FFO11FD040.protection.gbl (2a01:111:f400:7c09::103) by CY1PR03CA0028.outlook.office365.com (2603:10b6:600::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12 via Frontend Transport; Thu, 28 Sep 2017 12:19:59 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD040.mail.protection.outlook.com (10.173.161.136) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.56.11 via Frontend Transport; Thu, 28 Sep 2017 12:19:58 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8SCJ72J008785; Thu, 28 Sep 2017 05:19:56 -0700 From: Shreyansh Jain To: CC: , Date: Thu, 28 Sep 2017 17:59:46 +0530 Message-ID: <20170928123000.1711-27-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170928123000.1711-1-shreyansh.jain@nxp.com> References: <20170928113344.12248-1-shreyansh.jain@nxp.com> <20170928123000.1711-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131510747988118118; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(7966004)(376002)(346002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(498600001)(68736007)(5003940100001)(8656003)(85426001)(54906003)(16586007)(4326008)(316002)(104016004)(86362001)(5660300001)(50986999)(76176999)(8676002)(33646002)(6666003)(50226002)(356003)(47776003)(189998001)(97736004)(81156014)(305945005)(53936002)(6916009)(2950100002)(8936002)(50466002)(81166006)(48376002)(36756003)(77096006)(105606002)(2906002)(1076002)(106466001)(2351001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2702; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD040; 1:nWV7KglXdkPdfKfNyEY+CyaR0Y1lbYg5pm50v2xWnv4hPtBkDrsu+oLWiUxF5yw9z3oj99yVSbaFro5OC9gCXPlWQv8daSLqQPW6MIx7sSn5yewZ0w17Fn6eSF5+FxP6 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aaaf2ce6-250f-4069-e905-08d5066b3c6e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:MWHPR03MB2702; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2702; 3:zWjv2Eruvdc1KJ2ov7PIJaxKMy17cTTO1AGysqSMfh8UVZZUrBmRLXwg3WXLXsoc2S/GZr1uLTKK13AdEbcUaf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8kGM9eflkQIIGLt8Dc3JYPUJf/3yx/1HgqURpmoLa7reR8R9du/AnGAyFdOBQLxpyur0BIWCx+NUe3NSZtgYLB+EZWqwSr6IGtK1ZE/r3iY1LDYxbr+aohYA8q/GMRUbfgY2jDrfqW24t3tVMKob4G5pxRmPxLoLtgqU= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123556025)(20161123565025)(20161123563025)(20161123559100)(20161123561025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR03MB2702; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR03MB2702; X-Forefront-PRVS: 0444EB1997 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2702; 23:C3UQs0PScJXGGCGBSD4aWRZgPS8M8iFnRLozXvKnP?= =?us-ascii?Q?keeWU6MmaviyAIHZKrWRA5q7PyszYQXdil/10nUia1ea1xroHpWGYrqNmPf1?= =?us-ascii?Q?0l057fwARrSmJPnu4OGNPruyJ6KKmYcwy5W6ha65kuU8NwyguenBQnniMLXh?= =?us-ascii?Q?b8RKYD9xdCeTw9ANxjOsNmEj6QXeHh6KeuV+hQToQkSS2hOr9AjY8fpvi+0/?= =?us-ascii?Q?Tpbam2AnyYnY9Yqfwv8lzaP9jbVHTVqyzISGhKQtQSu2zWL2sZtDUiSG5zuR?= =?us-ascii?Q?fhRa8E4dNEPzhJX0pGZF6PfrcymnWgCPNBq8WztKC/DeCCfrDw+6x2YumHV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mPza+H8Z?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2702; 6:f99QF0fSmef9O/FAjT9093rzcMcUdIuPrJPzYxJHyQPcxNEBDjWr6Nid+TuJQT1Ly53mjOn6fssIoLO4uHBHT5UpwqBlbQ1H2OIkxpNECRPfiM+tJCzqE1EtwMzCagg+sVccUAfj7Nup7hOOs2VW2X+W2rGWbyazuKpYdmAOlqQb043CzDHNWL6wLIyjYG6bPvuoRO+Oz3NPKvoK4Mhaq/RJWciqbMOgEGKwakCmwgJiebtp91CHT5s1H4QCbdtrwqaNYqKSjbr+yTccgWGi/3cMH7eeFkERAFJBzJdBcg7ODe+ihpm2mTWUdWGQYmn6DLSFg0kU+umZTuPJ7ExcIg==; 5:MFiVV6dMDs8oteZDd4NWhCipJQUKeL5QiLmLmXj4jHPg6Hx23jMO4BShJ2hi22eSTb3frYr+GeDOsGgKyjXK/iMDCytFQ7tbmUXCkVHg005W0Pejn4sIb18gRQAUaweK0cWII3xpnPJ4mKTJaoOJCw==; 24:HnoEpxDIsK8QgLXhOiAvJ2WsUE5fr0P3LYe9zOjPeSct+ieNdyIcx0gdebVB/aE0va8xYFzAasGzZmdUC2sQwDn2iOINkjzbUmBdS8s69n8=; 7:MAg76ZR+hfohlF996MH7fD0tO2maYep24ZFPAHpyjvC2ToxPX7wIK2BbPajmIYnFmgZqF6KGDONTVM0JNvG11KWy7SA3cCTW7+ml2s7CaKKOS0lINPG5TcWt3plTOnnYa5D/ZFEbMRdytvXb4FuABfPnkYc1CDMwnIqX92nUwcQXs9XCZWaz+17oEmV/k6CKqq5d+38sGcUvKoM6ezbn1Eqg/P/ydMqO74ElG5ShJ+8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 12:19:58.6402 (UTC) 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: MWHPR03MB2702 Subject: [dpdk-dev] [PATCH v6 26/40] net/dpaa: support jumbo frames 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: Thu, 28 Sep 2017 12:20:01 -0000 Signed-off-by: Hemant Agrawal Signed-off-by: Shreyansh Jain --- doc/guides/nics/features/dpaa.ini | 1 + drivers/net/dpaa/dpaa_ethdev.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/guides/nics/features/dpaa.ini b/doc/guides/nics/features/dpaa.ini index 59ef23d..e62812c 100644 --- a/doc/guides/nics/features/dpaa.ini +++ b/doc/guides/nics/features/dpaa.ini @@ -4,6 +4,7 @@ ; Refer to default.ini for the full list of available PMD features. ; [Features] +Jumbo frame = Y MTU update = Y ARMv8 = Y Usage doc = Y diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 4e07661..1f4f372 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -85,9 +85,10 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) if (mtu < ETHER_MIN_MTU) return -EINVAL; if (mtu > ETHER_MAX_LEN) - return -1; + dev->data->dev_conf.rxmode.jumbo_frame = 1; + else + dev->data->dev_conf.rxmode.jumbo_frame = 0; - dev->data->dev_conf.rxmode.jumbo_frame = 0; dev->data->dev_conf.rxmode.max_rx_pkt_len = mtu; fman_if_set_maxfrm(dpaa_intf->fif, mtu); @@ -100,6 +101,14 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev __rte_unused) { PMD_INIT_FUNC_TRACE(); + if (dev->data->dev_conf.rxmode.jumbo_frame == 1) { + if (dev->data->dev_conf.rxmode.max_rx_pkt_len <= + DPAA_MAX_RX_PKT_LEN) + return dpaa_mtu_set(dev, + dev->data->dev_conf.rxmode.max_rx_pkt_len); + else + return -1; + } return 0; } -- 2.9.3