From f07aa795c92ac6a9460d25ab2e9d74379ed8e5eb Mon Sep 17 00:00:00 2001 From: Harish Patil Date: Tue, 7 Nov 2017 00:34:18 -0800 Subject: [PATCH] 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: 2ea6f76aff40 ("qede: add core driver") Cc: stable@dpdk.org Signed-off-by: Harish Patil --- config/common_base | 1 + drivers/net/qede/qede_ethdev.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config/common_base b/config/common_base index 9ae5ec30f1..34f04a9fe7 100644 --- a/config/common_base +++ b/config/common_base @@ -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="" diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 661d9381e9..c228b06b47 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -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; } -- 2.20.1