MCPcopy Create free account
hub / github.com/F-Stack/f-stack / set_rss_table

Function set_rss_table

lib/ff_dpdk_if.c:567–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565//RSS reta update will failed when enable flow isolate
566#if !defined(FF_FLOW_ISOLATE) && !defined(FF_FLOW_IPIP)
567static void
568set_rss_table(uint16_t port_id, uint16_t reta_size, uint16_t nb_queues)
569{
570 if (reta_size == 0) {
571 return;
572 }
573
574 unsigned reta_conf_size = RTE_MAX(1, reta_size / RTE_ETH_RETA_GROUP_SIZE);
575 struct rte_eth_rss_reta_entry64 reta_conf[reta_conf_size];
576
577 /* config HW indirection table */
578 unsigned i, j, hash=0;
579 for (i = 0; i < reta_conf_size; i++) {
580 reta_conf[i].mask = ~0ULL;
581 for (j = 0; j < RTE_ETH_RETA_GROUP_SIZE; j++) {
582 reta_conf[i].reta[j] = hash++ % nb_queues;
583 }
584 }
585
586 if (rte_eth_dev_rss_reta_update(port_id, reta_conf, reta_size)) {
587 rte_exit(EXIT_FAILURE, "port[%d], failed to update rss table\n",
588 port_id);
589 }
590}
591#endif
592
593static int

Callers 1

init_port_startFunction · 0.85

Calls 2

rte_exitFunction · 0.85

Tested by

no test coverage detected