get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/106629/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 106629,
    "url": "http://patchwork.dpdk.org/api/patches/106629/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220127153950.812953-12-michaelba@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20220127153950.812953-12-michaelba@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220127153950.812953-12-michaelba@nvidia.com",
    "date": "2022-01-27T15:39:41",
    "name": "[11/20] net/mlx5: share realtime timestamp configure",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5d2c2d8d92b83550db62da1a531dfc4a4ff18453",
    "submitter": {
        "id": 1949,
        "url": "http://patchwork.dpdk.org/api/people/1949/?format=api",
        "name": "Michael Baum",
        "email": "michaelba@nvidia.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patchwork.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220127153950.812953-12-michaelba@nvidia.com/mbox/",
    "series": [
        {
            "id": 21402,
            "url": "http://patchwork.dpdk.org/api/series/21402/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=21402",
            "date": "2022-01-27T15:39:30",
            "name": "mlx5: refactor devargs management",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/21402/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/106629/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/106629/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 349A5A04A6;\n\tThu, 27 Jan 2022 16:41:28 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 73CE4428BA;\n\tThu, 27 Jan 2022 16:40:21 +0100 (CET)",
            "from NAM10-BN7-obe.outbound.protection.outlook.com\n (mail-bn7nam10on2054.outbound.protection.outlook.com [40.107.92.54])\n by mails.dpdk.org (Postfix) with ESMTP id 359D64067C\n for <dev@dpdk.org>; Thu, 27 Jan 2022 16:40:20 +0100 (CET)",
            "from BN9PR03CA0229.namprd03.prod.outlook.com (2603:10b6:408:f8::24)\n by CH0PR12MB5171.namprd12.prod.outlook.com (2603:10b6:610:ba::23)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15; Thu, 27 Jan\n 2022 15:40:18 +0000",
            "from BN8NAM11FT064.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:f8:cafe::3e) by BN9PR03CA0229.outlook.office365.com\n (2603:10b6:408:f8::24) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15 via Frontend\n Transport; Thu, 27 Jan 2022 15:40:18 +0000",
            "from mail.nvidia.com (12.22.5.236) by\n BN8NAM11FT064.mail.protection.outlook.com (10.13.176.160) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4930.15 via Frontend Transport; Thu, 27 Jan 2022 15:40:18 +0000",
            "from drhqmail201.nvidia.com (10.126.190.180) by\n DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id\n 15.0.1497.18; Thu, 27 Jan 2022 15:40:17 +0000",
            "from drhqmail202.nvidia.com (10.126.190.181) by\n drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9;\n Thu, 27 Jan 2022 07:40:16 -0800",
            "from nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.181)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9 via Frontend\n Transport; Thu, 27 Jan 2022 07:40:15 -0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=RtOtIRKJHtKPzzNp2JhckqazzsTgZi7IFAMLkK+WETwW5mrNRN0SzLet6YSMNz5rL12DE4HNla3sqDcsMfgOkqU0NjfUT8MZXiZute7fEi0msTwDkoWkH8Ha0m7ktBFqi/yKRc4DviqvbKOLIRw2+vAHK/Fxp+XWZiJhpRfr4e431RJUkWvyT/n64ESdac4gnTEzJG3HjKCDz8a9B2IxDPPc5G/nt34OxdchCCvJpBMphgxkUmhNEjrsn25/3sPVoTwPT9ZaUUVBvEqeoXiOSl2UGpfk1VBhU0tbI4A73S6LF0BYFxq80g5DZpXNEWbfz+h/V/rpT4setyhmyWkShw==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n 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;\n bh=PFtiVM8X/ByFz8fYQZniYMH1w8A9cPliJBMG/XyXm84=;\n b=b8+3X+7Fs7X8tTRi324o8L87ietbrT1erpu/QWyglZyyy0t/GP4tH5OA5UtqBia+jnVo9uzkHoKtiCUTaviPSxkwW03hP9pcrux7F1SZX7qGutglgQ80AdVcYJb5EGIKYTX4BKE1gB1vDnGNoJWw18K1t8WZKrTdQBYo/Dl/H9c8zI9TtP7lW2YZq+TTiSun8xq+rd3AsCUW8Bvsd65g130+nFPBPUcYibbpd+GjiCZk9Oh5hRyuwm6pakC0B8uyCZmMfpnhNQIfYDJp8D+ceSQY+E91S8pJI6X4rQCjTPqllhB9lsMF/AH+FsNaNoFREz6iDNRskt1rW9FHzAj+Jg==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 12.22.5.236) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass\n (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none\n (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=PFtiVM8X/ByFz8fYQZniYMH1w8A9cPliJBMG/XyXm84=;\n b=rQEml/KhVB9+2X4kQaOSI6hPTgwhO9h6zUVLslouo9U8cW1zNrL4lJexBzyJEWPb8jxCkDazGsNfw2P6y9ft6Re8gQaJHPnaanm2qW5WSvGEAvPr4L8fIngpuFtvb1L9mwXF5gMWfzPa/yC1xYs6ZAKDzYdw24golC3dSYwPIT7wX8xfO2EkTLTrvXKaxpKQXEFwLzLaDmxj0Jesd71iMHJBtDU9xEAt9kXO+Rtg8zQdmTEAeP1p33faliVzVNhHgJ/U29sYNlNzc6M8rS4ST+Sn1rX3tb41s43QPIRQVqQcmEIuzEde1W1zUktIL/bOnrI+d+mKL1fI4MLZTXflcQ==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 12.22.5.236)\n smtp.mailfrom=nvidia.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 12.22.5.236 as permitted sender) receiver=protection.outlook.com;\n client-ip=12.22.5.236; helo=mail.nvidia.com;",
        "From": "Michael Baum <michaelba@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Matan Azrad <matan@nvidia.com>, Raslan Darawsheh <rasland@nvidia.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>",
        "Subject": "[PATCH 11/20] net/mlx5: share realtime timestamp configure",
        "Date": "Thu, 27 Jan 2022 17:39:41 +0200",
        "Message-ID": "<20220127153950.812953-12-michaelba@nvidia.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220127153950.812953-1-michaelba@nvidia.com>",
        "References": "<20220127153950.812953-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-Office365-Filtering-Correlation-Id": "193df303-4c9d-4cd3-af4e-08d9e1ab5222",
        "X-MS-TrafficTypeDiagnostic": "CH0PR12MB5171:EE_",
        "X-Microsoft-Antispam-PRVS": "\n <CH0PR12MB5171B27CAA6B0F0859D2AF18CC219@CH0PR12MB5171.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:5797;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n z6FG+k6awoYhkWBvmiMnAcHkOFz5SMh6GaTZ9sS4Yx2V5IW+rnUaeAylxTxvZUyjZeUnOA5aR0SSEnfXOBJVMru5LgMeOCVssHekmfab5grykqmuy7BQemlr7vM3f2gyokK2czZyZksIlIrzQXaf757S/QgKVn+/0UGJjFAwu/+4GI62THJUesDDa9BtpkKokkhs0U8X7jkTzOerMt7tfbOrCg53T+ekklvXITp06Flt1Qsp0pDA5lcYB0Y9KfC9LkLHEfJJT20M+TG+cZ1A3RkYynKQ3x/ZdLohLuH70v280EFJ/pdtVfl9vhVeqfObivTPL66HRcpxX727/P7pVBEZvvvxxC6Dqp4WhaAAcMTHiJIZAGj8Bm6erEg2HZp2HAaUggA75xgROwJlePvw9dQYFYKiK7zoJDxjIo4SYcykz2xdKUx4BncH6HFwhMbAaz9oHs0C5PXHsnq6KZBKRiD7skbx2c0mU+LubukkMsYmsGhVp7hjDeNjFkHi5zBo3wdNnT/MUfD1xy+AXekGHlrcX/Csx7rIIIP3psIran5iaZLO25bAuNC/vgbLfKvCmU9iG2jNs9xNI2bLHSlZ0w7IeLfIDLazZZz6z7DhN+rqHBYmcqHYnezuBOeGhclAKtim4GssvfRkQifGa5qan4C2T6pcDKCyDUxCOgMQeF+VxiLxmlXmcjcFsIbRm+Qtzbi2+05h0PSZAzT9vpSakw==",
        "X-Forefront-Antispam-Report": "CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE;\n SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(86362001)(82310400004)(2906002)(508600001)(6666004)(7696005)(47076005)(40460700003)(316002)(54906003)(6916009)(5660300002)(8936002)(107886003)(356005)(81166007)(26005)(8676002)(4326008)(2616005)(36860700001)(6286002)(83380400001)(186003)(55016003)(36756003)(336012)(1076003)(426003)(70586007)(70206006)(36900700001)(20210929001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "27 Jan 2022 15:40:18.1423 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 193df303-4c9d-4cd3-af4e-08d9e1ab5222",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n BN8NAM11FT064.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "CH0PR12MB5171",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "The realtime timestamp configure work for Linux as same as Windows.\nThis patch removes it to the function implemented in the folder shared\nbetween the operating systems, removing the duplication.\n\nSigned-off-by: Michael Baum <michaelba@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n drivers/net/mlx5/linux/mlx5_os.c   | 23 ++-----------------\n drivers/net/mlx5/mlx5.c            | 37 ++++++++++++++++++++++++++++++\n drivers/net/mlx5/mlx5.h            |  3 +++\n drivers/net/mlx5/windows/mlx5_os.c | 22 +-----------------\n 4 files changed, 43 insertions(+), 42 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c\nindex 2fb91fec06..bb90cc4426 100644\n--- a/drivers/net/mlx5/linux/mlx5_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_os.c\n@@ -1516,27 +1516,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,\n \t\t\t\tpriv->dev_port);\n \t\t}\n \t}\n-\tif (sh->cdev->config.devx) {\n-\t\tuint32_t reg[MLX5_ST_SZ_DW(register_mtutc)];\n-\n-\t\terr = hca_attr->access_register_user ?\n-\t\t\tmlx5_devx_cmd_register_read\n-\t\t\t\t(sh->cdev->ctx, MLX5_REGISTER_ID_MTUTC, 0,\n-\t\t\t\treg, MLX5_ST_SZ_DW(register_mtutc)) : ENOTSUP;\n-\t\tif (!err) {\n-\t\t\tuint32_t ts_mode;\n-\n-\t\t\t/* MTUTC register is read successfully. */\n-\t\t\tts_mode = MLX5_GET(register_mtutc, reg,\n-\t\t\t\t\t   time_stamp_mode);\n-\t\t\tif (ts_mode == MLX5_MTUTC_TIMESTAMP_MODE_REAL_TIME)\n-\t\t\t\tconfig->rt_timestamp = 1;\n-\t\t} else {\n-\t\t\t/* Kernel does not support register reading. */\n-\t\t\tif (hca_attr->dev_freq_khz == (NS_PER_S / MS_PER_S))\n-\t\t\t\tconfig->rt_timestamp = 1;\n-\t\t}\n-\t}\n+\tif (sh->cdev->config.devx)\n+\t\tmlx5_rt_timestamp_config(sh, config, hca_attr);\n \t/*\n \t * If HW has bug working with tunnel packet decapsulation and\n \t * scatter FCS, and decapsulation is needed, clear the hw_fcs_strip\ndiff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex b371a87355..5146359100 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -1129,6 +1129,43 @@ mlx5_setup_tis(struct mlx5_dev_ctx_shared *sh)\n \treturn 0;\n }\n \n+/**\n+ * Configure realtime timestamp format.\n+ *\n+ * @param sh\n+ *   Pointer to mlx5_dev_ctx_shared object.\n+ * @param config\n+ *   Device configuration parameters.\n+ * @param hca_attr\n+ *   Pointer to DevX HCA capabilities structure.\n+ */\n+void\n+mlx5_rt_timestamp_config(struct mlx5_dev_ctx_shared *sh,\n+\t\t\t struct mlx5_dev_config *config,\n+\t\t\t struct mlx5_hca_attr *hca_attr)\n+{\n+\tuint32_t dw_cnt = MLX5_ST_SZ_DW(register_mtutc);\n+\tuint32_t reg[dw_cnt];\n+\tint ret = ENOTSUP;\n+\n+\tif (hca_attr->access_register_user)\n+\t\tret = mlx5_devx_cmd_register_read(sh->cdev->ctx,\n+\t\t\t\t\t\t  MLX5_REGISTER_ID_MTUTC, 0,\n+\t\t\t\t\t\t  reg, dw_cnt);\n+\tif (!ret) {\n+\t\tuint32_t ts_mode;\n+\n+\t\t/* MTUTC register is read successfully. */\n+\t\tts_mode = MLX5_GET(register_mtutc, reg, time_stamp_mode);\n+\t\tif (ts_mode == MLX5_MTUTC_TIMESTAMP_MODE_REAL_TIME)\n+\t\t\tconfig->rt_timestamp = 1;\n+\t} else {\n+\t\t/* Kernel does not support register reading. */\n+\t\tif (hca_attr->dev_freq_khz == (NS_PER_S / MS_PER_S))\n+\t\t\tconfig->rt_timestamp = 1;\n+\t}\n+}\n+\n /**\n  * Allocate shared device context. If there is multiport device the\n  * master and representors will share this context, if there is single\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex 6bc7a34f60..0f90d757e9 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -1517,6 +1517,9 @@ void mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh);\n \t     port_id < RTE_MAX_ETHPORTS; \\\n \t     port_id = mlx5_eth_find_next(port_id + 1, dev))\n int mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs);\n+void mlx5_rt_timestamp_config(struct mlx5_dev_ctx_shared *sh,\n+\t\t\t      struct mlx5_dev_config *config,\n+\t\t\t      struct mlx5_hca_attr *hca_attr);\n struct mlx5_dev_ctx_shared *\n mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn,\n \t\t\t   const struct mlx5_dev_config *config);\ndiff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c\nindex 178e58b4d7..a9c7ba2a14 100644\n--- a/drivers/net/mlx5/windows/mlx5_os.c\n+++ b/drivers/net/mlx5/windows/mlx5_os.c\n@@ -483,27 +483,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,\n \t\tDRV_LOG(DEBUG, \"VLAN stripping is %ssupported\",\n \t\t\t(config->hw_vlan_strip ? \"\" : \"not \"));\n \t\tconfig->hw_fcs_strip = hca_attr->scatter_fcs;\n-\t}\n-\tif (sh->devx) {\n-\t\tuint32_t reg[MLX5_ST_SZ_DW(register_mtutc)];\n-\n-\t\terr = hca_attr->access_register_user ?\n-\t\t\tmlx5_devx_cmd_register_read\n-\t\t\t\t(sh->cdev->ctx, MLX5_REGISTER_ID_MTUTC, 0,\n-\t\t\t\treg, MLX5_ST_SZ_DW(register_mtutc)) : ENOTSUP;\n-\t\tif (!err) {\n-\t\t\tuint32_t ts_mode;\n-\n-\t\t\t/* MTUTC register is read successfully. */\n-\t\t\tts_mode = MLX5_GET(register_mtutc, reg,\n-\t\t\t\t\t   time_stamp_mode);\n-\t\t\tif (ts_mode == MLX5_MTUTC_TIMESTAMP_MODE_REAL_TIME)\n-\t\t\t\tconfig->rt_timestamp = 1;\n-\t\t} else {\n-\t\t\t/* Kernel does not support register reading. */\n-\t\t\tif (hca_attr->dev_freq_khz == (NS_PER_S / MS_PER_S))\n-\t\t\t\tconfig->rt_timestamp = 1;\n-\t\t}\n+\t\tmlx5_rt_timestamp_config(sh, config, hca_attr);\n \t}\n \tif (config->mprq.enabled) {\n \t\tDRV_LOG(WARNING, \"Multi-Packet RQ isn't supported\");\n",
    "prefixes": [
        "11/20"
    ]
}