[v4,1/7] net/gve: fully expose RSS offload support in dev_info
Checks
Commit Message
This patch communicates that the GVE driver supports RSS, along with
the RSS offloads supported by the driver.
Signed-off-by: Joshua Washington <joshwash@google.com>
Reviewed-by: Rushil Gupta <rushilg@google.com>
Reviewed-by: Jeroen de Borst <jeroendb@google.com>
---
drivers/net/gve/gve_ethdev.c | 4 +++-
drivers/net/gve/gve_ethdev.h | 8 ++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
Comments
On 1/31/2024 10:13 PM, Joshua Washington wrote:
> 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.
>
> v3:
> Fix build warnings that come up on certain distros.
>
> v4:
> Fix formatting in gve_adminq.c
>
> v5:
> Update commit messages to comply with check-git-log.
> Fold feature matrix and documentation updates into relevant commits.
>
> Joshua Washington (5):
> net/gve: expose RSS offload support in dev info
> net/gve: add RSS adminq command
> net/gve: add gve RSS library
> net/gve: add RSS configuration update support
> net/gve: add RSS redirection table update support
Series applied to dpdk-next-net/main, thanks.
@@ -405,7 +405,7 @@ gve_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_mtu = priv->max_mtu;
dev_info->min_mtu = RTE_ETHER_MIN_MTU;
- dev_info->rx_offload_capa = 0;
+ dev_info->rx_offload_capa = RTE_ETH_RX_OFFLOAD_RSS_HASH;
dev_info->tx_offload_capa =
RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
RTE_ETH_TX_OFFLOAD_UDP_CKSUM |
@@ -442,6 +442,8 @@ gve_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
.nb_align = 1,
};
+ dev_info->flow_type_rss_offloads = GVE_RSS_OFFLOAD_ALL;
+
return 0;
}
@@ -33,6 +33,14 @@
RTE_MBUF_F_TX_L4_MASK | \
RTE_MBUF_F_TX_TCP_SEG)
+#define GVE_RSS_OFFLOAD_ALL ( \
+ RTE_ETH_RSS_IPV4 | \
+ RTE_ETH_RSS_NONFRAG_IPV4_TCP | \
+ RTE_ETH_RSS_IPV6 | \
+ RTE_ETH_RSS_IPV6_EX | \
+ RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
+ RTE_ETH_RSS_IPV6_TCP_EX)
+
/* A list of pages registered with the device during setup and used by a queue
* as buffers
*/