get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 110460,
    "url": "https://patches.dpdk.org/api/patches/110460/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220429091958.3103384-2-kevinx.liu@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": "<20220429091958.3103384-2-kevinx.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220429091958.3103384-2-kevinx.liu@intel.com",
    "date": "2022-04-29T09:19:47",
    "name": "[v7,01/12] net/ice: support for RSS RETA configure in DCF mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "38ee361fd6bc4fff9e761ae56ffa6d55877ebef5",
    "submitter": {
        "id": 2440,
        "url": "https://patches.dpdk.org/api/people/2440/?format=api",
        "name": "Kevin Liu",
        "email": "kevinx.liu@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/20220429091958.3103384-2-kevinx.liu@intel.com/mbox/",
    "series": [
        {
            "id": 22721,
            "url": "https://patches.dpdk.org/api/series/22721/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22721",
            "date": "2022-04-29T09:19:46",
            "name": "complete common VF features for DCF",
            "version": 7,
            "mbox": "https://patches.dpdk.org/series/22721/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/110460/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/110460/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 164F5A0093;\n\tFri, 29 Apr 2022 03:22:29 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 07AEE4281C;\n\tFri, 29 Apr 2022 03:22:29 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id C2E36410E3\n for <dev@dpdk.org>; Fri, 29 Apr 2022 03:22:21 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Apr 2022 18:22:21 -0700",
            "from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195])\n by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Apr 2022 18:22:19 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1651195342; x=1682731342;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=RAa+apHcTp9O+RYMbi4sG4AScyabm2VxBAfd6Ubq3vg=;\n b=dZaipDmmUytGJkY2h0f+KdX/AgelOFWgOzkMa5b5eZZh8kzVRyUq6Zum\n 7mlVwJXwtTA/CP3qZEDy8GlLcSTAKdkoIh2Fkh11Uk/MFF7tBz5U1+V/S\n 7HggD5khjKqOqmYTf/QEMcnFBLaYg7hKRHTTzsGA8N5HQuw4+cpuz3rlP\n ldDPPS9NeWonIL49xhO7Dar7qOwY4NfbKGzf4dE+Np0qOYTuUTyZ+bbxn\n CsgVXkQOMN4okT8yzJxlyepkfGBzmHHx4FGh/R4vzVXSEtswPz7e8bWSc\n +lSf0m9hBZ7Uh1FMIBv97dOTrs8W51wPD6Or0yzlXeFLqC98v9JbfCKpP A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10331\"; a=\"266013642\"",
            "E=Sophos;i=\"5.91,296,1647327600\"; d=\"scan'208\";a=\"266013642\"",
            "E=Sophos;i=\"5.91,296,1647327600\"; d=\"scan'208\";a=\"581767752\""
        ],
        "From": "Kevin Liu <kevinx.liu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com,\n Kevin Liu <kevinx.liu@intel.com>",
        "Subject": "[PATCH v7 01/12] net/ice: support for RSS RETA configure in DCF mode",
        "Date": "Fri, 29 Apr 2022 09:19:47 +0000",
        "Message-Id": "<20220429091958.3103384-2-kevinx.liu@intel.com>",
        "X-Mailer": "git-send-email 2.33.1",
        "In-Reply-To": "<20220429091958.3103384-1-kevinx.liu@intel.com>",
        "References": "<20220427181301.1414196-1-kevinx.liu@intel.com>\n <20220429091958.3103384-1-kevinx.liu@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "From: Steve Yang <stevex.yang@intel.com>\n\nRSS RETA should be updated and queried by application,\nAdd related ops ('.reta_update', '.reta_query') for DCF.\n\nSigned-off-by: Steve Yang <stevex.yang@intel.com>\nSigned-off-by: Kevin Liu <kevinx.liu@intel.com>\n---\n doc/guides/nics/features/ice_dcf.ini   |  1 +\n doc/guides/rel_notes/release_22_07.rst |  3 +\n drivers/net/ice/ice_dcf.c              |  2 +-\n drivers/net/ice/ice_dcf.h              |  1 +\n drivers/net/ice/ice_dcf_ethdev.c       | 77 ++++++++++++++++++++++++++\n 5 files changed, 83 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/doc/guides/nics/features/ice_dcf.ini b/doc/guides/nics/features/ice_dcf.ini\nindex 54073f0b88..5221c99a9c 100644\n--- a/doc/guides/nics/features/ice_dcf.ini\n+++ b/doc/guides/nics/features/ice_dcf.ini\n@@ -15,6 +15,7 @@ L3 checksum offload  = P\n L4 checksum offload  = P\n Inner L3 checksum    = P\n Inner L4 checksum    = P\n+RSS reta update      = Y\n Basic stats          = Y\n Linux                = Y\n x86-32               = Y\ndiff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst\nindex 90123bb807..1f07d3e1b3 100644\n--- a/doc/guides/rel_notes/release_22_07.rst\n+++ b/doc/guides/rel_notes/release_22_07.rst\n@@ -60,6 +60,9 @@ New Features\n   * Added Tx QoS queue rate limitation support.\n   * Added quanta size configuration support.\n \n+* **Updated Intel ice driver.**\n+\n+ * Added support for RSS RETA configure in DCF mode.\n \n Removed Items\n -------------\ndiff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c\nindex 7f0c074b01..070d1b71ac 100644\n--- a/drivers/net/ice/ice_dcf.c\n+++ b/drivers/net/ice/ice_dcf.c\n@@ -790,7 +790,7 @@ ice_dcf_configure_rss_key(struct ice_dcf_hw *hw)\n \treturn err;\n }\n \n-static int\n+int\n ice_dcf_configure_rss_lut(struct ice_dcf_hw *hw)\n {\n \tstruct virtchnl_rss_lut *rss_lut;\ndiff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h\nindex 6ec766ebda..b2c6aa2684 100644\n--- a/drivers/net/ice/ice_dcf.h\n+++ b/drivers/net/ice/ice_dcf.h\n@@ -122,6 +122,7 @@ int ice_dcf_send_aq_cmd(void *dcf_hw, struct ice_aq_desc *desc,\n int ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw);\n int ice_dcf_init_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw);\n void ice_dcf_uninit_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw);\n+int ice_dcf_configure_rss_lut(struct ice_dcf_hw *hw);\n int ice_dcf_init_rss(struct ice_dcf_hw *hw);\n int ice_dcf_configure_queues(struct ice_dcf_hw *hw);\n int ice_dcf_config_irq_map(struct ice_dcf_hw *hw);\ndiff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c\nindex 59610e058f..1ac66ed990 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.c\n+++ b/drivers/net/ice/ice_dcf_ethdev.c\n@@ -761,6 +761,81 @@ ice_dcf_dev_flow_ops_get(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+static int\n+ice_dcf_dev_rss_reta_update(struct rte_eth_dev *dev,\n+\t\t\tstruct rte_eth_rss_reta_entry64 *reta_conf,\n+\t\t\tuint16_t reta_size)\n+{\n+\tstruct ice_dcf_adapter *adapter = dev->data->dev_private;\n+\tstruct ice_dcf_hw *hw = &adapter->real_hw;\n+\tuint8_t *lut;\n+\tuint16_t i, idx, shift;\n+\tint ret;\n+\n+\tif (!(hw->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF))\n+\t\treturn -ENOTSUP;\n+\n+\tif (reta_size != hw->vf_res->rss_lut_size) {\n+\t\tPMD_DRV_LOG(ERR, \"The size of hash lookup table configured \"\n+\t\t\t\"(%d) doesn't match the number of hardware can \"\n+\t\t\t\"support (%d)\", reta_size, hw->vf_res->rss_lut_size);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tlut = rte_zmalloc(\"rss_lut\", reta_size, 0);\n+\tif (!lut) {\n+\t\tPMD_DRV_LOG(ERR, \"No memory can be allocated\");\n+\t\treturn -ENOMEM;\n+\t}\n+\t/* store the old lut table temporarily */\n+\trte_memcpy(lut, hw->rss_lut, reta_size);\n+\n+\tfor (i = 0; i < reta_size; i++) {\n+\t\tidx = i / RTE_ETH_RETA_GROUP_SIZE;\n+\t\tshift = i % RTE_ETH_RETA_GROUP_SIZE;\n+\t\tif (reta_conf[idx].mask & (1ULL << shift))\n+\t\t\tlut[i] = reta_conf[idx].reta[shift];\n+\t}\n+\n+\trte_memcpy(hw->rss_lut, lut, reta_size);\n+\t/* send virtchnnl ops to configure rss*/\n+\tret = ice_dcf_configure_rss_lut(hw);\n+\tif (ret) /* revert back */\n+\t\trte_memcpy(hw->rss_lut, lut, reta_size);\n+\trte_free(lut);\n+\n+\treturn ret;\n+}\n+\n+static int\n+ice_dcf_dev_rss_reta_query(struct rte_eth_dev *dev,\n+\t\t       struct rte_eth_rss_reta_entry64 *reta_conf,\n+\t\t       uint16_t reta_size)\n+{\n+\tstruct ice_dcf_adapter *adapter = dev->data->dev_private;\n+\tstruct ice_dcf_hw *hw = &adapter->real_hw;\n+\tuint16_t i, idx, shift;\n+\n+\tif (!(hw->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF))\n+\t\treturn -ENOTSUP;\n+\n+\tif (reta_size != hw->vf_res->rss_lut_size) {\n+\t\tPMD_DRV_LOG(ERR, \"The size of hash lookup table configured \"\n+\t\t\t\"(%d) doesn't match the number of hardware can \"\n+\t\t\t\"support (%d)\", reta_size, hw->vf_res->rss_lut_size);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tfor (i = 0; i < reta_size; i++) {\n+\t\tidx = i / RTE_ETH_RETA_GROUP_SIZE;\n+\t\tshift = i % RTE_ETH_RETA_GROUP_SIZE;\n+\t\tif (reta_conf[idx].mask & (1ULL << shift))\n+\t\t\treta_conf[idx].reta[shift] = hw->rss_lut[i];\n+\t}\n+\n+\treturn 0;\n+}\n+\n #define ICE_DCF_32_BIT_WIDTH (CHAR_BIT * 4)\n #define ICE_DCF_48_BIT_WIDTH (CHAR_BIT * 6)\n #define ICE_DCF_48_BIT_MASK  RTE_LEN2MASK(ICE_DCF_48_BIT_WIDTH, uint64_t)\n@@ -1107,6 +1182,8 @@ static const struct eth_dev_ops ice_dcf_eth_dev_ops = {\n \t.udp_tunnel_port_add\t = ice_dcf_dev_udp_tunnel_port_add,\n \t.udp_tunnel_port_del\t = ice_dcf_dev_udp_tunnel_port_del,\n \t.tm_ops_get              = ice_dcf_tm_ops_get,\n+\t.reta_update             = ice_dcf_dev_rss_reta_update,\n+\t.reta_query              = ice_dcf_dev_rss_reta_query,\n };\n \n static int\n",
    "prefixes": [
        "v7",
        "01/12"
    ]
}