summaryrefslogtreecommitdiff
path: root/drivers/net/failsafe
diff options
context:
space:
mode:
authorOphir Munk <ophirmu@mellanox.com>2018-05-09 13:46:41 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2018-05-14 22:31:51 +0100
commit807dd827b32677bd06266b31a71efcee50c85cd1 (patch)
tree399634706053d100943eac161dc3c28681f03d54 /drivers/net/failsafe
parent2c01a48a508c54064da0e3d1dd0ba6dc644ca8e5 (diff)
downloaddpdk-next-eventdev-807dd827b32677bd06266b31a71efcee50c85cd1.zip
dpdk-next-eventdev-807dd827b32677bd06266b31a71efcee50c85cd1.tar.gz
dpdk-next-eventdev-807dd827b32677bd06266b31a71efcee50c85cd1.tar.xz
net/failsafe: advertise supported RSS functions
Advertise failsafe supported RSS functions as part of dev_infos_get callback. Set failsafe default RSS hash functions to be: ETH_RSS_IP, ETH_RSS_UDP, and ETH_RSS_TCP. The result of failsafe RSS hash functions is the logical AND of the RSS hash functions among all failsafe sub_devices and failsafe own defaults. Previous to this commit RSS support was reported as none. Since the introduction of [1] it is required that all RSS configurations be verified. [1] commit 8863a1fbfc66 ("ethdev: add supported hash function check") Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Diffstat (limited to 'drivers/net/failsafe')
-rw-r--r--drivers/net/failsafe/failsafe_ops.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index 6d44884..6f85a63 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -83,7 +83,10 @@ static struct rte_eth_dev_info default_infos = {
DEV_TX_OFFLOAD_UDP_CKSUM |
DEV_TX_OFFLOAD_TCP_CKSUM |
DEV_TX_OFFLOAD_TCP_TSO,
- .flow_type_rss_offloads = 0x0,
+ .flow_type_rss_offloads =
+ ETH_RSS_IP |
+ ETH_RSS_UDP |
+ ETH_RSS_TCP,
};
static int
@@ -805,26 +808,29 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
} else {
uint64_t rx_offload_capa;
uint64_t rxq_offload_capa;
+ uint64_t rss_hf_offload_capa;
rx_offload_capa = default_infos.rx_offload_capa;
rxq_offload_capa = default_infos.rx_queue_offload_capa;
+ rss_hf_offload_capa = default_infos.flow_type_rss_offloads;
FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_PROBED) {
rte_eth_dev_info_get(PORT_ID(sdev),
&PRIV(dev)->infos);
rx_offload_capa &= PRIV(dev)->infos.rx_offload_capa;
rxq_offload_capa &=
PRIV(dev)->infos.rx_queue_offload_capa;
+ rss_hf_offload_capa &=
+ PRIV(dev)->infos.flow_type_rss_offloads;
}
sdev = TX_SUBDEV(dev);
rte_eth_dev_info_get(PORT_ID(sdev), &PRIV(dev)->infos);
PRIV(dev)->infos.rx_offload_capa = rx_offload_capa;
PRIV(dev)->infos.rx_queue_offload_capa = rxq_offload_capa;
+ PRIV(dev)->infos.flow_type_rss_offloads = rss_hf_offload_capa;
PRIV(dev)->infos.tx_offload_capa &=
default_infos.tx_offload_capa;
PRIV(dev)->infos.tx_queue_offload_capa &=
default_infos.tx_queue_offload_capa;
- PRIV(dev)->infos.flow_type_rss_offloads &=
- default_infos.flow_type_rss_offloads;
}
rte_memcpy(infos, &PRIV(dev)->infos, sizeof(*infos));
}