get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1561702,
    "url": "http://patchwork.ozlabs.org/api/patches/1561702/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20211130150013.6610-3-david.marchand@redhat.com/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/projects/47/?format=api",
        "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": "<20211130150013.6610-3-david.marchand@redhat.com>",
    "list_archive_url": null,
    "date": "2021-11-30T15:00:12",
    "name": "[ovs-dev,v3,3/4] system-dpdk: Test with mlx5 devices.",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "c39579b8fc74d248fc9f453e5cdb120df693d7e5",
    "submitter": {
        "id": 75396,
        "url": "http://patchwork.ozlabs.org/api/people/75396/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20211130150013.6610-3-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 274454,
            "url": "http://patchwork.ozlabs.org/api/series/274454/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=274454",
            "date": "2021-11-30T15:00:10",
            "name": "[ovs-dev,v3,1/4] system-dpdk: Refactor common logs matching.",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/274454/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1561702/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/1561702/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@bilbo.ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "bilbo.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=ddapc2/m;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.133; helo=smtp2.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)",
            "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com"
        ],
        "Received": [
            "from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4J3QSx2zCdz9sRK\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  1 Dec 2021 02:03:13 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp2.osuosl.org (Postfix) with ESMTP id 9FC3C40472;\n\tTue, 30 Nov 2021 15:03:11 +0000 (UTC)",
            "from smtp2.osuosl.org ([127.0.0.1])\n\tby localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id xyCknbaH9oUn; Tue, 30 Nov 2021 15:03:10 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp2.osuosl.org (Postfix) with ESMTPS id 5AD374047F;\n\tTue, 30 Nov 2021 15:03:09 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 180A8C000A;\n\tTue, 30 Nov 2021 15:03:09 +0000 (UTC)",
            "from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 4F322C0039\n for <dev@openvswitch.org>; Tue, 30 Nov 2021 15:03:07 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id A99E24047B\n for <dev@openvswitch.org>; Tue, 30 Nov 2021 15:03:00 +0000 (UTC)",
            "from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id rjyp3Rq3MVT5 for <dev@openvswitch.org>;\n Tue, 30 Nov 2021 15:02:59 +0000 (UTC)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp2.osuosl.org (Postfix) with ESMTPS id 692DD4044F\n for <dev@openvswitch.org>; Tue, 30 Nov 2021 15:02:59 +0000 (UTC)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-179-JhsHtZ6GO_Ckc5jX0MGOeQ-1; Tue, 30 Nov 2021 10:02:51 -0500",
            "from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com\n [10.5.11.23])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4F3071023F52;\n Tue, 30 Nov 2021 15:02:50 +0000 (UTC)",
            "from dmarchan.remote.csb (unknown [10.39.195.207])\n by smtp.corp.redhat.com (Postfix) with ESMTP id C6D5419729;\n Tue, 30 Nov 2021 15:02:28 +0000 (UTC)"
        ],
        "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=1638284578;\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 in-reply-to:in-reply-to:references:references;\n bh=578Un0OziuUifiDh17vKOQeoO7yWLruLHVtsi93g4es=;\n b=ddapc2/m7qZhCnMLj0Td7Aq/v760wIGU75Oj080cSw7zDqMaG+PVw2bQ4t+vjr2XepECpd\n yFxZVPiplUWcE8NB4scffkOfvurvlQwDeMxMU8p0CnWFvXAcSGoEyrXijcdA5PGaPO9yLR\n D9UqXxB7amkybVUXKFqtNsM7WXigvRU=",
        "X-MC-Unique": "JhsHtZ6GO_Ckc5jX0MGOeQ-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@openvswitch.org",
        "Date": "Tue, 30 Nov 2021 16:00:12 +0100",
        "Message-Id": "<20211130150013.6610-3-david.marchand@redhat.com>",
        "In-Reply-To": "<20211130150013.6610-1-david.marchand@redhat.com>",
        "References": "<20211130150013.6610-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.23",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Cc": "i.maximets@ovn.org, fbl@sysclose.org, maxime.coquelin@redhat.com,\n kumar.amber@intel.com",
        "Subject": "[ovs-dev] [PATCH v3 3/4] system-dpdk: Test with mlx5 devices.",
        "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": "The DPDK unit test only runs if vfio or igb_uio kernel module is loaded:\non systems with only mlx5, this test is always skipped.\n\nBesides, the test tries to grab the first device listed by dpdk-devbind.py,\nregardless of the PCI device status regarding kmod binding.\n\nRemove dependency on this DPDK script and use a minimal script that\nreads PCI sysfs.\n\nThis script is not perfect, as one can imagine PCI devices bound to\nvfio-pci for virtual machines.\nAdd a new environment variable DPDK_PCI_ADDR for testers to select the\nPCI device of their liking.\nFor consistency and grep, the temporary file PCI_ADDR is renamed\nto DPDK_PCI_ADDR.\n\nNote: with mlx5 devices, there is now more OVS/DPDK warnings to waive.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\nChanges since v2:\n- sorted logs alphabetically,\n\n---\n Documentation/topics/testing.rst |  1 -\n tests/automake.mk                |  1 +\n tests/system-dpdk-find-device.py | 44 ++++++++++++++++++++++++++++++++\n tests/system-dpdk-macros.at      | 10 ++------\n tests/system-dpdk.at             |  4 ++-\n 5 files changed, 50 insertions(+), 10 deletions(-)\n create mode 100755 tests/system-dpdk-find-device.py",
    "diff": "diff --git a/Documentation/topics/testing.rst b/Documentation/topics/testing.rst\nindex 0ddcbd58ab..00f734a77a 100644\n--- a/Documentation/topics/testing.rst\n+++ b/Documentation/topics/testing.rst\n@@ -343,7 +343,6 @@ To see a list of all the available tests, run::\n \n These tests support a `DPDK supported NIC`_. The tests operate on a wider set of\n environments, for instance, when a virtual port is used.\n-They do require proper DPDK variables (``DPDK_DIR`` and ``DPDK_BUILD``).\n Moreover you need to have root privileges to load the required modules and to bind\n the NIC to the DPDK-compatible driver.\n \ndiff --git a/tests/automake.mk b/tests/automake.mk\nindex 3bc74a5aff..e7002634f2 100644\n--- a/tests/automake.mk\n+++ b/tests/automake.mk\n@@ -184,6 +184,7 @@ SYSTEM_OFFLOADS_TESTSUITE_AT = \\\n \n SYSTEM_DPDK_TESTSUITE_AT = \\\n \ttests/system-common-macros.at \\\n+\ttests/system-dpdk-find-device.py \\\n \ttests/system-dpdk-macros.at \\\n \ttests/system-dpdk-testsuite.at \\\n \ttests/system-dpdk.at\ndiff --git a/tests/system-dpdk-find-device.py b/tests/system-dpdk-find-device.py\nnew file mode 100755\nindex 0000000000..4253326e75\n--- /dev/null\n+++ b/tests/system-dpdk-find-device.py\n@@ -0,0 +1,44 @@\n+#!/usr/bin/env python3\n+# Copyright (c) 2021 Red Hat, Inc.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at:\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+\n+from pathlib import Path\n+import os\n+import sys\n+\n+# The tester might want to select a PCI device, if so, trust it.\n+if 'DPDK_PCI_ADDR' in os.environ:\n+    print(os.environ['DPDK_PCI_ADDR'])\n+    sys.exit(0)\n+\n+mlx5_ib_available = Path('/sys/module/mlx5_ib').exists()\n+\n+for device in sorted(Path('/sys/bus/pci/devices').iterdir()):\n+    class_path = device / 'class'\n+    # Only consider Network class devices\n+    if class_path.read_text().strip() != '0x020000':\n+        continue\n+    kmod_path = device / 'driver' / 'module'\n+    kmod_name = kmod_path.resolve().name\n+    # Devices of interest:\n+    # - device is bound to vfio_pci or igb_uio,\n+    # - device is bound to mlx5_core and mlx5 is loaded,\n+    if (kmod_name not in ['vfio_pci', 'igb_uio'] and\n+        (kmod_name not in ['mlx5_core'] or not mlx5_ib_available)):\n+        continue\n+    print(device.resolve().name)\n+    sys.exit(0)\n+\n+sys.exit(1)\ndiff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at\nindex 5a6b3cbff9..745740f36b 100644\n--- a/tests/system-dpdk-macros.at\n+++ b/tests/system-dpdk-macros.at\n@@ -22,14 +22,8 @@ m4_define([OVS_DPDK_PRE_PHY_SKIP],\n   [dnl Perform the precheck\n    OVS_DPDK_PRE_CHECK()\n \n-   dnl Check if VFIO or UIO driver is loaded\n-   AT_SKIP_IF([ ! (lsmod | grep -E \"igb_uio|vfio\") ], [], [stdout])\n-\n-   dnl Find PCI address candidate, skip if there is no DPDK-compatible NIC\n-   AT_CHECK([$DPDK_DIR/usertools/dpdk-devbind.py -s | head -n +4 | tail -1], [], [stdout])\n-   AT_CHECK([cat stdout | cut -d\" \" -s -f1 > PCI_ADDR])\n-   AT_SKIP_IF([ ! test -s PCI_ADDR ])\n-\n+   dnl Check if a device is available for DPDK\n+   AT_SKIP_IF([ ! $abs_top_srcdir/tests/system-dpdk-find-device.py > DPDK_PCI_ADDR])\n ])\n \n \ndiff --git a/tests/system-dpdk.at b/tests/system-dpdk.at\nindex 73c58030b1..76b60f3c3a 100644\n--- a/tests/system-dpdk.at\n+++ b/tests/system-dpdk.at\n@@ -5,9 +5,11 @@ AT_BANNER([OVS-DPDK unit tests])\n \n m4_define([SYSTEM_DPDK_ALLOWED_LOGS],[\n \\@does not exist. The Open vSwitch kernel module is probably not loaded.@d\n+\\@does not support MTU configuration,@d\n \\@EAL:   Invalid NUMA socket, default to 0@d\n \\@EAL: No \\(available\\|free\\) hugepages reported in hugepages-@d\n \\@Failed to enable flow control@d\n+\\@Rx checksum offload is not supported on@d\n ])\n \n dnl --------------------------------------------------------------------------\n@@ -35,7 +37,7 @@ OVS_DPDK_START()\n \n dnl Add userspace bridge and attach it to OVS\n AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev])\n-AT_CHECK([ovs-vsctl add-port br10 phy0 -- set Interface phy0 type=dpdk options:dpdk-devargs=$(cat PCI_ADDR)], [], [stdout], [stderr])\n+AT_CHECK([ovs-vsctl add-port br10 phy0 -- set Interface phy0 type=dpdk options:dpdk-devargs=$(cat DPDK_PCI_ADDR)], [], [stdout], [stderr])\n AT_CHECK([ovs-vsctl show], [], [stdout])\n sleep 2\n \n",
    "prefixes": [
        "ovs-dev",
        "v3",
        "3/4"
    ]
}