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 5D66AA0C58; Tue, 31 Aug 2021 22:40:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B5F241145; Tue, 31 Aug 2021 22:40:39 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2065.outbound.protection.outlook.com [40.107.102.65]) by mails.dpdk.org (Postfix) with ESMTP id DD9FB410F9; Tue, 31 Aug 2021 22:40:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A346+3QFc/iuEiEHLnX7d6qALWZIngDrVCuez/ctU2eFUPAEvaRuF1qWSv1gWq+RrAewmmeIsLIDbQ3iYUTgqN+hDl6ZcIh7sH9HunDDIkl2l/3LK0Rc627Fu3nNsKtW23YDuKcHxtTZVYCJCzRSUkW9OZLXfGpsXxndrfDiB/f0QLWCAEQmLc/7VeHZqosn9kw2xaX1rCVlGmaW9Y7hniISN/vwGwbHzn+jSzqwNfiQUfteBiuOcOm9nD4uyZl3yc9iqn+fpXL8Px/t7zw7Mngop2Nsng+ti7UDkQLxqwx8C8hlPPcW76VqQpabM/hVkmbznFLby0g4qe00cHPdBA== 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-SenderADCheck; bh=C21GFrLVgeP8HafeF2zQVezsSDTTUDT80FY+5eTQ5po=; b=U7CuyHTnq0xnhNnL7kYP2A71COG5SvTN8SPUnomlcwnMkFvrc86yhTkd6SvJtJwYrod0XaOhg9qEZQ7u2H9OP3bSm6l2iue94c/fAH8daFUrozGDpIf7ugaerhKS8x2YBCBI5HmhbizMnafmSsUNKnBKomLOL4mhlS+aMsdmxOWGj1k0DhVuS3j2NlGlK6O9kOPI5NFFDAcbDZ5Bw2yid477/zysSVGRRSESffp5lvKtuOIeG4gjG/thSMEeLhRmM8kbHvFFgvRIuTkl0OjZvB2OihqH+Kit22po2n5OY9z1eL/cUviWcM00fAqVlG+wC5bxLCtW4DGGcl+Npekcdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.35) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=none 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=C21GFrLVgeP8HafeF2zQVezsSDTTUDT80FY+5eTQ5po=; b=eHfLw+azFTNZW2Ij0AV7tUQPE2vNN3zIqaQDpjaKUMpXv3VULPGCADA/ZAkCtAsarW6BXcipoNNLO7afoalQK36MZ35kSdNEtqWtUwcwyMJLqLZVtfdWmIwhW7zJBzpJ5hx5tpT2Afv3TBVj6PvoUL7xH8kq77sh4y4iLbEPkNUoJQWO0r1VMdVD1vixYDTGS45HhHBuQco4M/whzuvS0tCBpL8hMSmQB03IYEMkfHoVAp9RolC7mCYnM0kdGaAUitYfVPT9+UicBobNN5BbPZI+0RL93VJgPIm1Yz/mNCPdlDJt2vVuP1RSuFBzfkQkHX66yfGHCsS+D7NDnxIgBg== Received: from MWHPR14CA0002.namprd14.prod.outlook.com (2603:10b6:300:ae::12) by DM5PR12MB4680.namprd12.prod.outlook.com (2603:10b6:4:a6::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.24; Tue, 31 Aug 2021 20:40:36 +0000 Received: from CO1NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:300:ae:cafe::82) by MWHPR14CA0002.outlook.office365.com (2603:10b6:300:ae::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Tue, 31 Aug 2021 20:40:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.35) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.35 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.35; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.35) by CO1NAM11FT049.mail.protection.outlook.com (10.13.175.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4478.19 via Frontend Transport; Tue, 31 Aug 2021 20:40:35 +0000 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 31 Aug 2021 20:40:35 +0000 Received: from nvidia.com (172.20.187.6) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 31 Aug 2021 20:40:34 +0000 From: Michael Baum To: CC: Matan Azrad , Date: Tue, 31 Aug 2021 23:40:15 +0300 Message-ID: <20210831204015.3411435-1-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To DRHQMAIL107.nvidia.com (10.27.9.16) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b45fb643-0d24-4d4d-6577-08d96cbf95e6 X-MS-TrafficTypeDiagnostic: DM5PR12MB4680: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LZnxuykQNNibvku67USTXGaO362QIwE/qe7naoY7h49PJLF4VQ6jWljnK21lgKbzRxWEWjebzxPx7IOn9QVW0dDJQeZgHD1zI07ivJXcSYS68OVEVrg7eybvMjIoeIgRgLxgkjwBRZzM85nEuH/ptNesHjBC+2AfUQnfNRHKRwnOqgo149+G8lDqKME6HbopKABI+ecEPWxG6H/XClueto31W8xZR17P5H+MvV/FKWiJQ0K4+1/B4FPh5Q7WbUA6JyTz/nAAKJKHO2RT9G9LoJ25EYvBfeIpv5oy6ACuEeCNK07emGB/j4JGpVEEhVRlmIdp8FXKWUlf2F7PfwXdqqTzaRpjbS7LhUdOckaeQLx9nIc4PYYrJr0ZzyOhMmnPYglyM6EPBHQJi0OD+ljIJ5wJiiCnqLXpsNVKn7otQUy+jaUWCsfc63rBPInvOJ4kUGYI7IwrCmEmAg27j/uFYVXKXNqNoHKgfggYIqlnj6WG0Mt1zgHEztytoWlJLm+Llfe7/JvwNtKQzEn7K4sji88IUKEMFkzBhHwIWS7xgkm1JtJwlDNzA0jUV4OqsUf7emC+2JVl3uWnCMquziF9blrFDdjNGdv3yzh2AjO7rFFbwRPUO8A46G0aGwJJR8jE7PlUCF3s5dkITlf0+hel29PPp69JG3jVhbnZ6xcJMrU7zIIwMte7FdTdztSJxvWB6EKoZeoMRX/wdcWjuHQuww== X-Forefront-Antispam-Report: CIP:216.228.112.35; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid02.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(39860400002)(136003)(346002)(396003)(36840700001)(46966006)(6666004)(1076003)(16526019)(2906002)(6916009)(54906003)(86362001)(6286002)(70206006)(83380400001)(5660300002)(55016002)(70586007)(36860700001)(336012)(4326008)(47076005)(36756003)(7696005)(26005)(2616005)(426003)(186003)(82740400003)(450100002)(8676002)(356005)(7636003)(8936002)(478600001)(36906005)(316002)(82310400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2021 20:40:35.7734 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b45fb643-0d24-4d4d-6577-08d96cbf95e6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.35]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB4680 Subject: [dpdk-dev] [PATCH] crypto/mlx5: support timestamp format X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" This patch adds support for the timestamp format settings for the receive and send queues. If the firmware version x.30.1000 or above is installed and the NIC timestamps are configured with the real-time format, the default zero values for newly added fields cause the queue creation to fail. The patch queries the timestamp formats supported by the hardware and sets the configuration values in queue context accordingly. Fixes: 6152534e211e ("crypto/mlx5: support queue pairs operations") Cc: stable@dpdk.org Signed-off-by: Michael Baum --- drivers/crypto/mlx5/mlx5_crypto.c | 2 ++ drivers/crypto/mlx5/mlx5_crypto.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/crypto/mlx5/mlx5_crypto.c b/drivers/crypto/mlx5/mlx5_crypto.c index b3d5200ca3..e01be15ade 100644 --- a/drivers/crypto/mlx5/mlx5_crypto.c +++ b/drivers/crypto/mlx5/mlx5_crypto.c @@ -707,6 +707,7 @@ mlx5_crypto_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id, attr.wq_umem_id = qp->umem_obj->umem_id; attr.wq_umem_offset = 0; attr.dbr_umem_id = qp->umem_obj->umem_id; + attr.ts_format = mlx5_ts_format_conv(priv->qp_ts_format); attr.dbr_address = RTE_BIT64(log_nb_desc) * priv->wqe_set_size; qp->qp_obj = mlx5_devx_cmd_create_qp(priv->ctx, &attr); if (qp->qp_obj == NULL) { @@ -1049,6 +1050,7 @@ mlx5_crypto_dev_probe(struct rte_device *dev) priv->ctx = ctx; priv->login_obj = login; priv->crypto_dev = crypto_dev; + priv->qp_ts_format = attr.qp_ts_format; if (mlx5_crypto_hw_global_prepare(priv) != 0) { rte_cryptodev_pmd_destroy(priv->crypto_dev); claim_zero(mlx5_glue->close_device(priv->ctx)); diff --git a/drivers/crypto/mlx5/mlx5_crypto.h b/drivers/crypto/mlx5/mlx5_crypto.h index d49b0001f0..722acb8d19 100644 --- a/drivers/crypto/mlx5/mlx5_crypto.h +++ b/drivers/crypto/mlx5/mlx5_crypto.h @@ -25,6 +25,7 @@ struct mlx5_crypto_priv { volatile uint64_t *uar_addr; uint32_t pdn; /* Protection Domain number. */ uint32_t max_segs_num; /* Maximum supported data segs. */ + uint8_t qp_ts_format; /* Whether QP supports timestamp formats. */ struct ibv_pd *pd; struct mlx5_hlist *dek_hlist; /* Dek hash list. */ struct rte_cryptodev_config dev_config; -- 2.25.1