Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/611853/?format=api
{ "id": 611853, "url": "http://patchwork.ozlabs.org/api/patches/611853/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1461004429-34316-3-git-send-email-jesse.brandeburg@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": "<1461004429-34316-3-git-send-email-jesse.brandeburg@intel.com>", "list_archive_url": null, "date": "2016-04-18T18:33:42", "name": "[next,S35,v3,2/9] i40e: Drop packet split receive routine", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "db5a3b3123595b90bc88d9938e50356c50a0e8c9", "submitter": { "id": 189, "url": "http://patchwork.ozlabs.org/api/people/189/?format=api", "name": "Jesse Brandeburg", "email": "jesse.brandeburg@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/1461004429-34316-3-git-send-email-jesse.brandeburg@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/611853/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/611853/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.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" ], "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 3qpcJ91JQzz9t48\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Apr 2016 04:34:49 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 816E8859D4;\n\tMon, 18 Apr 2016 18:34:48 +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 r6Qi6gzIDfwT; Mon, 18 Apr 2016 18:34:45 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id A508287581;\n\tMon, 18 Apr 2016 18:34:45 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 0F3E41C2080\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 18 Apr 2016 18:34:45 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 0895C31454\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 18 Apr 2016 18:34:45 +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 5tS6FH9mukFF for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 18 Apr 2016 18:34:41 +0000 (UTC)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby silver.osuosl.org (Postfix) with ESMTP id 419503145D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 18 Apr 2016 18:34:41 +0000 (UTC)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga103.jf.intel.com with ESMTP; 18 Apr 2016 11:34:40 -0700", "from jbrandeb-hsm2.jf.intel.com ([134.134.3.81])\n\tby fmsmga002.fm.intel.com with ESMTP; 18 Apr 2016 11:34:40 -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-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.24,503,1455004800\"; d=\"scan'208\";a=\"961329958\"", "From": "Jesse Brandeburg <jesse.brandeburg@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 18 Apr 2016 11:33:42 -0700", "Message-Id": "<1461004429-34316-3-git-send-email-jesse.brandeburg@intel.com>", "X-Mailer": "git-send-email 2.1.0", "In-Reply-To": "<1461004429-34316-2-git-send-email-jesse.brandeburg@intel.com>", "References": "<1461004429-34316-1-git-send-email-jesse.brandeburg@intel.com>\n\t<1461004429-34316-2-git-send-email-jesse.brandeburg@intel.com>", "Subject": "[Intel-wired-lan] [PATCH next S35 v3 2/9] i40e: Drop packet split\n\treceive routine", "X-BeenThere": "intel-wired-lan@lists.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.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "As part of preparation for the rx-refactor, remove the\npacket split receive routine and ancillary code.\n\nSigned-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e.h | 3 -\n drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 4 +-\n drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 19 --\n drivers/net/ethernet/intel/i40e/i40e_main.c | 49 +----\n drivers/net/ethernet/intel/i40e/i40e_txrx.c | 245 +------------------------\n drivers/net/ethernet/intel/i40e/i40e_txrx.h | 7 -\n 6 files changed, 10 insertions(+), 317 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex 618a2a8..2a3334e 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -101,7 +101,6 @@\n #define I40E_PRIV_FLAGS_LINKPOLL_FLAG\tBIT(1)\n #define I40E_PRIV_FLAGS_FD_ATR\t\tBIT(2)\n #define I40E_PRIV_FLAGS_VEB_STATS\tBIT(3)\n-#define I40E_PRIV_FLAGS_PS\t\tBIT(4)\n #define I40E_PRIV_FLAGS_HW_ATR_EVICT\tBIT(5)\n \n #define I40E_NVM_VERSION_LO_SHIFT 0\n@@ -335,8 +334,6 @@ struct i40e_pf {\n #define I40E_FLAG_RX_CSUM_ENABLED\t\tBIT_ULL(1)\n #define I40E_FLAG_MSI_ENABLED\t\t\tBIT_ULL(2)\n #define I40E_FLAG_MSIX_ENABLED\t\t\tBIT_ULL(3)\n-#define I40E_FLAG_RX_1BUF_ENABLED\t\tBIT_ULL(4)\n-#define I40E_FLAG_RX_PS_ENABLED\t\t\tBIT_ULL(5)\n #define I40E_FLAG_RSS_ENABLED\t\t\tBIT_ULL(6)\n #define I40E_FLAG_VMDQ_ENABLED\t\t\tBIT_ULL(7)\n #define I40E_FLAG_FDIR_REQUIRES_REINIT\t\tBIT_ULL(8)\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\nindex 83dccf1..f119a74 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n@@ -273,8 +273,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)\n \t\t\t rx_ring->rx_buf_len,\n \t\t\t rx_ring->dtype);\n \t\tdev_info(&pf->pdev->dev,\n-\t\t\t \" rx_rings[%i]: hsplit = %d, next_to_use = %d, next_to_clean = %d, ring_active = %i\\n\",\n-\t\t\t i, ring_is_ps_enabled(rx_ring),\n+\t\t\t \" rx_rings[%i]: next_to_use = %d, next_to_clean = %d, ring_active = %i\\n\",\n+\t\t\t i,\n \t\t\t rx_ring->next_to_use,\n \t\t\t rx_ring->next_to_clean,\n \t\t\t rx_ring->ring_active);\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\nindex 865c8db..7929d97 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n@@ -2950,8 +2950,6 @@ static u32 i40e_get_priv_flags(struct net_device *dev)\n \t\tI40E_PRIV_FLAGS_FD_ATR : 0;\n \tret_flags |= pf->flags & I40E_FLAG_VEB_STATS_ENABLED ?\n \t\tI40E_PRIV_FLAGS_VEB_STATS : 0;\n-\tret_flags |= pf->flags & I40E_FLAG_RX_PS_ENABLED ?\n-\t\tI40E_PRIV_FLAGS_PS : 0;\n \tret_flags |= pf->auto_disable_flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE ?\n \t\t0 : I40E_PRIV_FLAGS_HW_ATR_EVICT;\n \n@@ -2972,23 +2970,6 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)\n \n \t/* NOTE: MFP is not settable */\n \n-\t/* allow the user to control the method of receive\n-\t * buffer DMA, whether the packet is split at header\n-\t * boundaries into two separate buffers. In some cases\n-\t * one routine or the other will perform better.\n-\t */\n-\tif ((flags & I40E_PRIV_FLAGS_PS) &&\n-\t !(pf->flags & I40E_FLAG_RX_PS_ENABLED)) {\n-\t\tpf->flags |= I40E_FLAG_RX_PS_ENABLED;\n-\t\tpf->flags &= ~I40E_FLAG_RX_1BUF_ENABLED;\n-\t\treset_required = true;\n-\t} else if (!(flags & I40E_PRIV_FLAGS_PS) &&\n-\t\t (pf->flags & I40E_FLAG_RX_PS_ENABLED)) {\n-\t\tpf->flags &= ~I40E_FLAG_RX_PS_ENABLED;\n-\t\tpf->flags |= I40E_FLAG_RX_1BUF_ENABLED;\n-\t\treset_required = true;\n-\t}\n-\n \tif (flags & I40E_PRIV_FLAGS_LINKPOLL_FLAG)\n \t\tpf->flags |= I40E_FLAG_LINK_POLLING_ENABLED;\n \telse\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 19a2d30..5553522 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -2871,18 +2871,9 @@ static int i40e_configure_rx_ring(struct i40e_ring *ring)\n \t}\n \n \trx_ctx.dtype = vsi->dtype;\n-\tif (vsi->dtype) {\n-\t\tset_ring_ps_enabled(ring);\n-\t\trx_ctx.hsplit_0 = I40E_RX_SPLIT_L2 |\n-\t\t\t\t I40E_RX_SPLIT_IP |\n-\t\t\t\t I40E_RX_SPLIT_TCP_UDP |\n-\t\t\t\t I40E_RX_SPLIT_SCTP;\n-\t} else {\n-\t\trx_ctx.hsplit_0 = 0;\n-\t}\n+\trx_ctx.hsplit_0 = 0;\n \n-\trx_ctx.rxmax = min_t(u16, vsi->max_frame,\n-\t\t\t\t (chain_len * ring->rx_buf_len));\n+\trx_ctx.rxmax = min_t(u16, vsi->max_frame, chain_len * ring->rx_buf_len);\n \tif (hw->revision_id == 0)\n \t\trx_ctx.lrxqthresh = 0;\n \telse\n@@ -2919,12 +2910,7 @@ static int i40e_configure_rx_ring(struct i40e_ring *ring)\n \tring->tail = hw->hw_addr + I40E_QRX_TAIL(pf_q);\n \twritel(0, ring->tail);\n \n-\tif (ring_is_ps_enabled(ring)) {\n-\t\ti40e_alloc_rx_headers(ring);\n-\t\ti40e_alloc_rx_buffers_ps(ring, I40E_DESC_UNUSED(ring));\n-\t} else {\n-\t\ti40e_alloc_rx_buffers_1buf(ring, I40E_DESC_UNUSED(ring));\n-\t}\n+\ti40e_alloc_rx_buffers_1buf(ring, I40E_DESC_UNUSED(ring));\n \n \treturn 0;\n }\n@@ -2963,25 +2949,9 @@ static int i40e_vsi_configure_rx(struct i40e_vsi *vsi)\n \telse\n \t\tvsi->max_frame = I40E_RXBUFFER_2048;\n \n-\t/* figure out correct receive buffer length */\n-\tswitch (vsi->back->flags & (I40E_FLAG_RX_1BUF_ENABLED |\n-\t\t\t\t I40E_FLAG_RX_PS_ENABLED)) {\n-\tcase I40E_FLAG_RX_1BUF_ENABLED:\n-\t\tvsi->rx_hdr_len = 0;\n-\t\tvsi->rx_buf_len = vsi->max_frame;\n-\t\tvsi->dtype = I40E_RX_DTYPE_NO_SPLIT;\n-\t\tbreak;\n-\tcase I40E_FLAG_RX_PS_ENABLED:\n-\t\tvsi->rx_hdr_len = I40E_RX_HDR_SIZE;\n-\t\tvsi->rx_buf_len = I40E_RXBUFFER_2048;\n-\t\tvsi->dtype = I40E_RX_DTYPE_HEADER_SPLIT;\n-\t\tbreak;\n-\tdefault:\n-\t\tvsi->rx_hdr_len = I40E_RX_HDR_SIZE;\n-\t\tvsi->rx_buf_len = I40E_RXBUFFER_2048;\n-\t\tvsi->dtype = I40E_RX_DTYPE_SPLIT_ALWAYS;\n-\t\tbreak;\n-\t}\n+\tvsi->rx_hdr_len = 0;\n+\tvsi->rx_buf_len = vsi->max_frame;\n+\tvsi->dtype = I40E_RX_DTYPE_NO_SPLIT;\n \n #ifdef I40E_FCOE\n \t/* setup rx buffer for FCoE */\n@@ -8460,11 +8430,6 @@ static int i40e_sw_init(struct i40e_pf *pf)\n \t\t I40E_FLAG_MSI_ENABLED |\n \t\t I40E_FLAG_MSIX_ENABLED;\n \n-\tif (iommu_present(&pci_bus_type))\n-\t\tpf->flags |= I40E_FLAG_RX_PS_ENABLED;\n-\telse\n-\t\tpf->flags |= I40E_FLAG_RX_1BUF_ENABLED;\n-\n \t/* Set default ITR */\n \tpf->rx_itr_default = I40E_ITR_DYNAMIC | I40E_ITR_RX_DEF;\n \tpf->tx_itr_default = I40E_ITR_DYNAMIC | I40E_ITR_TX_DEF;\n@@ -10693,7 +10658,7 @@ static void i40e_print_features(struct i40e_pf *pf)\n \ti += snprintf(&buf[i], REMAIN(i), \" VSIs: %d QP: %d RX: %s\",\n \t\t pf->hw.func_caps.num_vsis,\n \t\t pf->vsi[pf->lan_vsi]->num_queue_pairs,\n-\t\t pf->flags & I40E_FLAG_RX_PS_ENABLED ? \"PS\" : \"1BUF\");\n+\t\t \"1BUF\");\n \n \tif (pf->flags & I40E_FLAG_RSS_ENABLED)\n \t\ti += snprintf(&buf[i], REMAIN(i), \" RSS\");\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex ce4d94b..c4cccd6 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -1050,22 +1050,6 @@ void i40e_clean_rx_ring(struct i40e_ring *rx_ring)\n \tif (!rx_ring->rx_bi)\n \t\treturn;\n \n-\tif (ring_is_ps_enabled(rx_ring)) {\n-\t\tint bufsz = ALIGN(rx_ring->rx_hdr_len, 256) * rx_ring->count;\n-\n-\t\trx_bi = &rx_ring->rx_bi[0];\n-\t\tif (rx_bi->hdr_buf) {\n-\t\t\tdma_free_coherent(dev,\n-\t\t\t\t\t bufsz,\n-\t\t\t\t\t rx_bi->hdr_buf,\n-\t\t\t\t\t rx_bi->dma);\n-\t\t\tfor (i = 0; i < rx_ring->count; i++) {\n-\t\t\t\trx_bi = &rx_ring->rx_bi[i];\n-\t\t\t\trx_bi->dma = 0;\n-\t\t\t\trx_bi->hdr_buf = NULL;\n-\t\t\t}\n-\t\t}\n-\t}\n \t/* Free all the Rx ring sk_buffs */\n \tfor (i = 0; i < rx_ring->count; i++) {\n \t\trx_bi = &rx_ring->rx_bi[i];\n@@ -1521,230 +1505,6 @@ static inline void i40e_rx_hash(struct i40e_ring *ring,\n }\n \n /**\n- * i40e_clean_rx_irq_ps - Reclaim resources after receive; packet split\n- * @rx_ring: rx ring to clean\n- * @budget: how many cleans we're allowed\n- *\n- * Returns true if there's any budget left (e.g. the clean is finished)\n- **/\n-static int i40e_clean_rx_irq_ps(struct i40e_ring *rx_ring, const int budget)\n-{\n-\tunsigned int total_rx_bytes = 0, total_rx_packets = 0;\n-\tu16 rx_packet_len, rx_header_len, rx_sph, rx_hbo;\n-\tu16 cleaned_count = I40E_DESC_UNUSED(rx_ring);\n-\tstruct i40e_vsi *vsi = rx_ring->vsi;\n-\tu16 i = rx_ring->next_to_clean;\n-\tunion i40e_rx_desc *rx_desc;\n-\tu32 rx_error, rx_status;\n-\tbool failure = false;\n-\tu8 rx_ptype;\n-\tu64 qword;\n-\tu32 copysize;\n-\n-\tif (budget <= 0)\n-\t\treturn 0;\n-\n-\tdo {\n-\t\tstruct i40e_rx_buffer *rx_bi;\n-\t\tstruct sk_buff *skb;\n-\t\tu16 vlan_tag;\n-\t\t/* return some buffers to hardware, one at a time is too slow */\n-\t\tif (cleaned_count >= I40E_RX_BUFFER_WRITE) {\n-\t\t\tfailure = failure ||\n-\t\t\t\t i40e_alloc_rx_buffers_ps(rx_ring,\n-\t\t\t\t\t\t\t cleaned_count);\n-\t\t\tcleaned_count = 0;\n-\t\t}\n-\n-\t\ti = rx_ring->next_to_clean;\n-\t\trx_desc = I40E_RX_DESC(rx_ring, i);\n-\t\tqword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);\n-\t\trx_status = (qword & I40E_RXD_QW1_STATUS_MASK) >>\n-\t\t\tI40E_RXD_QW1_STATUS_SHIFT;\n-\n-\t\tif (!(rx_status & BIT(I40E_RX_DESC_STATUS_DD_SHIFT)))\n-\t\t\tbreak;\n-\n-\t\t/* This memory barrier is needed to keep us from reading\n-\t\t * any other fields out of the rx_desc until we know the\n-\t\t * DD bit is set.\n-\t\t */\n-\t\tdma_rmb();\n-\t\t/* sync header buffer for reading */\n-\t\tdma_sync_single_range_for_cpu(rx_ring->dev,\n-\t\t\t\t\t rx_ring->rx_bi[0].dma,\n-\t\t\t\t\t i * rx_ring->rx_hdr_len,\n-\t\t\t\t\t rx_ring->rx_hdr_len,\n-\t\t\t\t\t DMA_FROM_DEVICE);\n-\t\tif (i40e_rx_is_programming_status(qword)) {\n-\t\t\ti40e_clean_programming_status(rx_ring, rx_desc);\n-\t\t\tI40E_RX_INCREMENT(rx_ring, i);\n-\t\t\tcontinue;\n-\t\t}\n-\t\trx_bi = &rx_ring->rx_bi[i];\n-\t\tskb = rx_bi->skb;\n-\t\tif (likely(!skb)) {\n-\t\t\tskb = __netdev_alloc_skb_ip_align(rx_ring->netdev,\n-\t\t\t\t\t\t\t rx_ring->rx_hdr_len,\n-\t\t\t\t\t\t\t GFP_ATOMIC |\n-\t\t\t\t\t\t\t __GFP_NOWARN);\n-\t\t\tif (!skb) {\n-\t\t\t\trx_ring->rx_stats.alloc_buff_failed++;\n-\t\t\t\tfailure = true;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\n-\t\t\t/* initialize queue mapping */\n-\t\t\tskb_record_rx_queue(skb, rx_ring->queue_index);\n-\t\t\t/* we are reusing so sync this buffer for CPU use */\n-\t\t\tdma_sync_single_range_for_cpu(rx_ring->dev,\n-\t\t\t\t\t\t rx_ring->rx_bi[0].dma,\n-\t\t\t\t\t\t i * rx_ring->rx_hdr_len,\n-\t\t\t\t\t\t rx_ring->rx_hdr_len,\n-\t\t\t\t\t\t DMA_FROM_DEVICE);\n-\t\t}\n-\t\trx_packet_len = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >>\n-\t\t\t\tI40E_RXD_QW1_LENGTH_PBUF_SHIFT;\n-\t\trx_header_len = (qword & I40E_RXD_QW1_LENGTH_HBUF_MASK) >>\n-\t\t\t\tI40E_RXD_QW1_LENGTH_HBUF_SHIFT;\n-\t\trx_sph = (qword & I40E_RXD_QW1_LENGTH_SPH_MASK) >>\n-\t\t\t I40E_RXD_QW1_LENGTH_SPH_SHIFT;\n-\n-\t\trx_error = (qword & I40E_RXD_QW1_ERROR_MASK) >>\n-\t\t\t I40E_RXD_QW1_ERROR_SHIFT;\n-\t\trx_hbo = rx_error & BIT(I40E_RX_DESC_ERROR_HBO_SHIFT);\n-\t\trx_error &= ~BIT(I40E_RX_DESC_ERROR_HBO_SHIFT);\n-\n-\t\trx_ptype = (qword & I40E_RXD_QW1_PTYPE_MASK) >>\n-\t\t\t I40E_RXD_QW1_PTYPE_SHIFT;\n-\t\t/* sync half-page for reading */\n-\t\tdma_sync_single_range_for_cpu(rx_ring->dev,\n-\t\t\t\t\t rx_bi->page_dma,\n-\t\t\t\t\t rx_bi->page_offset,\n-\t\t\t\t\t PAGE_SIZE / 2,\n-\t\t\t\t\t DMA_FROM_DEVICE);\n-\t\tprefetch(page_address(rx_bi->page) + rx_bi->page_offset);\n-\t\trx_bi->skb = NULL;\n-\t\tcleaned_count++;\n-\t\tcopysize = 0;\n-\t\tif (rx_hbo || rx_sph) {\n-\t\t\tint len;\n-\n-\t\t\tif (rx_hbo)\n-\t\t\t\tlen = I40E_RX_HDR_SIZE;\n-\t\t\telse\n-\t\t\t\tlen = rx_header_len;\n-\t\t\tmemcpy(__skb_put(skb, len), rx_bi->hdr_buf, len);\n-\t\t} else if (skb->len == 0) {\n-\t\t\tint len;\n-\t\t\tunsigned char *va = page_address(rx_bi->page) +\n-\t\t\t\t\t rx_bi->page_offset;\n-\n-\t\t\tlen = min(rx_packet_len, rx_ring->rx_hdr_len);\n-\t\t\tmemcpy(__skb_put(skb, len), va, len);\n-\t\t\tcopysize = len;\n-\t\t\trx_packet_len -= len;\n-\t\t}\n-\t\t/* Get the rest of the data if this was a header split */\n-\t\tif (rx_packet_len) {\n-\t\t\tskb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,\n-\t\t\t\t\trx_bi->page,\n-\t\t\t\t\trx_bi->page_offset + copysize,\n-\t\t\t\t\trx_packet_len, I40E_RXBUFFER_2048);\n-\n-\t\t\t/* If the page count is more than 2, then both halves\n-\t\t\t * of the page are used and we need to free it. Do it\n-\t\t\t * here instead of in the alloc code. Otherwise one\n-\t\t\t * of the half-pages might be released between now and\n-\t\t\t * then, and we wouldn't know which one to use.\n-\t\t\t * Don't call get_page and free_page since those are\n-\t\t\t * both expensive atomic operations that just change\n-\t\t\t * the refcount in opposite directions. Just give the\n-\t\t\t * page to the stack; he can have our refcount.\n-\t\t\t */\n-\t\t\tif (page_count(rx_bi->page) > 2) {\n-\t\t\t\tdma_unmap_page(rx_ring->dev,\n-\t\t\t\t\t rx_bi->page_dma,\n-\t\t\t\t\t PAGE_SIZE,\n-\t\t\t\t\t DMA_FROM_DEVICE);\n-\t\t\t\trx_bi->page = NULL;\n-\t\t\t\trx_bi->page_dma = 0;\n-\t\t\t\trx_ring->rx_stats.realloc_count++;\n-\t\t\t} else {\n-\t\t\t\tget_page(rx_bi->page);\n-\t\t\t\t/* switch to the other half-page here; the\n-\t\t\t\t * allocation code programs the right addr\n-\t\t\t\t * into HW. If we haven't used this half-page,\n-\t\t\t\t * the address won't be changed, and HW can\n-\t\t\t\t * just use it next time through.\n-\t\t\t\t */\n-\t\t\t\trx_bi->page_offset ^= PAGE_SIZE / 2;\n-\t\t\t}\n-\n-\t\t}\n-\t\tI40E_RX_INCREMENT(rx_ring, i);\n-\n-\t\tif (unlikely(\n-\t\t !(rx_status & BIT(I40E_RX_DESC_STATUS_EOF_SHIFT)))) {\n-\t\t\tstruct i40e_rx_buffer *next_buffer;\n-\n-\t\t\tnext_buffer = &rx_ring->rx_bi[i];\n-\t\t\tnext_buffer->skb = skb;\n-\t\t\trx_ring->rx_stats.non_eop_descs++;\n-\t\t\tcontinue;\n-\t\t}\n-\n-\t\t/* ERR_MASK will only have valid bits if EOP set */\n-\t\tif (unlikely(rx_error & BIT(I40E_RX_DESC_ERROR_RXE_SHIFT))) {\n-\t\t\tdev_kfree_skb_any(skb);\n-\t\t\tcontinue;\n-\t\t}\n-\n-\t\ti40e_rx_hash(rx_ring, rx_desc, skb, rx_ptype);\n-\n-\t\tif (unlikely(rx_status & I40E_RXD_QW1_STATUS_TSYNVALID_MASK)) {\n-\t\t\ti40e_ptp_rx_hwtstamp(vsi->back, skb, (rx_status &\n-\t\t\t\t\t I40E_RXD_QW1_STATUS_TSYNINDX_MASK) >>\n-\t\t\t\t\t I40E_RXD_QW1_STATUS_TSYNINDX_SHIFT);\n-\t\t\trx_ring->last_rx_timestamp = jiffies;\n-\t\t}\n-\n-\t\t/* probably a little skewed due to removing CRC */\n-\t\ttotal_rx_bytes += skb->len;\n-\t\ttotal_rx_packets++;\n-\n-\t\tskb->protocol = eth_type_trans(skb, rx_ring->netdev);\n-\n-\t\ti40e_rx_checksum(vsi, skb, rx_status, rx_error, rx_ptype);\n-\n-\t\tvlan_tag = rx_status & BIT(I40E_RX_DESC_STATUS_L2TAG1P_SHIFT)\n-\t\t\t ? le16_to_cpu(rx_desc->wb.qword0.lo_dword.l2tag1)\n-\t\t\t : 0;\n-#ifdef I40E_FCOE\n-\t\tif (unlikely(\n-\t\t i40e_rx_is_fcoe(rx_ptype) &&\n-\t\t !i40e_fcoe_handle_offload(rx_ring, rx_desc, skb))) {\n-\t\t\tdev_kfree_skb_any(skb);\n-\t\t\tcontinue;\n-\t\t}\n-#endif\n-\t\ti40e_receive_skb(rx_ring, skb, vlan_tag);\n-\n-\t\trx_desc->wb.qword1.status_error_len = 0;\n-\n-\t} while (likely(total_rx_packets < budget));\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-\tu64_stats_update_end(&rx_ring->syncp);\n-\trx_ring->q_vector->rx.total_packets += total_rx_packets;\n-\trx_ring->q_vector->rx.total_bytes += total_rx_bytes;\n-\n-\treturn failure ? budget : total_rx_packets;\n-}\n-\n-/**\n * i40e_clean_rx_irq_1buf - Reclaim resources after receive; single buffer\n * @rx_ring: rx ring to clean\n * @budget: how many cleans we're allowed\n@@ -2019,10 +1779,7 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)\n \ti40e_for_each_ring(ring, q_vector->rx) {\n \t\tint cleaned;\n \n-\t\tif (ring_is_ps_enabled(ring))\n-\t\t\tcleaned = i40e_clean_rx_irq_ps(ring, budget_per_ring);\n-\t\telse\n-\t\t\tcleaned = i40e_clean_rx_irq_1buf(ring, budget_per_ring);\n+\t\tcleaned = i40e_clean_rx_irq_1buf(ring, budget_per_ring);\n \n \t\twork_done += cleaned;\n \t\t/* if we clean as many as budgeted, we must not be done */\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h\nindex 6b2b191..5a2d0fe 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h\n@@ -245,16 +245,9 @@ struct i40e_rx_queue_stats {\n enum i40e_ring_state_t {\n \t__I40E_TX_FDIR_INIT_DONE,\n \t__I40E_TX_XPS_INIT_DONE,\n-\t__I40E_RX_PS_ENABLED,\n \t__I40E_RX_16BYTE_DESC_ENABLED,\n };\n \n-#define ring_is_ps_enabled(ring) \\\n-\ttest_bit(__I40E_RX_PS_ENABLED, &(ring)->state)\n-#define set_ring_ps_enabled(ring) \\\n-\tset_bit(__I40E_RX_PS_ENABLED, &(ring)->state)\n-#define clear_ring_ps_enabled(ring) \\\n-\tclear_bit(__I40E_RX_PS_ENABLED, &(ring)->state)\n #define ring_is_16byte_desc_enabled(ring) \\\n \ttest_bit(__I40E_RX_16BYTE_DESC_ENABLED, &(ring)->state)\n #define set_ring_16byte_desc_enabled(ring) \\\n", "prefixes": [ "next", "S35", "v3", "2/9" ] }