From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0048.outbound.protection.outlook.com [104.47.37.48]) by dpdk.org (Postfix) with ESMTP id 35A031AFE8 for ; Thu, 28 Sep 2017 13:23:54 +0200 (CEST) Received: from MWHPR03CA0052.namprd03.prod.outlook.com (10.174.173.169) by BN3PR03MB2354.namprd03.prod.outlook.com (10.166.74.149) 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 11:23:53 +0000 Received: from BN1BFFO11FD003.protection.gbl (2a01:111:f400:7c10::1:175) by MWHPR03CA0052.outlook.office365.com (2603:10b6:301:3b::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11 via Frontend Transport; Thu, 28 Sep 2017 11:23:53 +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 BN1BFFO11FD003.mail.protection.outlook.com (10.58.144.66) 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 11:23:52 +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 v8SBMpG2016035; Thu, 28 Sep 2017 04:23:50 -0700 From: Shreyansh Jain To: CC: , Date: Thu, 28 Sep 2017 17:03:30 +0530 Message-ID: <20170928113344.12248-27-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170928113344.12248-1-shreyansh.jain@nxp.com> References: <20170909112132.13936-1-shreyansh.jain@nxp.com> <20170928113344.12248-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131510714330224352; (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)(7966004)(336005)(39380400002)(346002)(39860400002)(376002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(33646002)(81166006)(97736004)(81156014)(77096006)(2351001)(16586007)(316002)(86362001)(575784001)(356003)(53936002)(8676002)(5660300001)(2906002)(54906003)(5003940100001)(104016004)(6916009)(2950100002)(6666003)(305945005)(85426001)(50226002)(76176999)(8936002)(68736007)(50986999)(106466001)(4326008)(105606002)(1076002)(47776003)(189998001)(498600001)(8656003)(48376002)(50466002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2354; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD003; 1:+SwIVskMGpUpvP+a8xySIfkriZfl54V58eX7JTl3mRATcxoAnPVPr6MS4dmpS+LfwlqWLAIAj/QFu5iGdC2+dhyUjpxP0h5lO4vtDXfpOE4bgiy8BIzZ/Bc3TVHVPd1T MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: af523a68-9e6b-47fc-96e0-08d506636646 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:BN3PR03MB2354; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2354; 3:hIf3XZEJ+8mQAlkmu/TKTyx0s7+PkkhggM0ot6Oh08oA8AnJsHUBEdKd2ztHX1qjxgLnN+p+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1f62a5hZz39+hXNqAmcM8uRDQegOlfFkbBzjBoVAb7hcOH9KV6BeYKN07ckhJ//Q+FrHgA+oUcZ8t7zAYbIvt6YxkHWQlQFGIzuUDwbockFRimYxFSTr2qKi4DvCW5ek0zJPwARyYLrLaXo4uhKxtxePhnA/YeKE52YAC0= 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)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123565025)(20161123559100)(20161123556025)(20161123563025)(20161123561025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR03MB2354; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR03MB2354; X-Forefront-PRVS: 0444EB1997 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2354; 23:++Ym2Sw5FdUzOcoQWOXa0+gQly9Ff6bw5PjGY0/q+?= =?us-ascii?Q?Ay0/eWBy7EkJk4c09YEYFkt+z+PhfbGmOISyqrvvqTqbYuNPrlhBcmIlV/P6?= =?us-ascii?Q?3wTg93rVwZozTZcevaxpRiE23aRbc51ZgP5Z2e++JUZrfWlHIscWeLHb8vAh?= =?us-ascii?Q?84El3+8I8B7nXonoR7kn0+O1U8l38a0GRkyxDCk5lddMIG1NJWJYgMKuUcLQ?= =?us-ascii?Q?1xGmikpNcE587Jtak7R/BacQKrUIrKwsXq5O4Vu8W9mWwoC74E1G4IvYG1/x?= =?us-ascii?Q?K2iZZm45CdualdEFWske6c7kRcu+ahuzZ4FLGHGC3d9U8rl3YXIlC7mE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kw7fQQnGBGchuBI9X6yDLd+pfCA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2354; 6:Zg9tPMetQFMXUAvKNIYHm6ezUFitr7Ak43UjiHD7O5++sat1INVVuZyZ0Vf5nJZwg8XE8viuU96Aw4S1xTCFWZ08NlS6EetAL+E2wnf+DT77h1JylouORVRX8W/SYcyTWUvb+Rn0DUtDBEvrBWJpzn6hFLbJThaET0ruwjmcVMtl08KdSq0EieWDbuDG+cfPsyLhFu+7lidtw+TX/gau/hShULK3tlYPhabxOVWsa2ihvlmyaXL3v8J0lQqY9nzYlXLanH8JCmFqZ5kM4TTMdPusWuNk3dHyT6JuZ8kDTb8lKErhnWhtyfEORqNovUgEwY1WGsnLZgW1XMqdg3G2sA==; 5:7nBsRh0+aWqu4LeZqHZTZMfVNUbvYAMqtxMf4wbIHQvVQmAKgF48zD3gUITzCHndiJtwO9kaO6RsGxjKpwiSdRAHjoYv0XJR9SMDJirczYD8q1Ircult9rv1IpnyScwx0gRHY0xPKsHCDdDJLv0I5A==; 24:Xc+HyJNj+FbtHKA0xWZt9f+Khmz44GYSMV4aghHmnL/GEvrqs4EVN8bXdi4E1gMfuQe6tupoIFOn4bDSht+Mm3rb3cbnJiOsGEupPT39MNI=; 7:QYeOsAgXOEtXvW5G3pfZc+HZyJ2yX4caYLYwdMl/6qucNCbCY7XaCrNYOeKaATSen7dBoC4k+kiQOTKdDLTpgoqq+rGH/lOl0+88kLSt8L9zzXOoAtpctjGeozUo1r8s9ENRiu1oUFSBA+HQA7GjgbWVpMbvsJmZ0X6T0+1pD31Me7CcKmu7CW90BgIRDLXeQfVDRNUA7rSmNSZWkMDgd9ESyny78YTT1MeKn6bP5cU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 11:23:52.8508 (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: BN3PR03MB2354 Subject: [dpdk-dev] [PATCH v5 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 11:23:55 -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 ad0a092..c013a84 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