get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1555103,
    "url": "http://patchwork.ozlabs.org/api/patches/1555103/",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20211115025312.786953-9-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": "<20211115025312.786953-9-cmi@nvidia.com>",
    "list_archive_url": null,
    "date": "2021-11-15T02:53:12",
    "name": "[ovs-dev,v18,8/8] system-offloads-traffic.at: Add sFlow offload test cases",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4a0b93027c672888dae9bf812b20860ee6afdc96",
    "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/20211115025312.786953-9-cmi@nvidia.com/mbox/",
    "series": [
        {
            "id": 271987,
            "url": "http://patchwork.ozlabs.org/api/series/271987/",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=271987",
            "date": "2021-11-15T02:53:04",
            "name": "Add offload support for sFlow",
            "version": 18,
            "mbox": "http://patchwork.ozlabs.org/series/271987/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1555103/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/1555103/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\" (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=LYqzR2En;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.136; helo=smtp3.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)",
            "smtp1.osuosl.org (amavisd-new);\n dkim=pass (2048-bit key) header.d=nvidia.com"
        ],
        "Received": [
            "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hsv131bxJz9s5P\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 15 Nov 2021 13:54:31 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id EBCB960793;\n\tMon, 15 Nov 2021 02:54:28 +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 OSTZU-dYCY03; Mon, 15 Nov 2021 02:54:27 +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 C2F34607A5;\n\tMon, 15 Nov 2021 02:54:26 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 95EBBC002E;\n\tMon, 15 Nov 2021 02:54:26 +0000 (UTC)",
            "from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 2A8D0C002E\n for <dev@openvswitch.org>; Mon, 15 Nov 2021 02:54:25 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 5EB0E80D69\n for <dev@openvswitch.org>; Mon, 15 Nov 2021 02:53:48 +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 oVo1DAY1Y5zE for <dev@openvswitch.org>;\n Mon, 15 Nov 2021 02:53:47 +0000 (UTC)",
            "from NAM11-BN8-obe.outbound.protection.outlook.com\n (mail-bn8nam11on2086.outbound.protection.outlook.com [40.107.236.86])\n by smtp1.osuosl.org (Postfix) with ESMTPS id 2DCDA80BB0\n for <dev@openvswitch.org>; Mon, 15 Nov 2021 02:53:46 +0000 (UTC)",
            "from BN9PR03CA0296.namprd03.prod.outlook.com (2603:10b6:408:f5::31)\n by BN8PR12MB3331.namprd12.prod.outlook.com (2603:10b6:408:45::17)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Mon, 15 Nov\n 2021 02:53:44 +0000",
            "from BN8NAM11FT058.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:f5:cafe::f6) by BN9PR03CA0296.outlook.office365.com\n (2603:10b6:408:f5::31) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend\n Transport; Mon, 15 Nov 2021 02:53:44 +0000",
            "from mail.nvidia.com (216.228.112.32) by\n BN8NAM11FT058.mail.protection.outlook.com (10.13.177.58) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4690.15 via Frontend Transport; Mon, 15 Nov 2021 02:53:44 +0000",
            "from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL109.nvidia.com\n (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 14 Nov\n 2021 18:53:32 -0800",
            "from dev-r630-03.lab.mtl.com (172.20.187.5) by mail.nvidia.com\n (172.20.187.10) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Mon, 15 Nov 2021 02:53:31 +0000"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "whitelisted by SQLgrey-1.8.0",
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=QWRU8v/koyAi9p3Jagehw4g+GG71TXbQ5z1Z/KWFbWciY19LG2dLlx7INHfJojkn7xJrqfEpI5hFvXnfRUQRFQpdhRNNd6/O9FLlfqI0a8z2T0+fA+62FsJ3DmHRt2hPojP8KywXMunOernUFrUX/0/l7LwPygY2bOglxAVOCElpr3XDC1EBCSZXN4EKXFp6q+4w+w+1q/MgbI6RnuqlrDQ+ZbTYp0pwYcRwf4DbXQlgUxHIonva5GnYgg+kazWqmrwPPALvtTVUE9md54/4rvQFj8hl8Ap1ey+UdtVbDYvvuJRh+bd8U5cgK7lS/sA0wKZjkzg4Vc/OW3Pb/H3XNA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=wKkv+Vkw/gK+yRsKZHIMNJ/xFhEQuZrbYa4gulvv0GY=;\n b=Kv7oEMzR6jxsnDmPehqDUfGBEOygk/ZBuI93cbXmTKJwwY4KnvO4hmfnkmRYzrDjYx2BUxpCNCz7JkvzMOVgwBGGTj8Jza6ZrYxKsmjlgpJsrS6rJ66CfRUm5Y76e0sBAmdbJ8ESuI9tppYWaW4LinFw3K9ZDNASfmj+2a0UGXHZrDeX2IwfWj0l5p3rOjv9n82RB0yD0a+/Jjs4F7sDJ6USDhHl+8j2nWIyY5YDwlpKh1aLKNKOgEpfdwrFjmDIqkZwmQmz5cpq/QyeblA8i+tAP+iKmbDjqexrzpxHLtU84ll52UhVd+snntZjfGNKmdbgXjY9vR01ka1ynjbIMw==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.112.32) smtp.rcpttodomain=ovn.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=quarantine sp=quarantine pct=100) action=none\n header.from=nvidia.com; dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=wKkv+Vkw/gK+yRsKZHIMNJ/xFhEQuZrbYa4gulvv0GY=;\n b=LYqzR2EnSK2ci+ZMIHCtO4ep3WKGLFqU7ux5wu+097eHR+RDksC8OwyPsx4e/M845H2chZYgnjUhBcpYlKRSZZXE0mJrwtWC828hAnSYj9EIVQNCjzlZf9+BOKRQ8rLHdh/1lyIx0OIjfKevPqt/+EpBwNrGWRpND96ZSsIM4hRRExOdGut7sOJBgsCBXXNF76DeeGFAOUzOpCjWS5046UHlHCBBvSQmBi9UEJAPJnacyBlQYmKAbxnZgtxPf8tuC0Me/a8ExzoxdyR4M5QxQDeBwZBa4PxiQ+WCJvRWH15/3RIAAzSz+W/pjAOP1F4y4TxZLJP5W4/vrGbB4OwCyA==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.112.32)\n smtp.mailfrom=nvidia.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.112.32 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.112.32; helo=mail.nvidia.com;",
        "To": "<dev@openvswitch.org>",
        "Date": "Mon, 15 Nov 2021 10:53:12 +0800",
        "Message-ID": "<20211115025312.786953-9-cmi@nvidia.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20211115025312.786953-1-cmi@nvidia.com>",
        "References": "<20211115025312.786953-1-cmi@nvidia.com>",
        "MIME-Version": "1.0",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "4660bd38-d4a2-474e-bf97-08d9a7e32396",
        "X-MS-TrafficTypeDiagnostic": "BN8PR12MB3331:",
        "X-Microsoft-Antispam-PRVS": "\n <BN8PR12MB3331F9C674A1C7E42F3CC3EACF989@BN8PR12MB3331.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:3;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n CZsMJYqAETkWbiYepsXSOAVHdHV55t1YpB5b9BAwIWEjIv1MZNW92GEN03CpSZXVcF//P/N2nXV4008jGizs/KZWBTxHxNCuq5zLdyvDycDfsZkU9qxtFEvvMVKpBNGeoL6PZ+fuAS+pAXgufGkhPbu2wqfj7XK5lDQtGShLS63JmLs2lZstCDUh8t+51r3NdXtsZch5r+hnXm3CTGATSTHb/2xECl+i6WMW7sPUmp+6HVRtyPVetraZykCRV6+MsIUkdTZNM7l1BU8mbb7Itadrb+cTmAOUMQw7PRhMlqRjE8U5T9MLNPh5OihUO9Lg/4dB1ZtYq1jwU2Xp4E00AzdAplTrYlLQq/7+le17ztjV/cUeFvv+lw1sJb2O63tJfBm3nR+IPT8I2wqVyIuZT07UgfHYlhSbA8YWeBJ95g7+x3WQSea5gPyusyN8VRhZS+0HhWWl4Ef3v6f/9GAUPaoz3ApdG1DtsKLH8Bal9UvahfeJ3m6C3Y6F2FfT6yNoJhxhnqzQ3yC4gVbujp0H4g0okBPblM1ljZITx4yBwDLp0/zjAE6YOJQFXlDCpEy4Dbf2ojuikMdmhk6kPJPjtYECHyHdbgym7mQohhAeaxajUjjEdJ+88HEW0ISDhol0QkvImXA26Mdd9qOXekt+wjDXvbCa3Tf3Dl9CCdC/ExM/hLSBVR6AUQ5EVjDAMNq5W9oIrPV5IaSaP12VwL4sFw==",
        "X-Forefront-Antispam-Report": "CIP:216.228.112.32; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid01.nvidia.com; CAT:NONE;\n SFS:(4636009)(36840700001)(46966006)(107886003)(54906003)(1076003)(70206006)(186003)(70586007)(356005)(4326008)(83380400001)(7636003)(426003)(316002)(5660300002)(2616005)(26005)(8936002)(82310400003)(47076005)(336012)(6666004)(6916009)(508600001)(2906002)(8676002)(36860700001)(86362001)(36756003);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "15 Nov 2021 02:53:44.0685 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 4660bd38-d4a2-474e-bf97-08d9a7e32396",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.32];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n BN8NAM11FT058.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BN8PR12MB3331",
        "Cc": "elibr@nvidia.com, simon.horman@netronome.com, roniba@nvidia.com,\n i.maximets@ovn.org",
        "Subject": "[ovs-dev] [PATCH v18 8/8] system-offloads-traffic.at: Add sFlow\n\toffload test 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>\nAcked-by: Eelco Chaudron <echaudro@redhat.com>\n---\n tests/system-offloads-traffic.at | 101 +++++++++++++++++++++++++++++++\n 1 file changed, 101 insertions(+)",
    "diff": "diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at\nindex be63057bb..5068fcae2 100644\n--- a/tests/system-offloads-traffic.at\n+++ b/tests/system-offloads-traffic.at\n@@ -71,6 +71,107 @@ 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+m4_define([DUMP_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/pid=[[0-9]]*/pid=1/;s/output=$P1_IFINDEX/output=1/\"])\n+P1_IFINDEX=$(cat /sys/class/net/ovs-p1/ifindex)\n+AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep \"in_port(2)\" | grep \"eth_type(0x0800)\" | grep \"actions:userspace\" | grep \"sFlow\" | DUMP_SFLOW], [0], [dnl\n+recirc_id(0),in_port(2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:10, bytes:840, used:0.001s, actions:userspace(pid=1,sFlow(vid=0,pcp=0,output=1),actions),3\n+])\n+\n+m4_define([DUMP_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/pid=[[0-9]]*/pid=1/;s/output=$P0_IFINDEX/output=1/\"])\n+P0_IFINDEX=$(cat /sys/class/net/ovs-p0/ifindex)\n+AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep \"in_port(3)\" | grep \"eth_type(0x0800)\" | grep \"actions:userspace\" | grep \"sFlow\" | DUMP_SFLOW], [0], [dnl\n+recirc_id(0),in_port(3),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:10, bytes:840, used:0.001s, actions:userspace(pid=1,sFlow(vid=0,pcp=0,output=1),actions),2\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+\n+P1_IFINDEX=$(cat /sys/class/net/ovs-p1/ifindex)\n+m4_define([DUMP_SFLOW], [sed -e \"s/packets:[[0-9]]*/packets:1/;s/bytes:[[0-9]]*/bytes:1/;s/used:[[0-9]].[[0-9]]*s/used:0.001s/;s/eth(src=[[a-z0-9:]]*,dst=[[a-z0-9:]]*)/eth(macs)/;s/pid=[[0-9]]*/pid=1/;s/output=$P1_IFINDEX/output=1/\"])\n+AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep \"in_port(2)\" | grep \"eth_type(0x0800)\" | grep \"actions:sample\" | grep \"sFlow\" | DUMP_SFLOW], [0], [dnl\n+recirc_id(0),in_port(2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:1, used:0.001s, actions:sample(sample=50.0%,actions(userspace(pid=1,sFlow(vid=0,pcp=0,output=1),actions))),3\n+])\n+\n+P0_IFINDEX=$(cat /sys/class/net/ovs-p0/ifindex)\n+m4_define([DUMP_SFLOW], [sed -e \"s/packets:[[0-9]]*/packets:1/;s/bytes:[[0-9]]*/bytes:1/;s/used:[[0-9]].[[0-9]]*s/used:0.001s/;s/eth(src=[[a-z0-9:]]*,dst=[[a-z0-9:]]*)/eth(macs)/;s/pid=[[0-9]]*/pid=1/;s/output=$P0_IFINDEX/output=1/\"])\n+AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep \"in_port(3)\" | grep \"eth_type(0x0800)\" | grep \"actions:sample\" | grep \"sFlow\" | DUMP_SFLOW], [0], [dnl\n+recirc_id(0),in_port(3),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:1, used:0.001s, actions:sample(sample=50.0%,actions(userspace(pid=1,sFlow(vid=0,pcp=0,output=1),actions))),2\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 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",
        "v18",
        "8/8"
    ]
}