From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0116.outbound.protection.outlook.com [104.47.42.116]) by dpdk.org (Postfix) with ESMTP id ED0691C0B for ; Mon, 23 Apr 2018 14:33:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freescale.onmicrosoft.com; s=selector1-freescale-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=RXn8RXxzNjgsgr0d/CzSGMpHyQRkUBVOz7+G0cMTlNo=; b=P/Z8QhScrp7mjQpyhi0010Jltlw1vWh1i9UBJHLr3NurzWTfA49n2JHQnvRoHHS8NbandMl0hwtKBRu5upO5TNRK9rLRjQWczuGPZxFiHKF7eoRsZDKNZ18DdUZOiIZXdEKczDaxY7FffB37pH9uF9n7+NPXn9Xqo2f6YebAb7I= Received: from DM5PR03CA0039.namprd03.prod.outlook.com (2603:10b6:4:3b::28) by BL2PR03MB386.namprd03.prod.outlook.com (2a01:111:e400:c26::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.13; Mon, 23 Apr 2018 12:33:52 +0000 Received: from BL2FFO11OLC012.protection.gbl (2a01:111:f400:7c09::141) by DM5PR03CA0039.outlook.office365.com (2603:10b6:4:3b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.696.12 via Frontend Transport; Mon, 23 Apr 2018 12:33:52 +0000 Authentication-Results: spf=fail (sender IP is 64.157.242.222) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 64.157.242.222 as permitted sender) receiver=protection.outlook.com; client-ip=64.157.242.222; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (64.157.242.222) by BL2FFO11OLC012.mail.protection.outlook.com (10.173.160.159) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.653.14 via Frontend Transport; Mon, 23 Apr 2018 12:33:48 +0000 Received: from az84smr01.freescale.net (az84smr01.freescale.net [10.64.34.197]) by tx30smr01.am.freescale.net (8.14.3/8.14.3) with ESMTP id w3NCXlw2026417; Mon, 23 Apr 2018 05:33:47 -0700 Received: from sunil-OptiPlex-790.ap.freescale.net (sunil-OptiPlex-790.ap.freescale.net [10.232.132.53]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id w3NCXfYi016265; Mon, 23 Apr 2018 05:33:46 -0700 From: Sunil Kumar Kori To: CC: , , Date: Mon, 23 Apr 2018 18:03:37 +0530 Message-ID: <20180423123337.5653-3-sunil.kori@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180423123337.5653-1-sunil.kori@nxp.com> References: <20180420104541.21987-1-sunil.kori@nxp.com> <20180423123337.5653-1-sunil.kori@nxp.com> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:64.157.242.222; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(39860400002)(396003)(39380400002)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(9170700003)(5660300001)(54906003)(8676002)(106466001)(50226002)(26005)(305945005)(8936002)(446003)(2616005)(50466002)(48376002)(336012)(486006)(476003)(47776003)(86362001)(126002)(85426001)(1076002)(356003)(77096007)(59450400001)(6666003)(11346002)(498600001)(36756003)(6916009)(8656006)(2906002)(53936002)(105606002)(76176011)(2351001)(81166006)(16586007)(316002)(4326008)(51416003); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB386; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; LANG:en; MLV:ovrnspm; A:1; MX:1; PTR:ErrorRetry; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC012; 1:SSTliM3xxBrUpm2qi2mh8fC7CB5fv5fZ+cR5x1ca353UkRdsKI9Tv9xCelzHpeP+rt1iUfqUlBLycbhYro4aiPIwe71UB46CuU1qCdfrZbonMCrmoCCXYrNbyDK4EHjv MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(8559017)(2017052603328); SRVR:BL2PR03MB386; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB386; 3:v3R+sVzYLcql3kfRNTwQNZFeNvGpln7CwMDHoxiBKP98LEx+hOvDJBwFrRcGipNobNG0/DWAvI460sPzEUOhy3ZRhKC9C3qa4y6PD9M8KWfF2xGCPc7owcsyhUiFvaFpCqiqS5zigK4zMMdCt7sg/eutgZAZdeWTmPPHrHXyLME5nQd7v5f3x17XRHk7iVeLOy6wUWmBhWjxkqIeRvJETneXGJIp/hcAwZen6sH6n4LeAV5bjdRgm6IhPif4AhAdYtMeeqL5MsKhLZUuet13cAOzfDPCqws9Zoo6GK7v7NYgLTZvoUb2pV/U22mY03Ft4MQUSGBlxkFWXmTnVZox+UR01qOS7+zWDgIqXHmHNrg=; 25:nUyzOR5MG4dJFXIkvBVWFZAsoHrbwhjaue6xVeAVvZWAHX442yYsq2jit9QXutdeHCGlu/ytfRLXTI5laG3XhBz0cXP1dNtsL4BGdnE5UUFrz1CpiQea6r548wpZhlrutVos8PGtSFj9Yazx4RZdwjv/0KzaswORCHhavI/Z2f8D7pMwqUgeavsBnMHCP1B02gGaEVW5f3TLpQf3uJHwiPkBOgh0+e/CS9VhJfadL3T4JMLF6cxhJNqmtwNwalOJVfF5BiSfcVlD2sRjfKAojNJlcbHp0DGYke0MfOh/UkpyZmU1eFLnrg1Vw3PGtgQcrviOHLGmy7LhlCKDViFhK34sy+b0RL2FGNLvIoBmQiE= X-MS-TrafficTypeDiagnostic: BL2PR03MB386: X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB386; 31:w3tsG5Bd5XCWbbm/x1HPWKtVXfDhPzzNNxHADzQouHCByT8yS4OGaTX0EO7q22iL0Y3cXLgbkh5m3eHWV96mnrpLJ8CzCH8tkYUHy8/rHn26KTSeKH+OnJc4oaJ4d+2OTq2upPYu8FUwfolA3yIoiJ3XbTp81KybDQ8RG8v53zqbJNZvIVGdsBELy+aANd8ODsiBGBNiIqrfO1PWloRmwW0m8A0KwRP1NZLyR27G42o=; 20:vYAzQncKhm8GvThP1jXUOo6MJnbjB2iyTkiu4ysHgudqwmu6w/WEtsuOTTonjzHcy0u5jf6KyVoqzJ8cmGwu8CogvB1ah5I3aFm90uzFZTGc8a6on/onVqNV0xOrbpll2nOP+21xJu6oEYD6i0bKuXC7pLxEErHlYm703secPIBriho15MPuRvcTKXtHg+R6tlklJmuFKXEZ7J5KViMZq1JoNi9TUVOEHepazENOqN2qKVablsaPmtGBBiglpSR+vOtEusNyvH1yLg3twLXpsExiCpwJ2uPQg9RpJoQCd9fzo780msnphkZe6o2zFvbq5o6rHQ0qDxJSXbV+tNH5ELIK+f8RiEQyxt7N+qWYGcy3bzO7EEcg9uqgJtDDtjkzUuQVYCUJmVrMmTmKMLqgr0wpueQzlW+GXtNrihxnqi76wYcpoU8ksTGbmMsyVMVmtJ0zpbCBzmMTLQkqGqy0z3wuW7i03UilX3viRXJjutWlyrgs8X/Q3xKYn6XwP4jwVwmBJfIxAIg45P4fmRTzmaLu5e8rnhS7pUDXcB29dPbndgzP0HvngMT7dthUrGowlxeR/nmK2wilYAal7Wpdap0XFwPzSGFT4GVQ/IvSDEg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93003095)(3231232)(944501410)(52105095)(6055026)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:BL2PR03MB386; BCL:0; PCL:0; RULEID:; SRVR:BL2PR03MB386; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB386; 4:Fgv7/niixCn9eLgYH8g4X8+IgcnkSIPWGVm0n1fbfMKoQoZZ7iqQAJAEd+Vpsxtd5PAaP5SjtwEECXa4rKESKRf42Ek7ZS5QJMV8rlHN8bGIt7Qn5KGpLeGXh4uao/1XlZZXvWxrQwxX/EzcxwjLchmbdTA/slt9ziDR8YQrwiHmLo9LECQ7oL34m4XgDOYVoGAG7om8b2tc+ft2JIMLfKOK1k4yR/V0iODWLhDQNJLRq0PKymbc+b7Lsdk2aqm23eA2vJTnC6C6CwERIWLfG/UonHHbhWMFuVqismQuMKofKIFxXpFApfICgaz+7r61 X-Forefront-PRVS: 06515DA04B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR03MB386; 23:xPEGM7pa94Zhs6MD/jPui8z3IvriRvs7D0V9g9Z1i7?= =?us-ascii?Q?h1DupZOzVWEFfyGaPTj6M543+oyuwKIWozbHEVkwMURMJkD8Dlx6bpwnwxWZ?= =?us-ascii?Q?zEdWYcVnE6Ag1XE32HLWCBtxMX+1zlxZXg4j6IZvqgLfmkvaGF4LDDi6LuR4?= =?us-ascii?Q?40r2FIFtZMb2MfbZBoR69fpGIAuJbJ2ZkKM4kxgAOKgclFUaQY0TuSvW5GYt?= =?us-ascii?Q?Jxt9p5hAS99HbwCCFsUgcPAiTB7Ncp45tYdfUOZjmxKFiNDW9uKSKh8wL+8a?= =?us-ascii?Q?dR8MWjyrxxLfd413CBqUa1Qx4CoagdlyMPcYrA7hrDOt97No4RxoGBEl3p9Z?= =?us-ascii?Q?gfGOOBYWY77Rere+hv0Tx3Q+MXJcZebXcnzEX3TsqntwR+HIBNWJWZ2UWLii?= =?us-ascii?Q?o12n9twkuKVtZ/U17j2PP+jPZ1RqUNgaJPBCL7WKMYJki8IplIxzbl3r6Etk?= =?us-ascii?Q?8UiFj+qUejPJt2Cbklrv+3OtfGXrJ/vm/zDtrTrZ6agHiYEmV1XWEQr7zqq9?= =?us-ascii?Q?U6qjSpLCSyF4/xWFjsTW2RgblBqkABPpyeRaW7rIiG7dnaU736K5u5KjftBC?= =?us-ascii?Q?xLAvmzXT5bULX7myIZ/a1JsukzytKFJI85jQnzPHdgtepQcB5Z7QS0kWqQOK?= =?us-ascii?Q?Ek+inuTPB8TyprSeKbaVvjT8IpOzFPgn/YUo5KtYx7GcQhv0u8IJTCfXm+19?= =?us-ascii?Q?QtkgcAw1u2gTF7b17a+euH2voEn9/8rwZEqDAGmcLH0sFuDhR1xUKccUpF1k?= =?us-ascii?Q?7w74AJTS7wYuXtQOU7leAdx5eRFY9BGIrNl0b7k81wYaI2iMhR+zXokvB1fJ?= =?us-ascii?Q?8dfpp4ehkQscYreQmITN+WOP992yR+PgamhK8PzGVN8NhUlYWLCeHHUqArcx?= =?us-ascii?Q?Uiq1mPRtoj989C+nbJblcxzgiD3nbmCWWCox5vQeNrm/hubLmt3rslvyOhSq?= =?us-ascii?Q?/AjNtPnaJf2AWcaVgq+BirwTopSJcZW1ZHQEuDgSD35tvT8Q0m6lnVN9PAma?= =?us-ascii?Q?4s/KnrjNZnxzS/q3VfQv9QYWZMIDl1ig8Ez0w98VkOYQ89DGoWDwmhjaNjlq?= =?us-ascii?Q?TttPABnHmZhGZH4Yp6X3Fgok7F3zul9mTlqlS6bhc7UJ88fs8WJOIUjX8/+4?= =?us-ascii?Q?H/oDNG/voFcDMck3XpgukdF1QriPi7e0/Co+/YqBl7/GOe3wTyjQ=3D=3D?= X-Microsoft-Antispam-Message-Info: TmcPYTMBvXP9Zt/bIBa3H+5NNvC4ALEzIl613tKawxOUaW4/J+u3QGqgx7v4G9p3gYH+mMDYoBd6XURSut2m07wEeAyi617nTAsVMPs0wwIhju8oylJBhGfv2xCqq/8M033NgmXeYwgi0J4arMskoPlZQFuR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WpOjyIHPgu5CaBX7ZEIx5gTwGW2bzQ3tqFskftF7wWPwGTRKtNVC8B1bUaAlebK+/qpRgL3jBTUkyF4Kbhfa2Q3/P1K3 X-MS-Office365-Filtering-Correlation-Id: 63f66220-905a-4ed3-f0b5-08d5a91677af X-OriginatorOrg: freescale.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2018 12:33:48.9899 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63f66220-905a-4ed3-f0b5-08d5a91677af X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[64.157.242.222]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB386 Subject: [dpdk-dev] [PATCH v2 2/2] net/dpaa2: non supported offloads are ignored with warning 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: Mon, 23 Apr 2018 12:33:56 -0000 Fixes: 0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs") Cc: shreyansh.jain@nxp.com Signed-off-by: Sunil Kumar Kori --- drivers/net/dpaa2/dpaa2_ethdev.c | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 54ab9eb..a47c723 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -27,6 +27,25 @@ #include "dpaa2_ethdev.h" #include +/* Non-Supported Rx offloads */ +static uint64_t dev_rx_offloads_not_supported = + DEV_RX_OFFLOAD_TCP_LRO | + DEV_RX_OFFLOAD_MACSEC_STRIP | + DEV_RX_OFFLOAD_HEADER_SPLIT | + DEV_RX_OFFLOAD_VLAN_EXTEND | + DEV_RX_OFFLOAD_SECURITY; + +/* Non-Supported Tx offloads */ +static uint64_t dev_tx_offloads_not_supported = + DEV_TX_OFFLOAD_TCP_TSO | + DEV_TX_OFFLOAD_UDP_TSO | + DEV_TX_OFFLOAD_VXLAN_TNL_TSO | + DEV_TX_OFFLOAD_GRE_TNL_TSO | + DEV_TX_OFFLOAD_IPIP_TNL_TSO | + DEV_TX_OFFLOAD_GENEVE_TNL_TSO | + DEV_TX_OFFLOAD_MACSEC_INSERT | + DEV_TX_OFFLOAD_SECURITY; + struct rte_dpaa2_xstats_name_off { char name[RTE_ETH_XSTATS_NAME_SIZE]; uint8_t page_id; /* dpni statistics page id */ @@ -289,18 +308,20 @@ 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 validation */ + if (dev_rx_offloads_not_supported & rx_offloads) { + DPAA2_PMD_ERR( + "Rx offloads not supported - Requested 0x%" PRIx64 " supported 0x%" PRIx64, rx_offloads, dev_info.rx_offload_capa); - return -ENOTSUP; + 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 validation */ + if (dev_tx_offloads_not_supported & tx_offloads) { + DPAA2_PMD_ERR( + "Tx offloads not supported - Requested 0x%" PRIx64 " Supported 0x%" PRIx64, tx_offloads, dev_info.tx_offload_capa); - return -ENOTSUP; + return -ENOTSUP; } if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { -- 2.9.3