get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 70406,
    "url": "https://patches.dpdk.org/api/patches/70406/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200519142350.70181-1-jia.guo@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": "<20200519142350.70181-1-jia.guo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200519142350.70181-1-jia.guo@intel.com",
    "date": "2020-05-19T14:23:50",
    "name": "[v2] net/iavf: fix VF reset issue for hash",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e312937908348e9d43f7febe69bae1cd7acce885",
    "submitter": {
        "id": 507,
        "url": "https://patches.dpdk.org/api/people/507/?format=api",
        "name": "Guo, Jia",
        "email": "jia.guo@intel.com"
    },
    "delegate": {
        "id": 31221,
        "url": "https://patches.dpdk.org/api/users/31221/?format=api",
        "username": "yexl",
        "first_name": "xiaolong",
        "last_name": "ye",
        "email": "xiaolong.ye@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200519142350.70181-1-jia.guo@intel.com/mbox/",
    "series": [
        {
            "id": 10140,
            "url": "https://patches.dpdk.org/api/series/10140/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10140",
            "date": "2020-05-19T14:23:50",
            "name": "[v2] net/iavf: fix VF reset issue for hash",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/10140/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/70406/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/70406/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 56068A0093;\n\tTue, 19 May 2020 04:24:26 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D12D31D53C;\n\tTue, 19 May 2020 04:24:25 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by dpdk.org (Postfix) with ESMTP id DDEA01D52C\n for <dev@dpdk.org>; Tue, 19 May 2020 04:24:23 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 May 2020 19:24:22 -0700",
            "from npg-dpdk-cvl-jeffguo-01.sh.intel.com ([10.67.111.128])\n by orsmga004.jf.intel.com with ESMTP; 18 May 2020 19:24:20 -0700"
        ],
        "IronPort-SDR": [
            "\n VKMOCjaRilZN/ng+5OmaAstyoNCTevt3A90/31CLexMTB1WaODK5IVfPlwCHWTvpnapQbt3ljZ\n W+hNvvIR+Izw==",
            "\n F+vN8uzCxd9FMgwgUzHYGAkN8G+wgH60dxzr0KNIdRmxoTR3uF7bZul7bnMCB0Zb0WyknTXb5l\n uqmKLAqNHOzQ=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,408,1583222400\"; d=\"scan'208\";a=\"411475718\"",
        "From": "Jeff Guo <jia.guo@intel.com>",
        "To": "beilei.xing@intel.com, xiaolong.ye@intel.com, qi.z.zhang@intel.com,\n jingjing.wu@intel.com",
        "Cc": "dev@dpdk.org,\n\tjia.guo@intel.com,\n\tZhiwei He <zhiwei.he@intel.com>",
        "Date": "Tue, 19 May 2020 10:23:50 -0400",
        "Message-Id": "<20200519142350.70181-1-jia.guo@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200519002017.106445-1-jia.guo@intel.com>",
        "References": "<20200519002017.106445-1-jia.guo@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [dpdk-dev v2] net/iavf: fix VF reset issue for hash",
        "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": "Since there are some default rss configure in kernel PF/VF but not DPDK\nIAVF, if these configurations be modified by VF and then VF reset, this\ndefault rss configurations can not be reset to default by IAVF. So need\nto add default rss set in IAVF hash initial process.\n\nSigned-off-by: Jeff Guo <jia.guo@intel.com>\nFixes: 7be10c3004be (\"net/iavf: add RSS configuration for VF\")\nAcked-by: Qi Zhang <qi.z.zhang@intel.com>\nTested-by: Zhiwei He <zhiwei.he@intel.com>\n---\nv2->v1:\nadd hash engine unregister process\n---\n drivers/net/iavf/iavf_hash.c | 53 +++++++++++++++++++++++++++++++++++-\n 1 file changed, 52 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c\nindex 975c84556..56ab170d8 100644\n--- a/drivers/net/iavf/iavf_hash.c\n+++ b/drivers/net/iavf/iavf_hash.c\n@@ -857,6 +857,17 @@ struct iavf_hash_match_type iavf_hash_type_list[] = {\n \t\t\t\t\t&hdrs_hint_ipv6_sctp},\n };\n \n+struct virtchnl_proto_hdrs *iavf_hash_default_hdrs[] = {\n+\t&hdrs_hint_ipv4,\n+\t&hdrs_hint_ipv4_udp,\n+\t&hdrs_hint_ipv4_tcp,\n+\t&hdrs_hint_ipv4_sctp,\n+\t&hdrs_hint_ipv6,\n+\t&hdrs_hint_ipv6_udp,\n+\t&hdrs_hint_ipv6_tcp,\n+\t&hdrs_hint_ipv6_sctp,\n+};\n+\n static struct iavf_flow_engine iavf_hash_engine = {\n \t.init = iavf_hash_init,\n \t.create = iavf_hash_create,\n@@ -875,6 +886,33 @@ static struct iavf_flow_parser iavf_hash_parser = {\n \t.stage = IAVF_FLOW_STAGE_RSS,\n };\n \n+static int\n+iavf_hash_default_set(struct iavf_adapter *ad)\n+{\n+\tstruct virtchnl_rss_cfg *rss_cfg;\n+\tuint16_t i;\n+\tint ret;\n+\n+\trss_cfg = rte_zmalloc(\"iavf rss rule\",\n+\t\t\t      sizeof(struct virtchnl_rss_cfg), 0);\n+\tif (!rss_cfg)\n+\t\treturn -ENOMEM;\n+\n+\tfor (i = 0; i < RTE_DIM(iavf_hash_default_hdrs); i++) {\n+\t\trss_cfg->proto_hdrs = *iavf_hash_default_hdrs[i];\n+\t\trss_cfg->rss_algorithm = VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC;\n+\n+\t\tret = iavf_add_del_rss_cfg(ad, rss_cfg, true);\n+\t\tif (ret) {\n+\t\t\tPMD_DRV_LOG(ERR, \"fail to add RSS configure\");\n+\t\t\trte_free(rss_cfg);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\treturn ret;\n+}\n+\n RTE_INIT(iavf_hash_engine_init)\n {\n \tstruct iavf_flow_engine *engine = &iavf_hash_engine;\n@@ -887,6 +925,7 @@ iavf_hash_init(struct iavf_adapter *ad)\n {\n \tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);\n \tstruct iavf_flow_parser *parser;\n+\tint ret;\n \n \tif (!vf->vf_res)\n \t\treturn -EINVAL;\n@@ -896,7 +935,19 @@ iavf_hash_init(struct iavf_adapter *ad)\n \n \tparser = &iavf_hash_parser;\n \n-\treturn iavf_register_parser(parser, ad);\n+\tret = iavf_register_parser(parser, ad);\n+\tif (ret) {\n+\t\tPMD_DRV_LOG(ERR, \"fail to register hash parser\");\n+\t\treturn ret;\n+\t}\n+\n+\tret = iavf_hash_default_set(ad);\n+\tif (ret) {\n+\t\tPMD_DRV_LOG(ERR, \"fail to set default RSS\");\n+\t\tiavf_unregister_parser(parser, ad);\n+\t}\n+\n+\treturn ret;\n }\n \n static int\n",
    "prefixes": [
        "v2"
    ]
}