get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 124650,
    "url": "https://patches.dpdk.org/api/patches/124650/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230302103527.931071-13-mingxia.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": "<20230302103527.931071-13-mingxia.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230302103527.931071-13-mingxia.liu@intel.com",
    "date": "2023-03-02T10:35:18",
    "name": "[v8,12/21] net/cpfl: support RSS",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "40296a6b07fdc51df11a6a0b25680d9e07999671",
    "submitter": {
        "id": 2514,
        "url": "https://patches.dpdk.org/api/people/2514/?format=api",
        "name": "Liu, Mingxia",
        "email": "mingxia.liu@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230302103527.931071-13-mingxia.liu@intel.com/mbox/",
    "series": [
        {
            "id": 27215,
            "url": "https://patches.dpdk.org/api/series/27215/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=27215",
            "date": "2023-03-02T10:35:06",
            "name": "add support for cpfl PMD in DPDK",
            "version": 8,
            "mbox": "https://patches.dpdk.org/series/27215/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/124650/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/124650/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 189EE41DB0;\n\tThu,  2 Mar 2023 03:22:10 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9E4DC42D62;\n\tThu,  2 Mar 2023 03:20:56 +0100 (CET)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by mails.dpdk.org (Postfix) with ESMTP id B718342D47\n for <dev@dpdk.org>; Thu,  2 Mar 2023 03:20:54 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 Mar 2023 18:20:54 -0800",
            "from dpdk-mingxial-ice.sh.intel.com ([10.67.110.191])\n by fmsmga002.fm.intel.com with ESMTP; 01 Mar 2023 18:20:53 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1677723654; x=1709259654;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=fqeDbAu/UgO1FKxhSi5br7A9U24yHabxQlOcFMSCi7M=;\n b=XEko/g8GMjN+Z7tKHBTSiLdTWqnoP/lv4IkGPfespnlBHII1xDyQUVso\n HO5xbJyVHbHOeDUp3QG9nuERlTxnIWMcntH0dAVBba4KWl/TNPT72RFfD\n Ey6Rz5VOhXzF0KbE53/Qpe68f/7KTpPmGEkPN1OIldahqtDNLOJzImEI9\n imm64XS2eXPEHPsduGrDexQGrdHI7fG57odKjyhZKx7IMrai4nj9R+x6/\n cUwzD20ntWN71i96pTHDOsQi/0m6AXZBMTiBDfO3vpu7Dxn4h7mgPj7fK\n pXuueNSa8nfs5PvqdX7IIh1jOCb3DVBsiTt/sBSIVZw0Z2vzDRDqhCtnf g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10636\"; a=\"315013571\"",
            "E=Sophos;i=\"5.98,226,1673942400\"; d=\"scan'208\";a=\"315013571\"",
            "E=McAfee;i=\"6500,9779,10636\"; a=\"784607544\"",
            "E=Sophos;i=\"5.98,226,1673942400\"; d=\"scan'208\";a=\"784607544\""
        ],
        "X-ExtLoop1": "1",
        "From": "Mingxia Liu <mingxia.liu@intel.com>",
        "To": "dev@dpdk.org,\n\tbeilei.xing@intel.com,\n\tyuying.zhang@intel.com",
        "Cc": "Mingxia Liu <mingxia.liu@intel.com>",
        "Subject": "[PATCH v8 12/21] net/cpfl: support RSS",
        "Date": "Thu,  2 Mar 2023 10:35:18 +0000",
        "Message-Id": "<20230302103527.931071-13-mingxia.liu@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20230302103527.931071-1-mingxia.liu@intel.com>",
        "References": "<20230216003010.3439881-1-mingxia.liu@intel.com>\n <20230302103527.931071-1-mingxia.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": "Add RSS support.\n\nSigned-off-by: Mingxia Liu <mingxia.liu@intel.com>\n---\n drivers/net/cpfl/cpfl_ethdev.c | 60 ++++++++++++++++++++++++++++++++++\n drivers/net/cpfl/cpfl_ethdev.h | 15 +++++++++\n 2 files changed, 75 insertions(+)",
    "diff": "diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c\nindex b09c7d4996..7fa52a5a19 100644\n--- a/drivers/net/cpfl/cpfl_ethdev.c\n+++ b/drivers/net/cpfl/cpfl_ethdev.c\n@@ -94,6 +94,8 @@ cpfl_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \tdev_info->max_mtu = vport->max_mtu;\n \tdev_info->min_mtu = RTE_ETHER_MIN_MTU;\n \n+\tdev_info->flow_type_rss_offloads = CPFL_RSS_OFFLOAD_ALL;\n+\n \tdev_info->tx_offload_capa = RTE_ETH_TX_OFFLOAD_MULTI_SEGS;\n \n \tdev_info->default_txconf = (struct rte_eth_txconf) {\n@@ -159,11 +161,49 @@ cpfl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)\n \treturn ptypes;\n }\n \n+static int\n+cpfl_init_rss(struct idpf_vport *vport)\n+{\n+\tstruct rte_eth_rss_conf *rss_conf;\n+\tstruct rte_eth_dev_data *dev_data;\n+\tuint16_t i, nb_q;\n+\tint ret = 0;\n+\n+\tdev_data = vport->dev_data;\n+\trss_conf = &dev_data->dev_conf.rx_adv_conf.rss_conf;\n+\tnb_q = dev_data->nb_rx_queues;\n+\n+\tif (rss_conf->rss_key == NULL) {\n+\t\tfor (i = 0; i < vport->rss_key_size; i++)\n+\t\t\tvport->rss_key[i] = (uint8_t)rte_rand();\n+\t} else if (rss_conf->rss_key_len != vport->rss_key_size) {\n+\t\tPMD_INIT_LOG(ERR, \"Invalid RSS key length in RSS configuration, should be %d\",\n+\t\t\t     vport->rss_key_size);\n+\t\treturn -EINVAL;\n+\t} else {\n+\t\trte_memcpy(vport->rss_key, rss_conf->rss_key,\n+\t\t\t   vport->rss_key_size);\n+\t}\n+\n+\tfor (i = 0; i < vport->rss_lut_size; i++)\n+\t\tvport->rss_lut[i] = i % nb_q;\n+\n+\tvport->rss_hf = IDPF_DEFAULT_RSS_HASH_EXPANDED;\n+\n+\tret = idpf_vport_rss_config(vport);\n+\tif (ret != 0)\n+\t\tPMD_INIT_LOG(ERR, \"Failed to configure RSS\");\n+\n+\treturn ret;\n+}\n+\n static int\n cpfl_dev_configure(struct rte_eth_dev *dev)\n {\n \tstruct idpf_vport *vport = dev->data->dev_private;\n \tstruct rte_eth_conf *conf = &dev->data->dev_conf;\n+\tstruct idpf_adapter *base = vport->adapter;\n+\tint ret;\n \n \tif (conf->link_speeds & RTE_ETH_LINK_SPEED_FIXED) {\n \t\tPMD_INIT_LOG(ERR, \"Setting link speed is not supported\");\n@@ -202,6 +242,26 @@ cpfl_dev_configure(struct rte_eth_dev *dev)\n \t\treturn -ENOTSUP;\n \t}\n \n+\tif (conf->rxmode.mq_mode != RTE_ETH_MQ_RX_RSS &&\n+\t    conf->rxmode.mq_mode != RTE_ETH_MQ_RX_NONE) {\n+\t\tPMD_INIT_LOG(ERR, \"RX mode %d is not supported.\",\n+\t\t\t     conf->rxmode.mq_mode);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (base->caps.rss_caps != 0 && dev->data->nb_rx_queues != 0 &&\n+\t\tconf->rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) {\n+\t\tret = cpfl_init_rss(vport);\n+\t\tif (ret != 0) {\n+\t\t\tPMD_INIT_LOG(ERR, \"Failed to init rss\");\n+\t\t\treturn ret;\n+\t\t}\n+\t} else {\n+\t\tPMD_INIT_LOG(ERR, \"RSS is not supported.\");\n+\t\tif (conf->rxmode.mq_mode == RTE_ETH_MQ_RX_RSS)\n+\t\t\treturn -ENOTSUP;\n+\t}\n+\n \tvport->max_pkt_len =\n \t\t(dev->data->mtu == 0) ? CPFL_DEFAULT_MTU : dev->data->mtu +\n \t\tCPFL_ETH_OVERHEAD;\ndiff --git a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h\nindex 4d1441ae64..200dfcac02 100644\n--- a/drivers/net/cpfl/cpfl_ethdev.h\n+++ b/drivers/net/cpfl/cpfl_ethdev.h\n@@ -35,6 +35,21 @@\n #define CPFL_ETH_OVERHEAD \\\n \t(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + CPFL_VLAN_TAG_SIZE * 2)\n \n+#define CPFL_RSS_OFFLOAD_ALL (\t\t\t\t\\\n+\t\tRTE_ETH_RSS_IPV4                |\t\\\n+\t\tRTE_ETH_RSS_FRAG_IPV4           |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV4_TCP    |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV4_UDP    |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV4_SCTP   |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV4_OTHER  |\t\\\n+\t\tRTE_ETH_RSS_IPV6                |\t\\\n+\t\tRTE_ETH_RSS_FRAG_IPV6           |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV6_TCP    |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV6_UDP    |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV6_SCTP   |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV6_OTHER  |\t\\\n+\t\tRTE_ETH_RSS_L2_PAYLOAD)\n+\n #define CPFL_ADAPTER_NAME_LEN\t(PCI_PRI_STR_SIZE + 1)\n \n #define CPFL_ALARM_INTERVAL\t50000 /* us */\n",
    "prefixes": [
        "v8",
        "12/21"
    ]
}