get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1528413,
    "url": "http://patchwork.ozlabs.org/api/patches/1528413/",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20210915150803.512312-1-mark.d.gray@redhat.com/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/projects/47/",
        "name": "Open vSwitch",
        "link_name": "openvswitch",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "git@github.com:openvswitch/ovs.git",
        "webscm_url": "https://github.com/openvswitch/ovs",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20210915150803.512312-1-mark.d.gray@redhat.com>",
    "list_archive_url": null,
    "date": "2021-09-15T15:08:03",
    "name": "[ovs-dev,v2] dpif-netlink: Fix feature negotiation for older kernels",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0091a049081c1e92612a675d0c89f29223f39c26",
    "submitter": {
        "id": 79963,
        "url": "http://patchwork.ozlabs.org/api/people/79963/",
        "name": "Mark Gray",
        "email": "mark.d.gray@redhat.com"
    },
    "delegate": {
        "id": 57772,
        "url": "http://patchwork.ozlabs.org/api/users/57772/",
        "username": "imaximets",
        "first_name": "Ilya",
        "last_name": "Maximets",
        "email": "i.maximets@samsung.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20210915150803.512312-1-mark.d.gray@redhat.com/mbox/",
    "series": [
        {
            "id": 262476,
            "url": "http://patchwork.ozlabs.org/api/series/262476/",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=262476",
            "date": "2021-09-15T15:08:03",
            "name": "[ovs-dev,v2] dpif-netlink: Fix feature negotiation for older kernels",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/262476/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1528413/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/1528413/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ovs-dev-bounces@openvswitch.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "dev@openvswitch.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=XK14e1HM;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.138; helo=smtp1.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)",
            "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mark.d.gray@redhat.com"
        ],
        "Received": [
            "from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4H8k9t50qQz9sR4\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Sep 2021 01:08:18 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 8FFD882B51;\n\tWed, 15 Sep 2021 15:08:14 +0000 (UTC)",
            "from smtp1.osuosl.org ([127.0.0.1])\n\tby localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id kPic285QN02E; Wed, 15 Sep 2021 15:08:13 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id 201C882B21;\n\tWed, 15 Sep 2021 15:08:12 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id E821BC0011;\n\tWed, 15 Sep 2021 15:08:11 +0000 (UTC)",
            "from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 9F69AC000D\n for <dev@openvswitch.org>; Wed, 15 Sep 2021 15:08:10 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 8EDB782B24\n for <dev@openvswitch.org>; Wed, 15 Sep 2021 15:08:10 +0000 (UTC)",
            "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id qAtXSUpHGlDq for <dev@openvswitch.org>;\n Wed, 15 Sep 2021 15:08:08 +0000 (UTC)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [216.205.24.124])\n by smtp1.osuosl.org (Postfix) with ESMTPS id BB4B282B21\n for <dev@openvswitch.org>; Wed, 15 Sep 2021 15:08:08 +0000 (UTC)",
            "from mail-qk1-f197.google.com (mail-qk1-f197.google.com\n [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-91-IdJVPEopOKutsfO4UsGn1A-1; Wed, 15 Sep 2021 11:08:06 -0400",
            "by mail-qk1-f197.google.com with SMTP id\n 70-20020a370b49000000b003d2f5f0dcc6so3492789qkl.9\n for <dev@openvswitch.org>; Wed, 15 Sep 2021 08:08:06 -0700 (PDT)",
            "from wsfd-netdev91.ntdv.lab.eng.bos.redhat.com\n (nat-pool-bos-t.redhat.com. [66.187.233.206])\n by smtp.gmail.com with ESMTPSA id c15sm180916qka.46.2021.09.15.08.08.04\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 15 Sep 2021 08:08:04 -0700 (PDT)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.8.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1631718487;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=EQpPTH+9aG0vF1xmGsnLpwSHiQGVXAgtM7yeblQHh3g=;\n b=XK14e1HMJNvCxoFWgOrPHgb3fiSdzbov3c3BwO+Opb3Am2FiKP4dlQyq+SsTOXFp5NRdPT\n Ibs7YJLD7L7fi2/92lwoVdJuiPWP8Q5LjXheiNaOHq1QxGrt3MES4ng+I/bHigtpSI0Tzg\n rWrqV1E/wKb+JomiTap1MHdwvcqimhE=",
        "X-MC-Unique": "IdJVPEopOKutsfO4UsGn1A-1",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=EQpPTH+9aG0vF1xmGsnLpwSHiQGVXAgtM7yeblQHh3g=;\n b=wGLqP3nuCXDEaDYSJfnEN9WE2TXRvXKAmxQ9ZzAXbx6frj8so9pyyUDhx/g/wOlG5e\n W4fVSK41tqwrCmPrRmV0w7EQ1zUPzskKYmsBYTo+kOboZhozmrCl4lgIennfEsClYbdI\n Y/78pqe9H16Qh+kHP8h0z8OW+UF3V6RWpMLQgvRjkTDhgHRIqjySHTjM400SQ72leesW\n xn0FLQermOJCUxWifTbYWHICI6+QBkZCauGbRwIZUgFfwU+BVhjlNqczZddGJMxVCnxV\n scosNG7EfOXb4brrbKFRMi0IY+4gY+lcmM61ZpM4TzvCJj8lXj+zGYLJFrcFLdLdzf/e\n e/kg==",
        "X-Gm-Message-State": "AOAM532Qoz/5ly4DdQ6z7oKfglDHwsDrmQEVTaxqLVO+104DroR4Hlj+\n e9Yne/pGMYg0VAKze/QCWhgz7IZItbHdqrxI/f8CJzD78PNET80Kw2U+RLaYCzJuP/c7td+UqQa\n l9Gxwiea/51nthQJUuvayQ0T2zaxNE4ZcJ34avQpHbPpslbiirridN6ciXsqODcFc8DB6",
        "X-Received": [
            "by 2002:a05:620a:bce:: with SMTP id\n s14mr430028qki.48.1631718485693;\n Wed, 15 Sep 2021 08:08:05 -0700 (PDT)",
            "by 2002:a05:620a:bce:: with SMTP id\n s14mr429986qki.48.1631718485329;\n Wed, 15 Sep 2021 08:08:05 -0700 (PDT)"
        ],
        "X-Google-Smtp-Source": "\n ABdhPJyW/3PMSC3VbyULWo3BaUXrO/j3+DQqgC75PKuqVbDEkhKyKfvONfHYiOxFocL0g2ZbTUWMdQ==",
        "From": "Mark Gray <mark.d.gray@redhat.com>",
        "To": "dev@openvswitch.org",
        "Date": "Wed, 15 Sep 2021 11:08:03 -0400",
        "Message-Id": "<20210915150803.512312-1-mark.d.gray@redhat.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "MIME-Version": "1.0",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Cc": "i.maximets@ovn.org, dceara@redhat.com",
        "Subject": "[ovs-dev] [PATCH v2] dpif-netlink: Fix feature negotiation for\n\tolder kernels",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "<ovs-dev.openvswitch.org>",
        "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>",
        "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>",
        "List-Post": "<mailto:ovs-dev@openvswitch.org>",
        "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>",
        "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ovs-dev-bounces@openvswitch.org",
        "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>"
    },
    "content": "Older kernels do not reject unsupported features. This can lead\nto a situation in which 'ovs-vswitchd' believes that a feature is\nsupported when, in fact, it is not.\n\nThis patch probes for this by attempting to set a known unsupported\nfeature.\n\nReported-by: Dumitru Ceara <dceara@redhat.com>\nReported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2004083\nSuggested-by: Ilya Maximets <i.maximets@ovn.org>\nSigned-off-by: Mark Gray <mark.d.gray@redhat.com>\n---\n\nNotes:\n    v2: Fix case raised by Dumitru in which kernel is already configured with\n        unsupported features.\n\n lib/dpif-netlink.c | 72 ++++++++++++++++++++++++++++++++--------------\n 1 file changed, 50 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c\nindex 34fc04237333..5f4b60c5a6d6 100644\n--- a/lib/dpif-netlink.c\n+++ b/lib/dpif-netlink.c\n@@ -84,6 +84,8 @@ enum { MAX_PORTS = USHRT_MAX };\n #define EPOLLEXCLUSIVE (1u << 28)\n #endif\n \n+#define OVS_DP_F_UNSUPPORTED (1 << 31);\n+\n /* This PID is not used by the kernel datapath when using dispatch per CPU,\n  * but it is required to be set (not zero). */\n #define DPIF_NETLINK_PER_CPU_PID UINT32_MAX\n@@ -382,36 +384,62 @@ dpif_netlink_open(const struct dpif_class *class OVS_UNUSED, const char *name,\n         dp_request.cmd = OVS_DP_CMD_SET;\n     }\n \n-    /* The Open vSwitch kernel module has two modes for dispatching upcalls:\n-     * per-vport and per-cpu.\n-     *\n-     * When dispatching upcalls per-vport, the kernel will\n-     * send the upcall via a Netlink socket that has been selected based on the\n-     * vport that received the packet that is causing the upcall.\n-     *\n-     * When dispatching upcall per-cpu, the kernel will send the upcall via\n-     * a Netlink socket that has been selected based on the cpu that received\n-     * the packet that is causing the upcall.\n-     *\n-     * First we test to see if the kernel module supports per-cpu dispatching\n-     * (the preferred method). If it does not support per-cpu dispatching, we\n-     * fall back to the per-vport dispatch mode.\n+    /* Some older kernels will not reject unknown features. This will cause\n+     * 'ovs-vswitchd' to incorrectly assume a feature is supported. In order to\n+     * test for that, we attempt to set a feature that we know is not supported\n+     * by any kernel. If this feature is not rejected, we can assume we are\n+     * running on one of these older kernels.\n      */\n     dp_request.user_features |= OVS_DP_F_UNALIGNED;\n-    dp_request.user_features &= ~OVS_DP_F_VPORT_PIDS;\n-    dp_request.user_features |= OVS_DP_F_DISPATCH_UPCALL_PER_CPU;\n+    dp_request.user_features |= OVS_DP_F_VPORT_PIDS;\n+    dp_request.user_features |= OVS_DP_F_UNSUPPORTED;\n     error = dpif_netlink_dp_transact(&dp_request, &dp, &buf);\n     if (error) {\n-        dp_request.user_features &= ~OVS_DP_F_DISPATCH_UPCALL_PER_CPU;\n+        /* The Open vSwitch kernel module has two modes for dispatching\n+         * upcalls: per-vport and per-cpu.\n+         *\n+         * When dispatching upcalls per-vport, the kernel will\n+         * send the upcall via a Netlink socket that has been selected based on\n+         * the vport that received the packet that is causing the upcall.\n+         *\n+         * When dispatching upcall per-cpu, the kernel will send the upcall via\n+         * a Netlink socket that has been selected based on the cpu that\n+         * received the packet that is causing the upcall.\n+         *\n+         * First we test to see if the kernel module supports per-cpu\n+         * dispatching (the preferred method). If it does not support per-cpu\n+         * dispatching, we fall back to the per-vport dispatch mode.\n+         */\n+        dp_request.user_features &= ~OVS_DP_F_UNSUPPORTED;\n+        dp_request.user_features |= OVS_DP_F_UNALIGNED;\n+        dp_request.user_features &= ~OVS_DP_F_VPORT_PIDS;\n+        dp_request.user_features |= OVS_DP_F_DISPATCH_UPCALL_PER_CPU;\n+        error = dpif_netlink_dp_transact(&dp_request, &dp, &buf);\n+        if (error) {\n+            dp_request.user_features &= ~OVS_DP_F_DISPATCH_UPCALL_PER_CPU;\n+            dp_request.user_features |= OVS_DP_F_VPORT_PIDS;\n+            error = dpif_netlink_dp_transact(&dp_request, &dp, &buf);\n+        }\n+        if (error) {\n+            return error;\n+        }\n+\n+        error = open_dpif(&dp, dpifp);\n+        dpif_netlink_set_features(*dpifp, OVS_DP_F_TC_RECIRC_SHARING);\n+    } else {\n+        VLOG_INFO(\"Kernel does not correctly support feature negotiation. \"\n+                  \"Using standard features.\");\n+        dp_request.cmd = OVS_DP_CMD_SET;\n+        dp_request.user_features = 0;\n+        dp_request.user_features |= OVS_DP_F_UNALIGNED;\n         dp_request.user_features |= OVS_DP_F_VPORT_PIDS;\n         error = dpif_netlink_dp_transact(&dp_request, &dp, &buf);\n-    }\n-    if (error) {\n-        return error;\n+        if (error) {\n+            return error;\n+        }\n+        error = open_dpif(&dp, dpifp);\n     }\n \n-    error = open_dpif(&dp, dpifp);\n-    dpif_netlink_set_features(*dpifp, OVS_DP_F_TC_RECIRC_SHARING);\n     ofpbuf_delete(buf);\n \n     if (create) {\n",
    "prefixes": [
        "ovs-dev",
        "v2"
    ]
}