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

Function i40e_pf_config_rss

dpdk/drivers/net/i40e/i40e_ethdev.c:8976–9003  ·  view source on GitHub ↗

Configure RSS */

Source from the content-addressed store, hash-verified

8974
8975/* Configure RSS */
8976int
8977i40e_pf_config_rss(struct i40e_pf *pf)
8978{
8979 struct i40e_hw *hw;
8980 enum rte_eth_rx_mq_mode mq_mode;
8981 uint64_t rss_hf, hena;
8982 int ret;
8983
8984 ret = i40e_pf_rss_reset(pf);
8985 if (ret) {
8986 PMD_DRV_LOG(ERR, "Reset RSS failed, RSS has been disabled");
8987 return ret;
8988 }
8989
8990 rss_hf = pf->dev_data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
8991 mq_mode = pf->dev_data->dev_conf.rxmode.mq_mode;
8992 if (!(rss_hf & pf->adapter->flow_types_mask) ||
8993 !(mq_mode & RTE_ETH_MQ_RX_RSS_FLAG))
8994 return 0;
8995
8996 hw = I40E_PF_TO_HW(pf);
8997 hena = i40e_config_hena(pf->adapter, rss_hf);
8998 i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), (uint32_t)hena);
8999 i40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), (uint32_t)(hena >> 32));
9000 I40E_WRITE_FLUSH(hw);
9001
9002 return 0;
9003}
9004
9005#define I40E_GL_PRS_FVBM_MSK_ENA 0x80000000
9006#define I40E_GL_PRS_FVBM(_i) (0x00269760 + ((_i) * 4))

Callers 2

i40e_dev_rx_initFunction · 0.85
i40e_hash_filter_createFunction · 0.85

Calls 3

i40e_pf_rss_resetFunction · 0.85
i40e_config_henaFunction · 0.85
i40e_write_rx_ctlFunction · 0.85

Tested by

no test coverage detected