From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0080.outbound.protection.outlook.com [104.47.36.80]) by dpdk.org (Postfix) with ESMTP id B628EFA33 for ; Thu, 19 Jan 2017 14:25:32 +0100 (CET) Received: from BN6PR03CA0034.namprd03.prod.outlook.com (10.175.124.20) by SN1PR0301MB1584.namprd03.prod.outlook.com (10.162.130.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Thu, 19 Jan 2017 13:25:31 +0000 Received: from BN1BFFO11FD017.protection.gbl (2a01:111:f400:7c10::1:107) by BN6PR03CA0034.outlook.office365.com (2603:10b6:404:10c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13 via Frontend Transport; Thu, 19 Jan 2017 13:25:31 +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 BN1BFFO11FD017.mail.protection.outlook.com (10.58.144.80) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.803.8 via Frontend Transport; Thu, 19 Jan 2017 13:25:27 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v0JDO4f0015351; Thu, 19 Jan 2017 06:25:24 -0700 From: Hemant Agrawal To: CC: , , , , , , Hemant Agrawal Date: Thu, 19 Jan 2017 18:53:49 +0530 Message-ID: <1484832240-2048-25-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484832240-2048-1-git-send-email-hemant.agrawal@nxp.com> References: <1484679174-4174-1-git-send-email-hemant.agrawal@nxp.com> <1484832240-2048-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131293059306995971; (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)(336005)(39400400002)(39410400002)(39850400002)(39860400002)(39450400003)(39380400002)(39840400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(86362001)(6916009)(2950100002)(6666003)(356003)(110136003)(77096006)(5660300001)(33646002)(2351001)(305945005)(106466001)(105606002)(189998001)(38730400001)(5003940100001)(54906002)(8656002)(97736004)(36756003)(626004)(50226002)(50466002)(47776003)(104016004)(68736007)(92566002)(53936002)(8676002)(2906002)(81166006)(76176999)(50986999)(85426001)(81156014)(8936002)(48376002)(4326007); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0301MB1584; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD017; 1:LKLpq2tcpeJCg0fYM5Q5rz6bDEuXR8fPax+eJb5CRFxJzwlj3nJCyXHp6DVI7SEycctMfWQ1RuhMDIqDjszew145ZhmKJl9zFoqDQ3SUenzD++/6rVLkE1FSjFA/FLxXYOasYV3SY3JOE3iXlw4K8nQwTOQK/7H87Jegef7Lxsz3Q88xMvjyBkV8BFn3yY5qBsj6h837aoVvOWN64Fo80xVD7ZmQRSe5XTn6Stp/rRcgawgu4w2pJP0WIkubax1FJrZQjkgeMdcTrkjDlwNMtuKE/itH09KHZUZLZRhwS2k0W1ToOHGU2alP3fk7Ei31mgwYS4IWA9Qsgbk0F0yf7hi4/9W0PArE8lX1HMPhhL6WZI5B7RxYFOUVDjYYvCmEQIVVzitwNcTmyb7sZupBccRPS9Or+WhEu2x9io9U3WVuJmjwDZbwjxrEEJzOVm0Lq2h/S14K6RiRr5F2glxjc6nMwR6ck0R8vA1sXseM2GgJl+X08Ne99O/UpgTvT6Yexmfn7RUm6eVf2KP+G3zGo/QBd61zBAjRKHaMpK5A++4ov3dscGDnqagw59/gUoU92oS/WqRNtLEuX3tckoYQe5pGqFtqtqVNsQ9RNFqdl6zlB86ymWFbGYEfzZm3MR32fXchtrzCbruYAn3ijY6CmD3HFXM5Cp1eAChLJtlZL+V141dmt2VFL2OMsYH+IS7eUoGjf7b4VJ3b6eRQyFRRkHyF28aG2W4scxRy++xs+gwdhY3k6+ZXLgindNbuDckn MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 827eb5b9-11b1-4d0f-b60b-08d4406ea3db X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:SN1PR0301MB1584; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1584; 3:M4scqpfrtioPiRTkiKfrW0xlErd3jiNQflnpLMxW0ur90Lg3bXI0L2E6/SxxLeJ42b23Bfzrz3A5fH0RY/euiqnEs9qWZ1CfbEozt0mtb9SErFslcYLNOy+JTuTVBkXYZybHX9E3RqzMlDT4PEZBjnvct1VWr+VKqZAckbbcGco5gZ3DREbrYDcqCZTvSmBIBga+VEEYpIc5Lw3PjE9fcral6Rl6Dy1yoi12qQNJyhBD/YXWTf4BY16pu16CzsxCySJ0OigY8MIAUoyPn+7FSDHkF/27qXIpdDz5jE9oYA9pG4fMMDzJTBwoe1R6lYkki7tFucy962pEh0SxHEeJwy5kdLCGj9X7svEg7wFEHq8yJgWsmcgcupCCJWvf01K0; 25:mbbC1cOGJlulhuQPRYiTnked7M76z1bD//exT4ahLfForcY7kf21TyNPY2e5fO8I96SPxH0ltxRzHfz7twvrS+NJHFaNY2SM2DnEHYRk0Zx8lylbHrofTwY9u2XJkvnqpbtDUBszX1Vc0aafPzZvxOnu3TBFGgt5QXzSw4e+5dDq7c6p1Lqs/N4szrRsUl1w3nrHUql8EDjj1o9tMlrhZzGwVKDzjizdZ2h5l1dUnIiw2uWPQSoK79Em9oKCw6sJhP5XM3xNvFHmxoyf0epDLvvkAzKDr7XokF/Ajwl5ZpsdyDQ7ZFKoFkgqaqPuIzgI/NUn866TgrknReoZzG0bzH/TpROqV0uUYatBtm0xw+HtWm7IQ2nU3mIzMT+uXS9pandtOv7R5ks/4XmLP1pMuhHRoE257X0iSdjl23yM0z00dZImHUmJyyQS5A8M2CtNhPwB5PPxgZGKjIoF27o+eA== X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1584; 31:Dh9FJ9yFkMZIXOQk/8Kbz5FnD+gQSyZlkL1yQ672iYRAaDeZ0dGNbYzRTRW01rpXMjPLRBi4A5AeHtJ6j1W7fUOqAEtnZonEeJZLyw4Ee1l/UjksOqj05f6Inae42pS3CFuMj9mumy/YtdnrIS1DzXIYFX0FoFj+cbi8viwSCZNdMQIGl3SYHEKMlYIdUSQxOuacGt46cKom4IJY1jkupj5Fs/UYQylJSiFyjJOpV9hdC87dNxkiah8kM3jUC08BIgaNAZEifF/EiIcR/E/3Mj6BDuuXYKaLMYc9wJvXHvw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13023025)(13017025)(13015025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025); SRVR:SN1PR0301MB1584; BCL:0; PCL:0; RULEID:(400006); SRVR:SN1PR0301MB1584; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1584; 4:PIg2gwJrUUa4ULrYGdJE6HtozAwEuVvEZZmtt6kD1S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iagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1584; 7:hXKIbisWzVjFW5kgOrnESCIwr13jMwiJneEB4nY9SgGrMmRvrnWwsjHSGwvtH0dPNFn8pjXERcUh0wSqdIyV9kpdIi+d2OBj6OdFGmsF/l7McA7cOGylon+lDcME3IE4DWJURsdaKDCxrULGABHzSDrPE7pvaHfVUDQxFkWaRq1qsEUQ43aekq5jiDqVyINmTWU11Lxhgi6+j+4Oygoy1b42D48cunMgWdYhKZcvW1gRQmEt2bYmo0adwe8VFjTSb1tOXO+t4c4BRMyZvM6C3ixIivbIZZWZqVuu6Jtdm5cPogIPX+c0kRYdjo5muPipl4jKpmXbTCp+86t2bomG5lwXTxuq7FrUEWdXdBmbymcvA2/Q3MxGXX4k79Gy7U0W9VZYtryCTwxj7fTxLnmriqWzx9iYriq4Y7Zzvor1YWrAqaup1s7re7RAhCb/+SCzDk5ZPXTSCLhSdUe4rrNFUg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2017 13:25:27.5484 (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: SN1PR0301MB1584 Subject: [dpdk-dev] [PATCHv5 22/33] 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: Thu, 19 Jan 2017 13:25:33 -0000 Signed-off-by: Hemant Agrawal --- doc/guides/nics/features/dpaa2.ini | 2 + drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 6 +++ drivers/net/dpaa2/dpaa2_ethdev.c | 72 +++++++++++++++++++++++++++++++-- 3 files changed, 76 insertions(+), 4 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/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index b4f243b..71361a4 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/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; @@ -253,8 +263,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); @@ -303,6 +318,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; @@ -338,6 +354,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; } @@ -454,7 +512,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