From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0055.outbound.protection.outlook.com [104.47.34.55]) by dpdk.org (Postfix) with ESMTP id 6505D1B19B for ; Thu, 28 Sep 2017 14:19:58 +0200 (CEST) Received: from BLUPR0301CA0041.namprd03.prod.outlook.com (10.162.113.179) by MWHPR03MB2703.namprd03.prod.outlook.com (10.168.207.137) 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 12:19:57 +0000 Received: from BL2FFO11FD043.protection.gbl (2a01:111:f400:7c09::132) by BLUPR0301CA0041.outlook.office365.com (2a01:111:e400:5259::51) 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 12:19:56 +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 BL2FFO11FD043.mail.protection.outlook.com (10.173.161.139) 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 12:19:56 +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 v8SCJ72I008785; Thu, 28 Sep 2017 05:19:55 -0700 From: Shreyansh Jain To: CC: , Date: Thu, 28 Sep 2017 17:59:45 +0530 Message-ID: <20170928123000.1711-26-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170928123000.1711-1-shreyansh.jain@nxp.com> References: <20170928113344.12248-1-shreyansh.jain@nxp.com> <20170928123000.1711-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131510747968899324; (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)(376002)(39380400002)(346002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(498600001)(1076002)(54906003)(50226002)(68736007)(2906002)(106466001)(2351001)(15650500001)(36756003)(305945005)(33646002)(5003940100001)(316002)(8656003)(5660300001)(85426001)(8936002)(16586007)(86362001)(48376002)(50986999)(76176999)(6666003)(104016004)(81166006)(50466002)(81156014)(77096006)(53936002)(47776003)(2950100002)(6916009)(105606002)(189998001)(97736004)(8676002)(356003)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2703; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD043; 1:77IfA/TvEx4/IPZoJymL4SlsvEe48K/TJm388EaX7I7m0HZ/3ml3MG7DjkQVy7FJ4+4Hm7PP2Jqjbd4xJkpL/VEdg5XETNNjlHa7ZbHLIUIhG+P8TAezqEyXnZcvFzUa MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c9d4c1f1-4537-450a-08fc-08d5066b3b4c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:MWHPR03MB2703; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2703; 3:Wa05jHiBOrynDG3RKr1gx8zW7T69Y3E6O3l+/tLtf88AXcPMNcWDhWhbP5gJXiXLuAj22hImDQ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3Ht5T+29z02OT/iULsvHKYSrANqtJPTe8UUvm7XwfHTMLgqMiaTzujtkZQuyvC19fpxkFP3PrHciSC86RIgQSqnEha9L+oikf9g7gUSHciF6FUDwiajW/VqStAcKyBiLyCPpfUX8ExGXEwowJ/+m8GRPV44AcxwfXRw0+soAw= 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)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123561025)(20161123563025)(20161123559100)(20161123565025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123556025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR03MB2703; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR03MB2703; X-Forefront-PRVS: 0444EB1997 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2703; 23:KN3Kgj/GXUxvrEqbQRs4ka3PrgN2F0AWvSoe7iVbq?= =?us-ascii?Q?mLE0eiWMVovLnUNsxBUG4WdQWJjuD1z7qZfXxt/RVMLZ3b7+bvrf6e9A37UU?= =?us-ascii?Q?4Km8oVc2mmC+Qm+f2bMrmeHxFusyaVDhEtBVgxISvR8PeqLGOEP+XD8Gw2ZA?= =?us-ascii?Q?E4tsgzjJS29UkWRfXpyF+XqmDa6goE8E/iXLk0oiHIZ49X0EZPWb8tDNcTds?= =?us-ascii?Q?wptoL0sYb3Un3z/qjJES6iW1LVlLCX7yS97aomL+Lm3j/SSyLdb5k6//Jbm1?= =?us-ascii?Q?dm9xGDSMLHNqo0wb/igQtMRkX+H23imuM8j+axXsE4xaKmmtTxwVfmJ4NAem?= =?us-ascii?Q?/S1W5rG3McxAanwvsW26x0b1PG3JEAX5wEKbIXTPpUQ8Yi0+gorgT+L9WgqC?= =?us-ascii?Q?O1BTkFB2OhqtAy1rQA2qCl/CFHFu+TEyZ3O7TQzBHoKDQY4V079P32ipMXqH?= =?us-ascii?Q?YDIE8cNER7L7RJv9YrvwBh3DZYJT9fRVBnpx+zVxiNMr4jXE4chhLrjPTCna?= =?us-ascii?Q?DKSXG9fZdbcYVWJAC5aHK47mTToq2peXecWA8AGjXBXoAhZafwdKXbTkWUmI?= =?us-ascii?Q?SAakTVlYy5HPIYkkrhIVJosbWdb14VnHYbF7vZevGuHG8A+xzslIR+TEmtns?= =?us-ascii?Q?Wx5Bl2NDT+iLDCRXNYufy4aGQt1OVu4If0QG5eje4MpWLisgKAbfzP+29UDV?= =?us-ascii?Q?2MLd7myay3CGmy4WPidjafBuNRbCUgbS/nCajY21+g5hnhwDsIy7l7BkBFI1?= =?us-ascii?Q?qmAP/DbeazCC5kha5HbqWj3BiZgHzXO0vM9lW5uueCoPCTMekCe+IazK0oDz?= =?us-ascii?Q?+pqUIl0rgUbgxzHFa2hAWPi/d2z4e1PNtTWHQv/Lh5ckozfhx6gqoI3aB9E8?= =?us-ascii?Q?hQ4Beoo390wIelFijmRutXEbEzuDwR6LoMG1dEZQGMD+6rMgeh13qpsxkato?= =?us-ascii?Q?TmDconCO442BvMP8k32Xpkx/NfrVLZiDli/VWQWv13Le8p/0wBuJq1enH6oV?= =?us-ascii?Q?iKQHl9McKFgrK3F/rewELS/HDytTmp8FvTIaGPgLQu0IQGVZCk/1BT+CBmyA?= =?us-ascii?Q?fcIyguIyiCcN76dtOa8FO3HkfhnHYVyrd3S7nxBxg/uNo30iFsiAdC7WUWJh?= =?us-ascii?Q?YY/zgp2bRJI2nuTxIgQSuNyGHEmH6sjzu4t2N2Epf0Sc7zB/PiylJKespjNy?= =?us-ascii?Q?FIUSesfFCu8/Zbs1FpJfxAj1mrcMVToxFq196fYeBKnVD1tGf2ibi9Amg=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2703; 6:Xo46mf2L3M8axntocp3w6lpQ/y2ims/tTWRT1cdvCzS5a+aPYtKimiMdV58lADuZlFMiUju6uXV1L7bBR1Fq5dZYVaFk8dQFx+TOHNGN/KhodraiHhszvjHQtEENsGF0K2vi8L412BVSMStdhZReeLmZTEI37OpynmliEanheXM/PgkLp6Ac3Wgxw8cQOBHnNUUGdp1iUBDBph/1eJJVTMuUVX5+/z0BYVmLRvzTlqsmjXAPLafm9GH7agAwGp62t5MOCDv1wyzW1mQJAOfSv5QG64PynqUHIWUaQtWTIs04nmtG37USp/y1Nb8W0TAJ/YNyc2n//LYQyw+DcQwNwg==; 5:/Q9sXRFPQ5aJxb0wvPzNPfHz+uNBtfKN62Hov/vvTkOtaE9RFuAZZZbmtI5D3IfjMAUhFPq2soMZd1ytZhqNNvXTGmJvdDd/DVtxRcZ3s5cwxpENRsmF5S3CBu3k0hqub8IuNd0hXWXDiJd3RWssaQ==; 24:0m69QdeuiSRo71L+X/W6vPg60QP5BUhYPrHg73SJ4ICkobAJR1m0Bmgj2ZAdpPmrEoZEN52pfESxn/V4CTap70VLBtAznDblDCtj7lYYuQg=; 7:Jp/bsgg1iI5beVkiSsCmBqJ6yKCJJpilnjqQH0F/0oxyp5pVGXes1T6KssYGZ9N5cXo0eEqF3cU1o8H0sR7n0b9xSpr6q7k2P69qOfmn/YFwCSEm+s2Wkhup7VuN+GIqxqiodvAQlx6kwkkT9/kV8e1IPjR7qgNC2UzfibMyT9ObPlBYWsvowfc11RqxVVgTc49E463IuJ4jN7QanFI1CMJPt7cqrN+zsEgNSCBTD3c= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 12:19:56.7339 (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: MWHPR03MB2703 Subject: [dpdk-dev] [PATCH v6 25/40] net/dpaa: support 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: Thu, 28 Sep 2017 12:19:59 -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 4996daa..4e07661 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