From 98363edee213a76adbac3ec7a4225be2f3abeed9 Mon Sep 17 00:00:00 2001 From: Naadir Jeewa Date: Thu, 17 Sep 2020 12:47:26 +0100 Subject: [PATCH] Disable H/W tx offload for ethernet devices on Photon Signed-off-by: Naadir Jeewa --- .../udev/rules.d/90-netif-disable-hw-offload.rules | 3 +++ images/capi/ansible/roles/node/tasks/photon.yml | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 images/capi/ansible/roles/node/files/etc/udev/rules.d/90-netif-disable-hw-offload.rules diff --git a/images/capi/ansible/roles/node/files/etc/udev/rules.d/90-netif-disable-hw-offload.rules b/images/capi/ansible/roles/node/files/etc/udev/rules.d/90-netif-disable-hw-offload.rules new file mode 100644 index 0000000000..4c18101e4c --- /dev/null +++ b/images/capi/ansible/roles/node/files/etc/udev/rules.d/90-netif-disable-hw-offload.rules @@ -0,0 +1,3 @@ +ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*", TAG+="netif_hw_tx_offload_disable" +ACTION=="add", SUBSYSTEM=="net", KERNEL=="en*", TAG+="netif_hw_tx_offload_disable" +TAG=="netif_hw_tx_offload_disable", RUN+="/usr/sbin/ethtool -K $name tx off" diff --git a/images/capi/ansible/roles/node/tasks/photon.yml b/images/capi/ansible/roles/node/tasks/photon.yml index ea42e12f2e..f384be55aa 100644 --- a/images/capi/ansible/roles/node/tasks/photon.yml +++ b/images/capi/ansible/roles/node/tasks/photon.yml @@ -13,7 +13,17 @@ # limitations under the License. --- -- name: Ensure Bandwidth for TCP connections should 1 Mb (same as Ubuntu) +# Due to https://github.com/vmware/photon/issues/1047 +# We disable tx offload for ethernet devices +- name: Disable transmission HW offload + copy: + src: etc/udev/rules.d/90-netif-disable-hw-offload.rules + dest: /etc/udev/rules.d/90-netif-disable-hw-offload.rules + owner: root + group: root + mode: 0644 + +- name: Double TCP small queue limit to be the same as Ubuntu sysctl: name: net.ipv4.tcp_limit_output_bytes value: "524288"