From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0079.outbound.protection.outlook.com [104.47.34.79]) by dpdk.org (Postfix) with ESMTP id 85A2D1B22C for ; Sat, 9 Sep 2017 13:11:26 +0200 (CEST) Received: from BN6PR03CA0055.namprd03.prod.outlook.com (10.173.137.17) by DM5PR03MB3321.namprd03.prod.outlook.com (10.174.241.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Sat, 9 Sep 2017 11:11:25 +0000 Received: from BL2FFO11OLC015.protection.gbl (2a01:111:f400:7c09::187) by BN6PR03CA0055.outlook.office365.com (2603:10b6:404:4c::17) 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; Sat, 9 Sep 2017 11:11:25 +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 BL2FFO11OLC015.mail.protection.outlook.com (10.173.160.81) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Sat, 9 Sep 2017 11:11:23 +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 v89BAUhR026326; Sat, 9 Sep 2017 04:11:21 -0700 From: Shreyansh Jain To: CC: , Date: Sat, 9 Sep 2017 16:51:18 +0530 Message-ID: <20170909112132.13936-28-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170909112132.13936-1-shreyansh.jain@nxp.com> References: <20170823141213.25476-1-shreyansh.jain@nxp.com> <20170909112132.13936-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131494290846796531; (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)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(48376002)(50466002)(6916009)(2950100002)(97736004)(54906002)(8656003)(77096006)(110136004)(2906002)(53936002)(498600001)(2351001)(104016004)(85426001)(5003940100001)(36756003)(6666003)(189998001)(33646002)(5660300001)(8936002)(50986999)(81166006)(81156014)(76176999)(105606002)(106466001)(1076002)(47776003)(305945005)(68736007)(50226002)(86362001)(575784001)(8676002)(356003)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB3321; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC015; 1:HnvX62qHtZBigyzN71gvse2Ph53N4d5nfuleDAlK4x0zg6dVqaOheKnFq9Uxwt170HvDlYNhh5Fj8IVv0aMqXdXrxrMhdPRxmuWiPvNLOk/y/n95oNrVnzVKC5d8xGY5 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9a307640-a605-4bae-e996-08d4f773825e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM5PR03MB3321; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3321; 3:5J934hgonXBAABz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IgPcOQu6Mc/lht0mHleWkTI4huahI3JIq4Iu1j/B5qPKpbF16Bblo1rJpzB6AdXxUo/xSUxuFpkxZgiwZA+mdt4WyXYdfI3vQo8Gy5Qoe1caFWTswQ/p+bvCE1I2AwYEUkhnZmmNVuBZ+DCaenNicoUfDx3riaG6apNoxI5fZqvl+AxR6//ClnVdKWYi0zr7XuqnpHGStAlpu/ynRG/VKT5iEPm3CBSNe55N/cnBQs= 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)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123565025)(20161123559100)(20161123556025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123561025)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB3321; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB3321; X-Forefront-PRVS: 0425A67DEF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB3321; 23:MQfgXNTzW29bofhuRv+max576nVdsNtvt9uJdwmOS?= =?us-ascii?Q?PlwwUtFELiImkG9v8a1t0yDp1BBNrG2JT55jrbJ0DnhD/ZxW81bK1zpWR6cz?= =?us-ascii?Q?+1i4sWnHtVwfub3JJFLKAAWklqvyAXD6jm9kNUQvCRv63uNFKWBewhuGXeNt?= =?us-ascii?Q?PGGPJZqgD1AfT4zJy2dzyTjSEU841qXqMOn1qQhpWU+3iZoVF3yAYQVAu1Mt?= =?us-ascii?Q?FVWrQUVNrZm7J6Iq9VPLyLBz447xicwnnDEoASXEcMs858FhoAQPs1A7pE/M?=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Q7WfHSOE/eFkuyofETsdQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3321; 6:bDIaRfqTIDRNh6MLhRPMFK0VbwBF7iz5HR8fa9p7bB8nk/9v5qUhZ0OWGdaUFwMbF81edp5ddVzDcZh3/hCjxPUwhyhon5ndcpdYVZ40EDLFQvzVrFGk6r3LdwK1Q/5FO3VuHT4L2olN+2+cc6TPz8U5Vs1zsZfyhY16y3wy7acxHkwsH0zekQsbvrsX63YQSfnprvPFr7Zxw1miXmX4b+rl3vSn52KCN6mVEsfNH2LSxKGJyNq3Lkq9gEPLnSQj583WZMdRePEMj+TWJJ82HMcZbMO7KIXq5xfmxlDXuQtAyxiEGg2zZJjzHsSM8/ZruJABogzSENS2BZM55mMj9w==; 5:M6aMqYV2GRQnBoGvDpA9QvUyyvsCFRMjCEIsYLXWE9cv1SV+rbQH3h7mEuMHw+zP2US64uTfOD5clFo4KjYDTkhVZVpBD61ywTs2D6icB8BZTiFJC9F0eXM9t5Ee/k2jG2kA0shgVbgd3r18pwYVew==; 24:vBSVm8R4nxwnlhA2oRi5UqfFAY142huVmCtfc3VAMFAffLyyWprYa9k/onDigg+cECL4pberWdQua3u05j8SWw3cLN89Ibt/J1kpqQLzbzQ=; 7:xu2Qzk3gUl8jBih5dv9NKPs8FkaEvOYPt8J8TY4ZQd6o9di1cVtxe50+i4DzO7oV7SXkBbGTvUhUNvBKusaQPQ2b/MHrJaatm1OEJfhUGoesP+bfLjLj1YPWvZLtA4Ikjv4TN2+GFSZW4WGENWNgFzNl+4CaTmf4IlZD9Pt0O7VU0mnikpUPulwn7oaWGfRTTcvn8NdJdsU3WFXgx7bthmTCdOL7p0cXdkXmcS/AcWo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2017 11:11:23.4472 (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: DM5PR03MB3321 Subject: [dpdk-dev] [PATCH v4 27/41] 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: Sat, 09 Sep 2017 11:11:27 -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