Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1192127/?format=api
{ "id": 1192127, "url": "http://patchwork.ozlabs.org/api/patches/1192127/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1573243090-2721-2-git-send-email-magnus.karlsson@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": "<1573243090-2721-2-git-send-email-magnus.karlsson@intel.com>", "list_archive_url": null, "date": "2019-11-08T19:58:10", "name": "[net,2/2] ixgbe: need_wakeup flag might not be set for Tx", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "7422add754305c9049ea4f37b3283c4ed53ba98c", "submitter": { "id": 72726, "url": "http://patchwork.ozlabs.org/api/people/72726/?format=api", "name": "Magnus Karlsson", "email": "magnus.karlsson@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/1573243090-2721-2-git-send-email-magnus.karlsson@intel.com/mbox/", "series": [ { "id": 141759, "url": "http://patchwork.ozlabs.org/api/series/141759/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=141759", "date": "2019-11-08T19:58:09", "name": "[net,1/2] i40e: need_wakeup flag might not be set for Tx", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/141759/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1192127/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1192127/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; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=osuosl.org (client-ip=140.211.166.136;\n\thelo=silver.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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 478rg71rRlz9sNT\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 9 Nov 2019 06:58:26 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id B56D623600;\n\tFri, 8 Nov 2019 19:58:24 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 9srEXn-oSlIk; Fri, 8 Nov 2019 19:58:23 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 9B9EA23509;\n\tFri, 8 Nov 2019 19:58:23 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id B43201BF2FE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 8 Nov 2019 19:58:19 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 9AD7B22658\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 8 Nov 2019 19:58:19 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id XtyjQVH8oV6x for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 8 Nov 2019 19:58:18 +0000 (UTC)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 1B64323509\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 8 Nov 2019 19:58:18 +0000 (UTC)", "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Nov 2019 11:58:16 -0800", "from unknown (HELO VM.ch.intel.com) ([10.78.3.78])\n\tby orsmga004.jf.intel.com with ESMTP; 08 Nov 2019 11:58:17 -0800" ], "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.68,283,1569308400\"; d=\"scan'208\";a=\"354188895\"", "From": "Magnus Karlsson <magnus.karlsson@intel.com>", "To": "magnus.karlsson@intel.com, bjorn.topel@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Fri, 8 Nov 2019 20:58:10 +0100", "Message-Id": "<1573243090-2721-2-git-send-email-magnus.karlsson@intel.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1573243090-2721-1-git-send-email-magnus.karlsson@intel.com>", "References": "<1573243090-2721-1-git-send-email-magnus.karlsson@intel.com>", "Subject": "[Intel-wired-lan] [PATCH net 2/2] ixgbe: need_wakeup flag might not\n\tbe set for Tx", "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": "maciejromanfijalkowski@gmail.com, maciej.fijalkowski@intel.com,\n\tnetdev@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": "The need_wakeup flag for Tx might not be set for AF_XDP sockets that\nare only used to send packets. This happens if there is at least one\noutstanding packet that has not been completed by the hardware and we\nget that corresponding completion (which will not generate an\ninterrupt since interrupts are disabled in the napi poll loop) between\nthe time we stopped processing the Tx completions and interrupts are\nenabled again. In this case, the need_wakeup flag will have been\ncleared at the end of the Tx completion processing as we believe we\nwill get an interrupt from the outstanding completion at a later point\nin time. But if this completion interrupt occurs before interrupts\nare enable, we lose it and should at that point really have set the\nneed_wakeup flag since there are no more outstanding completions that\ncan generate an interrupt to continue the processing. When this\nhappens, user space will see a Tx queue need_wakeup of 0 and skip\nissuing a syscall, which means will never get into the Tx processing\nagain and we have a deadlock.\n\nThis patch introduces a quick fix for this issue by just setting the\nneed_wakeup flag for Tx to 1 all the time. I am working on a proper\nfix for this that will toggle the flag appropriately, but it is more\nchallenging than I anticipated and I am afraid that this patch will\nnot be completed before the merge window closes, therefore this easier\nfix for now. This fix has a negative performance impact in the range\nof 0% to 4%. Towards the higher end of the scale if you have driver\nand application on the same core and issue a lot of packets, and\ntowards no negative impact if you use two cores, lower transmission\nspeeds and/or a workload that also receives packets.\n\nSigned-off-by: Magnus Karlsson <magnus.karlsson@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 10 ++--------\n 1 file changed, 2 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c\nindex 100ac89..d6feaac 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c\n@@ -622,8 +622,6 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *xdp_ring, unsigned int budget)\n \tif (tx_desc) {\n \t\tixgbe_xdp_ring_update_tail(xdp_ring);\n \t\txsk_umem_consume_tx_done(xdp_ring->xsk_umem);\n-\t\tif (xsk_umem_uses_need_wakeup(xdp_ring->xsk_umem))\n-\t\t\txsk_clear_tx_need_wakeup(xdp_ring->xsk_umem);\n \t}\n \n \treturn !!budget && work_done;\n@@ -691,12 +689,8 @@ bool ixgbe_clean_xdp_tx_irq(struct ixgbe_q_vector *q_vector,\n \tif (xsk_frames)\n \t\txsk_umem_complete_tx(umem, xsk_frames);\n \n-\tif (xsk_umem_uses_need_wakeup(tx_ring->xsk_umem)) {\n-\t\tif (tx_ring->next_to_clean == tx_ring->next_to_use)\n-\t\t\txsk_set_tx_need_wakeup(tx_ring->xsk_umem);\n-\t\telse\n-\t\t\txsk_clear_tx_need_wakeup(tx_ring->xsk_umem);\n-\t}\n+\tif (xsk_umem_uses_need_wakeup(tx_ring->xsk_umem))\n+\t\txsk_set_tx_need_wakeup(tx_ring->xsk_umem);\n \n \treturn ixgbe_xmit_zc(tx_ring, q_vector->tx.work_limit);\n }\n", "prefixes": [ "net", "2/2" ] }