Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/887194/?format=api
{ "id": 887194, "url": "http://patchwork.ozlabs.org/api/patches/887194/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180316223406.7295-4-anthony.l.nguyen@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": "<20180316223406.7295-4-anthony.l.nguyen@intel.com>", "list_archive_url": null, "date": "2018-03-16T22:34:04", "name": "[3/5] ixgbevf: Delay tail write for XDP packets", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "3b8fa91ec99458989d4a1a8ec318be78bf2536da", "submitter": { "id": 68875, "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api", "name": "Tony Nguyen", "email": "anthony.l.nguyen@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/20180316223406.7295-4-anthony.l.nguyen@intel.com/mbox/", "series": [ { "id": 34301, "url": "http://patchwork.ozlabs.org/api/series/34301/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=34301", "date": "2018-03-16T22:34:04", "name": "Enable XDP for ixgbevf", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/34301/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/887194/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/887194/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=none (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 AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4030qR2NVvz9sSm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 17 Mar 2018 09:43:30 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 9A80E8A6B7;\n\tFri, 16 Mar 2018 22:43:29 +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 j2ZCJ6ZiG5Ms; Fri, 16 Mar 2018 22:43:28 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 32C298A6AD;\n\tFri, 16 Mar 2018 22:43:28 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 80CE61C218D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:26 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 7B385863CA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:26 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 6kz7wzHOkYRF for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:25 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 8F9E9835F9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:25 +0000 (UTC)", "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t16 Mar 2018 15:43:24 -0700", "from unknown (HELO anguy11-linux.jf.intel.com) ([10.166.244.153])\n\tby orsmga007.jf.intel.com with ESMTP; 16 Mar 2018 15:43:24 -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.48,317,1517904000\"; d=\"scan'208\";a=\"25375065\"", "From": "Tony Nguyen <anthony.l.nguyen@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Fri, 16 Mar 2018 15:34:04 -0700", "Message-Id": "<20180316223406.7295-4-anthony.l.nguyen@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20180316223406.7295-1-anthony.l.nguyen@intel.com>", "References": "<20180316223406.7295-1-anthony.l.nguyen@intel.com>", "Subject": "[Intel-wired-lan] [PATCH 3/5] ixgbevf: Delay tail write for XDP\n\tpackets", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "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": "netdev@vger.kernel.org", "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": "Current XDP implementation hits the tail on every XDP_TX; change the\ndriver to only hit the tail after packet processing is complete.\n\nBased on commit 7379f97a4fce (\"ixgbe: delay tail write to every 'n'\npackets\")\n\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\nAcked-by: John Fastabend <john.fastabend@gmail.com>\n---\n drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 30 ++++++++++++++---------\n 1 file changed, 18 insertions(+), 12 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\nindex 309f549808e4..5167e81e0cf1 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n@@ -1016,14 +1016,8 @@ static int ixgbevf_xmit_xdp_ring(struct ixgbevf_ring *ring,\n \t\t\tcpu_to_le32((len << IXGBE_ADVTXD_PAYLEN_SHIFT) |\n \t\t\t\t IXGBE_ADVTXD_CC);\n \n-\t/* Force memory writes to complete before letting h/w know there\n-\t * are new descriptors to fetch. (Only applicable for weak-ordered\n-\t * memory model archs, such as IA-64).\n-\t *\n-\t * We also need this memory barrier to make certain all of the\n-\t * status bits have been updated before next_to_watch is written.\n-\t */\n-\twmb();\n+\t/* Avoid any potential race with cleanup */\n+\tsmp_wmb();\n \n \t/* set next_to_watch value indicating a packet is present */\n \ti++;\n@@ -1033,8 +1027,6 @@ static int ixgbevf_xmit_xdp_ring(struct ixgbevf_ring *ring,\n \ttx_buffer->next_to_watch = tx_desc;\n \tring->next_to_use = i;\n \n-\t/* notify HW of packet */\n-\tixgbevf_write_tail(ring, i);\n \treturn IXGBEVF_XDP_TX;\n }\n \n@@ -1101,6 +1093,7 @@ static int ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,\n \tstruct ixgbevf_adapter *adapter = q_vector->adapter;\n \tu16 cleaned_count = ixgbevf_desc_unused(rx_ring);\n \tstruct sk_buff *skb = rx_ring->skb;\n+\tbool xdp_xmit = false;\n \tstruct xdp_buff xdp;\n \n \txdp.rxq = &rx_ring->xdp_rxq;\n@@ -1142,11 +1135,13 @@ static int ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,\n \t\t}\n \n \t\tif (IS_ERR(skb)) {\n-\t\t\tif (PTR_ERR(skb) == -IXGBEVF_XDP_TX)\n+\t\t\tif (PTR_ERR(skb) == -IXGBEVF_XDP_TX) {\n+\t\t\t\txdp_xmit = true;\n \t\t\t\tixgbevf_rx_buffer_flip(rx_ring, rx_buffer,\n \t\t\t\t\t\t size);\n-\t\t\telse\n+\t\t\t} else {\n \t\t\t\trx_buffer->pagecnt_bias++;\n+\t\t\t}\n \t\t\ttotal_rx_packets++;\n \t\t\ttotal_rx_bytes += size;\n \t\t} else if (skb) {\n@@ -1208,6 +1203,17 @@ static int ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,\n \t/* place incomplete frames back on ring for completion */\n \trx_ring->skb = skb;\n \n+\tif (xdp_xmit) {\n+\t\tstruct ixgbevf_ring *xdp_ring =\n+\t\t\tadapter->xdp_ring[rx_ring->queue_index];\n+\n+\t\t/* Force memory writes to complete before letting h/w\n+\t\t * know there are new descriptors to fetch.\n+\t\t */\n+\t\twmb();\n+\t\tixgbevf_write_tail(xdp_ring, xdp_ring->next_to_use);\n+\t}\n+\n \tu64_stats_update_begin(&rx_ring->syncp);\n \trx_ring->stats.packets += total_rx_packets;\n \trx_ring->stats.bytes += total_rx_bytes;\n", "prefixes": [ "3/5" ] }