[PATCH v2 10/12] drivers/net: fix reported RSS capability
David Marchand
david.marchand at redhat.com
Wed Oct 21 12:30:24 CEST 2026
Some drivers (idpf, cpfl) report RSS support even if lacking HW support.
On the other hand, some driver do have support but do not advertise it
(either in dev_info, or in the documentation).
failsafe may support RSS, as it only passes the requests to the ports
attached to it, hence mark it as partial support.
Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver")
Fixes: 70675bcc3a57 ("net/idpf: support RSS")
Fixes: cfbc66551a14 ("net/cpfl: support RSS")
Fixes: 5fb899f4b225 ("net/xsc: support RSS configuration")
Fixes: 9f75cad1287f ("net/xsc: add PCT interfaces")
Fixes: ff8db3711b29 ("net/nbl: support infos query")
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
Changes since v1:
- fixed ip3nke,
- moved all RSS capabilities under check for idpf and cpfl,
- adjusted xsc RSS capabilities,
---
doc/guides/nics/features/failsafe.ini | 1 +
doc/guides/nics/features/ipn3ke.ini | 3 ---
doc/guides/nics/features/nbl.ini | 1 +
doc/guides/nics/features/netvsc.ini | 1 +
drivers/net/intel/cpfl/cpfl_ethdev.c | 9 +++++----
drivers/net/intel/cpfl/cpfl_representor.c | 4 +++-
drivers/net/intel/idpf/idpf_ethdev.c | 9 +++++----
drivers/net/xsc/xsc_ethdev.c | 4 ++++
8 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/doc/guides/nics/features/failsafe.ini b/doc/guides/nics/features/failsafe.ini
index 09afdc1963..b778a40be6 100644
--- a/doc/guides/nics/features/failsafe.ini
+++ b/doc/guides/nics/features/failsafe.ini
@@ -18,6 +18,7 @@ Multicast MAC filter = Y
VLAN filter = Y
Flow control = Y
Packet type parsing = Y
+RSS hash = P
Stats per queue = Y
ARMv7 = Y
ARMv8 = Y
diff --git a/doc/guides/nics/features/ipn3ke.ini b/doc/guides/nics/features/ipn3ke.ini
index 6abaf9e4f9..1f9a28f198 100644
--- a/doc/guides/nics/features/ipn3ke.ini
+++ b/doc/guides/nics/features/ipn3ke.ini
@@ -15,9 +15,6 @@ Promiscuous mode = Y
Allmulticast mode = Y
Unicast MAC filter = Y
Multicast MAC filter = Y
-RSS hash = Y
-RSS key update = Y
-RSS reta update = Y
SR-IOV = Y
VLAN filter = Y
Flow control = Y
diff --git a/doc/guides/nics/features/nbl.ini b/doc/guides/nics/features/nbl.ini
index 5935092a49..e799840e40 100644
--- a/doc/guides/nics/features/nbl.ini
+++ b/doc/guides/nics/features/nbl.ini
@@ -9,6 +9,7 @@ MTU update = Y
Scattered Rx = Y
Promiscuous mode = Y
Unicast MAC filter = Y
+RSS hash = Y
VLAN offload = P
Extended stats = Y
Stats per queue = Y
diff --git a/doc/guides/nics/features/netvsc.ini b/doc/guides/nics/features/netvsc.ini
index fa8c2ac132..7bc7148f95 100644
--- a/doc/guides/nics/features/netvsc.ini
+++ b/doc/guides/nics/features/netvsc.ini
@@ -8,6 +8,7 @@ Speed capabilities = P
Free Tx mbuf on demand = Y
Scattered Rx = Y
Promiscuous mode = Y
+RSS hash = Y
Allmulticast mode = Y
Stats per queue = Y
Extended stats = Y
diff --git a/drivers/net/intel/cpfl/cpfl_ethdev.c b/drivers/net/intel/cpfl/cpfl_ethdev.c
index 32e0f81d99..c235373daf 100644
--- a/drivers/net/intel/cpfl/cpfl_ethdev.c
+++ b/drivers/net/intel/cpfl/cpfl_ethdev.c
@@ -209,10 +209,11 @@ cpfl_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_mtu = vport->max_mtu;
dev_info->min_mtu = RTE_ETHER_MIN_MTU;
- dev_info->hash_key_size = vport->rss_key_size;
- dev_info->reta_size = vport->rss_lut_size;
-
- dev_info->flow_type_rss_offloads = CPFL_RSS_OFFLOAD_ALL;
+ if (base->caps.rss_caps != 0) {
+ dev_info->hash_key_size = vport->rss_key_size;
+ dev_info->reta_size = vport->rss_lut_size;
+ dev_info->flow_type_rss_offloads = CPFL_RSS_OFFLOAD_ALL;
+ }
dev_info->rx_offload_capa =
RTE_ETH_RX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/intel/cpfl/cpfl_representor.c b/drivers/net/intel/cpfl/cpfl_representor.c
index 60b72b5ec1..bb28c0b989 100644
--- a/drivers/net/intel/cpfl/cpfl_representor.c
+++ b/drivers/net/intel/cpfl/cpfl_representor.c
@@ -195,6 +195,7 @@ cpfl_repr_dev_info_get(struct rte_eth_dev *ethdev,
struct rte_eth_dev_info *dev_info)
{
struct cpfl_repr *repr = CPFL_DEV_TO_REPR(ethdev);
+ struct cpfl_adapter_ext *adapter = repr->itf.adapter;
dev_info->device = ethdev->device;
dev_info->max_mac_addrs = 1;
@@ -203,7 +204,8 @@ cpfl_repr_dev_info_get(struct rte_eth_dev *ethdev,
dev_info->min_rx_bufsize = CPFL_MIN_BUF_SIZE;
dev_info->max_rx_pktlen = CPFL_MAX_FRAME_SIZE;
- dev_info->flow_type_rss_offloads = CPFL_RSS_OFFLOAD_ALL;
+ if (adapter->base.caps.rss_caps != 0)
+ dev_info->flow_type_rss_offloads = CPFL_RSS_OFFLOAD_ALL;
dev_info->rx_offload_capa =
RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
diff --git a/drivers/net/intel/idpf/idpf_ethdev.c b/drivers/net/intel/idpf/idpf_ethdev.c
index e9e9781fdd..fbd50d0a91 100644
--- a/drivers/net/intel/idpf/idpf_ethdev.c
+++ b/drivers/net/intel/idpf/idpf_ethdev.c
@@ -166,10 +166,11 @@ idpf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_mtu = vport->max_mtu;
dev_info->min_mtu = RTE_ETHER_MIN_MTU;
- dev_info->hash_key_size = vport->rss_key_size;
- dev_info->reta_size = vport->rss_lut_size;
-
- dev_info->flow_type_rss_offloads = IDPF_RSS_OFFLOAD_ALL;
+ if (adapter->caps.rss_caps != 0) {
+ dev_info->hash_key_size = vport->rss_key_size;
+ dev_info->reta_size = vport->rss_lut_size;
+ dev_info->flow_type_rss_offloads = IDPF_RSS_OFFLOAD_ALL;
+ }
dev_info->rx_offload_capa =
RTE_ETH_RX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/xsc/xsc_ethdev.c b/drivers/net/xsc/xsc_ethdev.c
index 5fbe68782e..20d6f58f68 100644
--- a/drivers/net/xsc/xsc_ethdev.c
+++ b/drivers/net/xsc/xsc_ethdev.c
@@ -469,6 +469,10 @@ xsc_ethdev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
info->if_index = priv->ifindex;
info->speed_capa = priv->xdev->link_speed_capa;
info->hash_key_size = XSC_RSS_HASH_KEY_LEN;
+ info->flow_type_rss_offloads = RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP |
+ RTE_ETH_RSS_TCP | RTE_ETH_RSS_L3_SRC_ONLY |
+ RTE_ETH_RSS_L3_DST_ONLY | RTE_ETH_RSS_L4_SRC_ONLY |
+ RTE_ETH_RSS_L4_DST_ONLY | RTE_ETH_RSS_LEVEL_INNERMOST;
info->tx_desc_lim.nb_seg_max = 8;
info->tx_desc_lim.nb_mtu_seg_max = 8;
info->switch_info.name = dev->data->name;
--
2.54.0
More information about the dev
mailing list