get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 115691,
    "url": "https://patches.dpdk.org/api/patches/115691/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220831085344.47995-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": "<20220831085344.47995-1-achernavin@netgate.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220831085344.47995-1-achernavin@netgate.com",
    "date": "2022-08-31T08:53:44",
    "name": "net/virtio: fix crash when dev is configured twice",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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": {
        "id": 2642,
        "url": "https://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220831085344.47995-1-achernavin@netgate.com/mbox/",
    "series": [
        {
            "id": 24477,
            "url": "https://patches.dpdk.org/api/series/24477/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24477",
            "date": "2022-08-31T08:53:44",
            "name": "net/virtio: fix crash when dev is configured twice",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/24477/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/115691/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/115691/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 29C29A034C;\n\tWed, 31 Aug 2022 10:54:01 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CBB3840F17;\n\tWed, 31 Aug 2022 10:54:00 +0200 (CEST)",
            "from mail-lf1-f52.google.com (mail-lf1-f52.google.com\n [209.85.167.52]) by mails.dpdk.org (Postfix) with ESMTP id C593240395\n for <dev@dpdk.org>; Wed, 31 Aug 2022 10:53:58 +0200 (CEST)",
            "by mail-lf1-f52.google.com with SMTP id p7so7854005lfu.3\n for <dev@dpdk.org>; Wed, 31 Aug 2022 01:53:58 -0700 (PDT)",
            "from Aspire-VN7-571G.ad.sperasoft.com ([178.155.6.52])\n by smtp.gmail.com with ESMTPSA id\n t2-20020a056512068200b00492e3a8366esm1921560lfe.9.2022.08.31.01.53.57\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 31 Aug 2022 01:53:57 -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;\n bh=hKTTnwbT1YbwFBhhyGzrXGONBuvVuwN/OGVhulOEQjc=;\n b=QB/tMONCxwTAY2hTX/y94xl/pGJUBctbBQOtk0ocjKrboRktQB1jV2ue71PVKwYpQq\n Wu395kT6KpCTY9PCY9HBbDnYVJmbszJpU3UpcKXsdcejla2wJp5p+sY1ykb3P7XF0f7w\n c3nbRxAS96JLDy5rwjU9K/u0oHClwf0BC3IWU=",
        "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;\n bh=hKTTnwbT1YbwFBhhyGzrXGONBuvVuwN/OGVhulOEQjc=;\n b=DVZG0fmpzhBMUPBsm/59U7dbOGKhhAqEfgISV0M18Zvpft91Fzr9UJZDXcwROGJtpV\n S4hWkqPj4ev0GFhhM1URNfl9qdqxqva524Saz7+KoXX0NEShqsevV8CrWb2Ve1xHaJ/c\n YCRuWJO9HWJ3MtfNJouVe/ArHvfw065zOAguQg2u3bedA8tLmdHiRWDQOpxPRdn3X2qC\n ZItQRICcPydlnHqAtKSnqg5rs9es4kkO1kutUJUPMCSx4Qx/zE9MjymJRMOX5CHqfCdE\n +OQAawGayILIoa9wGduaZf4N5FzgrIPltecsoH4er098QfXS8tJtUdCLjuxD77XBby8r\n mTPA==",
        "X-Gm-Message-State": "ACgBeo2C8K5IN0Ks+ixb5dCpIybkFU8yK4Xun6K38srqDb61nAoYlnNw\n NHTQhk7OibIM7acEooa9Es9f/A==",
        "X-Google-Smtp-Source": "\n AA6agR66xsxxWgib53BhintQ0grsLnpEAlVWf/QaTEdAmwbDlOMH9di+HlEU5xbH98talPdwZw9CHQ==",
        "X-Received": "by 2002:ac2:4144:0:b0:492:eb38:d8e9 with SMTP id\n c4-20020ac24144000000b00492eb38d8e9mr9873050lfi.215.1661936038209;\n Wed, 31 Aug 2022 01:53:58 -0700 (PDT)",
        "From": "Alexander Chernavin <achernavin@netgate.com>",
        "To": "maxime.coquelin@redhat.com,\n\tchenbo.xia@intel.com",
        "Cc": "dev@dpdk.org,\n\tAlexander Chernavin <achernavin@netgate.com>",
        "Subject": "[PATCH] net/virtio: fix crash when dev is configured twice",
        "Date": "Wed, 31 Aug 2022 11:53:44 +0300",
        "Message-Id": "<20220831085344.47995-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\nSigned-off-by: Alexander Chernavin <achernavin@netgate.com>\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": []
}