get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1528676,
    "url": "http://patchwork.ozlabs.org/api/patches/1528676/",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20210916083852.1863327-1-cmi@nvidia.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": "<20210916083852.1863327-1-cmi@nvidia.com>",
    "list_archive_url": null,
    "date": "2021-09-16T08:38:52",
    "name": "[ovs-dev] system-offloads-traffic.at: Add sFlow offload test cases",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "d9bd4bb1c9943efd98842eb7f81d34e1207d1262",
    "submitter": {
        "id": 80086,
        "url": "http://patchwork.ozlabs.org/api/people/80086/",
        "name": "Chris Mi",
        "email": "cmi@nvidia.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20210916083852.1863327-1-cmi@nvidia.com/mbox/",
    "series": [
        {
            "id": 262561,
            "url": "http://patchwork.ozlabs.org/api/series/262561/",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=262561",
            "date": "2021-09-16T08:38:52",
            "name": "[ovs-dev] system-offloads-traffic.at: Add sFlow offload test cases",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/262561/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1528676/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/1528676/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 spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)",
        "Received": [
            "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\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 4H99VP2jcfz9sRK\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Sep 2021 18:39:09 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 1A9F16065A;\n\tThu, 16 Sep 2021 08:39:06 +0000 (UTC)",
            "from smtp3.osuosl.org ([127.0.0.1])\n\tby localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id CEkZJ6E7NFi1; Thu, 16 Sep 2021 08:39:05 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp3.osuosl.org (Postfix) with ESMTPS id 2AB29605D2;\n\tThu, 16 Sep 2021 08:39:04 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id DD9A4C0011;\n\tThu, 16 Sep 2021 08:39:03 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 78153C000D\n for <dev@openvswitch.org>; Thu, 16 Sep 2021 08:39:02 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id 672B24075C\n for <dev@openvswitch.org>; Thu, 16 Sep 2021 08:39:02 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id 1QmUc2Nsr7gm for <dev@openvswitch.org>;\n Thu, 16 Sep 2021 08:38:58 +0000 (UTC)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by smtp4.osuosl.org (Postfix) with ESMTP id 4012F40701\n for <dev@openvswitch.org>; Thu, 16 Sep 2021 08:38:57 +0000 (UTC)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from cmi@nvidia.com)\n with SMTP; 16 Sep 2021 11:38:54 +0300",
            "from c-141-46-1-010.mtl.labs.mlnx (c-141-46-1-010.mtl.labs.mlnx\n [10.141.46.10])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 18G8csRm016028;\n Thu, 16 Sep 2021 11:38:54 +0300"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.8.0",
        "To": "dev@openvswitch.org",
        "Date": "Thu, 16 Sep 2021 11:38:52 +0300",
        "Message-Id": "<20210916083852.1863327-1-cmi@nvidia.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "MIME-Version": "1.0",
        "Cc": "elibr@nvidia.com, simon.horman@netronome.com, roniba@nvidia.com,\n i.maximets@ovn.org",
        "Subject": "[ovs-dev] [PATCH] system-offloads-traffic.at: Add sFlow offload\n\ttest cases",
        "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>",
        "From": "Chris Mi via dev <ovs-dev@openvswitch.org>",
        "Reply-To": "Chris Mi <cmi@nvidia.com>",
        "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": "Add two sFlow offload test caes:\n\n  3: sflow offloads with sampling=1 - ping between two ports - offloads enabled ok\n  4: sflow offloads with sampling=2 - ping between two ports - offloads enabled ok\n\nSigned-off-by: Chris Mi <cmi@nvidia.com>\n---\n tests/system-offloads-traffic.at | 84 ++++++++++++++++++++++++++++++++\n 1 file changed, 84 insertions(+)",
    "diff": "diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at\nindex be63057bb..f263c9183 100644\n--- a/tests/system-offloads-traffic.at\n+++ b/tests/system-offloads-traffic.at\n@@ -5,6 +5,7 @@ AT_BANNER([datapath offloads])\n # Normilizes output ports, recirc_id, packets and macs.\n #\n m4_define([DUMP_CLEAN_SORTED], [sed -e 's/used:[[0-9]].[[0-9]]*s/used:0.001s/;s/eth(src=[[a-z0-9:]]*,dst=[[a-z0-9:]]*)/eth(macs)/;s/actions:[[0-9,]]*/actions:output/;s/recirc_id(0),//' | sort])\n+m4_define([DUMP_CLEAN_SORTED_SFLOW], [sed -e 's/used:[[0-9]].[[0-9]]*s/used:0.001s/;s/eth(src=[[a-z0-9:]]*,dst=[[a-z0-9:]]*)/eth(macs)/;s/actions:.*$/actions:output/;s/recirc_id(0),//' | sort])\n \n AT_SETUP([offloads - ping between two ports - offloads disabled])\n OVS_TRAFFIC_VSWITCHD_START()\n@@ -71,6 +72,89 @@ AT_CHECK([ovs-appctl upcall/show | grep -E \"offloaded flows : [[1-9]]\"], [0], [i\n OVS_TRAFFIC_VSWITCHD_STOP\n AT_CLEANUP\n \n+AT_SETUP([sflow offloads with sampling=1 - ping between two ports - offloads enabled])\n+OVS_TRAFFIC_VSWITCHD_START()\n+\n+on_exit 'kill `cat test-sflow.pid`'\n+AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])\n+AT_CAPTURE_FILE([sflow.log])\n+PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])\n+\n+AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:hw-offload=true])\n+\n+AT_CHECK([ovs-appctl -t ovsdb-server exit])\n+AT_CHECK([ovs-appctl -t ovs-vswitchd exit])\n+AT_CHECK([rm -f ovsdb-server.pid])\n+AT_CHECK([rm -f ovs-vswitchd.pid])\n+AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --log-file --remote=punix:$OVS_RUNDIR/db.sock], [0], [], [stderr])\n+AT_CHECK([ovs-vswitchd --detach --no-chdir --pidfile --log-file -vvconn -vofproto_dpif -vunixctl], [0], [], [stderr])\n+on_exit \"kill `cat ovsdb-server.pid`\"\n+on_exit \"kill_ovs_vswitchd `cat ovs-vswitchd.pid`\"\n+\n+AT_CHECK([ovs-ofctl add-flow br0 \"actions=normal\"])\n+\n+ADD_NAMESPACES(at_ns0, at_ns1)\n+\n+ADD_VETH(p0, at_ns0, br0, \"10.1.1.1/24\")\n+ADD_VETH(p1, at_ns1, br0, \"10.1.1.2/24\")\n+AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [ignore])\n+\n+NS_CHECK_EXEC([at_ns0], [ping -c 10 -w 12 10.1.1.2 | FORMAT_PING], [0], [dnl\n+10 packets transmitted, 10 received, 0% packet loss, time 0ms\n+])\n+AT_CHECK([ovs-vsctl -- --id=@sflow create sflow agent=lo target=\\\"127.0.0.1:$SFLOW_PORT\\\" header=128 sampling=1 polling=100 -- set bridge br0 sflow=@sflow], [0], [ignore])\n+NS_CHECK_EXEC([at_ns0], [ping -c 10 -w 12 10.1.1.2 | FORMAT_PING], [0], [dnl\n+10 packets transmitted, 10 received, 0% packet loss, time 0ms\n+])\n+\n+AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep \"actions:userspace\" |grep \"sFlow\" | grep \"eth_type(0x0800)\" | DUMP_CLEAN_SORTED_SFLOW], [0], [dnl\n+in_port(2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:10, bytes:840, used:0.001s, actions:output\n+in_port(3),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:10, bytes:840, used:0.001s, actions:output\n+])\n+\n+OVS_TRAFFIC_VSWITCHD_STOP\n+OVS_APP_EXIT_AND_WAIT([test-sflow])\n+count=`cat sflow.log | wc -l`\n+AT_CHECK([[[[ $count -le 22 && $count -ge 18 ]]]])\n+AT_CLEANUP\n+\n+AT_SETUP([sflow offloads with sampling=2 - ping between two ports - offloads enabled])\n+OVS_TRAFFIC_VSWITCHD_START()\n+\n+on_exit 'kill `cat test-sflow.pid`'\n+AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])\n+AT_CAPTURE_FILE([sflow.log])\n+PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])\n+\n+AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:hw-offload=true])\n+\n+AT_CHECK([ovs-appctl -t ovsdb-server exit])\n+AT_CHECK([ovs-appctl -t ovs-vswitchd exit])\n+AT_CHECK([rm -f ovsdb-server.pid])\n+AT_CHECK([rm -f ovs-vswitchd.pid])\n+AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --log-file --remote=punix:$OVS_RUNDIR/db.sock], [0], [], [stderr])\n+AT_CHECK([ovs-vswitchd --detach --no-chdir --pidfile --log-file -vvconn -vofproto_dpif -vunixctl], [0], [], [stderr])\n+on_exit \"kill `cat ovsdb-server.pid`\"\n+on_exit \"kill_ovs_vswitchd `cat ovs-vswitchd.pid`\"\n+\n+AT_CHECK([ovs-ofctl add-flow br0 \"actions=normal\"])\n+\n+ADD_NAMESPACES(at_ns0, at_ns1)\n+\n+ADD_VETH(p0, at_ns0, br0, \"10.1.1.1/24\")\n+ADD_VETH(p1, at_ns1, br0, \"10.1.1.2/24\")\n+AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [ignore])\n+\n+AT_CHECK([ovs-vsctl -- --id=@sflow create sflow agent=lo target=\\\"127.0.0.1:$SFLOW_PORT\\\" header=128 sampling=2 polling=100 -- set bridge br0 sflow=@sflow], [0], [ignore])\n+NS_CHECK_EXEC([at_ns0], [ping -c 1000 -i 0.01 -w 12 10.1.1.2], [0], [ignore])\n+AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep \"actions:sample\" | grep \"sFlow\" | grep \"eth_type(0x0800)\"], [0], [ignore])\n+\n+OVS_TRAFFIC_VSWITCHD_STOP\n+OVS_APP_EXIT_AND_WAIT([test-sflow])\n+count=`cat sflow.log | wc -l`\n+AT_CHECK([[[[ $count -le 1100 && $count -ge 900 ]]]])\n+AT_CLEANUP\n+\n AT_SETUP([offloads - set ingress_policing_rate and ingress_policing_burst - offloads disabled])\n AT_KEYWORDS([ingress_policing])\n AT_SKIP_IF([test $HAVE_TC = \"no\"])\n",
    "prefixes": [
        "ovs-dev"
    ]
}