From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0062.outbound.protection.outlook.com [104.47.41.62]) by dpdk.org (Postfix) with ESMTP id 9B09B1B1C2 for ; Thu, 28 Sep 2017 13:23:51 +0200 (CEST) Received: from BN3PR03CA0058.namprd03.prod.outlook.com (2a01:111:e400:7a4d::18) by SN2PR03MB2367.namprd03.prod.outlook.com (2603:10b6:804:e::18) 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:50 +0000 Received: from BN1BFFO11FD009.protection.gbl (2a01:111:f400:7c10::1:112) by BN3PR03CA0058.outlook.office365.com (2a01:111:e400:7a4d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Thu, 28 Sep 2017 11:23:50 +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 BN1BFFO11FD009.mail.protection.outlook.com (10.58.144.72) 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:50 +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 v8SBMpG1016035; Thu, 28 Sep 2017 04:23:48 -0700 From: Shreyansh Jain To: CC: , Date: Thu, 28 Sep 2017 17:03:29 +0530 Message-ID: <20170928113344.12248-26-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: 131510714305986222; (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)(346002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(54906003)(2950100002)(97736004)(1076002)(2906002)(305945005)(77096006)(48376002)(50466002)(356003)(8656003)(2351001)(105606002)(4326008)(36756003)(5660300001)(106466001)(498600001)(47776003)(85426001)(6916009)(76176999)(6666003)(33646002)(81166006)(8936002)(8676002)(81156014)(5003940100001)(104016004)(50986999)(15650500001)(68736007)(316002)(53936002)(50226002)(189998001)(86362001)(575784001)(16586007); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2367; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD009; 1:fvlEVqLWONraE0ftd2/lSBQyUmobTP/LjdBEMS+yJY85U7bQlrV8M4vBY8Z8rU1tSzPNgrHZ6J4cAhSmjM45MEBvw79siwQpWYykwcSUxqiYgdbAWGIOpKJ4y6bFlR3L MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4290fec3-3b0e-4e15-5d4d-08d5066364d2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:SN2PR03MB2367; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2367; 3:YDGoZMc7orKG8L0oXYuiyyl7h9ckLD0FdFdWp5RUJlEUgM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h1TrdUjxAGB8x9DDFKYHQoxXdkZh5SkHDlnT0iP1Glt/WhTUAfB6XxC1e8JPW1F3B7RVcxCyD9FpsAr/MAd9vsxgVNn3y0PY3Db/2Xd5+fMoFOwvUuyPicbeWpqtv3OfMXcAG9HZd8LODExx5zdDgbF/JL0m39qfLckPRfTJ9apTM4M7CI1QT5jH3sCX/SOgq9WAc= 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)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(20161123556025)(20161123561025)(20161123563025)(20161123559100)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR03MB2367; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR03MB2367; X-Forefront-PRVS: 0444EB1997 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2367; 23:KckfBnw3P6dRJtQj0ZFRdq+5NAEMM8J5u48V2t3wf?= =?us-ascii?Q?XirEOR6Wpzi0mRjUJfdrWxZ2LX1D0nHQ0CCbDJO+NEOeHH+kn9t9LvRKwoY2?= =?us-ascii?Q?eqsMsUrYejiOOBf4ikZATvueZxMr5CbJo5CnsHZ6sLAi/8scuS6CCC8OJQBH?= =?us-ascii?Q?QCWmSIIgUz9EJ1ATsg/8+R2pzvzo/aphCRJlvp2RLrOUa+PKFGQHw1v18Mzo?= =?us-ascii?Q?9I9PchENnHR6C4cE/f3bH6zUZF8DeTjTt7g+WxnQnPKIda9bxXXu6w9Ogdku?= =?us-ascii?Q?xdQ8LDU96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alTime: 28 Sep 2017 11:23:50.4114 (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: SN2PR03MB2367 Subject: [dpdk-dev] [PATCH v5 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 11:23:52 -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 2db7d99..ad0a092 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