From patchwork Tue Jan 23 17:58:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joshua Washington X-Patchwork-Id: 580 Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id C5A84439AA; Tue, 23 Jan 2024 18:58:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B6E1402C2; Tue, 23 Jan 2024 18:58:45 +0100 (CET) Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) by mails.dpdk.org (Postfix) with ESMTP id 2C70F4025D for ; Tue, 23 Jan 2024 18:58:44 +0100 (CET) Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-1d4a097002fso54520735ad.3 for ; Tue, 23 Jan 2024 09:58:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706032723; x=1706637523; darn=dpdk.org; h=cc:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=Y3KoLIyR7VFBU6Ebql2AT5O7Fl35OgyZ7NqXVz4EhLI=; b=adLdYnQ/ZHKHK+XWrJEMeoLrY8rTvnRxF0zQ8dh1YuoHXE40U0pv6qwpjtVZj0pNSw iHQgS8maATQMv08pL/9z2vl9aC1whSD42+0BXfeDF+t+oUhQ9oSoc3OYUSGEF9OMp/lH drWS/GHcQftwkMlNhObNwZkvQkryfwdhkr7id3rm3Weo1/OAG9jDexDvl1OeJ7SkGCou 1fhficKlz19xek2+JUhrDhq2CDV9L2epJ9IZvv1acRbpun6tGdSvYKP6dCWIBHp+riUl gZNKx3UfBN1rLhFHI6LpNIsmY0FrxK3U7HMhco2q9EcIvbHryt5bAEIeF2sPa7hNFHHb L0WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706032723; x=1706637523; h=cc:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Y3KoLIyR7VFBU6Ebql2AT5O7Fl35OgyZ7NqXVz4EhLI=; b=K/jBYGrq/MTLoW+brjyeWbDLwEh/lA1ffFvQj0XAgzuOG0RC28YHjRi2gFPbmLbXsK 45Kv/g3Y3t4scKULSgvY2fZKMTo/qjXWz7+A1yVKi0v3YBj+uk5w22TbwRdcoNGMEU+5 /eKUQZBFu0S0vZtN+hVQwbYt42mSbToqttcLQPMAzzQLKUxETqjXZtiipOULl+cPZNLZ 7mV5Fa3SaxmKq+eUIjDT+SSEen2YDHfyQ6a7eX1EiOsSsgdg5bcmsBN5sBKGYikpBs4t iMwH2Ieh/+lt1Np458CbqA3GVPtWUv9X0DdeFpddH/d8Bn6YLEBO7mvzNdBsNJsxLTYp u9AQ== X-Gm-Message-State: AOJu0YwB+Vrasdk6Gxf6vr6bjFb66D15Y6J/WqkMel9m4oiCNxl/3PTD g5kdTdE0gKzofjUxa9oT3iMGzv0flysrgVu7KnAcS2nR+oS85U9KMGA4TdxAvP3gtMw/G/FCq7T tFhQuiq53bgMejzDK2oqeNjYVdfyHuXI9ExhYfFKVnATBRznEdgdw8F7r4OaxWkrmvLpPgaPtiS jEaBgKybRWTqp8flXvefpQD6v69kEP8Q== X-Google-Smtp-Source: AGHT+IGHKHwUVqqlCjb8IZ2IXpLHqV3e3RGRYGrT+R46KQsp7Y+bsFJg1RfSlw8LVN1Bygh3yokdMDkrFT1CzA== X-Received: from joshwash.sea.corp.google.com ([2620:15c:11c:202:b9a2:fa74:abc3:bc47]) (user=joshwash job=sendgmr) by 2002:a17:902:c94b:b0:1d7:790f:5b41 with SMTP id i11-20020a170902c94b00b001d7790f5b41mr3771pla.1.1706032722820; Tue, 23 Jan 2024 09:58:42 -0800 (PST) Date: Tue, 23 Jan 2024 09:58:23 -0800 Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Message-ID: <20240123175831.3219292-1-joshwash@google.com> Subject: [PATCH 0/7] net/gve: RSS Support for GVE Driver From: Joshua Washington Cc: dev@dpdk.org, Ferruh Yigit , Rushil Gupta , Joshua Washington X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch series introduces RSS support for the GVE poll-mode driver. This series includes implementations of the following eth_dev_ops: 1) rss_hash_update 2) rss_hash_conf_get 3) reta_query 4) reta_update In rss_hash_update, the GVE driver supports the following RSS hash types: * RTE_ETH_RSS_IPV4 * RTE_ETH_RSS_NONFRAG_IPV4_TCP * RTE_ETH_RSS_NONFRAG_IPV4_UDP * RTE_ETH_RSS_IPV6 * RTE_ETH_RSS_IPV6_EX * RTE_ETH_RSS_NONFRAG_IPV6_TCP * RTE_ETH_RSS_NONFRAG_IPV6_UDP * RTE_ETH_RSS_IPV6_TCP_EX * RTE_ETH_RSS_IPV6_UDP_EX The hash key is 40B, and the lookup table has 128 entries. These values are not configurable in this implementation. In general, the DPDK driver expects the RSS hash configuration to be set with a key before the redriection table is set up. When the RSS hash is configured, a default redirection table is generated based on the number of queues. When the device is re-configured, the redirection table is reset to the default value based on the queue count. An important note is that the gVNIC device expects 32 bit integers for RSS redirection table entries, while the RTE API uses 16 bit integers. However, this is unlikely to be an issue, as these values represent receive queues, and the gVNIC device does not support anywhere near 64K queues. This series also updates the corresponding feature matrix ertries and documentation as it pertains to RSS support in the GVE driver. v2: Add commmit messages for patches with it missing, and other checkpatches fixes. Note: There is a warning about complex macros being parenthesized that does not seem to be well-founded. Joshua Washington (7): net/gve: fully expose RSS offload support in dev_info net/gve: RSS adminq command changes net/gve: add gve_rss library for handling RSS-related behaviors net/gve: RSS configuration update support net/gve: RSS redirection table update support net/gve: update gve.ini with RSS capabilities net/gve: update GVE documentation with RSS support doc/guides/nics/features/gve.ini | 3 + doc/guides/nics/gve.rst | 16 ++- drivers/net/gve/base/gve.h | 15 ++ drivers/net/gve/base/gve_adminq.c | 59 ++++++++ drivers/net/gve/base/gve_adminq.h | 21 +++ drivers/net/gve/gve_ethdev.c | 231 +++++++++++++++++++++++++++++- drivers/net/gve/gve_ethdev.h | 17 +++ drivers/net/gve/gve_rss.c | 206 ++++++++++++++++++++++++++ drivers/net/gve/gve_rss.h | 107 ++++++++++++++ drivers/net/gve/meson.build | 1 + 10 files changed, 667 insertions(+), 9 deletions(-) create mode 100644 drivers/net/gve/gve_rss.c create mode 100644 drivers/net/gve/gve_rss.h