get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 116856,
    "url": "https://patches.dpdk.org/api/patches/116856/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220926082339.1178538-1-achernavin@netgate.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": "<20220926082339.1178538-1-achernavin@netgate.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220926082339.1178538-1-achernavin@netgate.com",
    "date": "2022-09-26T08:23:39",
    "name": "[v2] net/virtio: fix crash when dev is configured twice",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "f7ebbbfce547b258e706e67d471631aeeda84321",
    "submitter": {
        "id": 2825,
        "url": "https://patches.dpdk.org/api/people/2825/?format=api",
        "name": "Alexander Chernavin",
        "email": "achernavin@netgate.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220926082339.1178538-1-achernavin@netgate.com/mbox/",
    "series": [
        {
            "id": 24821,
            "url": "https://patches.dpdk.org/api/series/24821/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24821",
            "date": "2022-09-26T08:23:39",
            "name": "[v2] net/virtio: fix crash when dev is configured twice",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/24821/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/116856/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/116856/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 12497A00C3;\n\tMon, 26 Sep 2022 10:23:44 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8BA8941133;\n\tMon, 26 Sep 2022 10:23:43 +0200 (CEST)",
            "from mail-lf1-f42.google.com (mail-lf1-f42.google.com\n [209.85.167.42]) by mails.dpdk.org (Postfix) with ESMTP id 44FC8400D7\n for <dev@dpdk.org>; Mon, 26 Sep 2022 10:23:42 +0200 (CEST)",
            "by mail-lf1-f42.google.com with SMTP id z25so9662167lfr.2\n for <dev@dpdk.org>; Mon, 26 Sep 2022 01:23:42 -0700 (PDT)",
            "from pb1-dev.ad.sperasoft.com ([188.233.188.88])\n by smtp.gmail.com with ESMTPSA id\n m4-20020a2e8704000000b0026bfadf87e3sm2305283lji.20.2022.09.26.01.23.40\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 26 Sep 2022 01:23:41 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=netgate.com; s=google;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date;\n bh=TZ6KZANGWhlvet5pg0LSqyeDjHFz852znq27/sSuNE4=;\n b=ECtK41YGyRaiB63aWvVP64SSG+t2fkzH8wCrrXFEGLMFW6jpZqoPI5bxFzlQl5Wrvp\n 0XFgQlpDmszIzkH5IUVDDsYcnCCNPOK09lxtnn/m9JN+ugXKisdF7sYwp3Wbk8ggubhQ\n 9xllV/UmmwbW37dIidlEAnS+b9XemIEHoTPXE=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-message-state:from:to:cc:subject:date;\n bh=TZ6KZANGWhlvet5pg0LSqyeDjHFz852znq27/sSuNE4=;\n b=W5B/NT8m0lBmCkXb8MXjgXnhL9GOSwNZB/3wzBubfYLKpVd1n5zuPfI7lEz57zSZAZ\n D/CPPTiIEMZg6fTCN0ayCQtEG2msbcraVbzFKDg85+NJMo0Pr2xo1URjR1R+ZHMz77rM\n lqOwG4GvxEbjIXS+fgfHkn0eRylQzZheSp2M4JLjUbHVf1Ly/xvu0P5p+7JoZBJ4OEe5\n 8hfchU5oa24MOD9cvX+96CqvLc6ZxIx1TGT2G36bI1fzcsox2MWXq1AH6KwuiBLW12/G\n hTNMH0IEpe8Z+6jimmA0FudSnX5kajz5ajrspUkMUKJyI1wCkv+gN4YtgvdoLlkArJiO\n L3Vg==",
        "X-Gm-Message-State": "ACrzQf2Emv13AY+yjG3OoktxFSm1XqYDAYJxiI2AlTjw71eis7EAnupW\n fvLfqKETI2CLleWEbxkH/0BhLg==",
        "X-Google-Smtp-Source": "\n AMsMyM7CkRB1a2EgzMyHnsuOWBJ/shHHcZW2GO6AWpgA8/3RkB7qiHt/YlYVNHtK0c05WUrnOh8oPw==",
        "X-Received": "by 2002:a05:6512:3053:b0:499:183:d5fb with SMTP id\n b19-20020a056512305300b004990183d5fbmr7894789lfb.98.1664180621712;\n Mon, 26 Sep 2022 01:23:41 -0700 (PDT)",
        "From": "Alexander Chernavin <achernavin@netgate.com>",
        "To": "maxime.coquelin@redhat.com,\n\tchenbo.xia@intel.com",
        "Cc": "dev@dpdk.org, Alexander Chernavin <achernavin@netgate.com>,\n stable@dpdk.org",
        "Subject": "[PATCH v2] net/virtio: fix crash when dev is configured twice",
        "Date": "Mon, 26 Sep 2022 08:23:39 +0000",
        "Message-Id": "<20220926082339.1178538-1-achernavin@netgate.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "When first attempt to configure a device with RX interrupt enabled fails\nfor some reason (e.g. because \"Multiple intr vector not supported\"),\nsecond attempt to configure the device with RX interrupt disabled and\nfeature set unchanged will succeed but will leave virtio queues not\nallocated. Accessing the queues will cause a segfault.\n\nFirst attempt:\n  - virtio_dev_configure()\n    - virtio_init_device() is called to reinit the device because\n      \"dev->data->dev_conf.intr_conf.rxq\" is \"1\"\n      - virtio_configure_intr() fails and returns an error\n      - virtio_free_queues() frees previously allocated virtio queues\n    - virtio_init_device() fails and returns an error\n  - virtio_dev_configure() fails and returns an error\n\nSecond attempt:\n  - virtio_dev_configure()\n    - This time virtio_init_device() is not called, virtio queues\n      are not allocated\n\nWith this fix, reinit the device during configuration if virtio queues\nare not allocated.\n\nCc: stable@dpdk.org\n\nSigned-off-by: Alexander Chernavin <achernavin@netgate.com>\n---\nv2:\n* Also CC to stable@dpdk.org\n\n drivers/net/virtio/virtio_ethdev.c | 7 +++++++\n 1 file changed, 7 insertions(+)",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex d180162abd..38bfe050b5 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -2616,6 +2616,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)\n \t\t\treturn ret;\n \t}\n \n+\t/* if queues are not allocated, reinit the device */\n+\tif (hw->vqs == NULL) {\n+\t\tret = virtio_init_device(dev, hw->req_guest_features);\n+\t\tif (ret < 0)\n+\t\t\treturn ret;\n+\t}\n+\n \tif ((rxmode->mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) &&\n \t\t\t!virtio_with_feature(hw, VIRTIO_NET_F_RSS)) {\n \t\tPMD_DRV_LOG(ERR, \"RSS support requested but not supported by the device\");\n",
    "prefixes": [
        "v2"
    ]
}