get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 74505,
    "url": "https://patches.dpdk.org/api/patches/74505/?format=api",
    "web_url": "https://patches.dpdk.org/project/dts/patch/20200720143803.212272-1-ohilyard@iol.unh.edu/",
    "project": {
        "id": 3,
        "url": "https://patches.dpdk.org/api/projects/3/?format=api",
        "name": "DTS",
        "link_name": "dts",
        "list_id": "dts.dpdk.org",
        "list_email": "dts@dpdk.org",
        "web_url": "",
        "scm_url": "git://dpdk.org/tools/dts",
        "webscm_url": "http://git.dpdk.org/tools/dts/",
        "list_archive_url": "https://inbox.dpdk.org/dts",
        "list_archive_url_format": "https://inbox.dpdk.org/dts/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200720143803.212272-1-ohilyard@iol.unh.edu>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20200720143803.212272-1-ohilyard@iol.unh.edu",
    "date": "2020-07-20T14:38:03",
    "name": "mac_filter: Add multicast filtering test case",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "443a5cac703420f4d3387ca32c279efc37ea9511",
    "submitter": {
        "id": 1829,
        "url": "https://patches.dpdk.org/api/people/1829/?format=api",
        "name": "Owen Hilyard",
        "email": "ohilyard@iol.unh.edu"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dts/patch/20200720143803.212272-1-ohilyard@iol.unh.edu/mbox/",
    "series": [
        {
            "id": 11176,
            "url": "https://patches.dpdk.org/api/series/11176/?format=api",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=11176",
            "date": "2020-07-20T14:38:03",
            "name": "mac_filter: Add multicast filtering test case",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11176/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74505/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/74505/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dts-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 7129EA0527;\n\tMon, 20 Jul 2020 16:38:09 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 69CC21BFEC;\n\tMon, 20 Jul 2020 16:38:09 +0200 (CEST)",
            "from mail-qv1-f46.google.com (mail-qv1-f46.google.com\n [209.85.219.46]) by dpdk.org (Postfix) with ESMTP id 61EFA1BFC5\n for <dts@dpdk.org>; Mon, 20 Jul 2020 16:38:08 +0200 (CEST)",
            "by mail-qv1-f46.google.com with SMTP id p7so7501951qvl.4\n for <dts@dpdk.org>; Mon, 20 Jul 2020 07:38:08 -0700 (PDT)",
            "from ohilyard-Alienware-m17.iol.unh.edu\n ([2606:4100:3880:1254::1033])\n by smtp.gmail.com with ESMTPSA id f41sm20529145qtk.55.2020.07.20.07.38.06\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 20 Jul 2020 07:38:06 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu;\n s=unh-iol;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=kFJmjySVoN03qDHKFZVVNbcURpZlLItj7Hl0OskDZa4=;\n b=Ct8K2fByVWAnPu221ILgPRFLZMlXvnsb9mjwEGG068x0p7JKnR0ht35Beu0EDD0UM8\n ZkAebM/7aZ7YzbDUs7jmGTHAOic4P3A3Teau8oaY84qWdj0YnGQJbf/0T0sxFLwnwP3X\n W5y93LHAQg6XRBijhmug6WZl9Gmhost5yD3hQ=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=kFJmjySVoN03qDHKFZVVNbcURpZlLItj7Hl0OskDZa4=;\n b=mKYn5SdLuSQ7HEGXh7jKqGQfWBQCjgkx/nquvdfue5K/DMUESf7jzD84XgQFBZlz+s\n RJekhoMQNGvX7aoo/Pe//1QaccfCem1XyBofiPisyUT9Q/rob7Q3xi7fYoLm66FLrUpn\n nM6EPSo3BAeMh0vxnmyeb3vEBmSA08JJcTBAQV/kwJagS9iPReUNAwdgSGjZW2mUeNJI\n Q/MAu2pvhSwctnZ0OeeH3jZCEiTKhCiLYiQO10QtK1FSgGkMTBYHZu21kR73OY83TvjM\n Wbb8pEwXcx5XELdSi/IPz8t+8goFLJXpvCMszXv1wxUJXGiyFrvtguQFzE68BG/wDvX+\n S8Hw==",
        "X-Gm-Message-State": "AOAM531faKO8NnBXKZsag3ZytXRMbIZkgs9ZXHkBcdsGKoPd02wPoz14\n VYwRIJ/RBFb2EW3bYds4YJEa/bEOxx2ygVXWENFS+ccbMCtxukmQmgQTtShHeB/oUsplSZyOl4f\n 3r99RSjlsMiBvPbMvpxh5fF2oaOYG7Q/NZ5oiyCb7oEZQIHIXDF6TzvFNIA==",
        "X-Google-Smtp-Source": "\n ABdhPJwKoz32cwPHI8MVq2JqztiLuzuEsDY77lVmFC/9S1hUid0ouStNqEuuYHQC4XjkPzigOuH/lg==",
        "X-Received": "by 2002:a0c:f385:: with SMTP id i5mr22465714qvk.4.1595255887299;\n Mon, 20 Jul 2020 07:38:07 -0700 (PDT)",
        "From": "Owen Hilyard <ohilyard@iol.unh.edu>",
        "To": "dts@dpdk.org",
        "Cc": "qi.z.zhang@intel.com, matan@mellanox.com, stephen@networkplumber.org,\n jerinj@marvell.com, suanmingm@mellanox.com, ohilyard@iol.unh.edu,\n thomas@monjalon.net, lylavoie@iol.unh.edu",
        "Date": "Mon, 20 Jul 2020 10:38:03 -0400",
        "Message-Id": "<20200720143803.212272-1-ohilyard@iol.unh.edu>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200716194237.137641-1-ohilyard@iol.unh.edu>",
        "References": "<20200716194237.137641-1-ohilyard@iol.unh.edu>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dts] [PATCH] mac_filter: Add multicast filtering test case",
        "X-BeenThere": "dts@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "test suite reviews and discussions <dts.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dts/>",
        "List-Post": "<mailto:dts@dpdk.org>",
        "List-Help": "<mailto:dts-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dts-bounces@dpdk.org",
        "Sender": "\"dts\" <dts-bounces@dpdk.org>"
    },
    "content": "Sorry about sending this twice, I noticed after todays meeting that this was caught in the moderator queue and I want to get it out to the mailing list at large asap.\n\nadd multicast filtering test case\nadd multicast test case test plan\n\nSigned-off-by: Owen Hilyard <ohilyard@iol.unh.edu>\n---\n test_plans/mac_filter_test_plan.rst | 27 ++++++++++++++++++++\n tests/TestSuite_mac_filter.py       | 39 ++++++++++++++++++++++++++---\n 2 files changed, 62 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/test_plans/mac_filter_test_plan.rst b/test_plans/mac_filter_test_plan.rst\nindex 1335e9f..e8a4f66 100644\n--- a/test_plans/mac_filter_test_plan.rst\n+++ b/test_plans/mac_filter_test_plan.rst\n@@ -172,3 +172,30 @@ Add one more different address::\n    testpmd> mac_addr add 0 <A+n+1>\n \n Verify that the response is \"No space left on device\" (-ENOSPC)\n+\n+Test Case: Multicast Filter\n+===========================\n+\n+Initialize first port without ``promiscuous mode``::\n+\n+  testpmd> set promisc 0 off\n+\n+\n+Add the multicast MAC address to the multicast filter::\n+\n+   testpmd> mcast_addr add 0 01:00:5E:00:00:00\n+\n+Send a packet with multicast destination MAC address to port 0::\n+\n+   port 0/queue 0: received 1 packets\n+     src=52:00:00:00:00:00 - dst=01:00:5E:00:00:00 - type=0x0800 - length=60 - nb_segs=1 - hw    ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP  - sw ptype: L2_ETHER L3_IPV4 L4_UDP  - l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x0\n+     ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN\n+\n+\n+Remove the multicast MAC address from the multicast filter::\n+\n+   testpmd> mcast_addr remove 0 01:00:5E:00:00:00\n+\n+Send a packet with multicast destination MAC address to port 0\n+\n+Verify that the packet was not received (Check for \"received\" in the output). There will be no output if the nic responds properly.\n\\ No newline at end of file\ndiff --git a/tests/TestSuite_mac_filter.py b/tests/TestSuite_mac_filter.py\nindex 9912d23..b762c91 100644\n--- a/tests/TestSuite_mac_filter.py\n+++ b/tests/TestSuite_mac_filter.py\n@@ -82,14 +82,18 @@ class TestMacFilter(TestCase):\n         \"\"\"\n         pass\n \n-    def whitelist_send_packet(self, portid, destMac=\"00:11:22:33:44:55\"):\n+    def whitelist_send_packet(self, portid, destMac=\"00:11:22:33:44:55\", count=-1):\n         \"\"\"\n         Send 1 packet to portid.\n         \"\"\"\n+        # You can't have an optional parameter use a class attribute as it's default value\n+        if count == -1:\n+            count = self.frames_to_send\n+\n         itf = self.tester.get_interface(self.tester.get_local_port(portid))\n         pkt = Packet(pkt_type='UDP')\n         pkt.config_layer('ether', {'src': '52:00:00:00:00:00', 'dst': destMac})\n-        pkt.send_pkt(self.tester, tx_port=itf, count=4)\n+        pkt.send_pkt(self.tester, tx_port=itf, count=count)\n \n     def test_add_remove_mac_address(self):\n         \"\"\"\n@@ -119,7 +123,7 @@ class TestMacFilter(TestCase):\n         out = self.dut.get_session_output()\n         # check the packet DO NOT increase\n         self.verify(\"received\" not in out,\n-                    \"Packet has been received on a new MAC address that has not been added yet\")\n+                    \"Packet has been received on a new MAC address that has been removed from the port\")\n \n         # add the different MAC address\n         self.dut.send_expect(\"mac_addr add %d\" % portid + \" %s\" % fake_mac_addr, \"testpmd>\")\n@@ -128,7 +132,7 @@ class TestMacFilter(TestCase):\n         out = self.dut.get_session_output()\n         cur_rxpkt = utils.regexp(out, \"received ([0-9]+) packets\")\n         # check the packet increase\n-        self.verify(int(cur_rxpkt)*self.frames_to_send == self.frames_to_send,\n+        self.verify(int(cur_rxpkt) * self.frames_to_send == self.frames_to_send,\n                     \"Packet has not been received on a new MAC address that has been added to the port\")\n \n         # remove the fake MAC address\n@@ -176,6 +180,33 @@ class TestMacFilter(TestCase):\n \n         self.verify(\"No space left on device\" in out, \"added 1 address more than max MAC addresses\")\n \n+    def test_multicast_filter(self):\n+        \"\"\"\n+        Add mac address and check packet can received\n+        Remove mac address and check packet can't received\n+        \"\"\"\n+        # initialise first port without promiscuous mode\n+        mcast_addr = \"01:00:5E:00:00:00\"\n+        portid = self.dutPorts[0]\n+        self.dut.send_expect(f\"set promisc {portid:d} off\", \"testpmd> \")\n+        self.dut.send_expect(\"clear port stats all\", \"testpmd> \")\n+\n+        self.dut.send_expect(f\"mcast_addr add {portid:d} {mcast_addr}\", \"testpmd>\")\n+        self.whitelist_send_packet(portid, mcast_addr, count=1)\n+        time.sleep(1)\n+        out = self.dut.get_session_output()\n+        self.verify(\"received\" in out,\n+                    \"Packet has not been received when it should have on a broadcast address\")\n+\n+        self.dut.send_expect(f\"mcast_addr remove {portid:d} {mcast_addr}\", \"testpmd>\")\n+        self.whitelist_send_packet(portid, mcast_addr, count=1)\n+        time.sleep(1)\n+        out = self.dut.get_session_output()\n+        self.verify(\"received\" not in out,\n+                    \"Packet has been received when it should have ignored the broadcast\")\n+\n+        self.dut.send_expect(\"stop\", \"testpmd> \")\n+\n     def tear_down(self):\n         \"\"\"\n         Run after each test case.\n",
    "prefixes": []
}