From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0052.outbound.protection.outlook.com [104.47.32.52]) by dpdk.org (Postfix) with ESMTP id 5FE05F60E for ; Thu, 29 Dec 2016 06:15:30 +0100 (CET) Received: from DM2PR03CA0022.namprd03.prod.outlook.com (10.141.96.21) by DM5PR03MB2475.namprd03.prod.outlook.com (10.168.233.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.11; Thu, 29 Dec 2016 05:15:28 +0000 Received: from BY2FFO11OLC014.protection.gbl (2a01:111:f400:7c0c::106) by DM2PR03CA0022.outlook.office365.com (2a01:111:e400:2428::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10 via Frontend Transport; Thu, 29 Dec 2016 05:15:28 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11OLC014.mail.protection.outlook.com (10.1.15.48) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.789.10 via Frontend Transport; Thu, 29 Dec 2016 05:15:28 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uBT5DOI4010218; Wed, 28 Dec 2016 22:15:24 -0700 From: Shreyansh Jain To: CC: , , , , , Hemant Agrawal Date: Thu, 29 Dec 2016 10:46:41 +0530 Message-ID: <1482988612-6638-23-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482988612-6638-1-git-send-email-shreyansh.jain@nxp.com> References: <1482180853-18823-1-git-send-email-hemant.agrawal@nxp.com> <1482988612-6638-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131274621286640853; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(7916002)(39380400002)(39860400002)(39400400002)(39410400002)(39450400003)(39850400002)(39840400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(2950100002)(69596002)(5003940100001)(626004)(2351001)(97736004)(6666003)(5660300001)(4326007)(8936002)(50226002)(47776003)(106466001)(77096006)(33646002)(8676002)(48376002)(6916009)(38730400001)(305945005)(50466002)(36756003)(189998001)(92566002)(104016004)(110136003)(105606002)(356003)(86362001)(8656002)(50986999)(85426001)(2906002)(81166006)(81156014)(68736007)(76176999)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2475; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC014; 1:q3eIjeT4doc7GVynXu4gtUHoWFpdK1+2n0S1t6snkkPuvjJcJYVrCNmx5FFUxQyhTGhmO4Yph9/VbS+RbASrLNbDHjoaBoMRa1aOI34A0BASaNagT4QVb78Saj7ot9J3dbMPSUV73YZ5klYJizP8PNs26Rf0XEjQ5VVtGwwPT0JwPFPLklOmRr65xVN6Y9e2yHqVDT1sBruvVKCmLktZhrNZ+N0XXjoERBhca0nvef4xrB1TksN7nF9cDr7K0doy+JhOWx+9CJ15vXFZsNDAidmChMXUOqij9ifDrIk0TVUKEImxkF0UL7JEhSSARIiK4Kdwg6FyAuRv2JAc0PXbV3UrZgyinOyMqoH+iW2tP/U4F/BfNW7jLlhF9dAycljtPCtPYfK0pe/KsawQRCWo4520NfA3rY9TgORdMVi+bbqU5siTnKKZOqZ5Wb2N/I3iJz6znkzvaoklkMGbKD/GFKZCNBAhgkYk7AdffrL8O237GAtbtiWwcTNzx1eTqpPh2gCvmmD1QqIAQNUk5/8F47y4h9icx+C2Ii3MWpqza1Y8w9wkL/hBWS55ONzHF+eT6dxG5/AIUHaeTGv2WHcGZVU4RTOcAgchXF2iayXO52YaaIcvsM74clX72Y+MVf8GU/ZTZiapLhn1syEvR8G374NEtmgJKMfVnEICrFiSoPQcnQ1hBdWzvvEU25GMpDPLnTmIEpnNz0AW7nro8X8ApB58A+OGCY4HPWcH78twHOuDRkQzxAGDkXgPK30n050TvnWa6zJN5yySIBx2KrnHMg== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: f3c17b34-a72d-4da5-0090-08d42fa9b432 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR03MB2475; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2475; 3:GmQxh/TI7Xrjd7i58oGdwriisPAOi7J6933FfGhIWF0GiDY6UhGTO4ODL7/TcbLLEtbaEjSWpuDYhddVenNb78kG9G7W3/p53NohD+50GXn1ozVwjI+wfd1F/4da5ZEx3ShUhdO2h2+uJyBdT7s/mgxQtSZTTfLXnEbadZ6VqOp3Z5VBmJRp1JdfA631uCEKY/xx9tLjpkK/nsj+Legr+TPRgzJHyjLbYDVhvAHuqySiefGBbCVlB7Rf+cHBnhz7Ujs8Hm3Y8oyfOCzk0E3jVYvZmwoFAO/kvHdsfzSTO6eKCu2WfZh/pypdew+voL2U5i97vcE0hfuk1MhT5le5vyG7tb+wQrHAhcX890Vduug=; 25:1Y1FQAnD0PTLL3e8u+6pDQEJd6RAxzSVKX5LqVFRW6xbpLDOmQu/Z/qjDrlenq0FRmBgh10xZIWlrCX/SmqSjoT4h2JsC+Fxr4oS5uUYCfmLlj18EfGFbQvmGodRD3OHOnoJ+rZ9W39ZD39gaM9esJQGafEHB7YF3WExx2hGjoKN630Pfr7NxtGJoi69LBBooMKRxPP6sqixNEPUZZ1b0xlYnbBWGb5uxfRZvLqy5loCDGp87UD/NW99uVWrOER149oHu6+54yGNl1WRTy73OejumglIOi+CPDQTzVSgNeS/m2nHjK/UDHo5GoO7eMtdVwwcQYyfqPa2pu38Nsewe8pjayuI7kaVTUN8EF5s890lrBJGbsYCSWRzndl1jN42AZVxtgUtusr5tSMAQTOWaIkIEvo/B2pAb6ePx/rhUyo9aQoArzIwXRJSyBiZzsRSp4clMzFgBpiVPnXbOoxDWQ== X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2475; 31:TfSR2Ys+k7cUqWw9IoMvB8lvDIf5HYHjm9QyRfEkbVQHmZ2KKyFVOMLOD0JPeBf1Kth3Rt4dW7VJ+4KCs0O+IrZPISWtHmOka+N0h5YSYPwcuFEybb2HtJUeSNqZWgxJR+u/M0LrMp2eQOKf0w9yads48rP6xFly1Fc2ewsQB85qqwj4AwncSpvTtfz1Q3R35BtkOdqwdevJeXDHbAbzaeFyBe7KEvmQvgExJh2VhlE2akt4N11m7ulj3BIlqVuw7WsqemB0TJrB7x12d9CPiNUawRIN/suFsYc0SaiqTmk= 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)(13024025)(13023025)(13015025)(13017025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123565025)(20161123563025); SRVR:DM5PR03MB2475; BCL:0; PCL:0; RULEID:(400006); SRVR:DM5PR03MB2475; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2475; 4:UsDosxhGSl3BrNOZKxBTcGGFkhd+Gu7Wu0xSYLaSVrSmMWBVOu5Z6gNLjAQrnGE89G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: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2475; 7:Yf7kwu/UQQiCKJ9m0MRJEIp6cVIJ0l/yN0BmtO092O2cFVYER5agu7ipGD697eAyX7W6O6PW8rRkI1YhD0rLVSnQ2CZq/BbgJ4lzNQinZyqGvaar3Ri9t7HAEBd8w/fu7k9olTVJ/M5ANgQpUsKdW5qpmD51wvpTBkVAU5Q3ujis2Z8LcSQwQIsjnwkdnr/RzIFgYiOzWdVuDH4o+zimWzqr+paTwAfxpPM4weAn83L4xOsiyOjHjY09wgr0qEEl5sjTOuIJjpIDR/uCnAL2FbD0s2vPsbrttyw+Nhhbvp3yvO0wZEjCE9tlSoc8y9HRlIYwsIEaGPENSjtKdnEYdnYAIgpyR3kDIvFTnj+Sm7P6ig5Fbug/K+GVw/4YPLfwd/dIpBgVVW6Fbjk7RDbuPjCv4ovWZmJuJs/H2imUX82je/tKecpZBSG/GdSQ8dkJLwy+iEQyZRemKSVs5ZKbIQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2016 05:15:28.0088 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2475 Subject: [dpdk-dev] [PATCH v3 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, 29 Dec 2016 05:15:30 -0000 From: Hemant Agrawal 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 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev, 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 @@ dpaa2_dev_start(struct rte_eth_dev *dev) 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_dev_start(struct rte_eth_dev *dev) 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 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev) */ 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; -- 2.7.4