get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 74060,
    "url": "http://patchwork.dpdk.org/api/patches/74060/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200715063515.9262-1-shougangx.wang@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20200715063515.9262-1-shougangx.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200715063515.9262-1-shougangx.wang@intel.com",
    "date": "2020-07-15T06:35:15",
    "name": "net/i40e: fix incorrect hash look up table",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "08826f35e1ec1556b3e24180af62778441c0271a",
    "submitter": {
        "id": 1418,
        "url": "http://patchwork.dpdk.org/api/people/1418/?format=api",
        "name": "Shougang Wang",
        "email": "shougangx.wang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patchwork.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200715063515.9262-1-shougangx.wang@intel.com/mbox/",
    "series": [
        {
            "id": 11033,
            "url": "http://patchwork.dpdk.org/api/series/11033/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=11033",
            "date": "2020-07-15T06:35:15",
            "name": "net/i40e: fix incorrect hash look up table",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/11033/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/74060/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/74060/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 34591A0540;\n\tWed, 15 Jul 2020 08:48:35 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 974341BF8F;\n\tWed, 15 Jul 2020 08:48:34 +0200 (CEST)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id 68FDC1BF8D;\n Wed, 15 Jul 2020 08:48:33 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Jul 2020 23:48:32 -0700",
            "from intel.sh.intel.com ([10.239.255.20])\n by orsmga002.jf.intel.com with ESMTP; 14 Jul 2020 23:48:30 -0700"
        ],
        "IronPort-SDR": [
            "\n rmnX834mD2x55IIbJ+i/t+D7r8KhDxni0grTIRuV/OnG5ANqV2tO6RhJH9njcp6twG/bZ5LVv4\n ew4O4G25GghA==",
            "\n BG7uHvMh1NBDWUJCfU3g37IwPyn3Fa8ypOs+QmsdvcPHWQXRmwgbCBon97kj9pGAYxPur7KAZ/\n m3mspqhvThbA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9682\"; a=\"210638547\"",
            "E=Sophos;i=\"5.75,354,1589266800\"; d=\"scan'208\";a=\"210638547\"",
            "E=Sophos;i=\"5.75,354,1589266800\"; d=\"scan'208\";a=\"299789818\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Shougang Wang <shougangx.wang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "beilei.xing@intel.com, jia.guo@intel.com,\n Shougang Wang <shougangx.wang@intel.com>, stable@dpdk.org",
        "Date": "Wed, 15 Jul 2020 06:35:15 +0000",
        "Message-Id": "<20200715063515.9262-1-shougangx.wang@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH] net/i40e: fix incorrect hash look up table",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The hash look up table(LUT) will not be initializing when starting\ntestpmd with --disable-rss. So that some queues in LUT will be invalid\nif rx queues is less than last time. When enable RSS by creating RSS rule,\nsome packets will not be into the valid queues.\nThis patch fixes this issue by initializing the LUT when creating an RSS\nrule.\n\nFixes: feaae285b342 (\"net/i40e: support hash configuration in RSS flow\")\nCc: stable@dpdk.org\n\nSigned-off-by: Shougang Wang <shougangx.wang@intel.com>\n---\n drivers/net/i40e/i40e_ethdev.c | 52 ++++++++++++++++++++++++++++++++++\n 1 file changed, 52 insertions(+)",
    "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 393b5320f..2a92bd8ef 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -13070,6 +13070,49 @@ i40e_rss_conf_init(struct i40e_rte_flow_rss_conf *out,\n \treturn 0;\n }\n \n+static int\n+i40e_rss_init_lut(struct i40e_pf *pf)\n+{\n+\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n+\tuint32_t lut = 0;\n+\tuint16_t j, num;\n+\tuint32_t i;\n+\n+\t/*\n+\t * If both VMDQ and RSS enabled, not all of PF queues are configured.\n+\t * It's necessary to calculate the actual PF queues that are configured.\n+\t */\n+\tif (pf->dev_data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG)\n+\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n+\telse\n+\t\tnum = pf->dev_data->nb_rx_queues;\n+\n+\tnum = RTE_MIN(num, I40E_MAX_Q_PER_TC);\n+\tPMD_INIT_LOG(INFO, \"Max of contiguous %u PF queues are configured\",\n+\t\t     num);\n+\n+\tif (num == 0) {\n+\t\tPMD_INIT_LOG(ERR,\n+\t\t\t\"No PF queues are configured to enable RSS for port %u\",\n+\t\t\tpf->dev_data->port_id);\n+\t\treturn -ENOTSUP;\n+\t}\n+\n+\tif (pf->adapter->rss_reta_updated == 0) {\n+\t\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n+\t\t\tif (j == num)\n+\t\t\t\tj = 0;\n+\t\t\tlut = (lut << 8) | (j & ((0x1 <<\n+\t\t\t\thw->func_caps.rss_table_entry_width) - 1));\n+\t\t\tif ((i & 3) == 3)\n+\t\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2),\n+\t\t\t\t\t       rte_bswap32(lut));\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n /* Write HENA register to enable hash */\n static int\n i40e_rss_hash_set(struct i40e_pf *pf, struct i40e_rte_flow_rss_conf *rss_conf)\n@@ -13318,12 +13361,21 @@ static int\n i40e_rss_enable_hash(struct i40e_pf *pf,\n \t\tstruct i40e_rte_flow_rss_conf *conf)\n {\n+\tenum rte_eth_rx_mq_mode mq_mode = pf->dev_data->dev_conf.rxmode.mq_mode;\n \tstruct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;\n \tstruct i40e_rte_flow_rss_conf rss_conf;\n \n \tif (!(conf->conf.types & pf->adapter->flow_types_mask))\n \t\treturn -ENOTSUP;\n \n+\t/*\n+\t * If the RSS is disabled before this, the LUT is uninitialized. \n+\t * So it is necessary to initialize it here.\n+\t */\n+\tif (!(mq_mode & ETH_MQ_RX_RSS_FLAG) && !pf->rss_info.conf.queue_num)\n+\t\tif (i40e_rss_init_lut(pf))\n+\t\t\treturn -ENOTSUP;\n+\n \tmemset(&rss_conf, 0, sizeof(rss_conf));\n \trte_memcpy(&rss_conf, conf, sizeof(rss_conf));\n \n",
    "prefixes": []
}