From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0085.outbound.protection.outlook.com [104.47.37.85]) by dpdk.org (Postfix) with ESMTP id 15FFBFA41 for ; Sun, 4 Dec 2016 13:44:48 +0100 (CET) Received: from BN6PR03CA0041.namprd03.prod.outlook.com (10.175.124.27) by DM2PR0301MB0752.namprd03.prod.outlook.com (10.160.97.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.8; Sun, 4 Dec 2016 12:44:38 +0000 Received: from BL2FFO11OLC014.protection.gbl (2a01:111:f400:7c09::172) by BN6PR03CA0041.outlook.office365.com (2603:10b6:404:10c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9 via Frontend Transport; Sun, 4 Dec 2016 12:44:37 +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;nxp.com; dkim=none (message not signed) header.d=none; 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 BL2FFO11OLC014.mail.protection.outlook.com (10.173.160.144) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.734.4 via Frontend Transport; Sun, 4 Dec 2016 12:44:37 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:728; Count:10 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uB4ChXbR032240; Sun, 4 Dec 2016 05:44:34 -0700 From: Hemant Agrawal To: CC: , , , Hemant Agrawal Date: Sun, 4 Dec 2016 23:47:19 +0530 Message-ID: <1480875447-23680-25-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1480875447-23680-1-git-send-email-hemant.agrawal@nxp.com> References: <1480875447-23680-1-git-send-email-hemant.agrawal@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131253290773082195; (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)(7916002)(2980300002)(1109001)(1110001)(339900001)(336004)(199003)(189002)(68736007)(39450400002)(33646002)(2906002)(39410400001)(7846002)(39380400001)(5003940100001)(8666005)(92566002)(305945005)(356003)(104016004)(50986999)(36756003)(47776003)(76176999)(2950100002)(8936002)(110136003)(105606002)(81166006)(50466002)(48376002)(6916009)(38730400001)(50226002)(8676002)(85426001)(6666003)(86362001)(5660300001)(4326007)(97736004)(189998001)(39400400001)(81156014)(106466001)(626004)(77096006)(2351001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0752; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC014; 1:6vez+zAch6aAZvWzH8BGtrWoz56mX2O/9/Srh/Pl/2p5Zus8XteUgfsXH9lxVhhYLPxhvw4bnzixfwRCslB6UHCMTHZTwTTb2YC6Bu/5wUv3uy1TOmucajC6M+ME5U/zAGoY+5II6NyxXLjDD9+Za8bvf3Qe/dyXtfeic6CVlzzlJnD/nyHGCGCViQ7IIMpeiN7QFJTXXpyqMTioPCkiaInxXi5EYJP5EVmDsLHZa3JZHk4xiP1YbaRbS1TYJWH5LkJn16g6SUE7ELwmvVmxJPH98JUvOU1+hjlEVJ4efvB33o6u6kow6rttyiUKqoE4LM4XKLbc643tpip4ov0XuBVlRSKt+BqPirdW6v/dLodPoJYsb1JL7GvVKDo2hADJqABCbp55z57DJ6qA+JS8G7Q+CbNRoRij9e/EW8XujeZdX4otdkkJ4+4y068uAieTju9R1/DlHxlHrz/yE3lSlBNBK5AqG9fVjjQj7YSTk7mdhZ1i0LNrjS0bm3zFELo5vgjjaT71evFkGMOP/ne0oj+XN6JYcx99G+epUJVnj6d8SU9cLIZ5ekEMENF8HFV1K2DFpoBJZ9t74YJxkMs1UuKGiq+u2OgpR7bRYIMNMEXNZSl/0jHdIRSsNBR3BPtXQU+IqN7Fy8CRsvcR+wSwa5y6ScVQExakPw16yrxW5f6Zq+nlH2AWPtEgI8F4boLchvs+qXzbzVY75yyZ0VuyqF4nSHxowbQNy3xDA88ugFOfA+lQmTRCaMQUhFvkWAP3Gk3yt6OakC68ayAJaEUmQA== MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0752; 2:UYR4qURun2YwzrOXQzfkrYC7fYy6ozae7+AyNS4Xkk+zfNJXSLMP0CtPKDAjM5UcetyqyRfuy5GFWaZQbfnk3a8+PUFw6RmIEDJ/gURuIhX/Z8ydlWHr509ilX22EYR8HYi5s3GTDPuZJpzKxTMPpmOyM+hlfkzZEUuyACm7jYU=; 3:HX/kvFsP9zlFFx1XaJ+xkrfCjUx7j7aTEo6JVGhLJXIVcHkS5uqK7/yEFTCM//idD3HQlo+/xNBGOTSSRbgBl7cGchpQMNAeuXO2QbJn6I+GgZiHanXTpFjvCAoJlfZ0QAB/Fl/+f6Om/HiMskxOlwYtfPS+M7QhvFkgG9Hei+I77a/P+aplGFNWGfKmRwErGb34Hxm88oUCzptYlGq11N/Az8HEsDqMT2UEgvmQdqin0Z1kUBLuPQwN7B98zk4QDRCY6L5G12f00n3LqVWazg== X-MS-Office365-Filtering-Correlation-Id: 221eac56-0b1f-4b33-7053-08d41c434e98 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0;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KhfL2kwkCWmXteS59eVm47DhSHVEeLNVlQfwnIjmu83Dspo3ixIGGO+yEDAGgM3ICLHX+IFgGrBXI0IswYOen3+QoEavyQzE8cZMmrW/n86eE8ZQMjQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13023025)(13024025)(13015025)(13017025)(13018025)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6096035)(20161123559025)(20161123556025)(20161123563025)(20161123561025)(20161123565025); SRVR:DM2PR0301MB0752; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB0752; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0752; 4:WOsavuj0cNBrhP+3x2pL7NEHEiluxaEDfQ/jc1klbBX76cdy9QXyy+psxBbKGdYFZ8UOn3lwU4Z+E2JNvJiC7F6SNv4c618c7i1kT5wUjvPwtGqBU2WwHg2EL7/++ndyr+bhGr9KYJbfM/7KgLKum+c1kDZrxmQ1+XPW5IvpYgYNAYdeSudX4kfZDD5Ur3YyrPvdG5wpEee7Zs1SKPESPo/InTmbSEVjNWlq7ofMAVvxczr8P8HEOYQgBdxgFpvfJsUg1omlCD11F+ezQjApJ6CDONzlNNIb9Qra+eowHBw0QgEglGTpy3NnNTMfJH41/yBJty0PORTlBnRONKrWUyXD39VogYqTWIoV1dfsohbAxcq24u1v59snP6DVXjtYBbvIOVqa4XdMhLsskJmWwRPkJcYSX3H+SE/2S/16X5jwY7u/uJfXGe4fBMZDtW7GcxBY8ffb/HmvH5d/CyG3rgi2uH5SKYKwaH2PSB/h0WK2t5ggPPid8qgW7R9YmSK+hlGK3kVivBOGEl9gPhLUAtM8b6xGYmQ6QuvnZ/9fDr4wOm9UY7yXneA1/+DQfnEzjgf9s8gED8Ye4flzvBTGKDAK8VsXWL/5e/vinGs4ud3gkkEsloJeFQ2+Xbq0+elQ38J7INepWaWXWF5xx3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EV+JC1Qb6965qc5ApJFP8Ac+gqi0GjLusPCoPbavkTaqTKwVg8uGk9CE4x5SBxk+au4YW4Z4b6l/Czl6WTZoFycQ55HLOIWJYmU+MBgFZb9HrK5kZOObtwcg5NFPUQKstNJsBo9/8cZhXhydd6pvtf; 24:EhA7tRuByD0CU+7J7wWBHssQ2XDkukIaEjxCKUy8wto+3Pw4YvVDTsL8ARpZaqdNUDEitH4KN+TStPx/WOKAnxMAmE0cEp2UgkRokwadCiM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0752; 7:3rM+oil7g7S3jJpzuWsqTUkIHV0CnvMWZ8g8oIKds/b9kZoFMezwkVlM9Y1kfZZgZ6qT6qH8SyLgkqrsoALCOL+bLhe2ubJJ7kKChtzNgvT6uh/UV8A4InWtQg6KawBQtkMLk3KziNlZXjH33RnTwtcYdn7RNj+/8BhbFMegG/z6cC0SRh9z+D2wHpxDQZzuZKAlAQxM7ohs1kjaybT6p/Uuzw514xWN6DB154pTePHZndtjSIHsuIvl4+OwzPeguCFdWlkqfQ4+4QlzZl/MP4GNzKk9HZH94g924kF44Ah0q+fz1UTYFzisW8zZr/jUksTgPSWzd2RrEUWyEI9xQwGfUtRW0Dxnzmj2fCrZccY= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2016 12:44:37.1366 (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: DM2PR0301MB0752 Subject: [dpdk-dev] [PATCH 24/32] net/dpaa2: add support for l3 and l4 checksum offload 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: Sun, 04 Dec 2016 12:44:49 -0000 Signed-off-by: Hemant Agrawal --- doc/guides/nics/features/dpaa2.ini | 2 + drivers/net/dpaa2/base/dpaa2_hw_pvt.h | 6 +++ drivers/net/dpaa2/dpaa2_ethdev.c | 71 +++++++++++++++++++++++++++++++++-- 3 files changed, 76 insertions(+), 3 deletions(-) diff --git a/doc/guides/nics/features/dpaa2.ini b/doc/guides/nics/features/dpaa2.ini index 20152a0..d50c62e 100644 --- a/doc/guides/nics/features/dpaa2.ini +++ b/doc/guides/nics/features/dpaa2.ini @@ -6,6 +6,8 @@ [Features] Queue start/stop = Y RSS hash = Y +L3 checksum offload = Y +L4 checksum offload = Y Linux VFIO = Y ARMv8 = Y Usage doc = Y diff --git a/drivers/net/dpaa2/base/dpaa2_hw_pvt.h b/drivers/net/dpaa2/base/dpaa2_hw_pvt.h index 7e34ea8..a4959a1 100644 --- a/drivers/net/dpaa2/base/dpaa2_hw_pvt.h +++ b/drivers/net/dpaa2/base/dpaa2_hw_pvt.h @@ -37,6 +37,12 @@ #include #include +#ifndef false +#define false 0 +#endif +#ifndef true +#define true 1 +#endif #define DPAA2_DQRR_RING_SIZE 16 /** min_rx_bufsize = DPAA2_MIN_RX_BUF_SIZE; dev_info->max_rx_queues = (uint16_t)priv->nb_rx_queues; dev_info->max_tx_queues = (uint16_t)priv->nb_tx_queues; + dev_info->rx_offload_capa = + DEV_RX_OFFLOAD_IPV4_CKSUM | + DEV_RX_OFFLOAD_UDP_CKSUM | + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM; + dev_info->tx_offload_capa = + DEV_TX_OFFLOAD_IPV4_CKSUM | + DEV_TX_OFFLOAD_UDP_CKSUM | + DEV_TX_OFFLOAD_TCP_CKSUM | + DEV_TX_OFFLOAD_SCTP_CKSUM | + DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM; dev_info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_2_5G | ETH_LINK_SPEED_10G; @@ -256,8 +267,13 @@ memset(&tx_conf_cfg, 0, sizeof(struct dpni_queue)); memset(&tx_flow_cfg, 0, sizeof(struct dpni_queue)); - tc_id = 0; - flow_id = tx_queue_id; + if (priv->num_tc == 1) { + tc_id = 0; + flow_id = tx_queue_id % priv->num_dist_per_tc[tc_id]; + } else { + tc_id = tx_queue_id; + flow_id = 0; + } ret = dpni_set_queue(dpni, CMD_PRI_LOW, priv->token, DPNI_QUEUE_TX, tc_id, flow_id, options, &tx_flow_cfg); @@ -306,6 +322,7 @@ struct dpaa2_dev_priv *priv = data->dev_private; struct fsl_mc_io *dpni = (struct fsl_mc_io *)priv->hw; struct dpni_queue cfg; + struct dpni_error_cfg err_cfg; uint16_t qdid; struct dpni_queue_id qid; struct dpaa2_queue *dpaa2_q; @@ -341,6 +358,48 @@ dpaa2_q->fqid = qid.fqid; } + ret = dpni_set_offload(dpni, CMD_PRI_LOW, priv->token, + DPNI_OFF_RX_L3_CSUM, true); + if (ret) { + PMD_INIT_LOG(ERR, "Error to set RX l3 csum:Error = %d\n", ret); + return ret; + } + + ret = dpni_set_offload(dpni, CMD_PRI_LOW, priv->token, + DPNI_OFF_RX_L4_CSUM, true); + if (ret) { + PMD_INIT_LOG(ERR, "Error to get RX l4 csum:Error = %d\n", ret); + return ret; + } + + ret = dpni_set_offload(dpni, CMD_PRI_LOW, priv->token, + DPNI_OFF_TX_L3_CSUM, true); + if (ret) { + PMD_INIT_LOG(ERR, "Error to set TX l3 csum:Error = %d\n", ret); + return ret; + } + + ret = dpni_set_offload(dpni, CMD_PRI_LOW, priv->token, + DPNI_OFF_TX_L4_CSUM, true); + if (ret) { + PMD_INIT_LOG(ERR, "Error to get TX l4 csum:Error = %d\n", ret); + return ret; + } + + /*checksum errors, send them to normal path and set it in annotation */ + err_cfg.errors = DPNI_ERROR_L3CE | DPNI_ERROR_L4CE; + + err_cfg.error_action = DPNI_ERROR_ACTION_CONTINUE; + err_cfg.set_frame_annotation = true; + + ret = dpni_set_errors_behavior(dpni, CMD_PRI_LOW, + priv->token, &err_cfg); + if (ret) { + PMD_INIT_LOG(ERR, "Error to dpni_set_errors_behavior:" + "code = %d\n", ret); + return ret; + } + return 0; } @@ -457,7 +516,13 @@ */ priv->nb_rx_queues = priv->num_dist_per_tc[DPAA2_DEF_TC]; - priv->nb_tx_queues = attr.num_queues; + if (attr.num_tcs == 1) + priv->nb_tx_queues = attr.num_queues; + else + priv->nb_tx_queues = attr.num_tcs; + + PMD_INIT_LOG(DEBUG, "num_tc %d", priv->num_tc); + PMD_INIT_LOG(DEBUG, "nb_rx_queues %d", priv->nb_rx_queues); eth_dev->data->nb_rx_queues = priv->nb_rx_queues; eth_dev->data->nb_tx_queues = priv->nb_tx_queues; -- 1.9.1