From f84196ac0f077041020288820324089e93e112f4 Mon Sep 17 00:00:00 2001 From: Chunsong Feng Date: Fri, 10 Dec 2021 05:52:37 +0000 Subject: [PATCH] msg/async/dpdk:Add the TSO configuration The TSO feature of some NICs(mlx5,iavf,sfc,hns3) is abnormal in DPDK-20.11. The TSO feature is fiexed in DPDK-21.11. Therefore, a configure is added for compatibility. Signed-off-by: Chunsong Feng Reviewed-by: luo rixin Reviewed-by: Han Fengzhe --- src/common/options/global.yaml.in | 4 ++++ src/msg/async/dpdk/DPDK.cc | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/common/options/global.yaml.in b/src/common/options/global.yaml.in index 1c81c3a1701cb..a149ddebdc5a0 100644 --- a/src/common/options/global.yaml.in +++ b/src/common/options/global.yaml.in @@ -1465,6 +1465,10 @@ options: level: advanced default: true with_legacy: true +- name: ms_dpdk_enable_tso + type: bool + level: advanced + default: true - name: ms_dpdk_hw_flow_control type: bool level: advanced diff --git a/src/msg/async/dpdk/DPDK.cc b/src/msg/async/dpdk/DPDK.cc index 24a6764fb0911..a10c6ec96aea0 100644 --- a/src/msg/async/dpdk/DPDK.cc +++ b/src/msg/async/dpdk/DPDK.cc @@ -310,7 +310,10 @@ int DPDKDevice::init_port_start() } // TSO is supported starting from DPDK v1.8 - if (_dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) { + // TSO is abnormal in some DPDK versions (eg.dpdk-20.11-3.e18.aarch64), try + // disable TSO by ms_dpdk_enable_tso=false + if ((_dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) && + cct->_conf.get_val("ms_dpdk_enable_tso")) { ldout(cct, 1) << __func__ << " TSO is supported" << dendl; _hw_features.tx_tso = 1; } -- 2.39.5