zoukankan      html  css  js  c++  java
  • tcpdump 报文超过 MTU tso

    root@-x86:~# ethtool -K eno3 gso on
    root@-x86:~# ethtool -k eno3|grep generic-
    generic-segmentation-offload: on
    generic-receive-offload: on
    root@-x86:~# ethtool -K eno3 gso off
    root@z-x86:~# ethtool -k eno3|grep generic-
    generic-segmentation-offload: off
    generic-receive-offload: on
    root@-x86:~#

    root@-x86:~# ethtool -k eno3|grep tcp
    tcp-segmentation-offload: on
    tx-tcp-segmentation: on
    tx-tcp-ecn-segmentation: on
    tx-tcp-mangleid-segmentation: on
    tx-tcp6-segmentation: on
    root@-x86:~# ethtool -K eno3 tso off
    root@-x86:~# ethtool -k eno3|grep tcp
    tcp-segmentation-offload: off
    tx-tcp-segmentation: off
    tx-tcp-ecn-segmentation: off
    tx-tcp-mangleid-segmentation: off
    tx-tcp6-segmentation: off
    root@zj-x86:~#

    如果开启了 TSO,使用 tcpdump 分析网络流量看到的数据是不一样的,下面给个对比。

    • 开启 TSO

     

    root@ -x86:~# ethtool -k eno3 | grep so
    tx-gso-robust: off [fixed]
    tx-gso-partial: on
    root@ -x86:~# ethtool -K eno3 tso off
    root@ -x86:~# ethtool -K eno3 gso off
    root@ -x86:~# ethtool -k eno3 | grep so
    tx-gso-robust: off [fixed]
    tx-gso-partial: on
    root@ -x86:~# ethtool -K eno3 gso on
    root@ -x86:~# ethtool -K eno3 tso on
    root@ -x86:~# ethtool -k eno3 | grep so
    tx-gso-robust: off [fixed]
    tx-gso-partial: on
    root@ -x86:~# ethtool -k eno3 | grep so
    tx-gso-robust: off [fixed]
    tx-gso-partial: on
    root@ -x86:~#
    root@-x86:~# scp /data/ubuntu-18.04-x86.qcow2 root@10.11.16.81:/data1
    root@10.11.16.81's password:
    Permission denied, please try again.
    root@10.11.16.81's password:
    ubuntu-18.04-x86.qcow2

     

    • 关闭 TSO

     

    root@-x86:~# ethtool -k eno4 | grep so
    tx-gso-robust: off [fixed]
    tx-gso-partial: on
    root@-x86:~# ethtool -K eno3 gso off
    root@-x86:~# ethtool -K eno3 tso off
    root@-x86:~# ethtool -k eno3 | grep so
    tx-gso-robust: off [fixed]
    tx-gso-partial: on
    root@-x86:~# scp  /data/ubuntu-18.04-x86.qcow2  root@10.11.16.81:/data1 
    root@10.11.16.81's password: 
    ubuntu-18.04-x86.qcow2  

    关闭tso,开gso

    root@-x86:~# ethtool -K eno3 tso off
    root@-x86:~# ethtool -K eno3 gso on
    root@-x86:~# scp  /data/ubuntu-18.04-x86.qcow2  root@10.11.16.81:/data1 
    root@10.11.16.81's password: 
    ubuntu-18.04-x86-new.qcow2     

    开tso,关gso

    root@-x86:~# ethtool -K eno3 gso off
    root@-x86:~# ethtool -K eno3 tso on
    root@-x86:~# scp  /data/ubuntu-18.04-x8.qcow2  root@10.11.16.81:/data1 
    root@10.11.16.81's password: 
    ubuntu-18.04-x86.qcow2                                                                                                                                                                                                100%  617MB  79.0MB/s   00:07    
    root@-x86:~# 

  • 相关阅读:
    第二十九课 循环链表的实现
    第二十八课 再论智能指针(下)
    第二十七课 再论智能指针(上)
    第二十六课 典型问题分析(Bugfix)
    普通new和placement new的重载
    leetcode 581. Shortest Unsorted Continuous Subarray
    leetcode 605. Can Place Flowers
    leetcode 219. Contains Duplicate II
    leetcode 283. Move Zeroes
    leetcode 217. Contains Duplicate
  • 原文地址:https://www.cnblogs.com/dream397/p/14513824.html
Copyright © 2011-2022 走看看