get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73548,
    "url": "https://patches.dpdk.org/api/patches/73548/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1594241536-5300-1-git-send-email-viacheslavo@mellanox.com/",
    "project": {
        "id": 1,
        "url": "https://patches.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": "<1594241536-5300-1-git-send-email-viacheslavo@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1594241536-5300-1-git-send-email-viacheslavo@mellanox.com",
    "date": "2020-07-08T20:52:16",
    "name": "common/mlx5: fix physical port name pattern recognition",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "5f0f7a5273110601c11fd8619b35bdf32fe4aced",
    "submitter": {
        "id": 1102,
        "url": "https://patches.dpdk.org/api/people/1102/?format=api",
        "name": "Slava Ovsiienko",
        "email": "viacheslavo@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1594241536-5300-1-git-send-email-viacheslavo@mellanox.com/mbox/",
    "series": [
        {
            "id": 10897,
            "url": "https://patches.dpdk.org/api/series/10897/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10897",
            "date": "2020-07-08T20:52:16",
            "name": "common/mlx5: fix physical port name pattern recognition",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/10897/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73548/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/73548/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B9A24A0526;\n\tWed,  8 Jul 2020 22:52:22 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 38F851DE7B;\n\tWed,  8 Jul 2020 22:52:21 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id A44B61DE1F\n for <dev@dpdk.org>; Wed,  8 Jul 2020 22:52:19 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n viacheslavo@mellanox.com) with SMTP; 8 Jul 2020 23:52:18 +0300",
            "from pegasus12.mtr.labs.mlnx (pegasus12.mtr.labs.mlnx\n [10.210.17.40])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 068KqI0n007649;\n Wed, 8 Jul 2020 23:52:18 +0300",
            "from pegasus12.mtr.labs.mlnx (localhost [127.0.0.1])\n by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id 068KqIjw005342;\n Wed, 8 Jul 2020 20:52:18 GMT",
            "(from viacheslavo@localhost)\n by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id 068KqIcq005341;\n Wed, 8 Jul 2020 20:52:18 GMT"
        ],
        "X-Authentication-Warning": "pegasus12.mtr.labs.mlnx: viacheslavo set sender to\n viacheslavo@mellanox.com using -f",
        "From": "Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "matan@mellanox.com, rasland@mellanox.com, stable@dpdk.org",
        "Date": "Wed,  8 Jul 2020 20:52:16 +0000",
        "Message-Id": "<1594241536-5300-1-git-send-email-viacheslavo@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "Subject": "[dpdk-dev] [PATCH] common/mlx5: fix physical port name pattern\n\trecognition",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch makes the Infiniband device physical port name\nrecognition more strict. Currently mlx5 PMD might recognize\nthe names like \"pf0sf0\" erroneously as \"pf0\" and the wrong\ndevice type (host PF representor) is reported.\n\nThe names like \"pf0sf0\" belong to PCI subfunctions which\nis currently not supported by mlx5 PMD and this false\nrecognition must be eliminated.\n\nFixes: 420bbdae89f2 (\"net/mlx5: fix host physical function representor naming\")\nCc: stable@dpdk.org\n\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n drivers/common/mlx5/linux/mlx5_common_os.c | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c\nindex e74aa89..7bb3ba6 100644\n--- a/drivers/common/mlx5/linux/mlx5_common_os.c\n+++ b/drivers/common/mlx5/linux/mlx5_common_os.c\n@@ -89,7 +89,7 @@\n mlx5_translate_port_name(const char *port_name_in,\n \t\t\t struct mlx5_switch_info *port_info_out)\n {\n-\tchar pf_c1, pf_c2, vf_c1, vf_c2;\n+\tchar pf_c1, pf_c2, vf_c1, vf_c2, eol;\n \tchar *end;\n \tint sc_items;\n \n@@ -97,9 +97,9 @@\n \t * Check for port-name as a string of the form pf0vf0\n \t * (support kernel ver >= 5.0 or OFED ver >= 4.6).\n \t */\n-\tsc_items = sscanf(port_name_in, \"%c%c%d%c%c%d\",\n+\tsc_items = sscanf(port_name_in, \"%c%c%d%c%c%d%c\",\n \t\t\t  &pf_c1, &pf_c2, &port_info_out->pf_num,\n-\t\t\t  &vf_c1, &vf_c2, &port_info_out->port_name);\n+\t\t\t  &vf_c1, &vf_c2, &port_info_out->port_name, &eol);\n \tif (sc_items == 6 &&\n \t    pf_c1 == 'p' && pf_c2 == 'f' &&\n \t    vf_c1 == 'v' && vf_c2 == 'f') {\n@@ -110,8 +110,8 @@\n \t * Check for port-name as a string of the form p0\n \t * (support kernel ver >= 5.0, or OFED ver >= 4.6).\n \t */\n-\tsc_items = sscanf(port_name_in, \"%c%d\",\n-\t\t\t  &pf_c1, &port_info_out->port_name);\n+\tsc_items = sscanf(port_name_in, \"%c%d%c\",\n+\t\t\t  &pf_c1, &port_info_out->port_name, &eol);\n \tif (sc_items == 2 && pf_c1 == 'p') {\n \t\tport_info_out->name_type = MLX5_PHYS_PORT_NAME_TYPE_UPLINK;\n \t\treturn;\n@@ -120,8 +120,8 @@\n \t * Check for port-name as a string of the form pf0\n \t * (support kernel ver >= 5.7 for HPF representor on BF).\n \t */\n-\tsc_items = sscanf(port_name_in, \"%c%c%d\",\n-\t\t\t  &pf_c1, &pf_c2, &port_info_out->pf_num);\n+\tsc_items = sscanf(port_name_in, \"%c%c%d%c\",\n+\t\t\t  &pf_c1, &pf_c2, &port_info_out->pf_num, &eol);\n \tif (sc_items == 3 && pf_c1 == 'p' && pf_c2 == 'f') {\n \t\tport_info_out->port_name = -1;\n \t\tport_info_out->name_type = MLX5_PHYS_PORT_NAME_TYPE_PFHPF;\n",
    "prefixes": []
}