41 #define MLX5_RSS_HKEY_LEN 40
43 int mlx5DeviceSetRSS(
int port_id,
int nb_rx_queues,
char *port_name)
45 uint16_t queues[RTE_MAX_QUEUES_PER_PORT];
46 struct rte_flow_error flush_error = { 0 };
47 struct rte_eth_rss_conf rss_conf = {
49 .rss_key_len = MLX5_RSS_HKEY_LEN,
52 if (nb_rx_queues < 1) {
53 FatalError(
"The number of queues for RSS configuration must be "
54 "configured with a positive number");
57 struct rte_flow_action_rss rss_action_conf =
58 DPDKInitRSSAction(rss_conf, nb_rx_queues, queues, RTE_ETH_HASH_FUNCTION_TOEPLITZ,
true);
60 int retval = DPDKCreateRSSFlowGeneric(port_id, port_name, rss_action_conf);
62 retval = rte_flow_flush(port_id, &flush_error);
64 SCLogError(
"%s: unable to flush rte_flow rules: %s Flush error msg: %s", port_name,
65 rte_strerror(-retval), flush_error.message);