Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1291794/?format=api
{ "id": 1291794, "url": "http://patchwork.ozlabs.org/api/patches/1291794/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200516005506.5113-2-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": "<20200516005506.5113-2-anthony.l.nguyen@intel.com>", "list_archive_url": null, "date": "2020-05-16T00:54:59", "name": "[S46,2/9] ice: Always clear QRXFLXP_CNTXT before writing new value", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "56c76755e8000c665a2c0f9442dd74ab0fed665b", "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/20200516005506.5113-2-anthony.l.nguyen@intel.com/mbox/", "series": [ { "id": 177331, "url": "http://patchwork.ozlabs.org/api/series/177331/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=177331", "date": "2020-05-16T00:55:01", "name": "[S46,1/9] ice: Reset VF for all port VLAN changes from host", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/177331/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1291794/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1291794/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 spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=silver.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)", "ozlabs.org;\n dmarc=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 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49P6MR6XFHz9sTC\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 16 May 2020 10:57:55 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 71206227AA;\n\tSat, 16 May 2020 00:57:54 +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 eSnzWY3CCsnR; Sat, 16 May 2020 00:57:50 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 75E44227B1;\n\tSat, 16 May 2020 00:57:49 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by ash.osuosl.org (Postfix) with ESMTP id EA3CD1BF9C6\n for <intel-wired-lan@lists.osuosl.org>; Sat, 16 May 2020 00:57:43 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by silver.osuosl.org (Postfix) with ESMTP id E4CD0204BE\n for <intel-wired-lan@lists.osuosl.org>; Sat, 16 May 2020 00:57:43 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id zDvev-46MAHm for <intel-wired-lan@lists.osuosl.org>;\n Sat, 16 May 2020 00:57:41 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by silver.osuosl.org (Postfix) with ESMTPS id AFDAB22622\n for <intel-wired-lan@lists.osuosl.org>; Sat, 16 May 2020 00:57:41 +0000 (UTC)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 15 May 2020 17:57:40 -0700", "from unknown (HELO localhost.jf.intel.com) ([10.166.241.65])\n by fmsmga005.fm.intel.com with ESMTP; 15 May 2020 17:57: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", "IronPort-SDR": [ "\n DGBqBesOluIOmF1s0/+fILPJVsVmK11clNfnayERYKWGfeeTB959dqYNpB3nsRto4AqtxxTPvc\n 1Vb31pW+G6Lg==", "\n rBOmYkSxS3wPd5tRqGuPkZ+Cx5soUzQs/uXP8gveWQHeaysa/Ebby0md88UENnCO0JR48iZDXw\n wtKvQDE56suw==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.73,397,1583222400\"; d=\"scan'208\";a=\"464922696\"", "From": "Tony Nguyen <anthony.l.nguyen@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Fri, 15 May 2020 17:54:59 -0700", "Message-Id": "<20200516005506.5113-2-anthony.l.nguyen@intel.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20200516005506.5113-1-anthony.l.nguyen@intel.com>", "References": "<20200516005506.5113-1-anthony.l.nguyen@intel.com>", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH S46 2/9] ice: Always clear QRXFLXP_CNTXT\n before writing new value", "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 <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <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 <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": "From: Brett Creeley <brett.creeley@intel.com>\n\nAlways clear the previous value in QRXFLXP_CNTXT before writing a new\nvalue. This will make it so re-used queues will not accidentally take the\npreviously configured settings.\n\nSigned-off-by: Brett Creeley <brett.creeley@intel.com>\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_base.c | 33 ++++++++---------------\n drivers/net/ethernet/intel/ice/ice_lib.c | 26 ++++++++++++++++++\n drivers/net/ethernet/intel/ice/ice_lib.h | 3 +++\n 3 files changed, 40 insertions(+), 22 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c\nindex 798b173e81e0..04be6f2d1861 100644\n--- a/drivers/net/ethernet/intel/ice/ice_base.c\n+++ b/drivers/net/ethernet/intel/ice/ice_base.c\n@@ -2,6 +2,7 @@\n /* Copyright (c) 2019, Intel Corporation. */\n \n #include \"ice_base.h\"\n+#include \"ice_lib.h\"\n #include \"ice_dcb_lib.h\"\n \n /**\n@@ -285,7 +286,6 @@ static int ice_setup_rx_ctx(struct ice_ring *ring)\n \tu32 rxdid = ICE_RXDID_FLEX_NIC;\n \tstruct ice_rlan_ctx rlan_ctx;\n \tstruct ice_hw *hw;\n-\tu32 regval;\n \tu16 pf_q;\n \tint err;\n \n@@ -346,27 +346,16 @@ static int ice_setup_rx_ctx(struct ice_ring *ring)\n \t/* Rx queue threshold in units of 64 */\n \trlan_ctx.lrxqthresh = 1;\n \n-\t /* Enable Flexible Descriptors in the queue context which\n-\t * allows this driver to select a specific receive descriptor format\n-\t */\n-\tregval = rd32(hw, QRXFLXP_CNTXT(pf_q));\n-\tif (vsi->type != ICE_VSI_VF) {\n-\t\tregval |= (rxdid << QRXFLXP_CNTXT_RXDID_IDX_S) &\n-\t\t\tQRXFLXP_CNTXT_RXDID_IDX_M;\n-\n-\t\t/* increasing context priority to pick up profile ID;\n-\t\t * default is 0x01; setting to 0x03 to ensure profile\n-\t\t * is programming if prev context is of same priority\n-\t\t */\n-\t\tregval |= (0x03 << QRXFLXP_CNTXT_RXDID_PRIO_S) &\n-\t\t\tQRXFLXP_CNTXT_RXDID_PRIO_M;\n-\n-\t} else {\n-\t\tregval &= ~(QRXFLXP_CNTXT_RXDID_IDX_M |\n-\t\t\t QRXFLXP_CNTXT_RXDID_PRIO_M |\n-\t\t\t QRXFLXP_CNTXT_TS_M);\n-\t}\n-\twr32(hw, QRXFLXP_CNTXT(pf_q), regval);\n+\t/* Enable Flexible Descriptors in the queue context which\n+\t * allows this driver to select a specific receive descriptor format\n+\t * increasing context priority to pick up profile ID; default is 0x01;\n+\t * setting to 0x03 to ensure profile is programming if prev context is\n+\t * of same priority\n+\t */\n+\tif (vsi->type != ICE_VSI_VF)\n+\t\tice_write_qrxflxp_cntxt(hw, pf_q, rxdid, 0x3);\n+\telse\n+\t\tice_write_qrxflxp_cntxt(hw, pf_q, ICE_RXDID_LEGACY_1, 0x3);\n \n \t/* Absolute queue number out of 2K needs to be passed */\n \terr = ice_write_rxq_ctx(hw, &rlan_ctx, pf_q);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c\nindex 7ab7408b3a05..7cd4afcade13 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.c\n@@ -1630,6 +1630,32 @@ void ice_vsi_cfg_frame_size(struct ice_vsi *vsi)\n \t}\n }\n \n+/**\n+ * ice_write_qrxflxp_cntxt - write/configure QRXFLXP_CNTXT register\n+ * @hw: HW pointer\n+ * @pf_q: index of the Rx queue in the PF's queue space\n+ * @rxdid: flexible descriptor RXDID\n+ * @prio: priority for the RXDID for this queue\n+ */\n+void\n+ice_write_qrxflxp_cntxt(struct ice_hw *hw, u16 pf_q, u32 rxdid, u32 prio)\n+{\n+\tint regval = rd32(hw, QRXFLXP_CNTXT(pf_q));\n+\n+\t/* clear any previous values */\n+\tregval &= ~(QRXFLXP_CNTXT_RXDID_IDX_M |\n+\t\t QRXFLXP_CNTXT_RXDID_PRIO_M |\n+\t\t QRXFLXP_CNTXT_TS_M);\n+\n+\tregval |= (rxdid << QRXFLXP_CNTXT_RXDID_IDX_S) &\n+\t\tQRXFLXP_CNTXT_RXDID_IDX_M;\n+\n+\tregval |= (prio << QRXFLXP_CNTXT_RXDID_PRIO_S) &\n+\t\tQRXFLXP_CNTXT_RXDID_PRIO_M;\n+\n+\twr32(hw, QRXFLXP_CNTXT(pf_q), regval);\n+}\n+\n /**\n * ice_vsi_cfg_rxqs - Configure the VSI for Rx\n * @vsi: the VSI being configured\ndiff --git a/drivers/net/ethernet/intel/ice/ice_lib.h b/drivers/net/ethernet/intel/ice/ice_lib.h\nindex 0d11a3dbed78..9223d3e88869 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.h\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.h\n@@ -76,6 +76,9 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool init_vsi);\n \n bool ice_is_reset_in_progress(unsigned long *state);\n \n+void\n+ice_write_qrxflxp_cntxt(struct ice_hw *hw, u16 pf_q, u32 rxdid, u32 prio);\n+\n void ice_vsi_put_qs(struct ice_vsi *vsi);\n \n void ice_vsi_dis_irq(struct ice_vsi *vsi);\n", "prefixes": [ "S46", "2/9" ] }