| |

VerySource

 Forgot password?
 Register
Search
View: 1724|Reply: 12

More difficult question, which layer of data is the network card responsible for?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-29 01:20:01
| Show all posts |Read mode
TCP / IP network transmission is divided into: link layer, network layer, transport layer and application layer. Which layer is the network card responsible for?
Are the network card responsible for data transmission, handshake, and integrity verification on the link, that is, the CPU does not participate (does not consume CPU instructions).
  I wrote a service program using the completion port, which is only responsible for receiving data and rarely processing it. If the network card is responsible for receiving and sending data, the bottleneck for data transmission and reception is mainly the network card, not the CPU. Is this correct?
  Please give pointers! Thank you!
Reply

Use magic Report

0

Threads

70

Posts

42.00

Credits

Newbie

Rank: 1

Credits
42.00

 China

Post time: 2020-3-2 21:30:01
| Show all posts
Different environments and different implementations, CPU network cards, memory, disks, etc. may all become bottlenecks
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-3-12 15:45:01
| Show all posts
Brother, of course. In the case of interrupt processing, the DMA transfer is like a gatekeeper. If you ask it, you will do other things, but if the network card is not a DMA transfer (usually it seems that there is only DMA when the hard disk is used). Only the kind of pci-e network card is right, you have to check the technical information, forgot, the development is too fast), the cpu will be responsible for moving the data, this is more cycle, or the network card is ah ... There is a problem. The network card is only responsible for the MAC and LLC frame headers. He does not have the high-level frame headers. He does not want a router. This problem is more carefully looked at the information. In short, if you only receive data, it is separate from processing data. Even the slowest modern CPUs are many times faster than the network card (add frame header, deframe header, analysis). Of course, it is not 8086. The CPU will always be Waiting.
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-16 23:15:01
| Show all posts
Network cards and drivers, I think they belong to the physical layer
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-19 01:15:01
| Show all posts
drive? ? ? ? ? ? ? Where where. ? ?
Reply

Use magic Report

3

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-25 17:30:02
| Show all posts
TCP / IP network transmission is divided into: link layer, network layer, transport layer and application layer
---------------------------
Although the network is so divided, when we actually develop it, it is not so divided at all, generally from bottom to top:
Physical layer: processing electrical characteristics, receiving electrical signals from RJ45, converting digital signals, should be controlled by its own single chip
|
Miniport microport layer: the lowest layer of the NDIS system, the general network card driver belongs to this layer
|
Middle layer: the middle layer of the NDIS system, the general software firewall about the rules (such as prohibiting IGMP, ICMP), are implemented at this layer through the middle layer
|
Protocol layer: the uppermost layer of the NDIS system, which is mainly forgotten by what processing, it is rarely used anyway
|
Application layer: Of course, it is divided according to the level (SPI, RawSocket, WinSocket)


The general level should be like this, please correct it if it is wrong :)
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-8-1 14:30:01
| Show all posts
Still not cleared!
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-8-3 15:00:01
| Show all posts
The network card hardware itself belongs to the physical layer. The driver belongs to the data link layer. When the network card is working, whether a large-scale CPU is required to participate depends on the working principle of different network control chips. Some slightly better chips support a "zero copy" mechanism for sending and receiving data packets. That is, when transferring data packets from the protocol layer to the driver, and when transferring data packets from the driver to the protocol layer, there is no need to copy. They share a buffer pool. For the network card data transmission and reception, the time-consuming is the copy of the data in the memory. ----Note that it is a copy between the protocol layer and the driver. DMA is at the driver level. Different.
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-4 09:30:01
| Show all posts
mac-link-physical layer three
Reply

Use magic Report

2

Threads

16

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-8-7 21:45:01
| Show all posts
The parts that the eyes can see and the current transmission are defined by the physical layer protocol, such as the definition of chip pins, network cable sequence, board size, AC/DC, and receiving and sending BIT signs.
But it also participates in the work of the Ethernet protocol (layer two: link layer). The Ethernet protocol includes a 48-bit source MAC address and a 48-bit destination MAC address, so its MAC address part belongs to the link layer .
Generally, the second layer and all layers above require the help of the CPU for calculation, and the application layer is completely managed by the CPU.
These are general network cards, special network cards have more complex functions:
TCP Offload Engine (TOE) technology:
http://www.it918.com/htm/jc/jcclbd/iptx/20040406C085439.shtml

Now using a good network card can greatly improve the performance of the server, provided that the overall performance is well balanced.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list