From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0083.outbound.protection.outlook.com [104.47.32.83]) by dpdk.org (Postfix) with ESMTP id 6110E7D06 for ; Fri, 8 Dec 2017 06:22:46 +0100 (CET) Received: from BN3PR03CA0066.namprd03.prod.outlook.com (10.167.1.154) by CO2PR03MB2359.namprd03.prod.outlook.com (10.166.93.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Fri, 8 Dec 2017 05:22:44 +0000 Received: from BN1BFFO11FD045.protection.gbl (2a01:111:f400:7c10::1:125) by BN3PR03CA0066.outlook.office365.com (2a01:111:e400:7a4d::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:44 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BN1BFFO11FD045.mail.protection.outlook.com (10.58.145.0) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:41 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vB85MKGg013022; Thu, 7 Dec 2017 22:22:41 -0700 From: Hemant Agrawal To: CC: , , Ashish Jain Date: Fri, 8 Dec 2017 10:51:22 +0530 Message-ID: <1512710487-32388-10-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841618209096; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(39860400002)(39380400002)(346002)(376002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(2950100002)(2351001)(5660300001)(97736004)(104016004)(2906002)(36756003)(6916009)(4326008)(51416003)(76176011)(105606002)(86362001)(6666003)(85426001)(33646002)(106466001)(575784001)(8656006)(498600001)(50466002)(81156014)(81166006)(8936002)(296002)(16586007)(68736007)(8676002)(54906003)(77096006)(305945005)(48376002)(53936002)(356003)(50226002)(47776003)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2359; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD045; 1:Xe/Bm98sXq7oDM3DOe0QBazwMoo6Tzq0Mpf9feoS4JL9ACKZVIuozKoRqlcOJbnADOkIZSpxCtCg5Ium+QdIFF2dAdyED88SFTV58aK+rdqzhxzEppiGm8UAfe53ExSA MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c32f23f-ac63-4e3f-e948-08d53dfbb48f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:CO2PR03MB2359; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2359; 3:AB7OEgUF5EyUv7Gv4F/S9pqrYHShEZeCdoYxIYkhCSgNOF6Mh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uWGw2IourSkynwTXbYG+Q/94/d8/us7qhtm2U1Bc7qGrbw/nFxX1j7IMPOcDRaGCBo0bnvQPfNcB4FBpGRRPRCNfVztxpiEC45VSH0BbXya7BrD5rv+oBvh5vpr/Inxn6N5CSxgKKY8klTe/VZjXZccB4Gc7R3k5X5FW+QTHb6xNf6rrLSEVkZbcHDoIO7E6OvrwTgmttbcyiYAqV4oLGDulULZCOKmMShfLC7/ylKkYBu/l+h7GelG377WuIHbFlqicvSQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(10201501046)(3231022)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123563025)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123556025)(20161123565025)(20161123561025)(201708071742011); SRVR:CO2PR03MB2359; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CO2PR03MB2359; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2359; 23:8t879DngogvL1cVDkBo4kbe4XYhMm+ZzgzLs3tdGV?= =?us-ascii?Q?A3SIMDW5d+j4VnRuxoVwq4IiLNOxkGwogRKzhBvMfZjZu887vsSfOD4nAAv6?= =?us-ascii?Q?s88NOtbxDcWCHHyGon+/6+c42+Bcc4iwGW25XlhsxXhtSkAb6u/xqvZg7eB+?= =?us-ascii?Q?fC3FVHH1jDfSeTc3QD34cy1xz9f4uKEQopvdsR8EQRa+BYqtw5Dq63AlpNC0?= =?us-ascii?Q?dSKQuBObxZ5xNB7vLWXwJnXVyYBzRThU8QW/OMY0hXxVIcCjjBdc5i/QSFJh?= =?us-ascii?Q?5LwjWj9dMY6g2FZ3gtYhGaxihdJEN0VmhXEYlhXMyjaSSKwil4gb7cqROigW?= =?us-ascii?Q?2wAZv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hCrFDwMRwFN1DbR5V87jkzGiqAWQ+ckq32UfO5cr+TtUE6FNx04nDq8dFAyOXeJtDGEgFg4T9pLqv68HMh+FgNOqDimQiROgapBQMmtJaXCIvIDaPsB1TJfBKst0V7le0DhYKX67GDYev8J0mMmQYZxsLqrICGkPErY8UhBNnwnkitKY4HGp/H1J9wsKkCBhLgeLO2/CQxoIkeyw8bAK2hXA+J17tg6Duw5Vw6dHzANF+/MFsdcV1P+7aCG5xvBeuMowGfsUJUKjoaUxE9kX8LETle3hLGzoDZIwrUEDyiypJiORaDw/xYU6gyA54=; 5:OJJpVaJ5Jo/0oX5Y+cQcSlI4YjQT/pYO/bLhGV1qsmAADNxKQBpJDrBtesqYCJM/wqyd3zT41cL4bgOvT9cKpN+6tLSiDNkXly8yZGD7N7ucmFy7RPVJH0cR6c3dh9iuA+2pTpxSKGeij8ipgdEUA1GwC07WKBu/mWJHni+vYNc=; 24:xAwPO3TOmY3XcOTU4unRwZyobhWBh9OS0ANVL0uKZq7BS7dT4acwB+FzR4GzkKjo64uRychf399RBla3gURCb9yAPPSkHtG66OFQC7dais8=; 7:NGdZzB2eaHqYucgxsoJtncZVr1Ih1RgshJXNqYMjElHslohMnNuVnxeLtyLmbpNl3hutFDnTdm49OvXP2GRVbEG8oaA1cLPVHt7xLnNOD2Tr4featFQe6LMLZYZPVDZdplSnjr5vdxtxcDsUOrLxRmMw0aBvhADBqE6awdJ7QzBvtMfSEGdfDWpqxsOr37HUrEjxC5f06QZeXzFhM5BMvaEgBXfsd8XQBybPhonJrOSBGKu7HHRhaSFWwcel8Ues SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:41.6493 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c32f23f-ac63-4e3f-e948-08d53dfbb48f 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: CO2PR03MB2359 Subject: [dpdk-dev] [PATCH 09/14] net/dpaa2: align the frame size in MTU set 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: Fri, 08 Dec 2017 05:22:46 -0000 From: Ashish Jain Setting correct frame size in dpaa2_dev_mtu_set api call. Also correcting the correct max frame size setting in hardware while dev_configure for jumbo frames Signed-off-by: Ashish Jain --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 4 ++-- drivers/net/dpaa2/dpaa2_ethdev.c | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index a432b6f..9f9ce0b 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -53,8 +53,8 @@ #define SVR_LS2088A 0x87090000 #define SVR_LX2160A 0x87360000 -#ifndef ETH_VLAN_HLEN -#define ETH_VLAN_HLEN 4 /** < Vlan Header Length */ +#ifndef VLAN_TAG_SIZE +#define VLAN_TAG_SIZE 4 /** < Vlan Header Length */ #endif #define MAX_TX_RING_SLOTS 8 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 3e89d8d..894c60e 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -347,8 +347,8 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev) if (eth_conf->rxmode.jumbo_frame == 1) { if (eth_conf->rxmode.max_rx_pkt_len <= DPAA2_MAX_RX_PKT_LEN) { - ret = dpaa2_dev_mtu_set(dev, - eth_conf->rxmode.max_rx_pkt_len); + ret = dpni_set_max_frame_length(dpni, CMD_PRI_LOW, + priv->token, eth_conf->rxmode.max_rx_pkt_len); if (ret) { PMD_INIT_LOG(ERR, "unable to set mtu. check config\n"); @@ -1000,7 +1000,8 @@ dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) int ret; struct dpaa2_dev_priv *priv = dev->data->dev_private; struct fsl_mc_io *dpni = (struct fsl_mc_io *)priv->hw; - uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; + uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + + VLAN_TAG_SIZE; PMD_INIT_FUNC_TRACE(); @@ -1018,11 +1019,13 @@ dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) else dev->data->dev_conf.rxmode.jumbo_frame = 0; + dev->data->dev_conf.rxmode.max_rx_pkt_len = frame_size; + /* Set the Max Rx frame length as 'mtu' + * Maximum Ethernet header length */ ret = dpni_set_max_frame_length(dpni, CMD_PRI_LOW, priv->token, - mtu + ETH_VLAN_HLEN); + frame_size); if (ret) { PMD_DRV_LOG(ERR, "setting the max frame length failed"); return -1; -- 2.7.4