Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1049834/?format=api
{ "id": 1049834, "url": "http://patchwork.ozlabs.org/api/patches/1049834/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190228232432.31659-7-anirudh.venkataramanan@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": "<20190228232432.31659-7-anirudh.venkataramanan@intel.com>", "list_archive_url": null, "date": "2019-02-28T23:24:27", "name": "[S16,06/11] ice: Update rings based on TC information", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "e4baac975e38cd3fa521edbdcbae50de8f720511", "submitter": { "id": 73601, "url": "http://patchwork.ozlabs.org/api/people/73601/?format=api", "name": "Anirudh Venkataramanan", "email": "anirudh.venkataramanan@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/20190228232432.31659-7-anirudh.venkataramanan@intel.com/mbox/", "series": [ { "id": 94826, "url": "http://patchwork.ozlabs.org/api/series/94826/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=94826", "date": "2019-02-28T23:24:25", "name": "Add support for Data Center Bridging (DCB)", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/94826/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1049834/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1049834/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.138; helo=whitealder.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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 449TCt0GVhz9sN1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 1 Mar 2019 10:24:41 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 9356986940;\n\tThu, 28 Feb 2019 23:24:39 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 9dLEVR33FeRc; Thu, 28 Feb 2019 23:24:37 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 16B6286A4F;\n\tThu, 28 Feb 2019 23:24:37 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 1AEAC1BF410\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:36 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 18B3F877E2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:36 +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 HtJYgMQzIELk for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:35 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 78030879B8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:35 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Feb 2019 15:24:34 -0800", "from shasta.jf.intel.com ([10.166.241.11])\n\tby FMSMGA003.fm.intel.com with ESMTP; 28 Feb 2019 15:24:34 -0800" ], "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.58,425,1544515200\"; d=\"scan'208\";a=\"137127724\"", "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 28 Feb 2019 15:24:27 -0800", "Message-Id": "<20190228232432.31659-7-anirudh.venkataramanan@intel.com>", "X-Mailer": "git-send-email 2.14.5", "In-Reply-To": "<20190228232432.31659-1-anirudh.venkataramanan@intel.com>", "References": "<20190228232432.31659-1-anirudh.venkataramanan@intel.com>", "Subject": "[Intel-wired-lan] [PATCH S16 06/11] ice: Update rings based on TC\n\tinformation", "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\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>", "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": "This patch adds a new function ice_vsi_cfg_dcb_rings which updates a\nVSI's rings based on DCB traffic class information.\n\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 38 ++++++++++++++++++++++++++++\n drivers/net/ethernet/intel/ice/ice_dcb_lib.h | 8 ++++++\n drivers/net/ethernet/intel/ice/ice_lib.c | 2 ++\n drivers/net/ethernet/intel/ice/ice_main.c | 1 +\n drivers/net/ethernet/intel/ice/ice_txrx.h | 3 +++\n 5 files changed, 52 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\nindex bb9c282ee35e..68df3d78a534 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\n@@ -57,6 +57,44 @@ u8 ice_dcb_get_num_tc(struct ice_dcbx_cfg *dcbcfg)\n \treturn ret;\n }\n \n+/**\n+ * ice_vsi_cfg_dcb_rings - Update rings to reflect DCB TC\n+ * @vsi: VSI owner of rings being updated\n+ */\n+void ice_vsi_cfg_dcb_rings(struct ice_vsi *vsi)\n+{\n+\tstruct ice_ring *tx_ring, *rx_ring;\n+\tu16 qoffset, qcount;\n+\tint i, n;\n+\n+\tif (!test_bit(ICE_FLAG_DCB_ENA, vsi->back->flags)) {\n+\t\t/* Reset the TC information */\n+\t\tfor (i = 0; i < vsi->num_txq; i++) {\n+\t\t\ttx_ring = vsi->tx_rings[i];\n+\t\t\ttx_ring->dcb_tc = 0;\n+\t\t}\n+\t\tfor (i = 0; i < vsi->num_rxq; i++) {\n+\t\t\trx_ring = vsi->rx_rings[i];\n+\t\t\trx_ring->dcb_tc = 0;\n+\t\t}\n+\t\treturn;\n+\t}\n+\n+\tice_for_each_traffic_class(n) {\n+\t\tif (!(vsi->tc_cfg.ena_tc & BIT(n)))\n+\t\t\tbreak;\n+\n+\t\tqoffset = vsi->tc_cfg.tc_info[n].qoffset;\n+\t\tqcount = vsi->tc_cfg.tc_info[n].qcount_tx;\n+\t\tfor (i = qoffset; i < (qoffset + qcount); i++) {\n+\t\t\ttx_ring = vsi->tx_rings[i];\n+\t\t\trx_ring = vsi->rx_rings[i];\n+\t\t\ttx_ring->dcb_tc = n;\n+\t\t\trx_ring->dcb_tc = n;\n+\t\t}\n+\t}\n+}\n+\n /**\n * ice_pf_dcb_recfg - Reconfigure all VEBs and VSIs\n * @pf: pointer to the PF struct\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.h b/drivers/net/ethernet/intel/ice/ice_dcb_lib.h\nindex a2e42f85fa55..449e3735ca1b 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dcb_lib.h\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.h\n@@ -10,10 +10,16 @@\n #ifdef CONFIG_DCB\n u8 ice_dcb_get_ena_tc(struct ice_dcbx_cfg *dcbcfg);\n u8 ice_dcb_get_num_tc(struct ice_dcbx_cfg *dcbcfg);\n+void ice_vsi_cfg_dcb_rings(struct ice_vsi *vsi);\n int ice_init_pf_dcb(struct ice_pf *pf);\n void\n ice_dcb_process_lldp_set_mib_change(struct ice_pf *pf,\n \t\t\t\t struct ice_rq_event_info *event);\n+static inline void\n+ice_set_cgd_num(struct ice_tlan_ctx *tlan_ctx, struct ice_ring *ring)\n+{\n+\ttlan_ctx->cgd_num = ring->dcb_tc;\n+}\n #else\n static inline u8 ice_dcb_get_ena_tc(struct ice_dcbx_cfg __always_unused *dcbcfg)\n {\n@@ -31,6 +37,8 @@ static inline int ice_init_pf_dcb(struct ice_pf *pf)\n \treturn -EOPNOTSUPP;\n }\n \n+#define ice_vsi_cfg_dcb_rings(vsi) do {} while (0)\n #define ice_dcb_process_lldp_set_mib_change(pf, event) do {} while (0)\n+#define ice_set_cgd_num(tlan_ctx, ring) do {} while (0)\n #endif /* CONFIG_DCB */\n #endif /* _ICE_DCB_LIB_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c\nindex f3574daa147c..f31129e4e9cf 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.c\n@@ -125,6 +125,8 @@ ice_setup_tx_ctx(struct ice_ring *ring, struct ice_tlan_ctx *tlan_ctx, u16 pf_q)\n \t/* Transmit Queue Length */\n \ttlan_ctx->qlen = ring->count;\n \n+\tice_set_cgd_num(tlan_ctx, ring);\n+\n \t/* PF number */\n \ttlan_ctx->pf_num = hw->pf_id;\n \ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex 9b58f156ceee..367e9559b1ca 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -2940,6 +2940,7 @@ static int ice_vsi_cfg(struct ice_vsi *vsi)\n \t\tif (err)\n \t\t\treturn err;\n \t}\n+\tice_vsi_cfg_dcb_rings(vsi);\n \n \terr = ice_vsi_cfg_lan_txqs(vsi);\n \tif (!err)\ndiff --git a/drivers/net/ethernet/intel/ice/ice_txrx.h b/drivers/net/ethernet/intel/ice/ice_txrx.h\nindex 60131b84b021..53903f846834 100644\n--- a/drivers/net/ethernet/intel/ice/ice_txrx.h\n+++ b/drivers/net/ethernet/intel/ice/ice_txrx.h\n@@ -160,6 +160,9 @@ struct ice_ring {\n \t};\n \tu16 q_index;\t\t\t/* Queue number of ring */\n \tu32 txq_teid;\t\t\t/* Added Tx queue TEID */\n+#ifdef CONFIG_DCB\n+\tu8 dcb_tc;\t\t/* Traffic class of ring */\n+#endif /* CONFIG_DCB */\n \n \tu16 count;\t\t\t/* Number of descriptors */\n \tu16 reg_idx;\t\t\t/* HW register index of the ring */\n", "prefixes": [ "S16", "06/11" ] }