net/qede: disable per-VF Tx switching feature

Provide a knob to control per-VF Tx switching feature by adding a config
option, CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH. By default, it will be kept
in disabled state for better performance with small sized frames.

Fixes: 2ea6f76aff ("qede: add core driver")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@cavium.com>
This commit is contained in:
Harish Patil 2017-11-07 00:34:18 -08:00 committed by Ferruh Yigit
parent 6c897093f2
commit f07aa795c9
2 changed files with 9 additions and 1 deletions

View File

@ -415,6 +415,7 @@ CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO=n
CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER=n
CONFIG_RTE_LIBRTE_QEDE_DEBUG_TX=n
CONFIG_RTE_LIBRTE_QEDE_DEBUG_RX=n
CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH=n
#Provides abs path/name of the firmware file.
#Empty string denotes driver will use default firmware
CONFIG_RTE_LIBRTE_QEDE_FW=""

View File

@ -453,6 +453,12 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev, bool flg)
params.update_vport_active_tx_flg = 1;
params.vport_active_rx_flg = flg;
params.vport_active_tx_flg = flg;
#ifndef RTE_LIBRTE_QEDE_VF_TX_SWITCH
if (IS_VF(edev)) {
params.update_tx_switching_flg = 1;
params.tx_switching_flg = !flg;
}
#endif
for_each_hwfn(edev, i) {
p_hwfn = &edev->hwfns[i];
params.opaque_fid = p_hwfn->hw_info.opaque_fid;
@ -463,7 +469,8 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev, bool flg)
break;
}
}
DP_INFO(edev, "vport %s\n", flg ? "activated" : "deactivated");
DP_INFO(edev, "vport %s VF tx-switch %s\n", flg ? "activated" : "deactivated",
params.tx_switching_flg ? "enabled" : "disabled");
return rc;
}