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:~# 

  • 相关阅读:
    走近Qt
    C: 数组形参
    C++: 单例模式和缺陷
    c++: 获取delete[]中的数组大小
    像素格式
    BMP图像格式
    Sublime Text 格式化JSON-pretty json
    Sublime Text3配置SublimeREPL快捷键的方法(Python)
    Sublime Text3安装SublimeREPL插件以及快捷键设置
    Sublime Text3 注册码激活码(持续更新中2018-11-20)
  • 原文地址:https://www.cnblogs.com/dream397/p/14513824.html
Copyright © 2011-2022 走看看