diff options
author | Harold Huang <baymaxhuang@gmail.com> | 2022-03-16 16:08:42 +0800 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-07-19 19:55:19 +0200 |
commit | 48ae7b802bb35ecaf95b6b83e8a063fce714ff72 (patch) | |
tree | b7a7efc79368dc44bd6d67c79b8fb0a585b9140f /lib/netdev-offload-dpdk.c | |
parent | fcdf8ae4a3508be317bf29dfb8878e52ac4c7f50 (diff) | |
download | openvswitch-48ae7b802bb35ecaf95b6b83e8a063fce714ff72.tar.gz |
netdev-offload-dpdk: Setting RSS hash types in RSS action.
When we send parallel flows such as VXLAN to a PF[1] port in OVS with
multiple PMDs. OVS will create a RTE flow with Mark and RSS actions to
send flows to the software data path. But the RSS action does not work
well and all the flows are forwarded to a single PMD. This is because
RSS hash types should be set in RSS action.
[1]: In our testbed, a Mellanox ConnectX-6 is used as a PF port.
[i.maximets]
DPDK PMD drivers supposed to provide "best-effort" RSS configuration
if the type is set to zero. However, they are very inconsistent in
practice and barely put any effort to provide a good configuration.
For example, mlx5 driver seems to use just RTE_ETH_RSS_IP, which is
not enough for most deployments.
Setting the types the same way we configure them for a normal RSS
in netdev-dpdk to workaround the scalability issue.
Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'lib/netdev-offload-dpdk.c')
-rw-r--r-- | lib/netdev-offload-dpdk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index 44a2be9c3..cceefbc50 100644 --- a/lib/netdev-offload-dpdk.c +++ b/lib/netdev-offload-dpdk.c @@ -18,6 +18,7 @@ #include <sys/types.h> #include <netinet/ip6.h> +#include <rte_ethdev.h> #include <rte_flow.h> #include <rte_gre.h> @@ -1714,7 +1715,7 @@ add_flow_mark_rss_actions(struct flow_actions *actions, .conf = (struct rte_flow_action_rss) { .func = RTE_ETH_HASH_FUNCTION_DEFAULT, .level = 0, - .types = 0, + .types = RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP | RTE_ETH_RSS_TCP, .queue_num = netdev_n_rxq(netdev), .queue = rss_data->queue, .key_len = 0, |