Configure RSS */
| 8974 | |
| 8975 | /* Configure RSS */ |
| 8976 | int |
| 8977 | i40e_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)) |
no test coverage detected