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

Function ionic_dev_rss_hash_update

dpdk/drivers/net/ionic/ionic_ethdev.c:633–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

631}
632
633static int
634ionic_dev_rss_hash_update(struct rte_eth_dev *eth_dev,
635 struct rte_eth_rss_conf *rss_conf)
636{
637 struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
638 uint32_t rss_types = 0;
639 uint8_t *key = NULL;
640
641 IONIC_PRINT_CALL();
642
643 if (rss_conf->rss_key)
644 key = rss_conf->rss_key;
645
646 if ((rss_conf->rss_hf & IONIC_ETH_RSS_OFFLOAD_ALL) == 0) {
647 /*
648 * Can't disable rss through hash flags,
649 * if it is enabled by default during init
650 */
651 if (lif->rss_ind_tbl)
652 return -EINVAL;
653 } else {
654 /* Can't enable rss if disabled by default during init */
655 if (!lif->rss_ind_tbl)
656 return -EINVAL;
657
658 if (rss_conf->rss_hf & RTE_ETH_RSS_IPV4)
659 rss_types |= IONIC_RSS_TYPE_IPV4;
660 if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV4_TCP)
661 rss_types |= IONIC_RSS_TYPE_IPV4_TCP;
662 if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV4_UDP)
663 rss_types |= IONIC_RSS_TYPE_IPV4_UDP;
664 if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6)
665 rss_types |= IONIC_RSS_TYPE_IPV6;
666 if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_TCP)
667 rss_types |= IONIC_RSS_TYPE_IPV6_TCP;
668 if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_UDP)
669 rss_types |= IONIC_RSS_TYPE_IPV6_UDP;
670
671 ionic_lif_rss_config(lif, rss_types, key, NULL);
672 }
673
674 return 0;
675}
676
677static int
678ionic_dev_stats_get(struct rte_eth_dev *eth_dev,

Callers

nothing calls this directly

Calls 1

ionic_lif_rss_configFunction · 0.85

Tested by

no test coverage detected