]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/dpdk:Add the TSO configuration 44278/head
authorChunsong Feng <fengchunsong@huawei.com>
Fri, 10 Dec 2021 05:52:37 +0000 (05:52 +0000)
committerChunsong Feng <fengchunsong@huawei.com>
Wed, 29 Dec 2021 03:19:06 +0000 (03:19 +0000)
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 <fengchunsong@huawei.com>
Reviewed-by: luo rixin <luorixin@huawei.com>
Reviewed-by: Han Fengzhe <hanfengzhe@hisilicon.com>
src/common/options/global.yaml.in
src/msg/async/dpdk/DPDK.cc

index 1c81c3a1701cbb68d72cbbfea88f8f6deda32d02..a149ddebdc5a04aa5156b671994b5c0dd4d85e7e 100644 (file)
@@ -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
index 24a6764fb0911ef191172732f636ef14bb2290be..a10c6ec96aea034d26cd49ff5ced65f047fcd0f8 100644 (file)
@@ -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<bool>("ms_dpdk_enable_tso")) {
     ldout(cct, 1) << __func__ << " TSO is supported" << dendl;
     _hw_features.tx_tso = 1;
   }