From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0087.outbound.protection.outlook.com [104.47.37.87]) by dpdk.org (Postfix) with ESMTP id B7B8C99A0 for ; Wed, 23 Aug 2017 16:03:20 +0200 (CEST) Received: from BN6PR03CA0056.namprd03.prod.outlook.com (10.173.137.18) by DM5PR03MB3323.namprd03.prod.outlook.com (10.174.241.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1362.18; Wed, 23 Aug 2017 14:03:19 +0000 Received: from BL2FFO11OLC012.protection.gbl (2a01:111:f400:7c09::194) by BN6PR03CA0056.outlook.office365.com (2603:10b6:404:4c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9 via Frontend Transport; Wed, 23 Aug 2017 14:03:18 +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 BL2FFO11OLC012.mail.protection.outlook.com (10.173.160.159) 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:18 +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 v7NE2Q3C004389; Wed, 23 Aug 2017 07:03:16 -0700 From: Shreyansh Jain To: CC: , Date: Wed, 23 Aug 2017 19:41:59 +0530 Message-ID: <20170823141213.25476-27-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: 131479705988963525; (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)(1110001)(1109001)(339900001)(199003)(189002)(105606002)(6916009)(2950100002)(106466001)(2351001)(36756003)(8676002)(356003)(50466002)(5660300001)(48376002)(6666003)(33646002)(1076002)(189998001)(498600001)(97736004)(47776003)(4326008)(81156014)(81166006)(104016004)(77096006)(86362001)(8656003)(305945005)(110136004)(626005)(76176999)(54906002)(8936002)(50986999)(53936002)(68736007)(5003940100001)(15650500001)(50226002)(85426001)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB3323; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC012; 1:Ja8RLVBlHT2lyctDRbh/QARWcy4He9svzn7bal+NyUCHl1X0tyoWjxl+eN3nOqPru58eryCkhA/UeR7M+5XwFjOHL8uLvQihjVBZDRZ49E7kSQZE3Og5vgA9y1VGXl8R MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 81b041b2-72d2-470e-bb68-08d4ea2fb519 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM5PR03MB3323; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03M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A/sTSUs3tBmPQlgB2xdo7e3eBDIwYXf+lqjY8oeheZYFjINhaNNE+dAMB/2lgA3ecHxLJR2mj6weznNVKwbE3ZszLkW8JQFZ3G3ioLm90eNTkGk3xVE0Bqvgi8edUBlrZ5ve04LOJtL/SoD7MWQ2nzjDP565WW9Sjp/NgE/S0OQTiFGpTJtdKKlEuHqfHD1iJqAbUs8C575US7QljBIGmth0ReZ6uRitDWvrjg0bUJ5YJTU3zUn8= 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)(13018025)(8121501046)(5005006)(13016025)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123561025)(20161123559100)(20161123563025)(20161123556025)(20161123565025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB3323; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB3323; X-Forefront-PRVS: 040866B734 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB3323; 23:PKRsLfT/l0IfGDXAcL27n1d/Fs0Q2fnCA+OoJlUVK?= =?us-ascii?Q?SA3PqnD9IZq4fkdXYxUc54iuxJG+Dk/d8nUaUiFxQIe5ndY9hJgSHrFkQiCL?= =?us-ascii?Q?Y/SP7fPEliSztYgP2EXP/UTEpka4veE+QoOHMveFgRgGgSRQk1nWy505Uiug?= =?us-ascii?Q?l/PJ+OqpW9gX1NTv4jhVTx+I3zfJk6B/nvCMiwjOXtYF8QxzUGJZTeGByXII?= =?us-ascii?Q?c9J+QDlADjEaEVwgopi4UGGQwMMubrT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3FVS99PCm8qbmP4D7RwnBtc+tPV4nHzkUXekEjkCRumi6GLhCKeGjpOXP41?= =?us-ascii?Q?jZt+qqTgiqAUQ4=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3323; 6:hLsyOenWSXYGArBbSR9mCcASShVi10NXNZHcJqqh4YRDYwLJhpCj9aCgBqxBi7JSG6+OvAztZO0bNsIKQvpuRUpXbRf6RIAMVH39Hd1ipA1H9zaAdjllMxMapqbpRmGShODavfCuD8TwHnf+L3vodRA9vFfrKKWT8tUHcW0czI93j2EtEdb/Xn120FtDJJbQrBtVQSu+eEHrx0V0ja7OJ0q9xbEtlbvSnUGyt0jX33BJrUe1AFMBW0D+nMxcTQChfivMERQfor7xFUUFfFE/UU+uXQVqrk/uJD+/HI+jJR8Tp5ddgOTg3APXbM+qfc4qeiIVqZpvB1VsahvrLiliug==; 5:pxyFgU1oEFKJB3O84tPdlDgA1Ac99Th+CXggroz+PXl4iFcBHAr+DmwNljKf4GVDlYl1E40KnBm2u43lWVclVXRmrAf2/uQ9jL45VD1VlVTa/NeRPl1zlst0lL5hGyHRiYYGjXD7HEdBbZJbliwF9w==; 24:SUmB++hAd8UC7zq+ubKHIe+WcjG59XK6aR6OFUAUIg7oT6ELL8f5jNpAtfIPFDGja80CxvJNyP94sfpeJ1w6VWoXE8WXRBcUSv+ij/GJ2cY=; 7:oF5J70l1bUH6fnLnklh4Q/vGDgezuL8pL1uiZ0giOhFuSDwDOsOSX7r5u2zpLv2AdQIFJLkNoG3Rl+gnxo+UIBq8jvUQIV5j6Vhxq7Bkg796Yjfp8pQ1xmIfaCELpfy6EoIPfbkZNiswZDQvKyL1ILo/dBrFtrf/OKh2BYbDsdlyezMgb8c+A56z5mZ3ClIZCSOy6QTcD5XJeZRxQD8czyQN5kUYlUXxgv2XxnSVR20= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2017 14:03:18.5687 (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: DM5PR03MB3323 Subject: [dpdk-dev] [PATCH v3 26/40] net/dpaa: add support for MTU update 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:21 -0000 Signed-off-by: Hemant Agrawal Signed-off-by: Shreyansh Jain --- doc/guides/nics/features/dpaa.ini | 1 + drivers/net/dpaa/dpaa_ethdev.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/doc/guides/nics/features/dpaa.ini b/doc/guides/nics/features/dpaa.ini index 9e8befc..59ef23d 100644 --- a/doc/guides/nics/features/dpaa.ini +++ b/doc/guides/nics/features/dpaa.ini @@ -4,5 +4,6 @@ ; Refer to default.ini for the full list of available PMD features. ; [Features] +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 ab19b2e..ad3eaac 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -76,6 +76,26 @@ static int is_global_init; static int +dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) +{ + struct dpaa_if *dpaa_intf = dev->data->dev_private; + + PMD_INIT_FUNC_TRACE(); + + if (mtu < ETHER_MIN_MTU) + return -EINVAL; + if (mtu > ETHER_MAX_LEN) + return -1; + + 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); + + return 0; +} + +static int dpaa_eth_dev_configure(struct rte_eth_dev *dev __rte_unused) { PMD_INIT_FUNC_TRACE(); @@ -197,6 +217,7 @@ static struct eth_dev_ops dpaa_devops = { .tx_queue_setup = dpaa_eth_tx_queue_setup, .rx_queue_release = dpaa_eth_rx_queue_release, .tx_queue_release = dpaa_eth_tx_queue_release, + .mtu_set = dpaa_mtu_set, }; /* Initialise an Rx FQ */ -- 2.9.3