Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1132628/?format=api
{ "id": 1132628, "url": "http://patchwork.ozlabs.org/api/patches/1132628/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190716030637.5634-8-kevin.laatz@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20190716030637.5634-8-kevin.laatz@intel.com>", "list_archive_url": null, "date": "2019-07-16T03:06:34", "name": "[v2,07/10] samples/bpf: add unaligned chunks mode support to xdpsock", "commit_ref": null, "pull_url": null, "state": "awaiting-upstream", "archived": false, "hash": "adfad9fad2e20dbab3b7f5ad1027c36eccca315c", "submitter": { "id": 76901, "url": "http://patchwork.ozlabs.org/api/people/76901/?format=api", "name": "Laatz, Kevin", "email": "kevin.laatz@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190716030637.5634-8-kevin.laatz@intel.com/mbox/", "series": [ { "id": 119750, "url": "http://patchwork.ozlabs.org/api/series/119750/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=119750", "date": "2019-07-16T03:06:28", "name": "[v2,01/10] i40e: simplify Rx buffer recycle", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/119750/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1132628/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1132628/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 45nyfY05r8z9sNC\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 16 Jul 2019 21:22:12 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 88C1587E07;\n\tTue, 16 Jul 2019 11:22:11 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id TVsQWmAq0dG9; Tue, 16 Jul 2019 11:22:10 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id C9C4487D40;\n\tTue, 16 Jul 2019 11:22:10 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 3D63D1BF82D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 16 Jul 2019 11:22:09 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 353C086044\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 16 Jul 2019 11:22:09 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id fg7zJAVCoGz7 for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 16 Jul 2019 11:22:06 +0000 (UTC)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 062C585FFD\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 16 Jul 2019 11:22:05 +0000 (UTC)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t16 Jul 2019 04:22:05 -0700", "from silpixa00399838.ir.intel.com (HELO\n\tsilpixa00399838.ger.corp.intel.com) ([10.237.223.10])\n\tby fmsmga006.fm.intel.com with ESMTP; 16 Jul 2019 04:22:03 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.63,498,1557212400\"; d=\"scan'208\";a=\"366631570\"", "From": "Kevin Laatz <kevin.laatz@intel.com>", "To": "netdev@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,\n\tbjorn.topel@intel.com, magnus.karlsson@intel.com,\n\tjakub.kicinski@netronome.com, jonathan.lemon@gmail.com", "Date": "Tue, 16 Jul 2019 03:06:34 +0000", "Message-Id": "<20190716030637.5634-8-kevin.laatz@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190716030637.5634-1-kevin.laatz@intel.com>", "References": "<20190620090958.2135-1-kevin.laatz@intel.com>\n\t<20190716030637.5634-1-kevin.laatz@intel.com>", "Subject": "[Intel-wired-lan] [PATCH v2 07/10] samples/bpf: add unaligned\n\tchunks mode support to xdpsock", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Cc": "bruce.richardson@intel.com, ciara.loftus@intel.com,\n\tintel-wired-lan@lists.osuosl.org, bpf@vger.kernel.org,\n\tKevin Laatz <kevin.laatz@intel.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "This patch adds support for the unaligned chunks mode. The addition of the\nunaligned chunks option will allow users to run the application with more\nrelaxed chunk placement in the XDP umem.\n\nUnaligned chunks mode can be used with the '-u' or '--unaligned' command\nline options.\n\nSigned-off-by: Kevin Laatz <kevin.laatz@intel.com>\nSigned-off-by: Ciara Loftus <ciara.loftus@intel.com>\n---\n samples/bpf/xdpsock_user.c | 17 +++++++++++++++--\n 1 file changed, 15 insertions(+), 2 deletions(-)", "diff": "diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c\nindex 93eaaf7239b2..26ba1a1fd582 100644\n--- a/samples/bpf/xdpsock_user.c\n+++ b/samples/bpf/xdpsock_user.c\n@@ -67,6 +67,8 @@ static int opt_ifindex;\n static int opt_queue;\n static int opt_poll;\n static int opt_interval = 1;\n+static u32 opt_umem_flags;\n+static int opt_unaligned_chunks;\n static u32 opt_xdp_bind_flags;\n static int opt_xsk_frame_size = XSK_UMEM__DEFAULT_FRAME_SIZE;\n static __u32 prog_id;\n@@ -282,7 +284,9 @@ static struct xsk_umem_info *xsk_configure_umem(void *buffer, u64 size)\n \t\t.comp_size = XSK_RING_CONS__DEFAULT_NUM_DESCS,\n \t\t.frame_size = opt_xsk_frame_size,\n \t\t.frame_headroom = XSK_UMEM__DEFAULT_FRAME_HEADROOM,\n+\t\t.flags = opt_umem_flags\n \t};\n+\n \tint ret;\n \n \tumem = calloc(1, sizeof(*umem));\n@@ -291,6 +295,7 @@ static struct xsk_umem_info *xsk_configure_umem(void *buffer, u64 size)\n \n \tret = xsk_umem__create(&umem->umem, buffer, size, &umem->fq, &umem->cq,\n \t\t\t &cfg);\n+\n \tif (ret)\n \t\texit_with_error(-ret);\n \n@@ -352,6 +357,7 @@ static struct option long_options[] = {\n \t{\"zero-copy\", no_argument, 0, 'z'},\n \t{\"copy\", no_argument, 0, 'c'},\n \t{\"frame-size\", required_argument, 0, 'f'},\n+\t{\"unaligned\", no_argument, 0, 'u'},\n \t{0, 0, 0, 0}\n };\n \n@@ -372,6 +378,7 @@ static void usage(const char *prog)\n \t\t\" -z, --zero-copy Force zero-copy mode.\\n\"\n \t\t\" -c, --copy Force copy mode.\\n\"\n \t\t\" -f, --frame-size=n Set the frame size (must be a power of two, default is %d).\\n\"\n+\t\t\" -u, --unaligned\tEnable unaligned chunk placement\\n\"\n \t\t\"\\n\";\n \tfprintf(stderr, str, prog, XSK_UMEM__DEFAULT_FRAME_SIZE);\n \texit(EXIT_FAILURE);\n@@ -384,7 +391,7 @@ static void parse_command_line(int argc, char **argv)\n \topterr = 0;\n \n \tfor (;;) {\n-\t\tc = getopt_long(argc, argv, \"Frtli:q:psSNn:czf:\", long_options,\n+\t\tc = getopt_long(argc, argv, \"Frtli:q:psSNn:czf:u\", long_options,\n \t\t\t\t&option_index);\n \t\tif (c == -1)\n \t\t\tbreak;\n@@ -424,12 +431,17 @@ static void parse_command_line(int argc, char **argv)\n \t\tcase 'c':\n \t\t\topt_xdp_bind_flags |= XDP_COPY;\n \t\t\tbreak;\n+\t\tcase 'u':\n+\t\t\topt_umem_flags |= XDP_UMEM_UNALIGNED_CHUNKS;\n+\t\t\topt_unaligned_chunks = 1;\n+\t\t\tbreak;\n \t\tcase 'F':\n \t\t\topt_xdp_flags &= ~XDP_FLAGS_UPDATE_IF_NOEXIST;\n \t\t\tbreak;\n \t\tcase 'f':\n \t\t\topt_xsk_frame_size = atoi(optarg);\n \t\t\tbreak;\n+\n \t\tdefault:\n \t\t\tusage(basename(argv[0]));\n \t\t}\n@@ -442,7 +454,8 @@ static void parse_command_line(int argc, char **argv)\n \t\tusage(basename(argv[0]));\n \t}\n \n-\tif (opt_xsk_frame_size & (opt_xsk_frame_size - 1)) {\n+\tif ((opt_xsk_frame_size & (opt_xsk_frame_size - 1)) &&\n+\t\t\t!opt_unaligned_chunks) {\n \t\tfprintf(stderr, \"--frame-size=%d is not a power of two\\n\",\n \t\t\topt_xsk_frame_size);\n \t\tusage(basename(argv[0]));\n", "prefixes": [ "v2", "07/10" ] }