From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0059.outbound.protection.outlook.com [104.47.36.59]) by dpdk.org (Postfix) with ESMTP id 5B74C1B251 for ; Sat, 9 Sep 2017 13:11:24 +0200 (CEST) Received: from BN3PR03CA0104.namprd03.prod.outlook.com (10.174.66.22) by CO2PR03MB2261.namprd03.prod.outlook.com (10.166.92.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:23 +0000 Received: from BY2FFO11OLC013.protection.gbl (2a01:111:f400:7c0c::131) by BN3PR03CA0104.outlook.office365.com (2603:10b6:400:4::22) 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:22 +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 BY2FFO11OLC013.mail.protection.outlook.com (10.1.15.25) 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:21 +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 v89BAUhQ026326; Sat, 9 Sep 2017 04:11:19 -0700 From: Shreyansh Jain To: CC: , Date: Sat, 9 Sep 2017 16:51:17 +0530 Message-ID: <20170909112132.13936-27-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: 131494290820967716; (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)(1109001)(1110001)(339900001)(189002)(199003)(36756003)(47776003)(68736007)(81156014)(110136004)(1076002)(54906002)(50466002)(8936002)(48376002)(81166006)(85426001)(86362001)(50226002)(8676002)(53936002)(15650500001)(97736004)(5003940100001)(356003)(104016004)(50986999)(76176999)(498600001)(189998001)(106466001)(77096006)(2906002)(5660300001)(6916009)(2950100002)(305945005)(2351001)(105606002)(8656003)(33646002)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2261; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC013; 1:oFvW5vPxXctR//jD3ZF8ZJr35kdxIlxoFftpNNuH9zZwpeNbouKLUTIkiCn49VAJ2RHie+P4rcoOhQi/0cfsnOAQrRZxpsKIhzi++U6E0oJnAcrc65zzTfigHTY8TO5e MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a98b987c-749a-440c-cbc7-08d4f77380d4 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:CO2PR03MB2261; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2261; 3:75FHpGFXIq6Q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0Lb4Je7qkT5Il14w83L09nLGvy106t87KUryYUVduZ9Zy47abtmT2n+YmJvet0n5DA/aSeXc+W1jwp1HbUUapYU/Kj/daWpjmaYCBgRmtm2mnCjGg2drO6GdbumIeyoMhp6FKiePAUgV92gcXW23mrWjwSF9dQS0+Ci8LvZndzDfRLTHPzGhkS97wGDF4RixQdKSYf2rDLXznyePg8sfbfUxwRavARMtbaylWHZtmQIxTp3ioMHW/+PA= 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)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123556025)(20161123563025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR03MB2261; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR03MB2261; X-Forefront-PRVS: 0425A67DEF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2261; 23:uVcaLX1D09TXC3rdXGJooCoxYpwuDcDlLDRxmj8p2?= =?us-ascii?Q?Dj3fKnqk4tph1SQ0gNMtH0Mcl/BkgGAGO47794FzfihWiLl2az/e74JbJYJQ?= =?us-ascii?Q?QDKcOaaFuq6kkIXkta8f25phRemno7XlFFjyLcsbLhS7xGX3wwX1ur+Dptdp?= =?us-ascii?Q?2JEVMAcevnh7HAAVt5B1qI2Vm6yVKgY7RBRA74usLDGG6JOovAEei1aVCVni?= =?us-ascii?Q?MjwcE5+P7UHAqG8ZmeY3NnKS8IvMlay3SAlEzrEckw1WogDCOAx6cis1E1W3?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fs3?= X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2261; 6:MD2LU4F8mmTQ2CAeDfwDkcI9neN1k4+26MpyMNGDTWZ7gwb2SJ0R8e/A4Ad8eTQlLSvsXSkBIWdKYIDnWiLjCj2YV9oYMfV4IS1ixtx0/QqGqawKhZuFlJmOqhKjhT6xD64DGR4KoawDaFwns7hGiHau4JqJq8jMWKyeOcHHjIBxyHhhEQFhXwW2Tz6bcQ+eLdeJB1oVYgYMtBQOWwaZt/PPwnVQSPbweYLEYQPdOzqD8OkKS8mUuRl6jw+IWDNFUIhLpmXbBFxz+ZywxKT0ascfUYECRICYgXstpjdnNuokEPBv51nPOv9eHtalHx02/TUVF+kIA40/5BlZgs/0lw==; 5:5+Ffiem7pS6bpymH04S+KQC4tiAda6qq6YD4lH5ZJ+23wuOwl64unKdPD0uz3JWKCuJqkB4I2RaT/iMNDU1BhCWxzREx2qRKQz91Ksj6zUqnMicSiJ0K8KtD4dioSclR+lU7uwCYnsHcS/bAharehg==; 24:Jj1UW8qaryUxydlvRRLFOa6VHlmJhjpAAkW+u1aRCfBWAOLtgCVfYOIG2aRsV/UgUD2rP9OYdr5GhYhHdg36/23iMs1iPg+nqPKz4NVdErM=; 7:Y0vWb16h9Mbm6dltemg7LVUR25jT2PHKupI+RWCsjRTMuXkD8NZ7+Sh53XclaHktaBLcgYivPOSC4CNQjoQlwRwh56FhXXnkBn5HGJ89eeOJHp8U3x6rAgveJ1KyhU0gbNIjPqWZKyvqRQEEfmf/C/R24XDHZML/WPLdNA74iGRgVzR8WjXsCUmGPKlj+xSONhn26M2w/sfAlzFCivW7nXmA8JisP3vSBSiUrR3xrc4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2017 11:11:21.8939 (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: CO2PR03MB2261 Subject: [dpdk-dev] [PATCH v4 26/41] 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: Sat, 09 Sep 2017 11:11:25 -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