get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 116969,
    "url": "http://patches.dpdk.org/api/patches/116969/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220927101504.1220037-1-achernavin@netgate.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20220927101504.1220037-1-achernavin@netgate.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220927101504.1220037-1-achernavin@netgate.com",
    "date": "2022-09-27T10:15:04",
    "name": "[v3] net/virtio: fix crash when dev is configured twice",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f7ebbbfce547b258e706e67d471631aeeda84321",
    "submitter": {
        "id": 2825,
        "url": "http://patches.dpdk.org/api/people/2825/?format=api",
        "name": "Alexander Chernavin",
        "email": "achernavin@netgate.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220927101504.1220037-1-achernavin@netgate.com/mbox/",
    "series": [
        {
            "id": 24862,
            "url": "http://patches.dpdk.org/api/series/24862/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24862",
            "date": "2022-09-27T10:15:04",
            "name": "[v3] net/virtio: fix crash when dev is configured twice",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/24862/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/116969/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/116969/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 B87A0A00C2;\n\tTue, 27 Sep 2022 12:15:10 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4543541143;\n\tTue, 27 Sep 2022 12:15:10 +0200 (CEST)",
            "from mail-lf1-f45.google.com (mail-lf1-f45.google.com\n [209.85.167.45]) by mails.dpdk.org (Postfix) with ESMTP id AEC87410D0\n for <dev@dpdk.org>; Tue, 27 Sep 2022 12:15:08 +0200 (CEST)",
            "by mail-lf1-f45.google.com with SMTP id a2so14947827lfb.6\n for <dev@dpdk.org>; Tue, 27 Sep 2022 03:15:08 -0700 (PDT)",
            "from pb1-dev.ad.sperasoft.com ([188.233.188.88])\n by smtp.gmail.com with ESMTPSA id\n z12-20020ac25dec000000b00493014c3d7csm115846lfq.309.2022.09.27.03.15.06\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 27 Sep 2022 03:15:07 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=netgate.com; s=google;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date;\n bh=0+nk4AuHhe3wNnakRnnblQ3eXeaYgx8xtNs4MSHvB48=;\n b=qlETIduhWAvLpTKiV4hnWW/RrZXoZJVzTpO8VSgBP7SWg2ekY6ok8Iho4Xuz7LyYOO\n K98L4LKQS7xpNARn0N8blS0g3RlNrBWP20QdKROKT/QHneaE8LGq9tMC18xz+GrpYX+K\n 6+TPCqTxXgIUop53lUC38eTdUMkksiuVWvzUk=",
        "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:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date;\n bh=0+nk4AuHhe3wNnakRnnblQ3eXeaYgx8xtNs4MSHvB48=;\n b=yS8fKAfn46cOB0SByl8a+inp6IY7zgWuhkmuJHZVMUImr9TAqJeTfeNZ4etTj9k/Ar\n uwIn24iorKs88MWGcHtcn2HB4WXstZ7zU9QSoF5uJN7lRVWTA58KDvCYCwLuWCwvxMBQ\n qWKSBOyEv+Ztzvnzxv0DPc4vpYmVhXnAh9Z10tDBOLNiYlttM6LfKrnT+AX8ZtjjWMgO\n CoYGmq7gf96L+ZDBm3gFHnSm2OvY4bOjGCPlfgHi0cOjRykN6QO+uI23tsk32UxgDQEx\n uc1lqnq6eix6SlScON8v9YynnT+8f4wdpgheHBciQdV/qeRz28XXauSkGyCtChJbC0hb\n eqQA==",
        "X-Gm-Message-State": "ACrzQf2H96sDvQ48lH5huYcKuqn8dEN1q4QI1K9oUD/w/XsZNaTYwRxm\n 8wYIlbZWAXV9iusiAdn2Zv3KNPX1jE2yy48k",
        "X-Google-Smtp-Source": "\n AMsMyM7Lfmx63pkJlqLR89aDTHACtADSWy4Gt9dlAzqdUfFecYfF2QWD4IkjFiY3aketYhqAcmm+Uw==",
        "X-Received": "by 2002:ac2:4bc7:0:b0:49a:dbf7:73e9 with SMTP id\n o7-20020ac24bc7000000b0049adbf773e9mr9930940lfq.529.1664273708131;\n Tue, 27 Sep 2022 03:15:08 -0700 (PDT)",
        "From": "Alexander Chernavin <achernavin@netgate.com>",
        "To": "chenbo.xia@intel.com,\n\tmaxime.coquelin@redhat.com",
        "Cc": "dev@dpdk.org, Alexander Chernavin <achernavin@netgate.com>,\n stable@dpdk.org",
        "Subject": "[PATCH v3] net/virtio: fix crash when dev is configured twice",
        "Date": "Tue, 27 Sep 2022 10:15:04 +0000",
        "Message-Id": "<20220927101504.1220037-1-achernavin@netgate.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220926083212.1178663-1-achernavin@netgate.com>",
        "References": "<20220926083212.1178663-1-achernavin@netgate.com>",
        "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\nFixes: 2b38151f745a (\"net/virtio: fix queue memory leak on error\")\nCc: stable@dpdk.org\n\nSigned-off-by: Alexander Chernavin <achernavin@netgate.com>\n---\nv2: Add Cc: stable@dpdk.org\nv3: Add Fixes: 2b38151f745a\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": [
        "v3"
    ]
}