41 #define IXGBE_RSS_HKEY_LEN 40
43 void ixgbeDeviceSetRSSHashFunction(uint64_t *rss_hf)
45 *rss_hf = RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_IPV6_EX;
48 int ixgbeDeviceSetRSS(
int port_id,
int nb_rx_queues,
char *port_name)
50 uint16_t queues[RTE_MAX_QUEUES_PER_PORT];
51 struct rte_flow_error flush_error = { 0 };
52 struct rte_eth_rss_conf rss_conf = {
54 .rss_key_len = IXGBE_RSS_HKEY_LEN,
57 if (nb_rx_queues < 1) {
58 FatalError(
"The number of queues for RSS configuration must be "
59 "configured with a positive number");
62 struct rte_flow_action_rss rss_action_conf =
63 DPDKInitRSSAction(rss_conf, nb_rx_queues, queues, RTE_ETH_HASH_FUNCTION_DEFAULT,
true);
65 int retval = DPDKCreateRSSFlowGeneric(port_id, port_name, rss_action_conf);
67 retval = rte_flow_flush(port_id, &flush_error);
69 SCLogError(
"%s: unable to flush rte_flow rules: %s Flush error msg: %s", port_name,
70 rte_strerror(-retval), flush_error.message);