Show a patch.

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

{
    "id": 41079,
    "url": "http://patches.dpdk.org/api/patches/41079/",
    "web_url": "http://patches.dpdk.org/patch/41079/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20180614083047.10812-2-adrien.mazarguil@6wind.com>",
    "date": "2018-06-14T08:34:49",
    "name": "[v2,1/7] net/mlx5: rename confusing object in probe code",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1f171cc558e4298904f7824f98febea4852f0bd2",
    "submitter": {
        "id": 165,
        "url": "http://patches.dpdk.org/api/people/165/",
        "name": "Adrien Mazarguil",
        "email": "adrien.mazarguil@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/patch/41079/mbox/",
    "series": [
        {
            "id": 118,
            "url": "http://patches.dpdk.org/api/series/118/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=118",
            "date": "2018-06-14T08:34:47",
            "name": "net/mlx5: add port representor support",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/118/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41079/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/41079/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "In-Reply-To": "<20180614083047.10812-1-adrien.mazarguil@6wind.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Mailer": "git-send-email 2.11.0",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 613B51E416;\n\tThu, 14 Jun 2018 10:35:09 +0200 (CEST)",
            "from mail-wm0-f67.google.com (mail-wm0-f67.google.com\n\t[74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 715C11E3B5\n\tfor <dev@dpdk.org>; Thu, 14 Jun 2018 10:35:06 +0200 (CEST)",
            "by mail-wm0-f67.google.com with SMTP id p126-v6so9077079wmb.2\n\tfor <dev@dpdk.org>; Thu, 14 Jun 2018 01:35:06 -0700 (PDT)",
            "from 6wind.com (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\th7-v6sm3015524wmb.48.2018.06.14.01.35.04\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 14 Jun 2018 01:35:04 -0700 (PDT)"
        ],
        "References": "<20180525161814.13873-1-adrien.mazarguil@6wind.com>\n\t<20180614083047.10812-1-adrien.mazarguil@6wind.com>",
        "X-Google-Smtp-Source": "ADUXVKLbyP9iNQrjJr8sC4A7ICojAwet0UtlLGodDyoZ/aI/Nsak4Jzrn+zPTZMQEYGyEo0JI5mLiA==",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to;\n\tbh=H/ZpZT6xCaR2rDmZ27Gj3UrIaboXsXF3Wy3BQR/8tRM=;\n\tb=HuXjo8lxJrvXBob46Mq5y952rpKnfgE2n9W2WLI+yDpBfEVV28Q60ya1ivK1mCxrue\n\twh1LR4M3SokYkmGoqdGikbP4xK/SinHy0cAivPNCB0+HhsF4BiuY7UrHiwEX+vkWnNpj\n\tehyViifqyjeBj3mXmuq/BjwsMhKNATa0IE3oVVW6TO1vCDkp3lsX2lEGakre/coD8Ljx\n\tr90yZFa/oFMfDyEqdD9ENzbg/oa5Oj4YNYsBaRy4uj4irtsufYcHB7WAA/XFnmFDqxGs\n\tWyvDSjSHBx7SM7bTFs6G9WpIsTo2kF17aKdCtiE03YapUxYHdlzBgyoIeRsBlr3jj9ne\n\t2x7w==",
        "MIME-Version": "1.0",
        "X-Received": "by 2002:a1c:338c:: with SMTP id\n\tz134-v6mr1107132wmz.93.1528965306203; \n\tThu, 14 Jun 2018 01:35:06 -0700 (PDT)",
        "Message-ID": "<20180614083047.10812-2-adrien.mazarguil@6wind.com>",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to;\n\tbh=H/ZpZT6xCaR2rDmZ27Gj3UrIaboXsXF3Wy3BQR/8tRM=;\n\tb=CHKJPcH0ZXlnF7fn6tHb87ttrzEL8fs6f235+HcxX2hrXwaB9AOrXBumXaSzOzHAdg\n\tqhnxsi2Xn51JNotYaW/YVPoVClb0iM2H73sBJaxNXw/Ga5SW1NmKs1jIgm5gBVrCHHdZ\n\tbX8fax6ie+vk7OJzmNqtwKFUvmdslZlmc9MNbC6lYHhEonc6bEHmwlqoIJBhJAzIf9MJ\n\tOmKhwSSCe9pvHAVu5KppMEw++EK0zmHh7owAg+GmqenSk44sB7BMVV1tezTN2UTvWYRr\n\t5F/ckj/dZyiwMcXoPbL5e9PmVYNRJ+MhBoeYIilXJwjyLGR45WcZveN4ko0nH38cdCSJ\n\tj6AQ==",
        "Delivered-To": "patchwork@dpdk.org",
        "Precedence": "list",
        "From": "Adrien Mazarguil <adrien.mazarguil@6wind.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "To": "Shahaf Shuler <shahafs@mellanox.com>",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Thu, 14 Jun 2018 10:34:49 +0200",
        "X-Gm-Message-State": "APt69E2ntgrwRBcuEAn0NOBdAcEQ+P5YP0mamaC1x3ks6ppqjZ61Yzjt\n\tb0CQX9bqT5xeEgzZKmMMQWQBwPHd",
        "Cc": "dev@dpdk.org",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "X-BeenThere": "dev@dpdk.org",
        "Subject": "[dpdk-dev] [PATCH v2 1/7] net/mlx5: rename confusing object in\n\tprobe code"
    },
    "content": "There are several attribute objects in this function:\n\n- IB device attributes (struct ibv_device_attr_ex device_attr).\n- Direct Verbs attributes (struct mlx5dv_context attrs_out).\n- Port attributes (struct ibv_port_attr).\n- IB device attributes again (struct ibv_device_attr_ex device_attr_ex).\n\n\"attrs_out\" is both odd and initialized using a nonstandard syntax. Rename\nit \"dv_attr\" for consistency.\n\nSigned-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>\n--\nv2 changes:\n\n- Fixed ctx -> attr_ctx in mlx5_pci_probe().\n---\n drivers/net/mlx5/mlx5.c | 34 +++++++++++++++++-----------------\n 1 file changed, 17 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex 3e0a1b186..3bdcb3970 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -654,6 +654,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n {\n \tstruct ibv_device **list = NULL;\n \tstruct ibv_device *ibv_dev;\n+\tstruct mlx5dv_context dv_attr = { .comp_mask = 0 };\n \tint err = 0;\n \tstruct ibv_context *attr_ctx = NULL;\n \tstruct ibv_device_attr_ex device_attr;\n@@ -670,7 +671,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tunsigned int mprq_min_stride_num_n = 0;\n \tunsigned int mprq_max_stride_num_n = 0;\n \tint i;\n-\tstruct mlx5dv_context attrs_out = {0};\n #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT\n \tstruct ibv_counter_set_description cs_desc = { .counter_type = 0 };\n #endif\n@@ -736,21 +736,21 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tibv_dev = list[i];\n \tDRV_LOG(DEBUG, \"device opened\");\n #ifdef HAVE_IBV_MLX5_MOD_SWP\n-\tattrs_out.comp_mask |= MLX5DV_CONTEXT_MASK_SWP;\n+\tdv_attr.comp_mask |= MLX5DV_CONTEXT_MASK_SWP;\n #endif\n \t/*\n \t * Multi-packet send is supported by ConnectX-4 Lx PF as well\n \t * as all ConnectX-5 devices.\n \t */\n #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT\n-\tattrs_out.comp_mask |= MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS;\n+\tdv_attr.comp_mask |= MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS;\n #endif\n #ifdef HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT\n-\tattrs_out.comp_mask |= MLX5DV_CONTEXT_MASK_STRIDING_RQ;\n+\tdv_attr.comp_mask |= MLX5DV_CONTEXT_MASK_STRIDING_RQ;\n #endif\n-\tmlx5_glue->dv_query_device(attr_ctx, &attrs_out);\n-\tif (attrs_out.flags & MLX5DV_CONTEXT_FLAGS_MPW_ALLOWED) {\n-\t\tif (attrs_out.flags & MLX5DV_CONTEXT_FLAGS_ENHANCED_MPW) {\n+\tmlx5_glue->dv_query_device(attr_ctx, &dv_attr);\n+\tif (dv_attr.flags & MLX5DV_CONTEXT_FLAGS_MPW_ALLOWED) {\n+\t\tif (dv_attr.flags & MLX5DV_CONTEXT_FLAGS_ENHANCED_MPW) {\n \t\t\tDRV_LOG(DEBUG, \"enhanced MPW is supported\");\n \t\t\tmps = MLX5_MPW_ENHANCED;\n \t\t} else {\n@@ -762,14 +762,14 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t\tmps = MLX5_MPW_DISABLED;\n \t}\n #ifdef HAVE_IBV_MLX5_MOD_SWP\n-\tif (attrs_out.comp_mask & MLX5DV_CONTEXT_MASK_SWP)\n-\t\tswp = attrs_out.sw_parsing_caps.sw_parsing_offloads;\n+\tif (dv_attr.comp_mask & MLX5DV_CONTEXT_MASK_SWP)\n+\t\tswp = dv_attr.sw_parsing_caps.sw_parsing_offloads;\n \tDRV_LOG(DEBUG, \"SWP support: %u\", swp);\n #endif\n #ifdef HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT\n-\tif (attrs_out.comp_mask & MLX5DV_CONTEXT_MASK_STRIDING_RQ) {\n+\tif (dv_attr.comp_mask & MLX5DV_CONTEXT_MASK_STRIDING_RQ) {\n \t\tstruct mlx5dv_striding_rq_caps mprq_caps =\n-\t\t\tattrs_out.striding_rq_caps;\n+\t\t\tdv_attr.striding_rq_caps;\n \n \t\tDRV_LOG(DEBUG, \"\\tmin_single_stride_log_num_of_bytes: %d\",\n \t\t\tmprq_caps.min_single_stride_log_num_of_bytes);\n@@ -794,15 +794,15 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t}\n #endif\n \tif (RTE_CACHE_LINE_SIZE == 128 &&\n-\t    !(attrs_out.flags & MLX5DV_CONTEXT_FLAGS_CQE_128B_COMP))\n+\t    !(dv_attr.flags & MLX5DV_CONTEXT_FLAGS_CQE_128B_COMP))\n \t\tcqe_comp = 0;\n \telse\n \t\tcqe_comp = 1;\n #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT\n-\tif (attrs_out.comp_mask & MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS) {\n-\t\ttunnel_en = ((attrs_out.tunnel_offloads_caps &\n+\tif (dv_attr.comp_mask & MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS) {\n+\t\ttunnel_en = ((dv_attr.tunnel_offloads_caps &\n \t\t\t      MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_VXLAN) &&\n-\t\t\t     (attrs_out.tunnel_offloads_caps &\n+\t\t\t     (dv_attr.tunnel_offloads_caps &\n \t\t\t      MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE));\n \t}\n \tDRV_LOG(DEBUG, \"tunnel offloading is %ssupported\",\n@@ -812,9 +812,9 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t\t\"tunnel offloading disabled due to old OFED/rdma-core version\");\n #endif\n #ifdef HAVE_IBV_DEVICE_MPLS_SUPPORT\n-\tmpls_en = ((attrs_out.tunnel_offloads_caps &\n+\tmpls_en = ((dv_attr.tunnel_offloads_caps &\n \t\t    MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_CW_MPLS_OVER_GRE) &&\n-\t\t   (attrs_out.tunnel_offloads_caps &\n+\t\t   (dv_attr.tunnel_offloads_caps &\n \t\t    MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_CW_MPLS_OVER_UDP));\n \tDRV_LOG(DEBUG, \"MPLS over GRE/UDP tunnel offloading is %ssupported\",\n \t\tmpls_en ? \"\" : \"not \");\n",
    "prefixes": [
        "v2",
        "1/7"
    ]
}