This patch communicates that the GVE driver supports RSS, along with the RSS offloads supported by the driver.
Signed-off-by: Joshua Washington <joshw...@google.com> Reviewed-by: Rushil Gupta <rush...@google.com> Reviewed-by: Jeroen de Borst <jeroe...@google.com> --- drivers/net/gve/gve_ethdev.c | 4 +++- drivers/net/gve/gve_ethdev.h | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c index d162fd3864..6acdb4e13b 100644 --- a/drivers/net/gve/gve_ethdev.c +++ b/drivers/net/gve/gve_ethdev.c @@ -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; } diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h index 9893fcfee6..14c72ec91a 100644 --- a/drivers/net/gve/gve_ethdev.h +++ b/drivers/net/gve/gve_ethdev.h @@ -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 */ -- 2.43.0.429.g432eaa2c6b-goog