Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/951913/?format=api
{ "id": 951913, "url": "http://patchwork.ozlabs.org/api/patches/951913/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180801040433.5865-5-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": "<20180801040433.5865-5-anirudh.venkataramanan@intel.com>", "list_archive_url": null, "date": "2018-08-01T04:04:24", "name": "[v2,04/13] ice: Code optimization for ice_fill_sw_rule()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "026c4210ca99fe9031f8fb425c38ead33e5df0ce", "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/20180801040433.5865-5-anirudh.venkataramanan@intel.com/mbox/", "series": [ { "id": 58674, "url": "http://patchwork.ozlabs.org/api/series/58674/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=58674", "date": "2018-08-01T04:04:20", "name": "Feature updates for ice", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/58674/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/951913/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/951913/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.136; helo=silver.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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41gKSz585cz9rxx\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 1 Aug 2018 14:04:51 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id F10ED25C72;\n\tWed, 1 Aug 2018 04:04:49 +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 TMpq5CtI9TGR; Wed, 1 Aug 2018 04:04:48 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 65B9125C0B;\n\tWed, 1 Aug 2018 04:04:48 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 2363F1C0BBC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 1 Aug 2018 04:04:45 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 2119A25BF8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 1 Aug 2018 04:04: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 Qi-90229R87I for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 1 Aug 2018 04:04:44 +0000 (UTC)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby silver.osuosl.org (Postfix) with ESMTPS id B8F4425636\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 1 Aug 2018 04:04:44 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t31 Jul 2018 21:04:43 -0700", "from lnahar-mobl.amr.corp.intel.com (HELO\n\tavenkata-mobl4.localdomain) ([10.252.134.1])\n\tby FMSMGA003.fm.intel.com with ESMTP; 31 Jul 2018 21:04:43 -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-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.51,430,1526367600\"; d=\"scan'208\";a=\"69105096\"", "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 31 Jul 2018 21:04:24 -0700", "Message-Id": "<20180801040433.5865-5-anirudh.venkataramanan@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20180801040433.5865-1-anirudh.venkataramanan@intel.com>", "References": "<20180801040433.5865-1-anirudh.venkataramanan@intel.com>", "Subject": "[Intel-wired-lan] [PATCH v2 04/13] ice: Code optimization for\n\tice_fill_sw_rule()", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "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": "From: Zhenning Xiao <zhenning.xiao@intel.com>\n\nUse the buffer in the s_rule structure directly instead of using\na local array eth_hdr[DUMMY_ETH_HDR_LEN]\n\nSigned-off-by: Zhenning Xiao <zhenning.xiao@intel.com>\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n[Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> cleaned up commit message]\n---\n drivers/net/ethernet/intel/ice/ice_switch.c | 18 ++++++++++--------\n 1 file changed, 10 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c\nindex 6b7ec2ae5ad6..d8b18cabc3a8 100644\n--- a/drivers/net/ethernet/intel/ice/ice_switch.c\n+++ b/drivers/net/ethernet/intel/ice/ice_switch.c\n@@ -464,8 +464,9 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,\n \t\t struct ice_aqc_sw_rules_elem *s_rule, enum ice_adminq_opc opc)\n {\n \tu16 vlan_id = ICE_MAX_VLAN_ID + 1;\n-\tu8 eth_hdr[DUMMY_ETH_HDR_LEN];\n \tvoid *daddr = NULL;\n+\tu16 eth_hdr_sz;\n+\tu8 *eth_hdr;\n \tu32 act = 0;\n \t__be16 *off;\n \n@@ -477,8 +478,11 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,\n \t\treturn;\n \t}\n \n+\teth_hdr_sz = sizeof(dummy_eth_header);\n+\teth_hdr = s_rule->pdata.lkup_tx_rx.hdr;\n+\n \t/* initialize the ether header with a dummy header */\n-\tmemcpy(eth_hdr, dummy_eth_header, sizeof(dummy_eth_header));\n+\tmemcpy(eth_hdr, dummy_eth_header, eth_hdr_sz);\n \tice_fill_sw_info(hw, f_info);\n \n \tswitch (f_info->fltr_act) {\n@@ -536,7 +540,7 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,\n \t\tdaddr = f_info->l_data.ethertype_mac.mac_addr;\n \t\t/* fall-through */\n \tcase ICE_SW_LKUP_ETHERTYPE:\n-\t\toff = (__be16 *)ð_hdr[ICE_ETH_ETHTYPE_OFFSET];\n+\t\toff = (__be16 *)(eth_hdr + ICE_ETH_ETHTYPE_OFFSET);\n \t\t*off = cpu_to_be16(f_info->l_data.ethertype_mac.ethertype);\n \t\tbreak;\n \tcase ICE_SW_LKUP_MAC_VLAN:\n@@ -563,18 +567,16 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,\n \ts_rule->pdata.lkup_tx_rx.act = cpu_to_le32(act);\n \n \tif (daddr)\n-\t\tether_addr_copy(ð_hdr[ICE_ETH_DA_OFFSET], daddr);\n+\t\tether_addr_copy(eth_hdr + ICE_ETH_DA_OFFSET, daddr);\n \n \tif (!(vlan_id > ICE_MAX_VLAN_ID)) {\n-\t\toff = (__be16 *)ð_hdr[ICE_ETH_VLAN_TCI_OFFSET];\n+\t\toff = (__be16 *)(eth_hdr + ICE_ETH_VLAN_TCI_OFFSET);\n \t\t*off = cpu_to_be16(vlan_id);\n \t}\n \n \t/* Create the switch rule with the final dummy Ethernet header */\n \tif (opc != ice_aqc_opc_update_sw_rules)\n-\t\ts_rule->pdata.lkup_tx_rx.hdr_len = cpu_to_le16(sizeof(eth_hdr));\n-\n-\tmemcpy(s_rule->pdata.lkup_tx_rx.hdr, eth_hdr, sizeof(eth_hdr));\n+\t\ts_rule->pdata.lkup_tx_rx.hdr_len = cpu_to_le16(eth_hdr_sz);\n }\n \n /**\n", "prefixes": [ "v2", "04/13" ] }