From patchwork Tue Apr 24 15:06:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 134109 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2352606lji; Tue, 24 Apr 2018 08:08:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx49/XlndnAWvz78N8VmjMFrqTw7Z4glLjof3qdYDjsPvl0sOyPyAqCK6ZYzdH1WPG4o7+Zya X-Received: by 2002:adf:86d2:: with SMTP id 18-v6mr21951474wry.232.1524582537868; Tue, 24 Apr 2018 08:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524582537; cv=none; d=google.com; s=arc-20160816; b=lV+idX9oVRHyOo4n3r4uajhTMpF3SwiBHXNdwYZ5p8RrsqoniXvWh6aXGOac1i3m6X RKMzIR6Ll+iPJpqIKovzOQs4luz3YsnrtQBtRK8LG6GfdSBimRknZSA4bgJCoKkh8i15 MbNePueXb8VivSIoeVun6fOHJTadAyCLEAvEaAjdb1wGZlCr5Y7VvZTNV3jSmH9R10gU gFvKRqyMd08ime8Ykf+HRUZxZvPiiyhiyd919I0U5RL/CticrToPMvuI8cdcOGSazKSC mxutbMkEVUl8548iD8QQCDvWXB1CdaytM0OLmJek+4KupiQsKcrMpXf6idtS0wqPbYgr ogDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=O8eYf/nGeU7dBkIQ0ZYJ9QJyKw20qk+8vZ7SbBVEKN0=; b=VixpMzVgvzqz3/8EsIw++2oFjEeg9eNV99XC66Tyehd27X52VlXNia56MUcleFvgy6 4KRb2r1kd8xPZ9D0r0bL26mnLa9eam/sG3csn9VPVZTXRgRhx7JQ5MI2u0Yhl+KaKmIv GSq60RxYMYKR4OqVPSyDykLd+1RhaJgSp8YS8MwRZs3K3GViayolqTQL36VnkEeLQ5QV oNctJFRun6KSFPWQkfKl1ul5VSTLvoHbupiJqrjyvW8rs9+Ptarf6sPc8FCDncOov1OW V0jQviMOKXjoNY9aZgs9Ek4GU283KVUiwVBdbzumTIgId8Wy0zDpg+M2sPv+wV7QGUhd vUbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=t8WZw+Ho; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id l110-v6si11852696wrc.110.2018.04.24.08.08.57; Tue, 24 Apr 2018 08:08:57 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=t8WZw+Ho; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE91F4C6F; Tue, 24 Apr 2018 17:08:55 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20064.outbound.protection.outlook.com [40.107.2.64]) by dpdk.org (Postfix) with ESMTP id 5DBD449CF for ; Tue, 24 Apr 2018 17:08:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=O8eYf/nGeU7dBkIQ0ZYJ9QJyKw20qk+8vZ7SbBVEKN0=; b=t8WZw+Ho3obiAlUOJTroBUPxfzBSYH6kk0WXCbw3gDNovPfZK60BCA1F6XdcYoadRgrYXubZvPNmH6M+A5SFH5ZtUHRr0uhR90PRrUIbfmCPyKsXkoiqnMLFWGNrqjxSq0aN7NmxVwFhVi60hPfpd8YiNTlXZ07n39X7Qb4jwEM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by DB3PR04MB0764.eurprd04.prod.outlook.com (2a01:111:e400:9440::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.12; Tue, 24 Apr 2018 15:08:49 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, shreyansh.jain@nxp.com, Sunil Kumar Kori Date: Tue, 24 Apr 2018 20:36:40 +0530 Message-Id: <1524582401-14696-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20180411110540.30071-1-sunil.kori@nxp.com> References: <20180411110540.30071-1-sunil.kori@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MA1PR01CA0092.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00::32) To DB3PR04MB0764.eurprd04.prod.outlook.com (2a01:111:e400:9440::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB3PR04MB0764; X-Microsoft-Exchange-Diagnostics: 1; DB3PR04MB0764; 3:cMAXGKDqEHjX8Pf6qcMQFg9YLJXwgNunXQMDd15aCB9y+SYnt72XB/UNc551bvdt5RIBViTtnaujZit9KIhGN1HXUd4R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JnvPJYSTizaEme8yklPh14T7t0UTBHekcsUlzmIQ2PNpigi9KEJpG2UHroBCdC4AvEyviXExShutIExvzbpeA/rUf06IMlRAKe0vpMW0XcpviXmDLgRRJWpx8T0Yh90NkYVDxNVK6lSmDlP6PizRSDFevSfU0/AoIYyOulNjy2QNWEMDltdruaAEe6tGNqfsFsxjvfOc9l5CdCUwxNmXbqfusfV9mE6MvRFekLOiCDAhcR+Y84qaDn0BXTIJXB63Dpekx; 4:7r2y+JPz7+IVrmo3lrf1M0wxUFd3eM8m4eZmXZ7lULttI6ziDaM4VYigwTHEU5rUWEpf/Ms9SioaBxPknLHrCd2wyIUoyQozHg8LcZHenNsRKiSfMGJkJbqIiNIfxrN+6LwBCeFnR4ddOS38VMveQ7IUob4q7CWpP/O5bTV/AIvV8lhm8KIi6EckWyoSLsZOk98oHNdYO+TcivesDZD9BwmIf+Ye4rrXCmzrZccx/ehW8q6K2wSo80IDQABJUKiOH0TZSSdjN4m/yVEaA05LdjkFmCYxbiYz6COVwi/0SRxFudJSC1mOjJfgQgdptakb X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231232)(944501410)(52105095)(10201501046)(6055026)(6041310)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB3PR04MB0764; BCL:0; PCL:0; RULEID:; SRVR:DB3PR04MB0764; X-Forefront-PRVS: 0652EA5565 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(39860400002)(346002)(39380400002)(396003)(189003)(199004)(6512007)(50466002)(2351001)(106356001)(16586007)(8936002)(446003)(478600001)(36756003)(6916009)(186003)(105586002)(55236004)(44832011)(81166006)(8676002)(4326008)(6486002)(48376002)(2361001)(51416003)(76176011)(26005)(59450400001)(53936002)(386003)(86362001)(2906002)(6506007)(52116002)(47776003)(956004)(68736007)(11346002)(7736002)(81156014)(66066001)(486006)(476003)(5660300001)(25786009)(6116002)(6666003)(5009440100003)(305945005)(50226002)(16526019)(3846002)(316002)(97736004)(2616005)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR04MB0764; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB3PR04MB0764; 23:s5FpZYb5EYkBMIe2tcqFkupHozdfpYIKXzhh3iRBr?= +qHlW5ilyVXip0BQwKU1WQZmnIbWj1cTnilPGj2SXUB5oy4+xGYpmoMJF86SUCvMRYK/DjVTLBwaE2ZXsraDSdMoqDXu0q19Xu9hN8nN4PuCzmpJObARJVCA5Msmc3DE3Gwitdx+ebSznL94tALuKQ3NZJJSzWWZ90gFWAEcUc/L8j0K+ON7hrxYPxa/ykWx7qb56GuGHy7V8mkwh8vTg+B7/PptrynNDQ9Yw8uiLbvUy2qtuHbDuqGg8pnrJvN1M+aICcsW1TtkSsfSU3XxbPKo/G72sjjeVe6BOxNT2ch6fH4EzP4Lo6WaHZCowmfY2vHLUNyH8EAo9aUhE+s0oz44M6VrpB7SmBT5y5+26qhBamSy8dxDVc9r1KgcxsNbQ5vzaRHIhOACBf2EMyFRjXF9OzTUM7bT1W/HrMBSTGUUqtNVFQKkFRLTu0D9Ih789zPFjy22YMTMxNpuBpx9T6Yi3ay01HpwwaomShdlS99qqiJXZIqi4RFlSK47+HOqTW99d0hVtojHdiWO3uj4p/qA9+AXHwKkKFnCsY0kHEjLLyw0r/v9K/hKbCNPZWIwFwnaUPfQRzIGWBma2ohbDb842A1DIiWhDJ0VLtdwNw+dfurMe6MW783Rdp8ErjQnr26Cm1zXTjpaHsHIzWIu+6a+Uat6+8SgdBkJXi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q5jeCSuFkU6121D1QlzDk3xGEg9Fojb4ZH1NcFbHmDpiGZ7daV0udQT+YqIfNQrlSM+Fbzs7a4tzGxRo50MaDm0JigDyTgxyzk53q0SO7ClPq0Y3eOuBjhlE8Ttx2c/04urCVHPQXP2klckzaQs1p/lnRnFG/TBA2I7zQon/bOjmp1qVBP8tyraL31a0hYNwsN6rlFGyLEmKSJdvv30qS/jQRAOQXzWK1ZbdOPWIQEpm4w0r03VBzMs6z3d0odqNzQBhJTxAF2DKtXyMWQ==; 5:wvKMkMpWm+hGvyz8lm5yeJ2+yAG5Dq2et/V5Evvos4rAcmH8fgneocqD7pUhfkZC4N4LGMXNC/diyMUrv5Zulo1hw/9ZQ9RzaQBNtML9iBqsJvAVg43Y2gg9rMV9JOInLBaWcTmvdvOQVaZgh1MDKR/4tbHiTP2lucETb7YsqqM=; 24:T3e7lrgQsV4ot2kPecky98wEwQ8hngjQzB7pErJJanmpGJTWWNo6wX0v6EeoVGGBnl62AZVUa26sqa5MzQJv4NfUoOMbyOaxT5H2EfJCMB8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB3PR04MB0764; 7:vLT4XPpgmNdffaYx4H31atxZ/UKfxaJooz/S1HytoazYCcsHUYScUfK1x8jqdZaR6nzj0PhPY0HJ6hZD1D36MNRX9GT4+I4Jq5TXgxn7Bzcr30GNc/Q3G5VDol+rGD0OVCoknNq6qpD9h485wON+24DAfK7RHka/C7rrr0m8L/cgpVt7ZL/MQsfUYdfAQWrLoVW37y3Dhovgnza4QsDlroZ6rtmI+r3QJ/LBZ3TPt7jhb0Ta095qroInowMm8jJ7 X-MS-Office365-Filtering-Correlation-Id: 9e068688-215b-4a20-c18a-08d5a9f549a4 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 15:08:49.6659 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9e068688-215b-4a20-c18a-08d5a9f549a4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR04MB0764 Subject: [dpdk-dev] [PATCH v3 1/2] net/dpaa: fix the ethdev offload checks 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Sunil Kumar Kori Fixes: 16e2c27f4fc7 ("net/dpaa: support new ethdev offload APIs") Signed-off-by: Sunil Kumar Kori --- drivers/net/dpaa/dpaa_ethdev.c | 89 +++++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 32 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index b2740b4..32d36f2 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -45,6 +45,33 @@ #include #include +/* Supported Rx offloads */ +static uint64_t dev_rx_offloads_sup = + DEV_RX_OFFLOAD_JUMBO_FRAME; + +/* Rx offloads which cannot be disabled */ +static uint64_t dev_rx_offloads_nodis = + DEV_RX_OFFLOAD_IPV4_CKSUM | + DEV_RX_OFFLOAD_UDP_CKSUM | + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | + DEV_RX_OFFLOAD_CRC_STRIP | + DEV_RX_OFFLOAD_SCATTER; + +/* Supported Tx offloads */ +static uint64_t dev_tx_offloads_sup; + +/* Tx offloads which cannot be disabled */ +static uint64_t dev_tx_offloads_nodis = + 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_TX_OFFLOAD_MULTI_SEGS | + DEV_TX_OFFLOAD_MT_LOCKFREE | + DEV_TX_OFFLOAD_MBUF_FAST_FREE; + /* Keep track of whether QMAN and BMAN have been globally initialized */ static int is_global_init; /* At present we only allow up to 4 push mode queues - as each of this queue @@ -143,35 +170,41 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev) { struct dpaa_if *dpaa_intf = dev->data->dev_private; struct rte_eth_conf *eth_conf = &dev->data->dev_conf; - struct rte_eth_dev_info dev_info; uint64_t rx_offloads = eth_conf->rxmode.offloads; uint64_t tx_offloads = eth_conf->txmode.offloads; PMD_INIT_FUNC_TRACE(); - dpaa_eth_dev_info(dev, &dev_info); - if (((~(dev_info.rx_offload_capa) & rx_offloads) != 0)) { - DPAA_PMD_ERR("Some Rx offloads are not supported " - "requested 0x%" PRIx64 " supported 0x%" PRIx64, - rx_offloads, dev_info.rx_offload_capa); - return -ENOTSUP; + /* Rx offloads validation */ + if (dev_rx_offloads_nodis & ~rx_offloads) { + DPAA_PMD_WARN( + "Rx offloads non configurable - requested 0x%" PRIx64 + " ignored 0x%" PRIx64, + rx_offloads, dev_rx_offloads_nodis); } - - if (((~(dev_info.tx_offload_capa) & tx_offloads) != 0)) { - DPAA_PMD_ERR("Some Tx offloads are not supported " - "requested 0x%" PRIx64 " supported 0x%" PRIx64, - tx_offloads, dev_info.tx_offload_capa); + if (~(dev_rx_offloads_sup | dev_rx_offloads_nodis) & rx_offloads) { + DPAA_PMD_ERR( + "Rx offloads non supported - requested 0x%" PRIx64 + " supported 0x%" PRIx64, + rx_offloads, + dev_rx_offloads_sup | dev_rx_offloads_nodis); return -ENOTSUP; } - if (((rx_offloads & DEV_RX_OFFLOAD_IPV4_CKSUM) == 0) || - ((rx_offloads & DEV_RX_OFFLOAD_UDP_CKSUM) == 0) || - ((rx_offloads & DEV_RX_OFFLOAD_TCP_CKSUM) == 0) || - ((tx_offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) == 0) || - ((tx_offloads & DEV_TX_OFFLOAD_UDP_CKSUM) == 0) || - ((tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM) == 0)) { - DPAA_PMD_ERR(" Cksum offloading is enabled by default " - " Cannot be disabled. So ignoring this configuration "); + /* Tx offloads validation */ + if (dev_tx_offloads_nodis & ~tx_offloads) { + DPAA_PMD_WARN( + "Tx offloads non configurable - requested 0x%" PRIx64 + " ignored 0x%" PRIx64, + tx_offloads, dev_tx_offloads_nodis); + } + if (~(dev_tx_offloads_sup | dev_tx_offloads_nodis) & tx_offloads) { + DPAA_PMD_ERR( + "Tx offloads non supported - requested 0x%" PRIx64 + " supported 0x%" PRIx64, + tx_offloads, + dev_tx_offloads_sup | dev_tx_offloads_nodis); + return -ENOTSUP; } if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { @@ -290,18 +323,10 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev, dev_info->flow_type_rss_offloads = DPAA_RSS_OFFLOAD_ALL; dev_info->speed_capa = (ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G); - dev_info->rx_offload_capa = - (DEV_RX_OFFLOAD_IPV4_CKSUM | - DEV_RX_OFFLOAD_UDP_CKSUM | - DEV_RX_OFFLOAD_TCP_CKSUM) | - DEV_RX_OFFLOAD_JUMBO_FRAME | - DEV_RX_OFFLOAD_SCATTER; - dev_info->tx_offload_capa = - (DEV_TX_OFFLOAD_IPV4_CKSUM | - DEV_TX_OFFLOAD_UDP_CKSUM | - DEV_TX_OFFLOAD_TCP_CKSUM) | - DEV_TX_OFFLOAD_MBUF_FAST_FREE | - DEV_TX_OFFLOAD_MULTI_SEGS; + dev_info->rx_offload_capa = dev_rx_offloads_sup | + dev_rx_offloads_nodis; + dev_info->tx_offload_capa = dev_tx_offloads_sup | + dev_tx_offloads_nodis; } static int dpaa_eth_link_update(struct rte_eth_dev *dev,