• Cannot set device tcp segmentation offload settings: Invalid argument


    错误描述

    ethtool -K eth0 tso on

    Cannot set device tcp segmentation offload settings: Invalid argument

    TSO选项开启失败。

    网卡驱动

    显示网卡驱动

    ethtool -i | --driver ethX

    例:ethtool -i eth0

    driver: tg3

    version: 3.122n

    firmware-version: 5752-v3.19

    bus-info: 0000:0b:00.0

    例:ethtool -i eth0

    driver: e1000

    version: 7.3.21-k4-NAPI

    firmware-version: N/A

    bus-info: 0000:03:06.0

    intel的e1000

    drivers/ net/ ethernet/ intel/ e1000/ e1000_main.c

    broadcom的tg3

    drivers/ net/ ethernet/ broadcom/ tg3.h

    drivers/ net/ ethernet/ broadcom/ tg3.c

    网卡型号

    PCI (Peripheral Component Interconnect),外围部件互联总线。

    lspci — list all PCI devices

    例:lspci -vvv | grep Ethernet

    0b:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 02)

    网卡为Broadcom的千兆网卡,型号为BCM5752。

    解决过程

    找台能正常设置TSO的机器,依次检查和对比:

    1. 网卡类型 - support TSO

    2. 网卡驱动 - support TSO

    3. ethtool - support TSO

    4. 内核版本 - support TSO

    5. 依赖关系 - 问题出在这里!

    A driver that wants to offer TSO needs to set the NETIF_F_TSO bit in the network structure.

    In oder for a device to support TSO, it needs to also support TCP_checksum_offloading and

    Scatter_Gather.

    想要使用TSO,必须确保:

    ethtool -K eth0 tx on // specifies whether TX checksumming should be enabled.

    ethtool -K eth0 sg on // specifies whether scatter-gather should be enabled.

    ethtool -K eth0 tso on // specifies whether TCP segmentation offload should be eabled.

    这三者缺一不可,而出现"Cannot set device tcp segmentation offload settings: Invalid argument"的原因

    就是没有事先启用scatter-gather选项。

  • 相关阅读:
    jquery跑马灯效果(ajax调取数据)
    IE6下双倍边距和关于IE6 7display:inline无效的问题
    js 利用ajax将前台数据传到后台(json格式)
    js 利用ajax将前台数据传到后台(1)
    js 点击某一块就显示某一块
    点击进行复制的JS代码
    jq利用ajax调用后台方法
    每一个程序员需要了解的10个Linux命令
    101个MySQL的调节和优化技巧
    JavaScript Math和Number对象
  • 原文地址:https://www.cnblogs.com/aiwz/p/6333359.html
Copyright © 2020-2023  润新知