Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811090/?format=api
{ "id": 811090, "url": "http://patchwork.ozlabs.org/api/patches/811090/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170907173248.7589.44547.stgit@john-Precision-Tower-5810/", "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": "<20170907173248.7589.44547.stgit@john-Precision-Tower-5810>", "list_archive_url": null, "date": "2017-09-07T17:32:48", "name": "[net] ixgbe: incorrect xdp ring accounting in ethtool tx_frame param", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "97c465a729eec689beac1fc61f4f0377ab93d826", "submitter": { "id": 20028, "url": "http://patchwork.ozlabs.org/api/people/20028/?format=api", "name": "John Fastabend", "email": "john.fastabend@gmail.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/20170907173248.7589.44547.stgit@john-Precision-Tower-5810/mbox/", "series": [ { "id": 2030, "url": "http://patchwork.ozlabs.org/api/series/2030/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=2030", "date": "2017-09-07T17:32:48", "name": "[net] ixgbe: incorrect xdp ring accounting in ethtool tx_frame param", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2030/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811090/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811090/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"r9UYyd0L\"; dkim-atps=neutral" ], "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 3xp6x36MXjz9sRY\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 8 Sep 2017 03:33:11 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 502BC87AFE;\n\tThu, 7 Sep 2017 17:33:10 +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 i_7Qm-tZADxZ; Thu, 7 Sep 2017 17:33:08 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id F40E687BC5;\n\tThu, 7 Sep 2017 17:33:07 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id ED4B01C2922\n\tfor <intel-wired-lan@osuosl.org>;\n\tThu, 7 Sep 2017 17:33:05 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E6B8E87B02\n\tfor <intel-wired-lan@osuosl.org>;\n\tThu, 7 Sep 2017 17:33:05 +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 rYCPbKvvvvPc for <intel-wired-lan@osuosl.org>;\n\tThu, 7 Sep 2017 17:33:05 +0000 (UTC)", "from mail-pf0-f194.google.com (mail-pf0-f194.google.com\n\t[209.85.192.194])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 711AE87AFE\n\tfor <intel-wired-lan@osuosl.org>;\n\tThu, 7 Sep 2017 17:33:05 +0000 (UTC)", "by mail-pf0-f194.google.com with SMTP id y68so168313pfd.1\n\tfor <intel-wired-lan@osuosl.org>;\n\tThu, 07 Sep 2017 10:33:05 -0700 (PDT)", "from [127.0.1.1] ([72.168.144.71])\n\tby smtp.gmail.com with ESMTPSA id\n\ty28sm290643pfd.58.2017.09.07.10.33.00\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 07 Sep 2017 10:33:03 -0700 (PDT)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:from:to:cc:date:message-id:user-agent:mime-version\n\t:content-transfer-encoding;\n\tbh=G9GPh+D+I74WfL6nt87ZZmatss7ju7ksF6utet38iX8=;\n\tb=r9UYyd0LFf5Y1t4OBXFS1XL8fp++RGDmUFNssiSD6RREU5xaOqfu4bsKSlpdX9Mvv5\n\t6kUbsUjF8G/mIMDQknwOcR6A4bwH/Hkcno3SPiz/C553dvgzE782loyPsnx/HElRWUYF\n\tn4F5TDBX/7k1/KIHhWThmuuTt2tCSb6NnpG09dKXPx3pW6hkFz4ksdj2LSMTRN23pSLj\n\ttuC6Ai5Dc1LaGMGrPfyFpvZ87mjEHJxsijm8PVAUS72YkJ8LSUf6sei0x5/ZdqWvbLSP\n\tqU276vkA/8CZrlTKjB3bg4ceCwGM1WLsQYx9OJcXsHKVQDMypHUDqRGYYjp1OCmziZHm\n\ttutw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:from:to:cc:date:message-id:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=G9GPh+D+I74WfL6nt87ZZmatss7ju7ksF6utet38iX8=;\n\tb=WhrjBKJryJ9XSv3lHGbC9lD98GgLzt8DqYZBgaNgSP3ZGNgBVyhM60k8qxnyoXRCWY\n\t6qaTl3LE4GjSZyf3jFHoNCYA3ZreZgEXEM/5urWS0eJfo3DZJrgrs75xgOUCKXmX0ysl\n\tNtT6pzdmuSCV2CgmRlKVBd3A+1GNRVBvtETlKaQHVtSzvydFg7DfGlo6YMWxqrXvqAAm\n\tv7HkAyeW+rEnhmrxWt8WLUC7V7OLiDGJBYEhqXblrh343B3aK6Um/XNyhrtiSwHHzuDu\n\ttdCcuTPyBVFrwYM+R7nvI9id1y9e7fFU81OgpQO5C5f0Hzw0Ym1YpmfA2h/qgmVJ5FIs\n\t3eyg==", "X-Gm-Message-State": "AHPjjUjErqxQJeqlKQ1lGbgY76OZEBTPlUiCFKyU+5JehCeESB4/tqzm\n\tzToaYDIwgtFvcVjf", "X-Google-Smtp-Source": "ADKCNb7ITt9idErrV/NoeE+V9JHUeFABXV4MSw7HLbG/nBAiGM1hS8/xYUSoyEzkohyNDug0HobrNg==", "X-Received": "by 10.98.223.210 with SMTP id d79mr81170pfl.67.1504805584707;\n\tThu, 07 Sep 2017 10:33:04 -0700 (PDT)", "From": "John Fastabend <john.fastabend@gmail.com>", "To": "intel-wired-lan@osuosl.org", "Date": "Thu, 07 Sep 2017 10:32:48 -0700", "Message-ID": "<20170907173248.7589.44547.stgit@john-Precision-Tower-5810>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [net PATCH] ixgbe: incorrect xdp ring accounting\n\tin ethtool tx_frame param", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.18-1", "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>", "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": "Changing the TX ring parameters with an XDP program attached may\ncause the XDP queues to be cleared and the TX rings to be incorrectly\nconfigured.\n\nFix by doing correct ring accounting in setup call.\n\nFixes: 33fdc82f0883 (\"ixgbe: add support for XDP_TX action\")\nSigned-off-by: John Fastabend <john.fastabend@gmail.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\nindex 72c5657..c3e7a81 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n@@ -1048,7 +1048,7 @@ static int ixgbe_set_ringparam(struct net_device *netdev,\n {\n \tstruct ixgbe_adapter *adapter = netdev_priv(netdev);\n \tstruct ixgbe_ring *temp_ring;\n-\tint i, err = 0;\n+\tint i, j, err = 0;\n \tu32 new_rx_count, new_tx_count;\n \n \tif ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))\n@@ -1085,8 +1085,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev,\n \t}\n \n \t/* allocate temporary buffer to store rings in */\n-\ti = max_t(int, adapter->num_tx_queues, adapter->num_rx_queues);\n-\ti = max_t(int, i, adapter->num_xdp_queues);\n+\ti = max_t(int, adapter->num_tx_queues + adapter->num_xdp_queues,\n+\t\t adapter->num_rx_queues);\n \ttemp_ring = vmalloc(i * sizeof(struct ixgbe_ring));\n \n \tif (!temp_ring) {\n@@ -1118,8 +1118,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev,\n \t\t\t}\n \t\t}\n \n-\t\tfor (i = 0; i < adapter->num_xdp_queues; i++) {\n-\t\t\tmemcpy(&temp_ring[i], adapter->xdp_ring[i],\n+\t\tfor (j = 0; j < adapter->num_xdp_queues; j++, i++) {\n+\t\t\tmemcpy(&temp_ring[i], adapter->xdp_ring[j],\n \t\t\t sizeof(struct ixgbe_ring));\n \n \t\t\ttemp_ring[i].count = new_tx_count;\n@@ -1139,10 +1139,10 @@ static int ixgbe_set_ringparam(struct net_device *netdev,\n \t\t\tmemcpy(adapter->tx_ring[i], &temp_ring[i],\n \t\t\t sizeof(struct ixgbe_ring));\n \t\t}\n-\t\tfor (i = 0; i < adapter->num_xdp_queues; i++) {\n-\t\t\tixgbe_free_tx_resources(adapter->xdp_ring[i]);\n+\t\tfor (j = 0; j < adapter->num_xdp_queues; j++, i++) {\n+\t\t\tixgbe_free_tx_resources(adapter->xdp_ring[j]);\n \n-\t\t\tmemcpy(adapter->xdp_ring[i], &temp_ring[i],\n+\t\t\tmemcpy(adapter->xdp_ring[j], &temp_ring[i],\n \t\t\t sizeof(struct ixgbe_ring));\n \t\t}\n \n", "prefixes": [ "net" ] }