[dpdk-dev,2/3] app/testpmd: enable RSS support for i40e
Commit Message
i40e can support RSS no matter if SR-IOV is enabled or not, while
ixgbe/igb can not support RSS if it is SR-IOV. Code changes are
needed to support i40e RSS if SR-IOV is enabled.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
---
app/test-pmd/testpmd.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
Comments
2014-07-18 10:45, Helin Zhang:
> i40e can support RSS no matter if SR-IOV is enabled or not, while
> ixgbe/igb can not support RSS if it is SR-IOV. Code changes are
> needed to support i40e RSS if SR-IOV is enabled.
[...]
> - /* In SR-IOV mode, RSS mode is not available */
> - if (port->dcb_flag == 0 && port->dev_info.max_vfs == 0) {
> + /**
> + * For i40e, RSS is always available.
> + * For non-i40e, RSS is available in non-SRIOV mode,
> + * according to datasheet.
> + */
> + if (port->dcb_flag == 0 &&
> + ((port->dev_info.max_vfs == 0) ||
> + (!strcmp(port->dev_info.driver_name,
> + "rte_i40e_pmd")) ||
> + (!strcmp(port->dev_info.driver_name,
> + "rte_i40evf_pmd")))) {
This kind of knowledge should be coded in the drivers.
Application writer doesn't have to read the datasheet to use the drivers.
I think returning an error in the driver could be enough to handle it at
application level.
Thanks
@@ -1684,8 +1684,17 @@ init_port_config(void)
port->dev_conf.rx_adv_conf.rss_conf.rss_hf = 0;
}
- /* In SR-IOV mode, RSS mode is not available */
- if (port->dcb_flag == 0 && port->dev_info.max_vfs == 0) {
+ /**
+ * For i40e, RSS is always available.
+ * For non-i40e, RSS is available in non-SRIOV mode,
+ * according to datasheet.
+ */
+ if (port->dcb_flag == 0 &&
+ ((port->dev_info.max_vfs == 0) ||
+ (!strcmp(port->dev_info.driver_name,
+ "rte_i40e_pmd")) ||
+ (!strcmp(port->dev_info.driver_name,
+ "rte_i40evf_pmd")))) {
if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0)
port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_RSS;
else