get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64321,
    "url": "http://patches.dpdk.org/api/patches/64321/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200109031559.63194-7-huwei013@chinasoftinc.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20200109031559.63194-7-huwei013@chinasoftinc.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200109031559.63194-7-huwei013@chinasoftinc.com",
    "date": "2020-01-09T03:15:54",
    "name": "[06/11] net/hns3: fix Rx queue search miss RAS err when recv BC pkt",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d5e01c00d93f3c0811c875815cd2881ff971e9a1",
    "submitter": {
        "id": 1537,
        "url": "http://patches.dpdk.org/api/people/1537/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "huwei013@chinasoftinc.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200109031559.63194-7-huwei013@chinasoftinc.com/mbox/",
    "series": [
        {
            "id": 8023,
            "url": "http://patches.dpdk.org/api/series/8023/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8023",
            "date": "2020-01-09T03:15:48",
            "name": "misc updates and fixes for hns3 PMD driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8023/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64321/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64321/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 3711DA04F3;\n\tThu,  9 Jan 2020 04:24:55 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 28B901DB69;\n\tThu,  9 Jan 2020 04:23:52 +0100 (CET)",
            "from incedge.chinasoftinc.com (unknown [114.113.233.8])\n by dpdk.org (Postfix) with ESMTP id 27B261DB50\n for <dev@dpdk.org>; Thu,  9 Jan 2020 04:23:44 +0100 (CET)",
            "from mail.chinasoftinc.com (inccas002.ito.icss [10.168.0.52]) by\n incedge.chinasoftinc.com with ESMTP id 1nDcuLLhkgxg2sCW (version=TLSv1\n cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO) for <dev@dpdk.org>;\n Thu, 09 Jan 2020 11:22:49 +0800 (CST)",
            "from localhost.localdomain (203.160.91.226) by INCCAS002.ito.icss\n (10.168.0.60) with Microsoft SMTP Server id 14.3.439.0; Thu, 9 Jan 2020\n 11:16:12 +0800"
        ],
        "X-ASG-Debug-ID": "1578539804-0a3dd116cf0490000e-TfluYd",
        "X-Barracuda-Envelope-From": "huwei013@chinasoftinc.com",
        "X-Barracuda-RBL-Trusted-Forwarder": [
            "10.168.0.52",
            "10.168.0.60"
        ],
        "X-ASG-Whitelist": "Client",
        "From": "\"Wei Hu (Xavier)\" <huwei013@chinasoftinc.com>",
        "To": "<dev@dpdk.org>",
        "Date": "Thu, 9 Jan 2020 11:15:54 +0800",
        "X-ASG-Orig-Subj": "[PATCH 06/11] net/hns3: fix Rx queue search miss RAS err when\n recv BC pkt",
        "Message-ID": "<20200109031559.63194-7-huwei013@chinasoftinc.com>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20200109031559.63194-1-huwei013@chinasoftinc.com>",
        "References": "<20200109031559.63194-1-huwei013@chinasoftinc.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[203.160.91.226]",
        "X-Barracuda-Connect": "inccas002.ito.icss[10.168.0.52]",
        "X-Barracuda-Start-Time": "1578540168",
        "X-Barracuda-Encrypted": "ECDHE-RSA-AES256-SHA",
        "X-Barracuda-URL": "https://spam.chinasoftinc.com:443/cgi-mod/mark.cgi",
        "X-Virus-Scanned": "by bsmtpd at chinasoftinc.com",
        "X-Barracuda-Scan-Msg-Size": "4500",
        "Subject": "[dpdk-dev] [PATCH 06/11] net/hns3: fix Rx queue search miss RAS err\n\twhen recv BC pkt",
        "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": "From: \"Wei Hu (Xavier)\" <xavier.huwei@huawei.com>\n\nCurrently, there is a certain probability of a type of RAS errors when\nreceiving broadcast packets. This type of RAS errors are parsed as\nrx_q_search_miss error by hns3 PF PMD driver, the related log as below:\n0000:bd:00.0 hns3_find_highest_level(): PPP_MFP_ABNORMAL_INT_ST2\nrx_q_search_miss found [error status=0x20000000]\n\nWhen receiving broadcast packet, network engine select which functions\nneed to accept it according to the function's promisc_bcast_en bit\nconfiguration. And then search TQP_MAP configuration to select which\nhardware queues the packet should enter, if can't find the target hardware\nqueue, network engine will trigger rx_q_search_miss RAS error.\n\nThe root cause as below:\n1. VF's promisc_bcast_en bit configuration is not cleared by FLR reset,\n   and the configuration has been setted in the previous application.\n2. There is one bug in setting TQP_MAP configuration in the initialization\n   of PF device: when tqp is allocated to VF, it is still marked as PF.\n   This issue will affect the correctness of the TQP_MAP configuration.\n\nThis patch fixes it with the following modification.\n1. clear all VFs promisc_bcast_en bit in the initialization of PF device.\n2. fix the issue to ensure the correct TQP_MAP configuration.\n\nFixes: d51867db65c1 (\"net/hns3: add initialization\")\nCc: stable@dpdk.org\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n drivers/net/hns3/hns3_ethdev.c | 32 +++++++++++++++++++++++++++++++-\n drivers/net/hns3/hns3_ethdev.h |  1 +\n 2 files changed, 32 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex 800fa47cc..ca8718000 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -2408,6 +2408,7 @@ hns3_query_pf_resource(struct hns3_hw *hw)\n \thw->total_tqps_num = rte_le_to_cpu_16(req->tqp_num);\n \tpf->pkt_buf_size = rte_le_to_cpu_16(req->buf_size) << HNS3_BUF_UNIT_S;\n \thw->tqps_num = RTE_MIN(hw->total_tqps_num, HNS3_MAX_TQP_NUM_PER_FUNC);\n+\tpf->func_num = rte_le_to_cpu_16(req->pf_own_fun_number);\n \n \tif (req->tx_buf_size)\n \t\tpf->tx_buf_size =\n@@ -2684,6 +2685,7 @@ hns3_map_tqp(struct hns3_hw *hw)\n \tuint16_t tqps_num = hw->total_tqps_num;\n \tuint16_t func_id;\n \tuint16_t tqp_id;\n+\tbool is_pf;\n \tint num;\n \tint ret;\n \tint i;\n@@ -2695,10 +2697,11 @@ hns3_map_tqp(struct hns3_hw *hw)\n \ttqp_id = 0;\n \tnum = DIV_ROUND_UP(hw->total_tqps_num, HNS3_MAX_TQP_NUM_PER_FUNC);\n \tfor (func_id = 0; func_id < num; func_id++) {\n+\t\tis_pf = func_id == 0 ? true : false;\n \t\tfor (i = 0;\n \t\t     i < HNS3_MAX_TQP_NUM_PER_FUNC && tqp_id < tqps_num; i++) {\n \t\t\tret = hns3_map_tqps_to_func(hw, func_id, tqp_id++, i,\n-\t\t\t\t\t\t    true);\n+\t\t\t\t\t\t    is_pf);\n \t\t\tif (ret)\n \t\t\t\treturn ret;\n \t\t}\n@@ -3599,6 +3602,26 @@ hns3_set_promisc_mode(struct hns3_hw *hw, bool en_uc_pmc, bool en_mc_pmc)\n \treturn 0;\n }\n \n+static int\n+hns3_clear_all_vfs_promisc_mode(struct hns3_hw *hw)\n+{\n+\tstruct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);\n+\tstruct hns3_pf *pf = &hns->pf;\n+\tstruct hns3_promisc_param param;\n+\tuint16_t func_id;\n+\tint ret;\n+\n+\t/* func_id 0 is denoted PF, the VFs start from 1 */\n+\tfor (func_id = 1; func_id < pf->func_num; func_id++) {\n+\t\thns3_promisc_param_init(&param, false, false, false, func_id);\n+\t\tret = hns3_cmd_set_promisc_mode(hw, &param);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static int\n hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)\n {\n@@ -3886,6 +3909,13 @@ hns3_init_hardware(struct hns3_adapter *hns)\n \t\tgoto err_mac_init;\n \t}\n \n+\tret = hns3_clear_all_vfs_promisc_mode(hw);\n+\tif (ret) {\n+\t\tPMD_INIT_LOG(ERR, \"Failed to clear all vfs promisc mode: %d\",\n+\t\t\t     ret);\n+\t\tgoto err_mac_init;\n+\t}\n+\n \tret = hns3_init_vlan_config(hns);\n \tif (ret) {\n \t\tPMD_INIT_LOG(ERR, \"Failed to init vlan: %d\", ret);\ndiff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h\nindex 2aa4c3cd7..d4a03065f 100644\n--- a/drivers/net/hns3/hns3_ethdev.h\n+++ b/drivers/net/hns3/hns3_ethdev.h\n@@ -464,6 +464,7 @@ struct hns3_mp_param {\n struct hns3_pf {\n \tstruct hns3_adapter *adapter;\n \tbool is_main_pf;\n+\tuint16_t func_num; /* num functions of this pf, include pf and vfs */\n \n \tuint32_t pkt_buf_size; /* Total pf buf size for tx/rx */\n \tuint32_t tx_buf_size; /* Tx buffer size for each TC */\n",
    "prefixes": [
        "06/11"
    ]
}