get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2176,
    "url": "https://patches.dpdk.org/api/patches/2176/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1419817288-22957-1-git-send-email-helin.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "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",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1419817288-22957-1-git-send-email-helin.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1419817288-22957-1-git-send-email-helin.zhang@intel.com",
    "date": "2014-12-29T01:41:28",
    "name": "[dpdk-dev,v2] i40e: workaround for XL710 performance",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f8a8bf94f33f57351c96e4ccd5811ebb819d232a",
    "submitter": {
        "id": 14,
        "url": "https://patches.dpdk.org/api/people/14/?format=api",
        "name": "Zhang, Helin",
        "email": "helin.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1419817288-22957-1-git-send-email-helin.zhang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2176/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2176/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 670B6594E;\n\tMon, 29 Dec 2014 02:41:46 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id BB2145921\n\tfor <dev@dpdk.org>; Mon, 29 Dec 2014 02:41:41 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga101.fm.intel.com with ESMTP; 28 Dec 2014 17:41:38 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 28 Dec 2014 17:41:37 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id sBT1fXC1003224;\n\tMon, 29 Dec 2014 09:41:33 +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 sBT1fVJl022991; Mon, 29 Dec 2014 09:41:33 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sBT1fU37022987; \n\tMon, 29 Dec 2014 09:41:30 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.07,658,1413270000\"; d=\"scan'208\";a=\"643875140\"",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 29 Dec 2014 09:41:28 +0800",
        "Message-Id": "<1419817288-22957-1-git-send-email-helin.zhang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1419405248-14158-1-git-send-email-helin.zhang@intel.com>",
        "References": "<1419405248-14158-1-git-send-email-helin.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2] i40e: workaround for XL710 performance",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "On XL710, performance number is far from the expectation on recent\nfirmware versions, if promiscuous mode is disabled, or promiscuous\nmode is enabled and port MAC address is equal to the packet\ndestination MAC address. The fix for this issue may not be\nintegrated in the following firmware version. So the workaround in\nsoftware driver is needed. For XL710, it needs to modify the initial\nvalues of 3 internal only registers, which are the same as X710.\nNote that the values for X710 and XL710 registers could be different,\nand the workaround can be removed when it is fixed in firmware in\nthe future.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\n---\n lib/librte_pmd_i40e/i40e_ethdev.c | 44 ++++++++++++++++++++++++++-------------\n 1 file changed, 30 insertions(+), 14 deletions(-)\n\nv2 changes:\n* Supported modifying the address of 0x269FBC of XL710 during\n  initialization, to fix the minor performance gap to expectation.\n  That means XL710 can meet the performance expectation with this\n  workaround.",
    "diff": "diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c\nindex b47a3d2..8982920 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.c\n@@ -5327,38 +5327,54 @@ i40e_debug_read_register(struct i40e_hw *hw, uint32_t addr, uint64_t *val)\n \n /*\n  * On X710, performance number is far from the expectation on recent firmware\n- * versions. The fix for this issue may not be integrated in the following\n+ * versions; on XL710, performance number is also far from the expectation on\n+ * recent firmware versions, if promiscuous mode is disabled, or promiscuous\n+ * mode is enabled and port MAC address is equal to the packet destination MAC\n+ * address. The fix for this issue may not be integrated in the following\n  * firmware version. So the workaround in software driver is needed. It needs\n- * to modify the initial values of 3 internal only registers. Note that the\n+ * to modify the initial values of 3 internal only registers for both X710 and\n+ * XL710. Note that the values for X710 or XL710 could be different, and the\n  * workaround can be removed when it is fixed in firmware in the future.\n  */\n-static void\n-i40e_configure_registers(struct i40e_hw *hw)\n-{\n+\n+/* For both X710 and XL710 */\n+#define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE 0x10000200\n #define I40E_GL_SWR_PRI_JOIN_MAP_0       0x26CE00\n+\n+#define I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x011f0200\n #define I40E_GL_SWR_PRI_JOIN_MAP_2       0x26CE08\n+\n+/* For X710 */\n+#define I40E_GL_SWR_PM_UP_THR_EF_VALUE   0x03030303\n+/* For XL710 */\n+#define I40E_GL_SWR_PM_UP_THR_SF_VALUE   0x06060606\n #define I40E_GL_SWR_PM_UP_THR            0x269FBC\n-#define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE 0x10000200\n-#define I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x011f0200\n-#define I40E_GL_SWR_PM_UP_THR_VALUE      0x03030303\n \n-\tstatic const struct {\n+static void\n+i40e_configure_registers(struct i40e_hw *hw)\n+{\n+\tstatic struct {\n \t\tuint32_t addr;\n \t\tuint64_t val;\n \t} reg_table[] = {\n \t\t{I40E_GL_SWR_PRI_JOIN_MAP_0, I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE},\n \t\t{I40E_GL_SWR_PRI_JOIN_MAP_2, I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE},\n-\t\t{I40E_GL_SWR_PM_UP_THR, I40E_GL_SWR_PM_UP_THR_VALUE},\n+\t\t{I40E_GL_SWR_PM_UP_THR, 0}, /* Compute value dynamically */\n \t};\n \tuint64_t reg;\n \tuint32_t i;\n \tint ret;\n \n-\t/* Below fix is for X710 only */\n-\tif (i40e_is_40G_device(hw->device_id))\n-\t\treturn;\n-\n \tfor (i = 0; i < RTE_DIM(reg_table); i++) {\n+\t\tif (reg_table[i].addr == I40E_GL_SWR_PM_UP_THR) {\n+\t\t\tif (i40e_is_40G_device(hw->device_id)) /* For XL710 */\n+\t\t\t\treg_table[i].val =\n+\t\t\t\t\tI40E_GL_SWR_PM_UP_THR_SF_VALUE;\n+\t\t\telse /* For X710 */\n+\t\t\t\treg_table[i].val =\n+\t\t\t\t\tI40E_GL_SWR_PM_UP_THR_EF_VALUE;\n+\t\t}\n+\n \t\tret = i40e_debug_read_register(hw, reg_table[i].addr, &reg);\n \t\tif (ret < 0) {\n \t\t\tPMD_DRV_LOG(ERR, \"Failed to read from 0x%\"PRIx32,\n",
    "prefixes": [
        "dpdk-dev",
        "v2"
    ]
}