First, download
ethtool-4.6.tar.gz Download
Second, installation
Decompression: TAR-XVF ethtool-4.6.tar.gz
Configuration:./configure--host=arm-hisiv300-linux
--host Specifies the prefix of the cross-compilation tool chain
Compiling: Make
Build: Ethtool
View: File Ethtool
Ethtool:elf 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
Copy: CP ethtool/usr/sbin//Copy to Development Board
extension: Configuration and usage of./configure
third, testing
/usr/sbin # Ethtool Eth0
Settings for eth0:
Supported ports: [TP AUI BNC MII FIBRE]
Supported Link Modes:10baset/half 10baset/full
100baset/half 100baset/full
1000baset/half 1000baset/full
Supported Pause Frame Use:symmetric
Supports Auto-negotiation:yes
Advertised Link Modes:10baset/half 10baset/full
100baset/half 100baset/full
1000baset/half 1000baset/full
Advertised Pause frame use:symmetric
Advertised Auto-negotiation:yes
speed:100mb/s
Duplex:full
Port:mii
Phyad:1
Transceiver:external
Auto-negotiation:on
Link Detected:yes
You can also view the network card rate as follows:
#cat/sys/class/net/eth0/speed
100
Analysis:
You can see support for 10M, 100M, 1000M, and the actual NIC rate is speed:100mb/s.
Then the question comes, is not gigabit network card speed must be 1000M it.
The result is not necessarily, network card rate and network cable, switch port rate has a relationship, see auto-negotiation field, on means to open auto-negotiation, after inserting the network cable will be automatically negotiated at the end of a supported rate.
Link detected means to plug the network cable, activate the network card (Ifup ethx, in fact, two layer up) will be yes.
Specifically to my this board why support 1000 Gigabit network, network card speed is 100mb/s it.
Iv. Use of
Enter the./ethtool--help command to see detailed help information.
or see: The Ethtool usage of the Linux command is detailed
The following is mainly about the Ethtool configuration interface.
The user can use the standard Ethtool tool interface to enable the flow control function.
Ethtool–a eth0 command to view the status of the Eth0 port flow control function, print as follows:
#./ethtool-a eth0
Pause Parameters for eth0:
Autonegotiate:on
Rx:on
Tx:on
wherein, the RX flow control is open, TX flow control is open;
Users can turn flow control on or off with the following command:
#./ethtool-a eth0 rx off (off Rx flow control)
#./ethtool-a eth0 Rx on (Turn on Rx flow control)
#./ethtool-a eth0 TX off (off TX flow control)
#./ethtool-a eth0 TX on (open TX stream control)
The GMAC module supports TSO functionality and is turned on by default, and can be turned off by tool Ethtool if the user wishes to turn off TSO functionality. The method for switching TSO functions is as follows:
Close TSO:./ethtool–k eth0 TX Off
Open TSO:./ethtool–k eth0 TX on
Introduction to TSO (TCP Segment Offload) features:
TSO (TCP segmentation offload) is a technique that uses network cards to divide large packets, reduce CPU load, and is called LSO (Large segment Offload), which is called TSO if the packet type is only TCP. If the hardware supports TSO functionality, it is also necessary to support both the hardware's TCP checksum calculation and the scatter-gather (scatter Gather) feature. The implementation of TSO is actually done by combining software and hardware, specifically, the hardware is able to shard large packets and attach related headers to each shard.
When using TSO, the HI3516A chip transfers a portion of the CPU-processed work to be handled by the network card, reducing CPU pressure and improving performance.