Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/611852/?format=api
{ "id": 611852, "url": "http://patchwork.ozlabs.org/api/patches/611852/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1461004429-34316-8-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-8-git-send-email-jesse.brandeburg@intel.com>", "list_archive_url": null, "date": "2016-04-18T18:33:47", "name": "[next,S35,v3,7/9] i40e/i40evf: Remove unused hardware receive descriptor code", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "e00f2c03969445b778dadaa665a7f67ee27e8a8c", "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-8-git-send-email-jesse.brandeburg@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/611852/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/611852/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 3qpcJ83ZsZz9t48\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Apr 2016 04:34:48 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id C8CED86A68;\n\tMon, 18 Apr 2016 18:34:47 +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 9XzN0iqleQHJ; 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 7579B8747B;\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 2CBF11C2080\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 18 Apr 2016 18:34:44 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 1BFDA30D7A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 18 Apr 2016 18:34:44 +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 ayDAAIbOUBSm for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 18 Apr 2016 18:34:42 +0000 (UTC)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby silver.osuosl.org (Postfix) with ESMTP id BAF883153A\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:41 -0700", "from jbrandeb-hsm2.jf.intel.com ([134.134.3.81])\n\tby fmsmga002.fm.intel.com with ESMTP; 18 Apr 2016 11:34:41 -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=\"961329963\"", "From": "Jesse Brandeburg <jesse.brandeburg@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 18 Apr 2016 11:33:47 -0700", "Message-Id": "<1461004429-34316-8-git-send-email-jesse.brandeburg@intel.com>", "X-Mailer": "git-send-email 2.1.0", "In-Reply-To": "<1461004429-34316-7-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>\n\t<1461004429-34316-3-git-send-email-jesse.brandeburg@intel.com>\n\t<1461004429-34316-4-git-send-email-jesse.brandeburg@intel.com>\n\t<1461004429-34316-5-git-send-email-jesse.brandeburg@intel.com>\n\t<1461004429-34316-6-git-send-email-jesse.brandeburg@intel.com>\n\t<1461004429-34316-7-git-send-email-jesse.brandeburg@intel.com>", "Subject": "[Intel-wired-lan] [PATCH next S35 v3 7/9] i40e/i40evf: Remove\n\tunused hardware receive descriptor code", "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": "The hardware supports a 16 byte descriptor for receive, but the\ndriver was never using it in production. There was no performance\nbenefit to the real driver of 16 byte descriptors, so drop a whole\nlot of complexity while getting rid of the code.\n\nAlso since the previous patch made us use no-split mode all the\ntime, drop any support in the driver for any other value in dtype\nand assume it is always zero (aka no-split).\n\nHooray for code removal!\n\nSigned-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>\nChange-ID: I2257e902e4dad84a07b94db6d2e6f4ce69b27bc0\n---\n drivers/net/ethernet/intel/i40e/i40e.h | 7 +------\n drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 16 +---------------\n drivers/net/ethernet/intel/i40e/i40e_main.c | 18 +++++-------------\n drivers/net/ethernet/intel/i40e/i40e_txrx.h | 24 ++++++++++--------------\n drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 24 ++++++++++--------------\n 5 files changed, 27 insertions(+), 62 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex 581694a..7f52bfe 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -122,10 +122,7 @@\n #define XSTRINGIFY(bar) STRINGIFY(bar)\n \n #define I40E_RX_DESC(R, i)\t\t\t\\\n-\t((ring_is_16byte_desc_enabled(R))\t\\\n-\t\t? (union i40e_32byte_rx_desc *)\t\\\n-\t\t\t(&(((union i40e_16byte_rx_desc *)((R)->desc))[i])) \\\n-\t\t: (&(((union i40e_32byte_rx_desc *)((R)->desc))[i])))\n+\t(&(((union i40e_32byte_rx_desc *)((R)->desc))[i]))\n #define I40E_TX_DESC(R, i)\t\t\t\\\n \t(&(((struct i40e_tx_desc *)((R)->desc))[i]))\n #define I40E_TX_CTXTDESC(R, i)\t\t\t\\\n@@ -342,7 +339,6 @@ struct i40e_pf {\n #ifdef I40E_FCOE\n #define I40E_FLAG_FCOE_ENABLED\t\t\tBIT_ULL(11)\n #endif /* I40E_FCOE */\n-#define I40E_FLAG_16BYTE_RX_DESC_ENABLED\tBIT_ULL(13)\n #define I40E_FLAG_CLEAN_ADMINQ\t\t\tBIT_ULL(14)\n #define I40E_FLAG_FILTER_SYNC\t\t\tBIT_ULL(15)\n #define I40E_FLAG_SERVICE_CLIENT_REQUESTED\tBIT_ULL(16)\n@@ -547,7 +543,6 @@ struct i40e_vsi {\n \n \tu16 max_frame;\n \tu16 rx_buf_len;\n-\tu8 dtype;\n \n \t/* List of q_vectors allocated to this VSI */\n \tstruct i40e_q_vector **q_vectors;\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\nindex 8ae30f7..e6af8c8 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n@@ -361,7 +361,7 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)\n \t\t vsi->work_limit);\n \tdev_info(&pf->pdev->dev,\n \t\t \" max_frame = %d, rx_buf_len = %d dtype = %d\\n\",\n-\t\t vsi->max_frame, vsi->rx_buf_len, vsi->dtype);\n+\t\t vsi->max_frame, vsi->rx_buf_len, 0);\n \tdev_info(&pf->pdev->dev,\n \t\t \" num_q_vectors = %i, base_vector = %i\\n\",\n \t\t vsi->num_q_vectors, vsi->base_vector);\n@@ -586,13 +586,6 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,\n \t\t\t\t\t \" d[%03x] = 0x%016llx 0x%016llx\\n\",\n \t\t\t\t\t i, txd->buffer_addr,\n \t\t\t\t\t txd->cmd_type_offset_bsz);\n-\t\t\t} else if (sizeof(union i40e_rx_desc) ==\n-\t\t\t\t sizeof(union i40e_16byte_rx_desc)) {\n-\t\t\t\trxd = I40E_RX_DESC(ring, i);\n-\t\t\t\tdev_info(&pf->pdev->dev,\n-\t\t\t\t\t \" d[%03x] = 0x%016llx 0x%016llx\\n\",\n-\t\t\t\t\t i, rxd->read.pkt_addr,\n-\t\t\t\t\t rxd->read.hdr_addr);\n \t\t\t} else {\n \t\t\t\trxd = I40E_RX_DESC(ring, i);\n \t\t\t\tdev_info(&pf->pdev->dev,\n@@ -614,13 +607,6 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,\n \t\t\t\t \"vsi = %02i tx ring = %02i d[%03x] = 0x%016llx 0x%016llx\\n\",\n \t\t\t\t vsi_seid, ring_id, desc_n,\n \t\t\t\t txd->buffer_addr, txd->cmd_type_offset_bsz);\n-\t\t} else if (sizeof(union i40e_rx_desc) ==\n-\t\t\t sizeof(union i40e_16byte_rx_desc)) {\n-\t\t\trxd = I40E_RX_DESC(ring, desc_n);\n-\t\t\tdev_info(&pf->pdev->dev,\n-\t\t\t\t \"vsi = %02i rx ring = %02i d[%03x] = 0x%016llx 0x%016llx\\n\",\n-\t\t\t\t vsi_seid, ring_id, desc_n,\n-\t\t\t\t rxd->read.pkt_addr, rxd->read.hdr_addr);\n \t\t} else {\n \t\t\trxd = I40E_RX_DESC(ring, desc_n);\n \t\t\tdev_info(&pf->pdev->dev,\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex f3e9365..49ef519 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -2861,14 +2861,12 @@ static int i40e_configure_rx_ring(struct i40e_ring *ring)\n \trx_ctx.base = (ring->dma / 128);\n \trx_ctx.qlen = ring->count;\n \n-\tif (vsi->back->flags & I40E_FLAG_16BYTE_RX_DESC_ENABLED) {\n-\t\tset_ring_16byte_desc_enabled(ring);\n-\t\trx_ctx.dsize = 0;\n-\t} else {\n-\t\trx_ctx.dsize = 1;\n-\t}\n+\t/* use 32 byte descriptors */\n+\trx_ctx.dsize = 1;\n \n-\trx_ctx.dtype = vsi->dtype;\n+\t/* descriptor type is always zero\n+\t * rx_ctx.dtype = 0;\n+\t */\n \trx_ctx.hsplit_0 = 0;\n \n \trx_ctx.rxmax = min_t(u16, vsi->max_frame, chain_len * ring->rx_buf_len);\n@@ -2948,7 +2946,6 @@ static int i40e_vsi_configure_rx(struct i40e_vsi *vsi)\n \t\tvsi->max_frame = I40E_RXBUFFER_2048;\n \n \tvsi->rx_buf_len = I40E_RXBUFFER_2048;\n-\tvsi->dtype = I40E_RX_DTYPE_NO_SPLIT;\n \n #ifdef I40E_FCOE\n \t/* setup rx buffer for FCoE */\n@@ -2956,7 +2953,6 @@ static int i40e_vsi_configure_rx(struct i40e_vsi *vsi)\n \t (vsi->back->flags & I40E_FLAG_FCOE_ENABLED)) {\n \t\tvsi->rx_buf_len = I40E_RXBUFFER_3072;\n \t\tvsi->max_frame = I40E_RXBUFFER_3072;\n-\t\tvsi->dtype = I40E_RX_DTYPE_NO_SPLIT;\n \t}\n \n #endif /* I40E_FCOE */\n@@ -7476,10 +7472,6 @@ static int i40e_alloc_rings(struct i40e_vsi *vsi)\n \t\trx_ring->count = vsi->num_desc;\n \t\trx_ring->size = 0;\n \t\trx_ring->dcb_tc = 0;\n-\t\tif (pf->flags & I40E_FLAG_16BYTE_RX_DESC_ENABLED)\n-\t\t\tset_ring_16byte_desc_enabled(rx_ring);\n-\t\telse\n-\t\t\tclear_ring_16byte_desc_enabled(rx_ring);\n \t\trx_ring->rx_itr_setting = pf->rx_itr_default;\n \t\tvsi->rx_rings[i] = rx_ring;\n \t}\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h\nindex 37643e6..b78c810 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h\n@@ -260,15 +260,18 @@ 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_16BYTE_DESC_ENABLED,\n };\n \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-\tset_bit(__I40E_RX_16BYTE_DESC_ENABLED, &(ring)->state)\n-#define clear_ring_16byte_desc_enabled(ring) \\\n-\tclear_bit(__I40E_RX_16BYTE_DESC_ENABLED, &(ring)->state)\n+/* some useful defines for virtchannel interface, which\n+ * is the only remaining user of header split\n+ */\n+#define I40E_RX_DTYPE_NO_SPLIT 0\n+#define I40E_RX_DTYPE_HEADER_SPLIT 1\n+#define I40E_RX_DTYPE_SPLIT_ALWAYS 2\n+#define I40E_RX_SPLIT_L2 0x1\n+#define I40E_RX_SPLIT_IP 0x2\n+#define I40E_RX_SPLIT_TCP_UDP 0x4\n+#define I40E_RX_SPLIT_SCTP 0x8\n \n /* struct that defines a descriptor ring, associated with a VSI */\n struct i40e_ring {\n@@ -296,13 +299,6 @@ struct i40e_ring {\n \tu16 count;\t\t\t/* Number of descriptors */\n \tu16 reg_idx;\t\t\t/* HW register index of the ring */\n \tu16 rx_buf_len;\n-#define I40E_RX_DTYPE_NO_SPLIT 0\n-#define I40E_RX_DTYPE_HEADER_SPLIT 1\n-#define I40E_RX_DTYPE_SPLIT_ALWAYS 2\n-#define I40E_RX_SPLIT_L2 0x1\n-#define I40E_RX_SPLIT_IP 0x2\n-#define I40E_RX_SPLIT_TCP_UDP 0x4\n-#define I40E_RX_SPLIT_SCTP 0x8\n \n \t/* used in interrupt processing */\n \tu16 next_to_use;\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h\nindex 4ba302e..0112277 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h\n@@ -259,15 +259,18 @@ 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_16BYTE_DESC_ENABLED,\n };\n \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-\tset_bit(__I40E_RX_16BYTE_DESC_ENABLED, &(ring)->state)\n-#define clear_ring_16byte_desc_enabled(ring) \\\n-\tclear_bit(__I40E_RX_16BYTE_DESC_ENABLED, &(ring)->state)\n+/* some useful defines for virtchannel interface, which\n+ * is the only remaining user of header split\n+ */\n+#define I40E_RX_DTYPE_NO_SPLIT 0\n+#define I40E_RX_DTYPE_HEADER_SPLIT 1\n+#define I40E_RX_DTYPE_SPLIT_ALWAYS 2\n+#define I40E_RX_SPLIT_L2 0x1\n+#define I40E_RX_SPLIT_IP 0x2\n+#define I40E_RX_SPLIT_TCP_UDP 0x4\n+#define I40E_RX_SPLIT_SCTP 0x8\n \n /* struct that defines a descriptor ring, associated with a VSI */\n struct i40e_ring {\n@@ -287,13 +290,6 @@ struct i40e_ring {\n \tu16 count;\t\t\t/* Number of descriptors */\n \tu16 reg_idx;\t\t\t/* HW register index of the ring */\n \tu16 rx_buf_len;\n-#define I40E_RX_DTYPE_NO_SPLIT 0\n-#define I40E_RX_DTYPE_HEADER_SPLIT 1\n-#define I40E_RX_DTYPE_SPLIT_ALWAYS 2\n-#define I40E_RX_SPLIT_L2 0x1\n-#define I40E_RX_SPLIT_IP 0x2\n-#define I40E_RX_SPLIT_TCP_UDP 0x4\n-#define I40E_RX_SPLIT_SCTP 0x8\n \n \t/* used in interrupt processing */\n \tu16 next_to_use;\n", "prefixes": [ "next", "S35", "v3", "7/9" ] }