The support and implementation of Linux NIC driver for Ethtool
Speaking from a typical Ethernet controller
The network card works in the last two layers of OSI network system, physical layer and data link layer, the physical layer defines the electrical and optical signal, line state, clock datum, data coding and circuit, etc., and provides standard interface for data link layer equipment. The physical layer of the chip called PHY. The data link layer provides the addressing mechanism, data frame construction, data error checking, Transmission control, providing standard data interface to the network layer and other functions. The chip of Data Link layer in Ethernet card is called MAC Controller. Many of these two parts of the network card are done together. The relationship between them is the PCI bus to connect the MAC bus, Mac connect phy,phy cable (of course, not directly connected, there is a transformer device).
Generally, the basic structure of a typical Ethernet controller is shown in Figure 1:
Figure 1. A typical Ethernet controller structure diagram conforming to the IEEE802.3 standard
The data link layer MAC is the abbreviation for media access control, which is the medium Access Controls child layer protocol. The protocol is located in the lower half of the data link layer in the OSI Seven layer protocol, and is mainly responsible for controlling and connecting the physical layer of physical media. When you send the data, the MAC protocol can determine in advance whether the data can be sent, if it can be sent to the data plus some control information, and ultimately the data and control information in the specified format to the physical layer; When receiving data, the MAC protocol first determines whether the input information is transmitted and the transmission error occurs. If there is no error, remove the control information and send it to the LLC layer. Ethernet MAC is defined by the IEEE-802.3 Ethernet standard.