From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E0B4441BAE for ; Thu, 2 Feb 2023 17:25:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD3FC42F8A; Thu, 2 Feb 2023 17:25:58 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id 8901942D65; Thu, 2 Feb 2023 17:25:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lcEXnMOjWzRp20cQ7IlMcA3mkaZqpVeCcEJK6jgaCh4vCowr46IxMgeFjoUA05ZRAifhrbO7UnhnFDBbwj2jvgubAPo9+G760blO2lEqpn730ryR754aWuF3Bo1mEgCz5Q6xLDs9VQeFV/cnHtcttAcFBcSWSxg/sO70eMOo6rrEn+SXTiZ4KJIcc6Y0CoLpCMXFz7cIASJwjBGR/NOckXdp6cpjvIhr+vGAE/7EUOfw0QWkifTI0BN+Il3F7JJzi3KsBUSUNmlchnXH/BBSfVZalaEYPOz/veuQBQs/fbZp2PSgqAnaApsJN28N0MRLc/i60HqbjhxLwf+EFTqzJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=skV3ajSf4gvPxNWYDTYCTAgxOTx7Np3z02Xuw+sQv+8=; b=IQ+mjupcI2jLPL3zGn6dMztxuhpH4BMbQWStGI2Cqpu0c3MO+eYn0+PszvD8PXScb24a9N1JtG96N3RZ2CYfhGRfRc1cDZytD74h6+wH4Yb7laMXfLJhz2RJqvCO5VKo9wa1Vbn5xwoOzuU4iH/uFkyh3yfehrDjsWmBFVMy3IiA7aY79OzUL9piMydPG1eGYGVNU7wDLaxuO8lWY7XC9/KcuWFYzcnd6oy2OfkBmEK+T/S1p13ClmZH+5hq3zWWAZ3T4IqwgTu/bvtcmcIUwZXB8IwOMljDBcnAjTv+N3BV8A92sXQMUhZsDETmKlKpRs+LF7CWOFLIEq4Nq857sg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=skV3ajSf4gvPxNWYDTYCTAgxOTx7Np3z02Xuw+sQv+8=; b=O2B0K3+zPYFdeLxFdsLn9GES8/b9TQOpyM8XVHd5jV0vkzxcdyaQ3uq/0n6pMLu6kiRmdA/aVgeqImjktkkdicI1ZHbDw+1QGu2/pLblMNUJHdd6j+OfP/SXbd/osoOJOsVSuHB73jgo6q8cWEFpRbgPYMDA55E2jcN1S9R4mzFNRUrKMcMxYPDw6HW2I8mdiGtmLAuQXQdNB48BNwuN+aioYvcMpkTojN3iHjBWf919rALJEZ6IbtiaBVFixcnA3YY9iuKTTkV120jH3+b7cCI3Zd1NlJtjuxQawG5BNgI6jsRmZxvcuM6R5YkdYfLASDnK1ODDdEhZqYEL56KJbQ== Received: from DM6PR08CA0051.namprd08.prod.outlook.com (2603:10b6:5:1e0::25) by CH3PR12MB7643.namprd12.prod.outlook.com (2603:10b6:610:152::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.27; Thu, 2 Feb 2023 16:25:55 +0000 Received: from DM6NAM11FT108.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1e0:cafe::4d) by DM6PR08CA0051.outlook.office365.com (2603:10b6:5:1e0::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.27 via Frontend Transport; Thu, 2 Feb 2023 16:25:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT108.mail.protection.outlook.com (10.13.172.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.27 via Frontend Transport; Thu, 2 Feb 2023 16:25:54 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 2 Feb 2023 08:25:46 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 2 Feb 2023 08:25:46 -0800 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36 via Frontend Transport; Thu, 2 Feb 2023 08:25:44 -0800 From: Michael Baum To: CC: Matan Azrad , Akhil Goyal , "Thomas Monjalon" , , Subject: [PATCH v2 1/8] compress/mlx5: fix decompress xform validation Date: Thu, 2 Feb 2023 18:25:30 +0200 Message-ID: <20230202162537.1067595-2-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230202162537.1067595-1-michaelba@nvidia.com> References: <20230109075838.2508039-1-michaelba@nvidia.com> <20230202162537.1067595-1-michaelba@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT108:EE_|CH3PR12MB7643:EE_ X-MS-Office365-Filtering-Correlation-Id: 21bac7cf-6767-45f2-64d8-08db053a289c X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zIDjgDxGaXd1l6V1cmKyqJ/Z/K0U/T0/qzvhMhed7LHkLKcFOhq4lXgq7sOfGSvI2KF6STe4+Bj7rgrN66/9WFhoK6Qns7utY0JUntPd9H4UgbqVwgW0lv5rywuQiysF69+7SIallAJXQgwVZ1xhGy3adisrmqEGNKTG8BUGOo5vfQ9I1K2LUjUuE4bANhnVIagPCu67wjy6kwYKNOACwxP7cPZ5W/2pFtGjhrAaApRhDOFSZJupN8z6xfWJ/2dt/9Qfpn7Kd+Oj7f3Z9rV7edn4LDbnSHifZ0aFrSvphVL6D9lkBUdrr4DmcRGkkEtFovfikeRLCbVmFCZ+R2oZS2jV7zBxFdYCdScyMJSOlI6kno2gwGxBqoT9I0pvSxIg71eQX+yi4zOAIkZAMf441TvCNp3ArN3ebIAdm1ZDRZrBUyMPXBcPqUWBOXbYvb8/WAwwnYwQ91Lfomz3ffXkVfOJxYB7OHGQlBthw8q+2Nr9My0dq+hMLgMAZcl7X/raW69LzksdgMqQtYlH2ZQ4e4flC3Ygfw1z+LlGLid7Yyu8+3rrk5/UdgDo7R2LNd6jxgfQxzkHUmz52Kpiqer0BILH5Edg5Tb1OZ6ZsQk0Wkk/aUqo0mkS5pmwhwjZwwA8Ro+AdehBY2zJ0grkSx/tsdWhg2uhniJrFOuScensC2UmiO2kv3pqXAjNu01tVko0mbjck8bJkoSs5fPkDESh6w== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(136003)(346002)(39860400002)(396003)(376002)(451199018)(40470700004)(36840700001)(46966006)(40460700003)(36860700001)(8676002)(7696005)(478600001)(186003)(26005)(54906003)(36756003)(6286002)(1076003)(82310400005)(316002)(6666004)(5660300002)(86362001)(2906002)(8936002)(41300700001)(6916009)(70586007)(70206006)(4326008)(55016003)(40480700001)(336012)(2616005)(7636003)(426003)(83380400001)(47076005)(356005)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2023 16:25:54.8918 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 21bac7cf-6767-45f2-64d8-08db053a289c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT108.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7643 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org In xform creation, it first validate the xform according the capabilities. One of validations verifies that given "hash_algo" is "RTE_COMP_HASH_ALGO_NONE" for both compress and decompress xform objects. However, the validation for decompress checks it again for compress xform object. This patch changes it to verify decompress xform object. Fixes: 2efd26544554 ("compress/mlx5: support partial transformation") Cc: rzidane@nvidia.com Cc: stable@dpdk.org Signed-off-by: Michael Baum --- drivers/compress/mlx5/mlx5_compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c index 459e4b5e8a..cadff83f27 100644 --- a/drivers/compress/mlx5/mlx5_compress.c +++ b/drivers/compress/mlx5/mlx5_compress.c @@ -313,7 +313,7 @@ mlx5_compress_xform_create(struct rte_compressdev *dev, DRV_LOG(ERR, "Not enough capabilities to support decompress operation, maybe old FW/OFED version?"); return -ENOTSUP; } - if (xform->compress.hash_algo != RTE_COMP_HASH_ALGO_NONE) { + if (xform->decompress.hash_algo != RTE_COMP_HASH_ALGO_NONE) { DRV_LOG(ERR, "SHA is not supported."); return -ENOTSUP; } -- 2.25.1