Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/136245/?format=api
http://patches.dpdk.org/api/patches/136245/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240131221308.2208815-6-joshwash@google.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": "<20240131221308.2208815-6-joshwash@google.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20240131221308.2208815-6-joshwash@google.com", "date": "2024-01-31T22:13:08", "name": "[v5,5/5] net/gve: add RSS redirection table update support", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "3d40207cccde0d4d02245834dc16f6be3cbb9803", "submitter": { "id": 2921, "url": "http://patches.dpdk.org/api/people/2921/?format=api", "name": "Joshua Washington", "email": "joshwash@google.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/20240131221308.2208815-6-joshwash@google.com/mbox/", "series": [ { "id": 30957, "url": "http://patches.dpdk.org/api/series/30957/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30957", "date": "2024-01-31T22:13:03", "name": "net/gve: RSS Support for GVE Driver", "version": 5, "mbox": "http://patches.dpdk.org/series/30957/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/136245/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/136245/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 23AAB43A26;\n\tWed, 31 Jan 2024 23:14:38 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E48EE42DDC;\n\tWed, 31 Jan 2024 23:14:13 +0100 (CET)", "from mail-yw1-f201.google.com (mail-yw1-f201.google.com\n [209.85.128.201])\n by mails.dpdk.org (Postfix) with ESMTP id 68C8942DCB\n for <dev@dpdk.org>; Wed, 31 Jan 2024 23:14:10 +0100 (CET)", "by mail-yw1-f201.google.com with SMTP id\n 00721157ae682-6041c45ce1cso527867b3.1\n for <dev@dpdk.org>; Wed, 31 Jan 2024 14:14:10 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=google.com; s=20230601; t=1706739250; x=1707344050; darn=dpdk.org;\n h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n :date:from:to:cc:subject:date:message-id:reply-to;\n bh=pWegFo2mXANUvf5i4pDtGVcxN5FDU1BHvUx/e0NQpYk=;\n b=IAsgKlBi+YODD+2QffuMa7nR0ctjrTil7MksUc/2DoWmMDcN1lT8RA301w1XO0qp1n\n h9ybUuIdPlxkighdu3jbqg0ygV/AD/H301DO/PLiEkEhqINUqRG43eJoT2LpznzyGMS6\n A6H3Gnbn48iFU/FAQ3izojIryGCKw0LwYfoq4muWeemBNQlNezuc9PZK/DwgmP/qBa1y\n liyaFb5zCLvKbjexsZ5g/ejfhEDnmd5fEka0+IJYz89oHNgHuR7CCbmBxrYlZRLWvklb\n hOOkc1DMVBJjcxTompKPzDv4uTj9qxKDPurHRIsh6tr/HkuOnUjm2Gop0xjZ4Yw5xHuf\n vVWA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1706739250; x=1707344050;\n h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n bh=pWegFo2mXANUvf5i4pDtGVcxN5FDU1BHvUx/e0NQpYk=;\n b=pSL5jXglKwkxsyRMGe+eFc8sCX2kIGlMw7YJrLldJIvXo1hL59VyCdoUsw98givNAy\n mCyD7eec1gPlzKciC64MuH6uiHwZX5d0LLkybF3/iMJAy9/wtMwbIkUQeaELuG/A3bj+\n fPAzeKUJoJFQktfEPa7P7HiOxu4jv0mdO45Csaxt8aRpAxMIDknIv9D/3bWlOnsKEOLB\n yPyxJxmtPko0FQcE8OL45VMXbjYCUqBLOsNCOOZfdsndjmgjxPO+kurVZ4JnnSBHwn5c\n RKvofRACDXN7edFn1PVobWh5Z+G0TA4m7JjhoxMP/SIlxIX5NB6gg52PPuKcsi4xvRqU\n VMpg==", "X-Gm-Message-State": "AOJu0YzZ0VNnzdpe6w0rB9J1/ii/Rd4x0D0ZXs262AtsmNfgWtAHKjSu\n UtSbpdv5mdqXswEHa0OhugsYZjIzCggZpM5QBeYwdkBPnoT77CNsvwjSvoYrqtjupiFVhVlx1r8\n DutW83iaiYg==", "X-Google-Smtp-Source": "\n AGHT+IEnOEW2qji7tzQd5E4K6bk6jrybQsGRC1WqaMp1mKyq5/IVJvvB9Ay9sgH3LAPlVv6uaeZkexTCxxNqjA==", "X-Received": "from joshwash.sea.corp.google.com\n ([2620:15c:11c:202:9a96:68e3:c6ee:7117])\n (user=joshwash job=sendgmr) by 2002:a05:690c:f8d:b0:5ff:b07b:fb83 with SMTP\n id df13-20020a05690c0f8d00b005ffb07bfb83mr67683ywb.4.1706739249820; Wed, 31\n Jan 2024 14:14:09 -0800 (PST)", "Date": "Wed, 31 Jan 2024 14:13:08 -0800", "In-Reply-To": "<20240131221308.2208815-1-joshwash@google.com>", "Mime-Version": "1.0", "References": "<20240126173317.2779230-2-joshwash@google.com>\n <20240131221308.2208815-1-joshwash@google.com>", "X-Mailer": "git-send-email 2.43.0.429.g432eaa2c6b-goog", "Message-ID": "<20240131221308.2208815-6-joshwash@google.com>", "Subject": "[PATCH v5 5/5] net/gve: add RSS redirection table update support", "From": "Joshua Washington <joshwash@google.com>", "To": "Junfeng Guo <junfeng.guo@intel.com>,\n Jeroen de Borst <jeroendb@google.com>,\n Rushil Gupta <rushilg@google.com>, Joshua Washington <joshwash@google.com>", "Cc": "dev@dpdk.org, Ferruh Yigit <ferruh.yigit@amd.com>", "Content-Type": "text/plain; charset=\"UTF-8\"", "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": "This patch introduces support for updating the RSS redirection table in\nthe GVE PMD through the implementation of rss_reta_update and\nrss_reta_query.\n\nDue to an infrastructure limitation, the RSS hash key must be manually\nconfigured before the redirection table can be updated or queried. The\nredirection table is expected to be exactly 128 bytes.\n\nSigned-off-by: Joshua Washington <joshwash@google.com>\nReviewed-by: Rushil Gupta <rushilg@google.com>\nReviewed-by: Jeroen de Borst <jeroendb@google.com>\n---\n doc/guides/nics/features/gve.ini | 1 +\n doc/guides/nics/gve.rst | 8 +++\n drivers/net/gve/gve_ethdev.c | 95 ++++++++++++++++++++++++++++++++\n 3 files changed, 104 insertions(+)", "diff": "diff --git a/doc/guides/nics/features/gve.ini b/doc/guides/nics/features/gve.ini\nindex 4381b1565f..8dfa229bb0 100644\n--- a/doc/guides/nics/features/gve.ini\n+++ b/doc/guides/nics/features/gve.ini\n@@ -10,6 +10,7 @@ MTU update = Y\n TSO = Y\n RSS hash = Y\n RSS key update = Y\n+RSS reta update = Y\n L4 checksum offload = Y\n Basic stats = Y\n Linux = Y\ndiff --git a/doc/guides/nics/gve.rst b/doc/guides/nics/gve.rst\nindex 908b2aab11..69e4eaabdb 100644\n--- a/doc/guides/nics/gve.rst\n+++ b/doc/guides/nics/gve.rst\n@@ -71,6 +71,7 @@ Supported features of the GVE PMD are:\n - Tx multi-segments (Scatter Tx)\n - Tx UDP/TCP/SCTP Checksum\n - RSS hash configuration\n+- RSS redirection table query and update\n \n Currently, only GQI_QPL and GQI_RDA queue format are supported in PMD.\n Jumbo Frame is not supported in PMD for now.\n@@ -92,3 +93,10 @@ Note that the initial configuration requires a hash key to be provided if one\n had not been provided before. Attempting to set hash types alone without the\n existence of a set key will result in a failed request.\n \n+As stated above, the RSS redirection table has exactly 128 entries. The RSS hash\n+must be configured before the redirection table can be updated using the standard\n+interface. Because the initial RSS hash creates a default redirection table, the\n+redirection table will be available for querying upon initial hash configuration.\n+When performing redirection table updates, it is possible to update individual\n+table entries.\n+\ndiff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c\nindex 2a68d31808..3b8ec5872d 100644\n--- a/drivers/net/gve/gve_ethdev.c\n+++ b/drivers/net/gve/gve_ethdev.c\n@@ -770,6 +770,97 @@ gve_rss_hash_conf_get(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+static int\n+gve_rss_reta_update(struct rte_eth_dev *dev,\n+\tstruct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)\n+{\n+\tstruct gve_priv *priv = dev->data->dev_private;\n+\tstruct gve_rss_config gve_rss_conf;\n+\tint table_id;\n+\tint err;\n+\tint i;\n+\n+\t/* RSS key must be set before the redirection table can be set. */\n+\tif (!priv->rss_config.key || priv->rss_config.key_size == 0) {\n+\t\tPMD_DRV_LOG(ERR, \"RSS hash key msut be set before the \"\n+\t\t\t\"redirection table can be updated.\");\n+\t\treturn -ENOTSUP;\n+\t}\n+\n+\tif (reta_size != GVE_RSS_INDIR_SIZE) {\n+\t\tPMD_DRV_LOG(ERR, \"Redirection table must have %hu elements\",\n+\t\t\t(uint16_t)GVE_RSS_INDIR_SIZE);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\terr = gve_init_rss_config_from_priv(priv, &gve_rss_conf);\n+\tif (err) {\n+\t\tPMD_DRV_LOG(ERR, \"Error allocating new RSS config.\");\n+\t\treturn err;\n+\t}\n+\n+\ttable_id = 0;\n+\tfor (i = 0; i < priv->rss_config.indir_size; i++) {\n+\t\tint table_entry = i % RTE_ETH_RETA_GROUP_SIZE;\n+\t\tif (reta_conf[table_id].mask & (1ULL << table_entry))\n+\t\t\tgve_rss_conf.indir[i] =\n+\t\t\t\treta_conf[table_id].reta[table_entry];\n+\n+\t\tif (table_entry == RTE_ETH_RETA_GROUP_SIZE - 1)\n+\t\t\ttable_id++;\n+\t}\n+\n+\terr = gve_adminq_configure_rss(priv, &gve_rss_conf);\n+\tif (err)\n+\t\tPMD_DRV_LOG(ERR, \"Problem configuring RSS with device.\");\n+\telse\n+\t\tgve_update_priv_rss_config(priv, &gve_rss_conf);\n+\n+\tgve_free_rss_config(&gve_rss_conf);\n+\treturn err;\n+}\n+\n+static int\n+gve_rss_reta_query(struct rte_eth_dev *dev,\n+\tstruct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)\n+{\n+\tstruct gve_priv *priv = dev->data->dev_private;\n+\tint table_id;\n+\tint i;\n+\n+\tif (!(dev->data->dev_conf.rxmode.offloads &\n+\t\tRTE_ETH_RX_OFFLOAD_RSS_HASH)) {\n+\t\tPMD_DRV_LOG(ERR, \"RSS not configured.\");\n+\t\treturn -ENOTSUP;\n+\t}\n+\n+\t/* RSS key must be set before the redirection table can be queried. */\n+\tif (!priv->rss_config.key) {\n+\t\tPMD_DRV_LOG(ERR, \"RSS hash key must be set before the \"\n+\t\t\t\"redirection table can be initialized.\");\n+\t\treturn -ENOTSUP;\n+\t}\n+\n+\tif (reta_size != priv->rss_config.indir_size) {\n+\t\tPMD_DRV_LOG(ERR, \"RSS redirection table must have %d entries.\",\n+\t\t\tpriv->rss_config.indir_size);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\ttable_id = 0;\n+\tfor (i = 0; i < priv->rss_config.indir_size; i++) {\n+\t\tint table_entry = i % RTE_ETH_RETA_GROUP_SIZE;\n+\t\tif (reta_conf[table_id].mask & (1ULL << table_entry))\n+\t\t\treta_conf[table_id].reta[table_entry] =\n+\t\t\t\tpriv->rss_config.indir[i];\n+\n+\t\tif (table_entry == RTE_ETH_RETA_GROUP_SIZE - 1)\n+\t\t\ttable_id++;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static const struct eth_dev_ops gve_eth_dev_ops = {\n \t.dev_configure = gve_dev_configure,\n \t.dev_start = gve_dev_start,\n@@ -792,6 +883,8 @@ static const struct eth_dev_ops gve_eth_dev_ops = {\n \t.xstats_get_names = gve_xstats_get_names,\n \t.rss_hash_update = gve_rss_hash_update,\n \t.rss_hash_conf_get = gve_rss_hash_conf_get,\n+\t.reta_update = gve_rss_reta_update,\n+\t.reta_query = gve_rss_reta_query,\n };\n \n static const struct eth_dev_ops gve_eth_dev_ops_dqo = {\n@@ -816,6 +909,8 @@ static const struct eth_dev_ops gve_eth_dev_ops_dqo = {\n \t.xstats_get_names = gve_xstats_get_names,\n \t.rss_hash_update = gve_rss_hash_update,\n \t.rss_hash_conf_get = gve_rss_hash_conf_get,\n+\t.reta_update = gve_rss_reta_update,\n+\t.reta_query = gve_rss_reta_query,\n };\n \n static void\n", "prefixes": [ "v5", "5/5" ] }{ "id": 136245, "url": "