Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/831021/?format=api
{ "id": 831021, "url": "http://patchwork.ozlabs.org/api/1.2/patches/831021/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20171027012443.3306-16-xiyou.wangcong@gmail.com/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/1.2/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20171027012443.3306-16-xiyou.wangcong@gmail.com>", "list_archive_url": null, "date": "2017-10-27T01:24:42", "name": "[net,15/16] selftests: Introduce a new script to generate tc batch file", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "d5c89984c6573b7ad57edb5de3ff2e8d0045ab60", "submitter": { "id": 211, "url": "http://patchwork.ozlabs.org/api/1.2/people/211/?format=api", "name": "Cong Wang", "email": "xiyou.wangcong@gmail.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/1.2/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20171027012443.3306-16-xiyou.wangcong@gmail.com/mbox/", "series": [ { "id": 10472, "url": "http://patchwork.ozlabs.org/api/1.2/series/10472/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=10472", "date": "2017-10-27T01:24:27", "name": "net_sched: fix races with RCU callbacks", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/10472/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/831021/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/831021/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"DkWXFR+j\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yNR5m61mFz9t2h\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 27 Oct 2017 12:25:48 +1100 (AEDT)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932506AbdJ0BZq (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 26 Oct 2017 21:25:46 -0400", "from mail-pf0-f196.google.com ([209.85.192.196]:47968 \"EHLO\n\tmail-pf0-f196.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S932428AbdJ0BZR (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 26 Oct 2017 21:25:17 -0400", "by mail-pf0-f196.google.com with SMTP id z11so3779407pfk.4\n\tfor <netdev@vger.kernel.org>; Thu, 26 Oct 2017 18:25:16 -0700 (PDT)", "from tw-172-25-30-113.office.twttr.net ([8.25.197.25])\n\tby smtp.gmail.com with ESMTPSA id\n\tb16sm13211973pfe.58.2017.10.26.18.25.15\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 26 Oct 2017 18:25:15 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=qjKZfQfIdHVGMkQ9Vvv1r3TfiVEHot82U1ujBYw+l/0=;\n\tb=DkWXFR+jXLfr+bJaJnLl/72c4llgH2vN6p7OVKJxSktr+1I2QFHLLsq4an0IHQZoao\n\t3S5PrEoGE/9AadZYq6yxmWwQM5S239NJl90F0hPPHOHeNHk228mtghRmz+j58qdNRhIV\n\tc2d6dF+JhMX25NitXXkPArYE+nsCz0kpgnM45AhR+2RnTgC0g8RIKUkHN0h3iRGSHR6u\n\tuaLK4qPj9VldPXSwP0OA45FGJlhvJmhJWfPYKEsPADLRPwoPqyAaoKgI32i5pH5pMMlA\n\tnwWeYKm/YVyWLT15MzbPbfImoAtrnUQ2sgtq3lSyXOTScwF9nt+k43cXE761/Gc6gxzs\n\ty6/A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=qjKZfQfIdHVGMkQ9Vvv1r3TfiVEHot82U1ujBYw+l/0=;\n\tb=RSNoYOtvgYoa3sedkQb3R6ZnEccwu8kVB6vVi1sI20X7xuJ18ZyqN2KRPrDLBayYYa\n\tA2i+N1kUiU8OY2Gp/0DsisPsq4JKTC2giVDH8NJAjLDR+w+Ce96rrb3GOUHEuwgIDqub\n\tkOyqO7+DcN92cAxvDLKYWsAWpSBrj+RHbVUhTqF6rUhZnUmrbsHMOzOCjvRVX66R1eSk\n\tvzwHsPHEdVXvN/txSyXu9pyYYG6LCvQ7kq5XJym62sbiqEvXnOIUZ3UTEM2Sk7f2JXug\n\tbw9BaSaFAEcIPu7HO26hDC+66RZL9MvknOaFDRNM519VZgVMT1mwo6RmZTgGJs0d6aWk\n\tWnkg==", "X-Gm-Message-State": "AMCzsaXevoRdxgVSyB2t9ic94D9KARPytEm4NP92lt1AhLDrYJUrCsko\n\tYGH+af0Jeciaw/8A7tT0bJRS+fgK", "X-Google-Smtp-Source": "ABhQp+QQek7A3ED8uN22vsJyHoLxRgRySKKWbqKMGvkneL7sQAxxwUjcP7XneGgH2fSZI1Aph/NCiA==", "X-Received": "by 10.99.168.13 with SMTP id o13mr6578379pgf.435.1509067516359; \n\tThu, 26 Oct 2017 18:25:16 -0700 (PDT)", "From": "Cong Wang <xiyou.wangcong@gmail.com>", "To": "netdev@vger.kernel.org", "Cc": "Chris Mi <chrism@mellanox.com>, Cong Wang <xiyou.wangcong@gmail.com>", "Subject": "[Patch net 15/16] selftests: Introduce a new script to generate tc\n\tbatch file", "Date": "Thu, 26 Oct 2017 18:24:42 -0700", "Message-Id": "<20171027012443.3306-16-xiyou.wangcong@gmail.com>", "X-Mailer": "git-send-email 2.9.4", "In-Reply-To": "<20171027012443.3306-1-xiyou.wangcong@gmail.com>", "References": "<20171027012443.3306-1-xiyou.wangcong@gmail.com>", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "From: Chris Mi <chrism@mellanox.com>\n\n # ./tdc_batch.py -h\n usage: tdc_batch.py [-h] [-n NUMBER] [-o] [-s] [-p] device file\n\n TC batch file generator\n\n positional arguments:\n device device name\n file batch file name\n\n optional arguments:\n -h, --help show this help message and exit\n -n NUMBER, --number NUMBER\n how many lines in batch file\n -o, --skip_sw skip_sw (offload), by default skip_hw\n -s, --share_action all filters share the same action\n -p, --prio all filters have different prio\n\nAcked-by: Jamal Hadi Salim <jhs@mojatatu.com>\nAcked-by: Lucas Bates <lucasb@mojatatu.com>\nSigned-off-by: Chris Mi <chrism@mellanox.com>\nSigned-off-by: Cong Wang <xiyou.wangcong@gmail.com>\n---\n tools/testing/selftests/tc-testing/tdc_batch.py | 62 +++++++++++++++++++++++++\n 1 file changed, 62 insertions(+)\n create mode 100755 tools/testing/selftests/tc-testing/tdc_batch.py", "diff": "diff --git a/tools/testing/selftests/tc-testing/tdc_batch.py b/tools/testing/selftests/tc-testing/tdc_batch.py\nnew file mode 100755\nindex 000000000000..707c6bfef689\n--- /dev/null\n+++ b/tools/testing/selftests/tc-testing/tdc_batch.py\n@@ -0,0 +1,62 @@\n+#!/usr/bin/python3\n+\n+\"\"\"\n+tdc_batch.py - a script to generate TC batch file\n+\n+Copyright (C) 2017 Chris Mi <chrism@mellanox.com>\n+\"\"\"\n+\n+import argparse\n+\n+parser = argparse.ArgumentParser(description='TC batch file generator')\n+parser.add_argument(\"device\", help=\"device name\")\n+parser.add_argument(\"file\", help=\"batch file name\")\n+parser.add_argument(\"-n\", \"--number\", type=int,\n+ help=\"how many lines in batch file\")\n+parser.add_argument(\"-o\", \"--skip_sw\",\n+ help=\"skip_sw (offload), by default skip_hw\",\n+ action=\"store_true\")\n+parser.add_argument(\"-s\", \"--share_action\",\n+ help=\"all filters share the same action\",\n+ action=\"store_true\")\n+parser.add_argument(\"-p\", \"--prio\",\n+ help=\"all filters have different prio\",\n+ action=\"store_true\")\n+args = parser.parse_args()\n+\n+device = args.device\n+file = open(args.file, 'w')\n+\n+number = 1\n+if args.number:\n+ number = args.number\n+\n+skip = \"skip_hw\"\n+if args.skip_sw:\n+ skip = \"skip_sw\"\n+\n+share_action = \"\"\n+if args.share_action:\n+ share_action = \"index 1\"\n+\n+prio = \"prio 1\"\n+if args.prio:\n+ prio = \"\"\n+ if number > 0x4000:\n+ number = 0x4000\n+\n+index = 0\n+for i in range(0x100):\n+ for j in range(0x100):\n+ for k in range(0x100):\n+ mac = (\"%02x:%02x:%02x\" % (i, j, k))\n+ src_mac = \"e4:11:00:\" + mac\n+ dst_mac = \"e4:12:00:\" + mac\n+ cmd = (\"filter add dev %s %s protocol ip parent ffff: flower %s \"\n+ \"src_mac %s dst_mac %s action drop %s\" %\n+ (device, prio, skip, src_mac, dst_mac, share_action))\n+ file.write(\"%s\\n\" % cmd)\n+ index += 1\n+ if index >= number:\n+ file.close()\n+ exit(0)\n", "prefixes": [ "net", "15/16" ] }