Show a patch.

GET /api/patches/89/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 89,
    "url": "http://patches.dpdk.org/api/patches/89/",
    "web_url": "http://patches.dpdk.org/patch/89/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk"
    },
    "msgid": "<1406184149-11531-4-git-send-email-helin.zhang@intel.com>",
    "date": "2014-07-24T06:42:27",
    "name": "[dpdk-dev,3/5] i40e: support selecting hash functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8b23620d50eb1f41fa1c0b918bff3266d987f1fc",
    "submitter": {
        "id": 14,
        "url": "http://patches.dpdk.org/api/people/14/",
        "name": "Helin Zhang",
        "email": "helin.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/patch/89/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/89/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/89/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<hzhan75@shecgisg004.sh.intel.com>",
        "References": "<1406184149-11531-1-git-send-email-helin.zhang@intel.com>",
        "X-Mailman-Version": "2.1.15",
        "X-IronPort-AV": "E=Sophos;i=\"5.01,722,1400050800\"; d=\"scan'208\";a=\"460749090\"",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "X-List-Received-Date": "Thu, 24 Jul 2014 06:41:20 -0000",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<1406184149-11531-4-git-send-email-helin.zhang@intel.com>",
        "Received": [
            "from mga03.intel.com (mga03.intel.com [143.182.124.21])\n\tby dpdk.org (Postfix) with ESMTP id A52D8B361\n\tfor <dev@dpdk.org>; Thu, 24 Jul 2014 08:41:19 +0200 (CEST)",
            "from azsmga001.ch.intel.com ([10.2.17.19])\n\tby azsmga101.ch.intel.com with ESMTP; 23 Jul 2014 23:42:45 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby azsmga001.ch.intel.com with ESMTP; 23 Jul 2014 23:42:42 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id s6O6gem7017102;\n\tThu, 24 Jul 2014 14:42:40 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid s6O6gaNQ011661; Thu, 24 Jul 2014 14:42:38 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s6O6gaEs011657; \n\tThu, 24 Jul 2014 14:42:36 +0800"
        ],
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "Precedence": "list",
        "Date": "Thu, 24 Jul 2014 14:42:27 +0800",
        "Subject": "[dpdk-dev] [PATCH 3/5] i40e: support selecting hash functions",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "X-ExtLoop1": "1",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "In-Reply-To": "<1406184149-11531-1-git-send-email-helin.zhang@intel.com>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "To": "dev@dpdk.org"
    },
    "content": "Toeplitz and simple XOR hash functions are supported by\nhardware, code changes are to tell the hardware which hash\nfunction is selected according to the configuration.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\n---\n config/common_bsdapp              |  1 +\n config/common_linuxapp            |  1 +\n lib/librte_pmd_i40e/i40e_ethdev.c | 30 ++++++++++++++++++++++++++++++\n 3 files changed, 32 insertions(+)",
    "diff": "diff --git a/config/common_bsdapp b/config/common_bsdapp\nindex bf6d8a0..e73629e 100644\n--- a/config/common_bsdapp\n+++ b/config/common_bsdapp\n@@ -187,6 +187,7 @@ CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n\n CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF=4\n # interval up to 8160 us, aligned to 2 (or default value)\n CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1\n+CONFIG_RTE_LIBRTE_I40E_HASH_FUNC_TOEPLITZ=y\n \n #\n # Compile burst-oriented VIRTIO PMD driver\ndiff --git a/config/common_linuxapp b/config/common_linuxapp\nindex 9047975..9e00513 100644\n--- a/config/common_linuxapp\n+++ b/config/common_linuxapp\n@@ -210,6 +210,7 @@ CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n\n CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF=4\n # interval up to 8160 us, aligned to 2 (or default value)\n CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1\n+CONFIG_RTE_LIBRTE_I40E_HASH_FUNC_TOEPLITZ=y\n \n #\n # Compile burst-oriented VIRTIO PMD driver\ndiff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c\nindex 9ed31b5..cc04c70 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.c\n@@ -203,6 +203,7 @@ static int i40e_dev_rss_hash_update(struct rte_eth_dev *dev,\n \t\t\t\t    struct rte_eth_rss_conf *rss_conf);\n static int i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,\n \t\t\t\t      struct rte_eth_rss_conf *rss_conf);\n+static void i40e_select_hash_function(struct i40e_hw *hw);\n \n /* Default hash key buffer for RSS */\n static uint32_t rss_key_default[I40E_PFQF_HKEY_MAX_INDEX + 1];\n@@ -384,6 +385,9 @@ eth_i40e_dev_init(__rte_unused struct eth_driver *eth_drv,\n \t\treturn ret;\n \t}\n \n+\t/* Select hash functions */\n+\ti40e_select_hash_function(hw);\n+\n \t/* Initialize the shared code (base driver) */\n \tret = i40e_init_shared_code(hw);\n \tif (ret) {\n@@ -3956,3 +3960,29 @@ i40e_pf_config_mq_rx(struct i40e_pf *pf)\n \n \treturn 0;\n }\n+\n+static void\n+i40e_select_hash_function(struct i40e_hw *hw)\n+{\n+\tuint32_t reg;\n+\n+\treg = I40E_READ_REG(hw, I40E_GLQF_CTL);\n+#ifdef RTE_LIBRTE_I40E_HASH_FUNC_TOEPLITZ\n+\tif (reg & I40E_GLQF_CTL_HTOEP_MASK) {\n+\t\tPMD_DRV_LOG(DEBUG, \"Hash function already set to Hoeplitz\\n\");\n+\t\treturn;\n+\t}\n+\treg |= I40E_GLQF_CTL_HTOEP_MASK;\n+#else\n+\tif (!(reg & I40E_GLQF_CTL_HTOEP_MASK)) {\n+\t\tPMD_DRV_LOG(DEBUG, \"Hash function already set to \"\n+\t\t\t\t\t\t\"Simple XOR\\n\");\n+\t\treturn;\n+\t}\n+\treg &= ~I40E_GLQF_CTL_HTOEP_MASK;\n+#endif\n+\tPMD_DRV_LOG(INFO, \"Hash function set to %s\\n\",\n+\t\t(reg & I40E_GLQF_CTL_HTOEP_MASK) ? \"Toeplitz\" : \"XOR\");\n+\tI40E_WRITE_REG(hw, I40E_GLQF_CTL, reg);\n+\tI40E_WRITE_FLUSH(hw);\n+}\n",
    "prefixes": [
        "dpdk-dev",
        "3/5"
    ]
}