From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0063.outbound.protection.outlook.com [104.47.40.63]) by dpdk.org (Postfix) with ESMTP id 668F499B5 for ; Wed, 23 Aug 2017 16:03:23 +0200 (CEST) Received: from BLUPR0301CA0040.namprd03.prod.outlook.com (10.162.113.178) by CY4PR03MB3317.namprd03.prod.outlook.com (10.171.246.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1362.18; Wed, 23 Aug 2017 14:03:22 +0000 Received: from BY2FFO11FD017.protection.gbl (2a01:111:f400:7c0c::127) by BLUPR0301CA0040.outlook.office365.com (2a01:111:e400:5259::50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1362.18 via Frontend Transport; Wed, 23 Aug 2017 14:03:21 +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 BY2FFO11FD017.mail.protection.outlook.com (10.1.14.105) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1341.15 via Frontend Transport; Wed, 23 Aug 2017 14:03:20 +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 v7NE2Q3D004389; Wed, 23 Aug 2017 07:03:18 -0700 From: Shreyansh Jain To: CC: , Date: Wed, 23 Aug 2017 19:42:00 +0530 Message-ID: <20170823141213.25476-28-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170823141213.25476-1-shreyansh.jain@nxp.com> References: <1499179471-19145-1-git-send-email-shreyansh.jain@nxp.com> <20170823141213.25476-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131479706005153705; (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)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(2950100002)(8676002)(106466001)(575784001)(86362001)(104016004)(189998001)(76176999)(50986999)(8936002)(105606002)(6666003)(50226002)(81156014)(5660300001)(6916009)(47776003)(48376002)(33646002)(498600001)(36756003)(81166006)(8656003)(2351001)(1076002)(50466002)(110136004)(626005)(53936002)(54906002)(356003)(4326008)(77096006)(97736004)(68736007)(5003940100001)(85426001)(305945005)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB3317; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD017; 1:O/gUYPt7HwNTQ8LGSwvnjiL5k+L1Qm36kIRqbN8HhxcjZsotu6Yj2KG4dp9Xq++bC4aPuo2HMh06yUQ1sxJLZ9mdDCsWl9oU3N9DpxJf+Gor6Pdvec5GkoUgluqejUao MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 546c78d0-294f-4c17-27a9-08d4ea2fb613 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603185)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY4PR03MB3317; X-Microsoft-Exchange-Diagnostics: 1; CY4P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QXeVgXJ4OBFquOmwb+dElOO6lJCl0MvDaVLBVQR0A2H199vuDR2rCSG2ndqj7cwzU1KkTLcF1WAlh/2+mR2GvtRlfwy3GnZSXo8nt0ECwTrVWkaScMD3qo/G/6RM8t/wd5iQ6b3pkpM6gXbfRSqQkCaf8elqMqN33NJOW4hpLixdwM941vzuKwIzYTLz0qQf+1hRTcfJpDiyC4teDnhehKDENYDXQBSNLdQEkObxC9eK2r5OPig= 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)(601004)(2401047)(8121501046)(13016025)(13018025)(5005006)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123561025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123559100)(20161123565025)(20161123556025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB3317; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB3317; X-Forefront-PRVS: 040866B734 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB3317; 23:re19u8sczB8389gfMaf+GEBPdLST1uoOt8q2T4qay?= =?us-ascii?Q?hbCVeNrrzypdLN51p9ZB2aDE0y5d5AwhjORYf4IXoinMQIk6oW1uZyl/9TAX?= =?us-ascii?Q?A83aPTV/R5b12rMP4UVItdPx6TRHVqQJEyT3leVtgcNJGSsubofyMSkinRkp?= =?us-ascii?Q?WE0Rwvn4u2KhiIXmdsJ1vE0JDwWoN2g2z3ZdtBvsZv7Ccer74C585i9AvyaC?= =?us-ascii?Q?LgCMjDJD5i2V27AxOvKptgM35OE0DxNk4gf6fUTPcNPqqubDeh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8zlPy3bc0i0OcR3glDdABdVGX6cclJdMRzGFdnkAzb2hl9khtTH?= =?us-ascii?Q?l/mwERMtUQPwvU=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB3317; 6:ts7UKWt0KZhOsotWVSrppwKKs54vqXWHVkwdtHKh+f/zQcZhtlDvrENVaxMqls2gMVArH3/fVsZZ021g8JlpsjNJmPb9ApMX7EDaZHWQEhcRBIVleV1zdh0mZJJUV33jtR7IfujktNL0RUCN024Uv8o+jJuSCypIBe8CF1RDH0ysjZsujXzMSsf/Xu74J3W8OGtF3f7wm77A/Qcd8TF9WlIzAvfpVYR7RFTjuTkD6bEoGqIAAPgEbLt2KRVojwqb4Aj6bNgMHAI+IH7ihUek0uswP0nSsJeScxBbohDR2pkhIlIS8M0dv1Z3Ho9a2zhdSl5OKjBkuAURFsx9SRwQqQ==; 5:hsohVb1RB9xoVD7IhwhHtrrE7noluVo9MZWuLO5niygxUpussocjpcoYN1PxSQsJCP6N4HYIM8aF6wJCjpHHYxck/XnOYNR5/M9aW3KfdvNZeKq0sklf080PyTSiabU5cFJ8t8L5MQBjjDkba0uZkQ==; 24:GwDI3Im43UZY6Hw6tEQGskzhM4Lp2TZ/VfLKuEJQnZOd8pN044CNHqeudnsfo7Bav+eWS5/q7F2lfkG0fvVSAEllg1Pxm3H9pHZgSnltv0E=; 7:2GdAmLjtSapaF3376+YhXnFBftSxpDOBOERxZrahOUHW/5DUhjOR2fDuWpZ76uCwjC2MMzyG3+7QVsqJ6DccXd3ZCtF2PRsHcDY78jombPOepT9YjDdp9jQg88Q2KHnVS1nY/4w4uoIZaXtdcelNF9+8p3iKvL/IC1imfeDN2PYQoPyd9snbR7GvCyPmUomqqlxJwQiLRBRcCm5Nk8yhFBj20PIF5rqFHAJQW4So+M8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2017 14:03:20.0785 (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: CY4PR03MB3317 Subject: [dpdk-dev] [PATCH v3 27/40] net/dpaa: add support for 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: Wed, 23 Aug 2017 14:03:24 -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 ad3eaac..d0bab36 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