From patchwork Tue Apr 24 15:06:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 134110 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2352767lji; Tue, 24 Apr 2018 08:09:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Y6banMJUlFJOs6xODtQ9YzBagEAx71UhMLQ2nqgcBMVt3r63hwezBcRcDkrng/qf9wlfy X-Received: by 2002:adf:b595:: with SMTP id c21-v6mr21237448wre.233.1524582546633; Tue, 24 Apr 2018 08:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524582546; cv=none; d=google.com; s=arc-20160816; b=Ag5DUspeaVNu0CbXm27riiF71bhCrQqwXDX2xsJ5VZeqHB+qCBpopZ+KpZKGF/4YbF E/fjS0GvlZ5w8QbXzDu6Om13Fr2uQW1FW787glx2qKKzs1mUHtUQ8MBCPDaxGIpuFkNy rClxqsfhPyPzAqoU4KPACFUT3BqqfouIJbpwl0+ZMYUit1dzTYthz6S5GFgFoUqVMMJs sztHnNPOYUvchW9kf5dUoWFObSlOxLtL+/CWD0+Dti0Hqb+LeABXUtzhvSYymY2xuVBg 74VXjTpbT05OCvEi3XjIOmxIXfB25H86y9W0wJ37z7AJEcNijOQWOeNww9VNf2wiJXiG 88DQ== 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=Fvx5l7SHly/2B0anC45Ova2NIYdCj9fnV+zVFiuvdk4=; b=Q62xzl+yYI90QdXmRAWiSzgw0OEfxqI4dmSKilCx8HmYCaiOcNC0GXcwcJR2Vq9PA4 kpC+hjwLdRRgq8WZZG/maHjC8QSyQMB+QkhlGeA11TExI/wIwd2rdmvYnFUF8HFEo2eQ mlMxQCwuERWoaOhEDmclFgeqDcHTUGuYO7WU3Vvgy0f+OieojMNUqVxmFWkR9GlIpree zO+fOyYqHYGFUHZ8Yi9AuI1Q4t461/RqF0hPlc+Lw3cnR7yzybhdY4eHVKWxPstOIkEQ oCpZIzhhqzT0VSNz/2QpR/OFsb6WrIFA31M8JSKPMyc7VqlSiogu7hXkQVwLB7Y7rM1N l8sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=W9grKupS; 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 k91-v6si11751188wrc.459.2018.04.24.08.09.06; Tue, 24 Apr 2018 08:09:06 -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=W9grKupS; 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 4C54A5593; Tue, 24 Apr 2018 17:08:58 +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 9A8854C6F for ; Tue, 24 Apr 2018 17:08:54 +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=Fvx5l7SHly/2B0anC45Ova2NIYdCj9fnV+zVFiuvdk4=; b=W9grKupSTLBbYkllKbSYQ2YEJEE8J4bbKebFycbLTbIn1qfJ4FjM5QDxgp1vl4oGxk8SVQtOYjBZ4wEvOW2t8OT01Mj+gpaJIW5GMnQQ6srgtSYBbLcV8JfoyDrJne/Pnk/iJ8m8clQWq0EXOx7Iu5tooE0P4IaHIeGWoNQDy4w= 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:51 +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:41 +0530 Message-Id: <1524582401-14696-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524582401-14696-1-git-send-email-hemant.agrawal@nxp.com> References: <20180411110540.30071-1-sunil.kori@nxp.com> <1524582401-14696-1-git-send-email-hemant.agrawal@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:xISdvxNzWjxu3UI6BNRcHpvC/B9YY5Gf0QnqB687d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CxfMXfcnd4ajkiX9DSHAvbL+El4tMMeLZBg6LNea32Ms0+4qfoPBK0vGE2VWr7KQ+aKmzcXEFHpQpa/M551n1NRIReh3TEqwvELu99YCUteSTB6oM0VbKcRjdkpt2a+CicgKSE1ieTIkveo5G5BsblzKlzXgWZjjXt8c1ZBRlYyBgKHzsnMVM7V84kK/mSUV0vwVaDrnWlb3J51byBXO1RkLWvly6RnaNALy0TeLMJRF+ddqv086Pd3p1OD46ek9fMPYMr9LwSVpaaODMA8MD2wFAp7IGIChPhCkq5+I4N9L6YxMy3gjf; 4:iKfiEQknpjzdselvmOtWtqlyU0UEyJxd6YrgE3/FY4qk8dkI2UIFHXElamzZPxjR+0edz7C+pCIRGPPRwrfAObJgAArGHnPhJtwy+LwEU5rat+AUmY8JBulrnvU/Aj5n8532rx3mXv0+ze35rymBVoZYmF+Y4wNfFaW2sz+c7rrm8BlJ7zE/H+V5Sy2ld0GGakW43Um8Y64wpK0GgdBq4lU2u6Qf+19fkZvLfOc1gqPz9KTWO6wS2z3vHacHigVszQ5Cdz2D4s8fpe4tWoCqa2bzcSWP0kKThcBYDtv7EqRuZeLtLwjeRinKJYSdg0Ix 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:1LQxPv61DUwwNLhum3c54//z9N+lSTmcGiR9ZkvNl?= oQrM+L7AuLqismr4wBUDfh6bV0wr+TqXkRaosnn/z+EI4Oho9kjldkMn2Fm4sL51HOazhc+Kv9eJ03F/cWO9HAuRvISFnNStePJRITsRtv+E0ghwTOE5WsPXg+twnXKCwRqnzIdGmoFQeT2p1eNGG74CJUMAKoMLQz5JVmQVDuL9wvwBCCJMyyzBLEaeTVzbFRJVrc6VXMj2E0YD1wmJt2kVzuxUclKU7v2fiHxJj7ztIkBMMYa5l4Uf2SbMV2cy8lTJN9jviV6JNdbTlZdEvzVXqb4spcApJC2CeMhjGEtgfASWkZlb/JjpQU3RDrJVwq9Gzw8J+UR/Z6SpIRlLxRPTjPFZ5Yl0/pT4ewM5FBz56mpQgdODXSCWdLDAk+6vFjoWfOlYhvJQhAQzdRyzSzqFM9TLFYaw/7IliNuDpVxLRcMpU5sL4lYnhHfWEBCaGqDz3cimD3tHQUnOOjJvqAoPasBziT4PBOPmSEWwPlsnjiSaGSHGfBXuzVFgZdBqspJxlIGOd7vOKuAESD/UihwPn+U66Qx4Geuaegld6Kxzfd270sSaS4sr4cx4NnM56UcjE6VVem9MKhJvdVOWY2Ybe5OXDeF4n4lvewFihILc2vrzI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mshT0kwbP3vMNmFeaVMOvf8a5759AVgFkE9sTp/VAx2oAkxboCaoHSGZa/qrx8RoH1xdeByYVg3oPNyetfqV/Z0Tqg7wvzHX82yKczxCKMFTB+GnQmfOoD6HjDfhP1IqguwD9Cv2oa7JYdOrSg6IpDcQxRe6nQAZHv3jDE6JAiA3Q4PQeJySfb38jTwpuvgqp17BDZgsBTe/uid3WACWkMEv+EgUEAY/Dkq0n7jBu/xEv+MGdAyZoKuCZWCOx0YTSCj6OjRAHKowgTZWpSz3opQNuuUeK6486HUq+fOABivgBHMbdV3wlATobmEJnuGrv2N7O6MTL9Xg==; 5:nS8PB4EpepgFI3qsT9+MrymLAbYgnTdUCmHl3gBMADHxgCor8sfz1eQOpeACDTeYGU0mNqLKgbiZJ9VT0YmxoAP1eFHPviyibXMDdX4cbg4x9YfbV9y4mL7ErtWgY1b177XqFNQOWzjprunBuqj785PUypqW46uQQq8TjqB3Xrs=; 24:cv7iTmhyCFNNtFnicx/Debyr5KlMOqF00ILUIl1w/fI8TgXZwfzqiTTQwesbMQwTM88C4hPgSRKawZpV1tiDH84Ke3XYaW3KqyA+FOUBdNc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB3PR04MB0764; 7:WAnZkwSVFQ8wdnXTSm8oVZeThM9BDC2qOKdFrWpRwZY/MGwpxuM5TBwGOM3rXatHUj5e5jg0RA06ixKQMylB1qwZ2DUPj2cezsAh+IJUj72PIpT98A6Jfb00aX/iZPfQBUtFrKcQPAcTCocVOY4ZjujISaHd9mN4X6vd1nqPku8+82rBOthvyDblnrYNgox8nGWS59GPTLD0c7Cu//IBS+SW+oHnU0zh/bSOrBrYGjuz40e0/G0plxSxHpezO9lm X-MS-Office365-Filtering-Correlation-Id: 960ca9d1-86d4-49d3-16eb-08d5a9f54abe X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 15:08:51.5252 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 960ca9d1-86d4-49d3-16eb-08d5a9f54abe 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 2/2] net/dpaa2: 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: 0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs") Signed-off-by: Sunil Kumar Kori Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/dpaa2_ethdev.c | 88 +++++++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 28 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 54ab9eb..96a1cc4 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -27,6 +27,36 @@ #include "dpaa2_ethdev.h" #include +/* Supported Rx offloads */ +static uint64_t dev_rx_offloads_sup = + DEV_RX_OFFLOAD_VLAN_STRIP | + DEV_RX_OFFLOAD_IPV4_CKSUM | + DEV_RX_OFFLOAD_UDP_CKSUM | + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | + DEV_RX_OFFLOAD_VLAN_FILTER | + DEV_RX_OFFLOAD_JUMBO_FRAME; + +/* Rx offloads which cannot be disabled */ +static uint64_t dev_rx_offloads_nodis = + DEV_RX_OFFLOAD_CRC_STRIP | + DEV_RX_OFFLOAD_SCATTER; + +/* Supported Tx offloads */ +static uint64_t dev_tx_offloads_sup = + DEV_TX_OFFLOAD_VLAN_INSERT | + 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; + +/* Tx offloads which cannot be disabled */ +static uint64_t dev_tx_offloads_nodis = + DEV_TX_OFFLOAD_MULTI_SEGS | + DEV_TX_OFFLOAD_MT_LOCKFREE | + DEV_TX_OFFLOAD_MBUF_FAST_FREE; + struct rte_dpaa2_xstats_name_off { char name[RTE_ETH_XSTATS_NAME_SIZE]; uint8_t page_id; /* dpni statistics page id */ @@ -170,24 +200,10 @@ dpaa2_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->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_RX_OFFLOAD_VLAN_FILTER | - DEV_RX_OFFLOAD_VLAN_STRIP | - 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_SCTP_CKSUM | - DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | - DEV_TX_OFFLOAD_VLAN_INSERT | - 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; dev_info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_2_5G | ETH_LINK_SPEED_10G; @@ -277,7 +293,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev) struct dpaa2_dev_priv *priv = dev->data->dev_private; struct fsl_mc_io *dpni = priv->hw; 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; int rx_l3_csum_offload = false; @@ -288,18 +303,35 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - dpaa2_dev_info_get(dev, &dev_info); - if ((~(dev_info.rx_offload_capa) & rx_offloads) != 0) { - DPAA2_PMD_ERR("Some Rx offloads are not supported " - "requested 0x%" PRIx64 " supported 0x%" PRIx64, - rx_offloads, dev_info.rx_offload_capa); + /* Rx offloads validation */ + if (dev_rx_offloads_nodis & ~rx_offloads) { + DPAA2_PMD_WARN( + "Rx offloads non configurable - requested 0x%" PRIx64 + " ignored 0x%" PRIx64, + rx_offloads, dev_rx_offloads_nodis); + } + if (~(dev_rx_offloads_sup | dev_rx_offloads_nodis) & rx_offloads) { + DPAA2_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 ((~(dev_info.tx_offload_capa) & tx_offloads) != 0) { - DPAA2_PMD_ERR("Some Tx offloads are not supported " - "requested 0x%" PRIx64 " supported 0x%" PRIx64, - tx_offloads, dev_info.tx_offload_capa); + /* Tx offloads validation */ + if (dev_tx_offloads_nodis & ~tx_offloads) { + DPAA2_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) { + DPAA2_PMD_ERR( + "Tx offloads non supported - requested 0x%" PRIx64 + " supported 0x%" PRIx64, + tx_offloads, + dev_tx_offloads_sup | dev_tx_offloads_nodis); return -ENOTSUP; }