Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/951315/?format=api
{ "id": 951315, "url": "http://patchwork.ozlabs.org/api/patches/951315/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180730225248.42639-1-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": "<20180730225248.42639-1-anthony.l.nguyen@intel.com>", "list_archive_url": null, "date": "2018-07-30T22:52:48", "name": "[v2] ixgbe: Prevent unsupported configurations with XDP", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "2535bb8f0478f282c8877a933cc1f696736ee3ab", "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/20180730225248.42639-1-anthony.l.nguyen@intel.com/mbox/", "series": [ { "id": 58400, "url": "http://patchwork.ozlabs.org/api/series/58400/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=58400", "date": "2018-07-30T22:52:48", "name": "[v2] ixgbe: Prevent unsupported configurations with XDP", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/58400/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/951315/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/951315/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 AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41fZp31gSPz9s1x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 31 Jul 2018 09:02:01 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 28B6288A5F;\n\tMon, 30 Jul 2018 23:01:59 +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 abcYQ+4KK6-1; Mon, 30 Jul 2018 23:01:58 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 9505E88A05;\n\tMon, 30 Jul 2018 23:01:58 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 2DBE51BFFD0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 30 Jul 2018 23:01:57 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 2B1D7226D8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 30 Jul 2018 23:01:57 +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 GFK13Tp-9jhy for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 30 Jul 2018 23:01:56 +0000 (UTC)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 9522722226\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 30 Jul 2018 23:01:56 +0000 (UTC)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 Jul 2018 16:01:55 -0700", "from unknown (HELO anguy11-linux.jf.intel.com) ([10.166.241.34])\n\tby orsmga005.jf.intel.com with ESMTP; 30 Jul 2018 16:01:55 -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.51,424,1526367600\"; d=\"scan'208\";a=\"244639000\"", "From": "Tony Nguyen <anthony.l.nguyen@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 30 Jul 2018 15:52:48 -0700", "Message-Id": "<20180730225248.42639-1-anthony.l.nguyen@intel.com>", "X-Mailer": "git-send-email 2.13.6", "Subject": "[Intel-wired-lan] [PATCH v2] ixgbe: Prevent unsupported\n\tconfigurations with XDP", "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": "jakub.kicinski@netronome.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": "These changes address comments by Jakub Kicinski on\ncommit 38b7e7f8ae82 (\"ixgbe: Do not allow LRO or MTU change with XDP\").\n\nChange the MTU check with XDP to allow any supported value and only\nreject those outside of the range as opposed to rejecting any change\nwhen XDP is active. In situations where MTU size is not supported,\nreturn -EINVAL instead of -EPERM.\n\nAdd checks when enabling SRIOV, DCB, or adding L2FW offloaded device\nas they are not supported with XDP.\n\nCC: Jakub Kicinski <jakub.kicinski@netronome.com>\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\nv2:\nAdded check for L2FW offload and updated description.\n\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 28 ++++++++++++++++++++++++--\n drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 5 +++++\n 2 files changed, 31 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 447098005490..4081e5a9ead3 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -6620,8 +6620,18 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)\n \tstruct ixgbe_adapter *adapter = netdev_priv(netdev);\n \n \tif (adapter->xdp_prog) {\n-\t\te_warn(probe, \"MTU cannot be changed while XDP program is loaded\\n\");\n-\t\treturn -EPERM;\n+\t\tint new_frame_size = new_mtu + ETH_HLEN + ETH_FCS_LEN +\n+\t\t\t\t VLAN_HLEN;\n+\t\tint i;\n+\n+\t\tfor (i = 0; i < adapter->num_rx_queues; i++) {\n+\t\t\tstruct ixgbe_ring *ring = adapter->rx_ring[i];\n+\n+\t\t\tif (new_frame_size > ixgbe_rx_bufsz(ring)) {\n+\t\t\t\te_warn(probe, \"Requested MTU size is not supported with XDP\\n\");\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n+\t\t}\n \t}\n \n \t/*\n@@ -8983,6 +8993,15 @@ int ixgbe_setup_tc(struct net_device *dev, u8 tc)\n \n #ifdef CONFIG_IXGBE_DCB\n \tif (tc) {\n+\t\tif (adapter->xdp_prog) {\n+\t\t\te_warn(probe, \"DCB is not supported with XDP\\n\");\n+\n+\t\t\tixgbe_init_interrupt_scheme(adapter);\n+\t\t\tif (netif_running(dev))\n+\t\t\t\tixgbe_open(dev);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n \t\tnetdev_set_num_tc(dev, tc);\n \t\tixgbe_set_prio_tc_map(adapter);\n \n@@ -9936,6 +9955,11 @@ static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev)\n \tint tcs = adapter->hw_tcs ? : 1;\n \tint pool, err;\n \n+\tif (adapter->xdp_prog) {\n+\t\te_warn(probe, \"L2FW offload is not supported with XDP\\n\");\n+\t\treturn ERR_PTR(-EINVAL);\n+\t}\n+\n \t/* The hardware supported by ixgbe only filters on the destination MAC\n \t * address. In order to avoid issues we only support offloading modes\n \t * where the hardware can actually provide the functionality.\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\nindex 6f59933cdff7..9264a5f8a5d0 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n@@ -53,6 +53,11 @@ static int __ixgbe_enable_sriov(struct ixgbe_adapter *adapter,\n \tstruct ixgbe_hw *hw = &adapter->hw;\n \tint i;\n \n+\tif (adapter->xdp_prog) {\n+\t\te_warn(probe, \"SRIOV is not supported with XDP\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n \t/* Enable VMDq flag so device will be set in VM mode */\n \tadapter->flags |= IXGBE_FLAG_SRIOV_ENABLED |\n \t\t\t IXGBE_FLAG_VMDQ_ENABLED;\n", "prefixes": [ "v2" ] }