get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 116858,
    "url": "http://patches.dpdk.org/api/patches/116858/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220926083212.1178663-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": "<20220926083212.1178663-1-achernavin@netgate.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220926083212.1178663-1-achernavin@netgate.com",
    "date": "2022-09-26T08:32:12",
    "name": "[v2] 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": "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/20220926083212.1178663-1-achernavin@netgate.com/mbox/",
    "series": [
        {
            "id": 24823,
            "url": "http://patches.dpdk.org/api/series/24823/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24823",
            "date": "2022-09-26T08:32:12",
            "name": "[v2] net/virtio: fix crash when dev is configured twice",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/24823/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/116858/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/116858/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 1BE32A00C2;\n\tMon, 26 Sep 2022 10:33:18 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9CB7A41133;\n\tMon, 26 Sep 2022 10:33:17 +0200 (CEST)",
            "from mail-lf1-f50.google.com (mail-lf1-f50.google.com\n [209.85.167.50]) by mails.dpdk.org (Postfix) with ESMTP id 0D0E1400D7\n for <dev@dpdk.org>; Mon, 26 Sep 2022 10:33:16 +0200 (CEST)",
            "by mail-lf1-f50.google.com with SMTP id u18so9645484lfo.8\n for <dev@dpdk.org>; Mon, 26 Sep 2022 01:33:16 -0700 (PDT)",
            "from pb1-dev.ad.sperasoft.com ([188.233.188.88])\n by smtp.gmail.com with ESMTPSA id\n v7-20020a056512348700b00497a23cf2absm2457653lfr.258.2022.09.26.01.32.28\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 26 Sep 2022 01:32:52 -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=TZ6KZANGWhlvet5pg0LSqyeDjHFz852znq27/sSuNE4=;\n b=Ow+hk7fhaTxSoPdqJgJHpIDkKORDp9HZbDyESfqCu6aI5dPH6+3nzRKS03704UWmnF\n Kd2GFfnxSSiR7sxR91HakYL/UiO1PYeZJjzIuseBKcKW46wwUk07przVAZSu1mRyrkAA\n 7E7Ddb0DDii9wfVJSNqAK+vbfY8xOunxhBpec=",
        "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=TZ6KZANGWhlvet5pg0LSqyeDjHFz852znq27/sSuNE4=;\n b=UdQsXhQEs4xRLJVV39COWEcXYcpothJ7h1tv/VIsyLwuh+QRNXJqk9QxLntii+Gvz+\n puFwR++MUsL/ch7xg5XV78jG2VA3zQNumiOLvBMy4K2MmJA91S2YnMFH0CPpr4qGigWw\n kRTEz4ridkmZT6fGDlgNwq43jROUidX5ZZ3LYa2u229xfJkcWuVgeZ43q2cHSyQi8667\n vmdt0SWO4HR993z1I9dfMn69CjUABtExcQ+to8eZr3uei4d4DkaWN0kWOYh2lIDoi2V3\n r855kzkVeQlMYnTA38RrKNlCOacD7bWGQHyF1T4ImvM3VH1idS4P1jk+QhUAhE4JZwh8\n VObg==",
        "X-Gm-Message-State": "ACrzQf0NZFLLqOBt4F1mbn+T3h+WrCHAWHAl9sNKR6fbfmN+gKB0TRof\n 7JdKKzLQrS72nX92NC2UbiJeWQ==",
        "X-Google-Smtp-Source": "\n AMsMyM7t0++2uLRzFzZ1wPYGki6ruZbICRhiQZQNsf1JcN2qrwK0SO5oSiW/mNkaiCnM6Kei9kDtWA==",
        "X-Received": "by 2002:a19:e01e:0:b0:497:81a9:c2c4 with SMTP id\n x30-20020a19e01e000000b0049781a9c2c4mr8404588lfg.74.1664181195447;\n Mon, 26 Sep 2022 01:33:15 -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:32:12 +0000",
        "Message-Id": "<20220926083212.1178663-1-achernavin@netgate.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220831085344.47995-1-achernavin@netgate.com>",
        "References": "<20220831085344.47995-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\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"
    ]
}