Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1237766/?format=api
{ "id": 1237766, "url": "http://patchwork.ozlabs.org/api/patches/1237766/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200213213129.34023-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": "<20200213213129.34023-2-anthony.l.nguyen@intel.com>", "list_archive_url": null, "date": "2020-02-13T21:31:17", "name": "[S39,v2,03/15] ice: Fix for TCAM entry management", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "4d5448991e86f46cfeda9af0db93ecb9b32cabbe", "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/20200213213129.34023-2-anthony.l.nguyen@intel.com/mbox/", "series": [ { "id": 158447, "url": "http://patchwork.ozlabs.org/api/series/158447/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=158447", "date": "2020-02-13T21:30:59", "name": "[S39,v2,01/15] ice: Validate config for SW DCB map", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/158447/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1237766/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1237766/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; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=osuosl.org (client-ip=140.211.166.138;\n\thelo=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 48JV8Q5KM8z9sRG\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 14 Feb 2020 08:32:06 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 229408748E;\n\tThu, 13 Feb 2020 21:32:05 +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 7earZJ6FPiUV; Thu, 13 Feb 2020 21:32:03 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id C409A87527;\n\tThu, 13 Feb 2020 21:32:02 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id B459B1BF338\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 13 Feb 2020 21:31:55 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id B124F203F0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 13 Feb 2020 21:31:55 +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 32gXNzqFhTMx for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 13 Feb 2020 21:31:54 +0000 (UTC)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 936F82156E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 13 Feb 2020 21:31:54 +0000 (UTC)", "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Feb 2020 13:31:51 -0800", "from unknown (HELO localhost.jf.intel.com) ([10.166.244.174])\n\tby orsmga008.jf.intel.com with ESMTP; 13 Feb 2020 13:31:50 -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.70,438,1574150400\"; d=\"scan'208\";a=\"227382406\"", "From": "Tony Nguyen <anthony.l.nguyen@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 13 Feb 2020 13:31:17 -0800", "Message-Id": "<20200213213129.34023-2-anthony.l.nguyen@intel.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20200213213129.34023-1-anthony.l.nguyen@intel.com>", "References": "<20200213213129.34023-1-anthony.l.nguyen@intel.com>", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH S39 v2 03/15] ice: Fix for TCAM entry\n\tmanagement", "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>", "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: Dan Nowlin <dan.nowlin@intel.com>\n\nOrder intermediate VSIG list correct in order to correctly match existing\nVSIG lists.\n\nWhen overriding pre-existing TCAM entries, properly delete the existing\nentry and remove it from the change/update list.\n\nSigned-off-by: Dan Nowlin <dan.nowlin@intel.com>\n---\n .../net/ethernet/intel/ice/ice_flex_pipe.c | 65 +++++++++++++++----\n 1 file changed, 51 insertions(+), 14 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c\nindex 99208946224c..42bac3ec5526 100644\n--- a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c\n+++ b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c\n@@ -3470,6 +3470,24 @@ ice_move_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig,\n \treturn 0;\n }\n \n+/**\n+ * ice_rem_chg_tcam_ent - remove a specific TCAM entry from change list\n+ * @hw: pointer to the HW struct\n+ * @idx: the index of the TCAM entry to remove\n+ * @chg: the list of change structures to search\n+ */\n+static void\n+ice_rem_chg_tcam_ent(struct ice_hw *hw, u16 idx, struct list_head *chg)\n+{\n+\tstruct ice_chs_chg *pos, *tmp;\n+\n+\tlist_for_each_entry_safe(tmp, pos, chg, list_entry)\n+\t\tif (tmp->type == ICE_TCAM_ADD && tmp->tcam_idx == idx) {\n+\t\t\tlist_del(&tmp->list_entry);\n+\t\t\tdevm_kfree(ice_hw_to_dev(hw), tmp);\n+\t\t}\n+}\n+\n /**\n * ice_prof_tcam_ena_dis - add enable or disable TCAM change\n * @hw: pointer to the HW struct\n@@ -3489,14 +3507,19 @@ ice_prof_tcam_ena_dis(struct ice_hw *hw, enum ice_block blk, bool enable,\n \tenum ice_status status;\n \tstruct ice_chs_chg *p;\n \n-\t/* Default: enable means change the low flag bit to don't care */\n-\tu8 dc_msk[ICE_TCAM_KEY_VAL_SZ] = { 0x01, 0x00, 0x00, 0x00, 0x00 };\n+\tu8 vl_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };\n+\tu8 dc_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0x00, 0x00, 0x00 };\n \tu8 nm_msk[ICE_TCAM_KEY_VAL_SZ] = { 0x00, 0x00, 0x00, 0x00, 0x00 };\n-\tu8 vl_msk[ICE_TCAM_KEY_VAL_SZ] = { 0x01, 0x00, 0x00, 0x00, 0x00 };\n \n \t/* if disabling, free the TCAM */\n \tif (!enable) {\n-\t\tstatus = ice_free_tcam_ent(hw, blk, tcam->tcam_idx);\n+\t\tstatus = ice_rel_tcam_idx(hw, blk, tcam->tcam_idx);\n+\n+\t\t/* if we have already created a change for this TCAM entry, then\n+\t\t * we need to remove that entry, in order to prevent writing to\n+\t\t * a TCAM entry we no longer will have ownership of.\n+\t\t */\n+\t\tice_rem_chg_tcam_ent(hw, tcam->tcam_idx, chg);\n \t\ttcam->tcam_idx = 0;\n \t\ttcam->in_use = 0;\n \t\treturn status;\n@@ -3612,11 +3635,12 @@ ice_adj_prof_priorities(struct ice_hw *hw, enum ice_block blk, u16 vsig,\n * @blk: hardware block\n * @vsig: the VSIG to which this profile is to be added\n * @hdl: the profile handle indicating the profile to add\n+ * @rev: true to add entries to the end of the list\n * @chg: the change list\n */\n static enum ice_status\n ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,\n-\t\t struct list_head *chg)\n+\t\t bool rev, struct list_head *chg)\n {\n \t/* Masks that ignore flags */\n \tu8 vl_msk[ICE_TCAM_KEY_VAL_SZ] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };\n@@ -3625,7 +3649,7 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,\n \tstruct ice_prof_map *map;\n \tstruct ice_vsig_prof *t;\n \tstruct ice_chs_chg *p;\n-\tu16 i;\n+\tu16 vsig_idx, i;\n \n \t/* Get the details on the profile specified by the handle ID */\n \tmap = ice_search_prof_id(hw, blk, hdl);\n@@ -3687,8 +3711,13 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,\n \t}\n \n \t/* add profile to VSIG */\n-\tlist_add(&t->list,\n-\t\t &hw->blk[blk].xlt2.vsig_tbl[(vsig & ICE_VSIG_IDX_M)].prop_lst);\n+\tvsig_idx = vsig & ICE_VSIG_IDX_M;\n+\tif (rev)\n+\t\tlist_add_tail(&t->list,\n+\t\t\t &hw->blk[blk].xlt2.vsig_tbl[vsig_idx].prop_lst);\n+\telse\n+\t\tlist_add(&t->list,\n+\t\t\t &hw->blk[blk].xlt2.vsig_tbl[vsig_idx].prop_lst);\n \n \treturn 0;\n \n@@ -3728,7 +3757,7 @@ ice_create_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl,\n \tif (status)\n \t\tgoto err_ice_create_prof_id_vsig;\n \n-\tstatus = ice_add_prof_id_vsig(hw, blk, new_vsig, hdl, chg);\n+\tstatus = ice_add_prof_id_vsig(hw, blk, new_vsig, hdl, false, chg);\n \tif (status)\n \t\tgoto err_ice_create_prof_id_vsig;\n \n@@ -3753,11 +3782,13 @@ ice_create_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl,\n * @blk: hardware block\n * @vsi: the initial VSI that will be in VSIG\n * @lst: the list of profile that will be added to the VSIG\n+ * @new_vsig: return of new VSIG\n * @chg: the change list\n */\n static enum ice_status\n ice_create_vsig_from_lst(struct ice_hw *hw, enum ice_block blk, u16 vsi,\n-\t\t\t struct list_head *lst, struct list_head *chg)\n+\t\t\t struct list_head *lst, u16 *new_vsig,\n+\t\t\t struct list_head *chg)\n {\n \tstruct ice_vsig_prof *t;\n \tenum ice_status status;\n@@ -3772,12 +3803,15 @@ ice_create_vsig_from_lst(struct ice_hw *hw, enum ice_block blk, u16 vsi,\n \t\treturn status;\n \n \tlist_for_each_entry(t, lst, list) {\n+\t\t/* Reverse the order here since we are copying the list */\n \t\tstatus = ice_add_prof_id_vsig(hw, blk, vsig, t->profile_cookie,\n-\t\t\t\t\t chg);\n+\t\t\t\t\t true, chg);\n \t\tif (status)\n \t\t\treturn status;\n \t}\n \n+\t*new_vsig = vsig;\n+\n \treturn 0;\n }\n \n@@ -3899,7 +3933,8 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)\n \t\t\t * not sharing entries and we can simply add the new\n \t\t\t * profile to the VSIG.\n \t\t\t */\n-\t\t\tstatus = ice_add_prof_id_vsig(hw, blk, vsig, hdl, &chg);\n+\t\t\tstatus = ice_add_prof_id_vsig(hw, blk, vsig, hdl, false,\n+\t\t\t\t\t\t &chg);\n \t\t\tif (status)\n \t\t\t\tgoto err_ice_add_prof_id_flow;\n \n@@ -3910,7 +3945,8 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)\n \t\t} else {\n \t\t\t/* No match, so we need a new VSIG */\n \t\t\tstatus = ice_create_vsig_from_lst(hw, blk, vsi,\n-\t\t\t\t\t\t\t &union_lst, &chg);\n+\t\t\t\t\t\t\t &union_lst, &vsig,\n+\t\t\t\t\t\t\t &chg);\n \t\t\tif (status)\n \t\t\t\tgoto err_ice_add_prof_id_flow;\n \n@@ -4076,7 +4112,8 @@ ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)\n \t\t\t\t * new VSIG and TCAM entries\n \t\t\t\t */\n \t\t\t\tstatus = ice_create_vsig_from_lst(hw, blk, vsi,\n-\t\t\t\t\t\t\t\t ©, &chg);\n+\t\t\t\t\t\t\t\t ©, &vsig,\n+\t\t\t\t\t\t\t\t &chg);\n \t\t\t\tif (status)\n \t\t\t\t\tgoto err_ice_rem_prof_id_flow;\n \n", "prefixes": [ "S39", "v2", "03/15" ] }