get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87573,
    "url": "https://patches.dpdk.org/api/patches/87573/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210131104724.73202-1-xuan.ding@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": "<20210131104724.73202-1-xuan.ding@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210131104724.73202-1-xuan.ding@intel.com",
    "date": "2021-01-31T10:47:24",
    "name": "net/iavf: fix default RSS configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "300749ed5e8f1a382c787a611e2d4c72ab82f97d",
    "submitter": {
        "id": 1401,
        "url": "https://patches.dpdk.org/api/people/1401/?format=api",
        "name": "Ding, Xuan",
        "email": "xuan.ding@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210131104724.73202-1-xuan.ding@intel.com/mbox/",
    "series": [
        {
            "id": 15043,
            "url": "https://patches.dpdk.org/api/series/15043/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=15043",
            "date": "2021-01-31T10:47:24",
            "name": "net/iavf: fix default RSS configuration",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/15043/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/87573/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/87573/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id EFF72A0A0D;\n\tSun, 31 Jan 2021 12:01:02 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C65DC40693;\n\tSun, 31 Jan 2021 12:01:02 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id CF99540692\n for <dev@dpdk.org>; Sun, 31 Jan 2021 12:01:00 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 31 Jan 2021 03:00:59 -0800",
            "from dpdk-xuanding-dev2.sh.intel.com ([10.67.119.124])\n by orsmga001.jf.intel.com with ESMTP; 31 Jan 2021 03:00:58 -0800"
        ],
        "IronPort-SDR": [
            "\n 46owqKiX+KzOhfMVdAge546JNqfnO3Fm8LjalkUO1jwMN39FcM6bySN2OkkJNm/PIcJSK0y8Je\n aHa7puFgtk/A==",
            "\n A3M2zmWJ7jQkZudK6IPlSbh8lrSh2Sj9mGlHhw2m5YsSVIIXWH4xmMESPqPFvut0Rj1jHR2lay\n Atr41BO9o5CQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9880\"; a=\"180656716\"",
            "E=Sophos;i=\"5.79,390,1602572400\"; d=\"scan'208\";a=\"180656716\"",
            "E=Sophos;i=\"5.79,390,1602572400\"; d=\"scan'208\";a=\"431746746\""
        ],
        "X-ExtLoop1": "1",
        "From": "Xuan Ding <xuan.ding@intel.com>",
        "To": "qi.z.zhang@intel.com,\n\tjingjing.wu@intel.com,\n\tbeilei.xing@intel.com",
        "Cc": "dev@dpdk.org,\n\tXuan Ding <xuan.ding@intel.com>",
        "Date": "Sun, 31 Jan 2021 10:47:24 +0000",
        "Message-Id": "<20210131104724.73202-1-xuan.ding@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH] net/iavf: fix default RSS configuration",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "Add advanced RSS offloads check due to some legacy driver(kernel/DPDK PF)\ndoes not support virtual channel command VIRTCHNL_OP_RSS_HENA with\nhena = 0 and VIRTCHNL_OP_ADD_RSS_CFG.\n\nFixes: 95f2f0e9fc2a6(\"net/iavf: improve default RSS\")\n\nSigned-off-by: Xuan Ding <xuan.ding@intel.com>\n---\n drivers/net/iavf/iavf_ethdev.c | 67 +++++++++++++++++++++-------------\n 1 file changed, 41 insertions(+), 26 deletions(-)",
    "diff": "diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c\nindex 58a20b443f..d8735401d9 100644\n--- a/drivers/net/iavf/iavf_ethdev.c\n+++ b/drivers/net/iavf/iavf_ethdev.c\n@@ -291,11 +291,13 @@ iavf_init_rss(struct iavf_adapter *adapter)\n \tif (ret)\n \t\treturn ret;\n \n-\t/* Set RSS hash configuration based on rss_conf->rss_hf. */\n-\tret = iavf_rss_hash_set(adapter, rss_conf->rss_hf, true);\n-\tif (ret) {\n-\t\tPMD_DRV_LOG(ERR, \"fail to set default RSS\");\n-\t\treturn ret;\n+\tif (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF) {\n+\t\t/* Set RSS hash configuration based on rss_conf->rss_hf. */\n+\t\tret = iavf_rss_hash_set(adapter, rss_conf->rss_hf, true);\n+\t\tif (ret) {\n+\t\t\tPMD_DRV_LOG(ERR, \"fail to set default RSS\");\n+\t\t\treturn ret;\n+\t\t}\n \t}\n \n \treturn 0;\n@@ -1251,21 +1253,23 @@ iavf_dev_rss_hash_update(struct rte_eth_dev *dev,\n \tif (rss_conf->rss_hf == 0)\n \t\treturn 0;\n \n-\t/* Clear existing RSS. */\n-\tret = iavf_set_hena(adapter, 0);\n+\tif (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF) {\n+\t\t/* Clear existing RSS. */\n+\t\tret = iavf_set_hena(adapter, 0);\n \n-\t/* It is a workaround, temporarily allow error to be returned\n-\t * due to possible lack of PF handling for hena = 0.\n-\t */\n-\tif (ret)\n-\t\tPMD_DRV_LOG(WARNING, \"fail to clean existing RSS,\"\n-\t\t\t    \"lack PF support\");\n+\t\t/* It is a workaround, temporarily allow error to be returned\n+\t\t * due to possible lack of PF handling for hena = 0.\n+\t\t */\n+\t\tif (ret)\n+\t\t\tPMD_DRV_LOG(WARNING, \"fail to clean existing RSS,\"\n+\t\t\t\t    \"lack PF support\");\n \n-\t/* Set new RSS configuration. */\n-\tret = iavf_rss_hash_set(adapter, rss_conf->rss_hf, true);\n-\tif (ret) {\n-\t\tPMD_DRV_LOG(ERR, \"fail to set new RSS\");\n-\t\treturn ret;\n+\t\t/* Set new RSS configuration. */\n+\t\tret = iavf_rss_hash_set(adapter, rss_conf->rss_hf, true);\n+\t\tif (ret) {\n+\t\t\tPMD_DRV_LOG(ERR, \"fail to set new RSS\");\n+\t\t\treturn ret;\n+\t\t}\n \t}\n \n \treturn 0;\n@@ -2092,6 +2096,24 @@ iavf_dev_filter_ctrl(struct rte_eth_dev *dev,\n \treturn ret;\n }\n \n+static void\n+iavf_default_rss_disable(struct iavf_adapter *adapter)\n+{\n+\tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);\n+\tint ret = 0;\n+\n+\tif (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF) {\n+\t\t/* Set hena = 0 to ask PF to cleanup all existing RSS. */\n+\t\tret = iavf_set_hena(adapter, 0);\n+\t\tif (ret)\n+\t\t\t/* It is a workaround, temporarily allow error to be\n+\t\t\t * returned due to possible lack of PF handling for\n+\t\t\t * hena = 0.\n+\t\t\t */\n+\t\t\tPMD_INIT_LOG(WARNING, \"fail to disable default RSS,\"\n+\t\t\t\t    \"lack PF support\");\n+\t}\n+}\n \n static int\n iavf_dev_init(struct rte_eth_dev *eth_dev)\n@@ -2180,14 +2202,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)\n \t\treturn ret;\n \t}\n \n-\t/* Set hena = 0 to ask PF to cleanup all existing RSS. */\n-\tret = iavf_set_hena(adapter, 0);\n-\tif (ret)\n-\t\t/* It is a workaround, temporarily allow error to be returned\n-\t\t * due to possible lack of PF handling for hena = 0.\n-\t\t */\n-\t\tPMD_DRV_LOG(WARNING, \"fail to disable default RSS,\"\n-\t\t\t    \"lack PF support\");\n+\tiavf_default_rss_disable(adapter);\n \n \treturn 0;\n }\n",
    "prefixes": []
}