CN108600194A - Network interface controller - Google Patents

Network interface controller Download PDF

Info

Publication number
CN108600194A
CN108600194A CN201810298515.2A CN201810298515A CN108600194A CN 108600194 A CN108600194 A CN 108600194A CN 201810298515 A CN201810298515 A CN 201810298515A CN 108600194 A CN108600194 A CN 108600194A
Authority
CN
China
Prior art keywords
data
verification
module
network interface
protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810298515.2A
Other languages
Chinese (zh)
Other versions
CN108600194B (en
Inventor
惠志强
王晶洋
邵尉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhaoxin Semiconductor Co Ltd
Original Assignee
Shanghai Zhaoxin Integrated Circuit Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zhaoxin Integrated Circuit Co Ltd filed Critical Shanghai Zhaoxin Integrated Circuit Co Ltd
Priority to CN201810298515.2A priority Critical patent/CN108600194B/en
Priority to US16/141,985 priority patent/US10771364B2/en
Publication of CN108600194A publication Critical patent/CN108600194A/en
Priority to US16/159,719 priority patent/US11082318B2/en
Priority to US16/364,204 priority patent/US10735290B2/en
Application granted granted Critical
Publication of CN108600194B publication Critical patent/CN108600194B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/24Testing correct operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Abstract

The present invention provides a kind of network interface controller, including alignment of data module, edge determination module and verification and module.Alignment of data module receives initial data, and initial data is reconfigured as the first valid data, and wherein initial data includes the domain section of first layer agreement and the domain section of Layer2 protocol.Edge determination module and alignment of data modular concurrent receive initial data, and based on initial data carry out edge determination operation to generate boundary information, and wherein boundary information is judging the boundary between the domain section of the first layer protocol and the domain section of Layer2 protocol.Verification and module couples alignment of data module, are configured to:It is the second valid data by the dismantling of the first valid data;And based on boundary information and the second valid data calculate verification and.

Description

Network interface controller
Technical field
The invention relates to a kind of network interface controllers, and can carry out edge determination in advance in particular to one kind The network interface controller of operation.
Background technology
Fig. 1 is please referred to, is a host internal hardware schematic diagram.As shown in Figure 1, general host may include central processing Unit (central processing unit, CPU), north bridge (north bridge, NB), dynamic random access memory (dynamic random access memory, DRAM) and south bridge (south bridge, SB), wherein north bridge and south bridge can It can be integrated in same chip group (chipset).SB may include universal serial bus (universal serial bus, USB) And the hardware such as network interface controller (network interface controller, NIC), wherein network interface controller NIC can obtain required data and is pocessed from dynamic random access memory DRAM, north bridge or central processing unit.
It is the schematic diagram of NIC and its associated transport interface by taking Fig. 2 as an example.As shown in Fig. 2, NIC may include core (core) module and suspension (suspend) module, after can handling upper layer data, by treated, data turn via digital-to-analogue Change (PAD) module, physical layer (physical layer, PHY) module is sent to other from transmitting terminal bus (abbreviation TX bus) Host, the upper layer data may be derived from other hardware for the host for being embedded in NIC, such as dynamic random access memory DRAM, Data in north bridge or central processing unit.
In order to promote the reliability of transmitted data, can generally there are a verification and domain section (segment) in data, To allow the both sides of transmitting-receiving to be capable of the correctness of verify data according to this.Due to all needing to be verified before sending each data packet The generation of sum, if therefore the efficiency for verifying and being bound to that data packet transmission can be promoted with computational efficiency can be promoted.
Invention content
In view of this, the present invention provides a kind of network interface controller, can the verification that calculates data and when it is pre- advanced Row bound judges (boundary determination) operation, to accelerate the calculating process and raising efficiency of verification sum.
The present invention provides a kind of network interface controller, including alignment of data module, edge determination module and verification and mould Block.Alignment of data module receives an at least initial data, and initial data is reconfigured as one first valid data, Central Plains Beginning data include the domain section of one first layer protocol and the domain section of a Layer2 protocol.Edge determination module and alignment of data module are simultaneously Row receives initial data, and carries out a boundary decision based on initial data to generate a boundary information, wherein boundary information To judge the boundary between the domain section of the first layer protocol and the domain section of Layer2 protocol.Verification and module couples alignment of data Module is configured to:It is at least one second valid data by the dismantling of the first valid data;And had based on boundary information and second Imitate data calculate one verification and.
Based on above-mentioned, network interface controller proposed by the present invention can be in advance based on initial data by edge determination module (it includes invalid data) carry out edge determination operation to generate boundary information, without wait until the first valid data be disassembled for Second valid data carry out edge determination operation to the second valid data again, and verification and required time are calculated so as to shorten And improve efficiency.
To make the foregoing features and advantages of the present invention clearer and more comprehensible, special embodiment below, and it is detailed to coordinate attached drawing to make Carefully it is described as follows.
Description of the drawings
Fig. 1 is well known host internal hardware schematic diagram.
Fig. 2 is the schematic diagram of NIC and its associated transport interface.
Fig. 3 A are the NIC schematic diagrames of one embodiment of the invention.
Fig. 3 B are the NIC running schematic diagrames of Fig. 3 A.
Fig. 4 is the signal timing diagram being painted according to Fig. 3 A and Fig. 3 B.
Fig. 5 A are the TX schematic diagrames of nucleus module in one embodiment of the invention NIC.
Fig. 5 B are the NIC running schematic diagrames of Fig. 5 A.
Fig. 6 is the signal timing diagram being painted according to Fig. 5 A and Fig. 5 B.
Fig. 7 is according to Fig. 5 B verifications being painted and computing mechanism schematic diagram.
Specific implementation mode
Fig. 3 A and Fig. 3 B are please referred to, wherein Fig. 3 A are the NIC schematic diagrames of one of present invention embodiment, and Fig. 3 B are Fig. 3 A NIC operates schematic diagram.As shown in Figure 3A, network interface controller 300 includes alignment of data module 310 and verification and module 320, in one embodiment, alignment of data module 310 and verification and module 320 may be disposed at core (Core) module of Fig. 2 In.In one embodiment, the nucleus module of Fig. 2 may include one or more transmitting terminals (Transmitter, TX), and alignment of data Module 310 and verification and module 320 may be disposed in each TX of nucleus module, with when receiving data packet cooperate with into Row required verification and calculating.In some embodiments, network interface controller may be integrated in a chipset, can also be embedding Enter in a host, wherein the host refers to the electronic equipment that can carry out network communication, for example, notebook computer.It is real one It applies in example, network interface controller can be that (Network Interface Card, NIC, generally can also claim a network adapter Be " network interface card "), more specifically, network interface controller can be a gigabit network adapter (Gigabit Network Interface Card, GNIC), however, the present invention is not limited thereto.I.e. collocation Fig. 3 B are further described below.
Fig. 3 B are please referred to, when alignment of data module 310 is from the hardware configuration of host (such as dynamic random access memory DRAM, central processing unit CPU or north bridge etc.) obtain initial data DD when, due to generally comprising significant figure in initial data DD According to and invalid data, therefore alignment of data module 310 valid data in initial data DD can be reconfigured for first effectively Data DA.
For example, it is assumed that the first stroke initial data and second caught from the interface (its bit wide is by 64 bits) of host Initial data is respectively " 55aa_55aa_55aa_5500 " and " 5507_0605_0403_0201 ", and valid data therein Respectively " 00 " and " 07_0605_0403_0201 ".In the case, alignment of data module 310 can be by above-mentioned valid data weight Combination nova is first valid data (its bit wide is 64 bits, that is, 8 bytes) of " 0706_0605_0302_0100 ".
In the present embodiment, initial data DD may be from a particular data packet, and this particular data packet can connect according to network Communication protocol used in mouthful controller 300 and there is different formats.For example, particular data packet is based on multi-layer protocol The data of transmission, the multi-layer protocol may include physical layer, network layer and/or transport layer, wherein network layer protocol may include mutually Networking protocol (Internet protocol, IP), transport layer protocol may include transmission control protocol (transmission Control protocol, TCP) and User Datagram Protocol (user datagram protocol, UDP).
In one embodiment, aforementioned particular data packet can include at least domain section and the domain of Layer2 protocol of the first layer protocol Section, and the domain section of Layer2 protocol may include in the payload (payload) of the first layer protocol.Also that is, Layer2 protocol For the upper-layer protocol of the first layer protocol.For example, the first layer protocol can be Internet protocol (Internet protocol, ), such as IP fourth editions (IPV4) or IP sixth versions (IPV6) IP.In addition, Layer2 protocol is transmission control protocol (transmission control protocol, TCP) or User Datagram Protocol (user datagram protocol, UDP).Corresponding to both transmission modes of IP+TCP and IP+UDP, corresponding data packet also has a different formats, and with Under table 1 and table 2 be two illustrative formats.
Table 1 (IPV6+TCP)
Table 2 (IPV6+UDP)
As indicated above, table 1 and table 2 are without extension stem (extension header) situation respectively Under " IPV6+TCP " and " IPV6+UDP " data packet format, and the meaning of wherein each domain section can refer to the rule of IEEE 802.3 The content of lattice book, also stet is searched with profit in table, and its other specific meaning does not repeat separately herein.
As shown in table 1, table 1 includes domain section and the domain of Layer2 protocol (that is, TCP) of the first layer protocol (that is, IP) The domain section of section, wherein TCP is included in the payload of IP.Similarly, table 2 also includes the domain of the first layer protocol (that is, IP) The domain section of the domain of section and Layer2 protocol (that is, UDP) section, wherein UDP is included in the payload of IP.For purposes of illustration only, with Under all using TCP as the example of Layer2 protocol, and those skilled in the art can should correspondingly be pushed away based on following teaching and be able to UDP Related embodiment as Layer2 protocol.
Alignment of data module 310 by the valid data in initial data DD reconfigure for the first valid data DA it Afterwards, the first valid data DA dismantlings can be then the second valid data DB by verification and module 320, wherein each second valid data The length of DB is less than the length of each first valid data DA.In one embodiment, it is assumed that the length of the first valid data DA is 64 Bit, then its can be disassembled as the second valid data DB that 4 groups of bit wides are 16 bits (that is, 2 bytes).Due to verification sum Calculate is usually to be added up as unit of 2 bytes, therefore above-mentioned disassemble the first valid data DA is the second valid data The operation of DB can be conducive to the calculating of subsequent check sum.The calculating of verification sum includes to the domain Layer2 protocol (that is, TCP/UDP) section Verify the calculating of sum and the calculating of the verification sum of virtual stem (pseudo header).
In one embodiment, verification and module 320 can be based on virtual stem (pseudo header) lattice shown in the following table 3 Formula is verified and is calculated.
Table 3 (virtual stem)
For example, it is assumed that the domains IP section in considered table 1, then verification and module 320 can be first by the second valid data Correspond to " Source IP Ad " (source IP addresses), " Des IP Ad " (purpose IP address) and " Next in table 1 in DB The content of the domains sections such as Header " (next stem domain section) is respectively filled in " source IP addresses ", " purpose in (that is, being applied to) table 3 In IP address " and " next stem ".Then, verification and module 320 can be in the contents for calculating " length of upper-layer protocol domain section " Later, inserted in table 3 domain section, with calculate virtual stem verification and.In various embodiments, due to calculating The length of section " upper-layer protocol domain " content can also assist the second layer it can be learnt that boundary between the section of the domains the IP domains Duan YuTCP Discuss (that is, TCP/UDP) domain section calculate verification and, behind can be described in detail.
In one embodiment, it is assumed that the data packet format of verification and module 320 considered " IPV6+TCP ", and wherein If extending stem, then " length of upper-layer protocol domain section " can refer to table 1 and directly be taken from the second valid data DB .Specifically, without stem is extended, the payload length of IP is TCP (that is, upper-layer protocol of IP) Domain segment length, and verify and module 320 can directly from the second valid data DB correspond to table 1 " Payload Length " Domain section obtain the payload length of IP, and can connect in the length of section " upper-layer protocol domain " by its filling table 3, after profit The verification and calculating of continuous virtual stem.Also that is, verification and module 320 can be directly using the length of the payload of IP as TCP Domain section length;In addition, obtaining IP (the first layer protocol) domain section and TCP (Layer2 protocol) domain according to the domain segment length of TCP Section between boundary, to since the boundary to TCP (Layer2 protocol) domain section calculate verification and.
In another embodiment, it is assumed that verification and the considered " IPV6 with one or more extension stems of module 320 The data packet format (as shown in table 4 below) of+TCP ", then verification and module 320, which can subtract the length of the payload of IP, respectively prolongs The length of stem is stretched to calculate the domain segment length of TCP.
Table 4
Upper table 4 is please referred to, is, for example, the data packet format of " IPV6+TCP " that includes two kinds of extension stems.It is similar to elder generation The meaning of preceding embodiment, each domain section in table 4 can refer to the content of 802.3 specifications of IEEE, not repeat separately herein.
In the example of table 4, verification and module 320 can be from the second valid data DB corresponding to the " Payload of table 4 The domain section of Length " obtains the payload length of IP, and subtracts each length for extending stem with it to calculate the domain section of TCP Length, details can refer to 802.3 specifications of IEEE, do not repeat separately herein.
After the content for calculating " the domain segment length of upper-layer protocol " according to above-mentioned teaching, verification and module 320 can phases The content of " length in upper-layer protocol domain section " is inserted into table 3 with answering, and generates a control information IS, to indicate verification and calculating mould Block since the boundary between IP (the first layer protocol) domain section and TCP (Layer2 protocol) domain section to subsequent TCP, (assist by the second layer View) domain section and suffix virtual stem carry out verification sum calculating.
In one embodiment, verify the calculating of sum for example including:(1) verification and domain section initialization, first by the " TCP of table 1 ChkSum " (16 bit) assigns initial value, is all set to 0;(2) full content that will be verified and be calculated, with 16 bits (that is, 2 bytes) are grouped for unit;(3) process calculated be exactly to the binary numbers of these 16 bits carry out band recycle into The addition of position is recycled if highest order has carry after being added and is entered on lowest order (1 complement code and operation);(4) tire out In addition after, the result of gained negates code again, you can obtain verification and.
Later, verification and module 320 can be by the verification being calculated and filling verification and domain sections.For example, when data packet is When the data packet format of " IPV6+TCP ", then after the verification being calculated and the domain " TCP ChkSum " section being filled in, then will be whole A " IPV6+TCP " data packet is sent;When data packet is the data packet format of " IPV6+UDP ", then will be calculated After verifying and being filled in the domain " UDP ChkSum " section, then will entirely " IPV6+UDP " data packet it send.In one embodiment, " IPV6+TCP " data packet and/or " IPV6+UDP " data packet can be sent to by transmitting terminal TX via transmitting terminal bus (TX bus) The receiving terminal (Receiver, RX) of other hosts.
Significantly, since foregoing boundary decision needs to complete to corresponding to table 1 in the second valid data DB In " NxtHeader " domain section extraction (to the domain " NxtHeader " section extraction can directly be divided based on the second valid data DB From without occupying delay time) and its length is cumulative, but complete boundary that is cumulative and extracting between IP, TCP and at least need The delay in 2 periods.If also, exist and extend stem, the information input correlation computations logic extracted was needed into for 1 week Phase, and length 1 period of needs for extending stem is calculated according to each domain " Next header " section for extending stem.Also that is, prolonging The quantity for stretching stem is more, and the period that need to postpone is more.
Fig. 4 is please referred to, is the signal timing diagram being painted according to Fig. 3 A and Fig. 3 B.In fig. 4, it is assumed that data D0, D1, D2, D3 and D4 are the different data in the section of the domains IP in " IPV6+TCP " data packet respectively, and after data D4 (as shown in Figure 4 Data D5) it is the domains TCP section, " IPV6+TCP " data packet includes three extension stems.As shown in figure 4, starting the 2nd period Registration process is executed to data, and control information IS is just generated in the 12nd period (that is, the 24th clock).It should be noted that It is that the timing cycles shared by data packet shown in Fig. 4 are a signal, in practical situations, when data packet can occupy more The sequence period, for example, data D4 may occupy 2 periods.
It is to be based on the second significant figure when carrying out the operation of IP/TCP edge determinations it is worth noting that, can be seen that from Fig. 3 B It is carried out according to DB (it is made of valid data).However, in fact only needing to know in table 1 when carrying out edge determination operation " Payload Length " or other relevant domain section can be carried out with length, it is not absolutely required to from smaller bit wide (16 Bit) the second valid data DB (it is come by the first valid data DA dismantling) in acquirement.In other words, edge determination operates not It need to wait until just to carry out after the second valid data DB is generated, and initial data can be directly based upon and carry out edge determination.In addition, to school The calculating for testing sum such as does not need at the domain section and a second layer for calculating " Payload Length " or judging the first layer protocol yet Boundary between the domain section of agreement just starts, but after having carried out tear down operations to the domain segment data for participating in verifying and calculating, Can based on the calculating of the domain segment data beginning after dismantling verify and.
In view of this, another embodiment of the present invention proposes a kind of NIC, side can be carried out while carrying out alignment of data Boundary's decision, thus control information can be generated quickly, and will start to calculate the time advance for verifying sum, to count quickly Verification is calculated with after, data packet is sent out in time, greatly improves the efficiency of NIC transmission data packets.It will carry out below detailed It describes in detail bright.
Fig. 5 A and Fig. 5 B are please referred to, wherein Fig. 5 A are the TX schematic diagrames of nucleus module in one embodiment of the invention NIC, and Fig. 5 B are the NIC running schematic diagrames of Fig. 5 A.In the present embodiment, TX 505 includes alignment of data module 510, edge determination mould Block 530 and verification and module 520.Alignment of data module 510 receives an at least initial data DD, and by initial data DD again group It is combined into the first valid data DA, wherein initial data DD includes the domain section and a Layer2 protocol of one first layer protocol (IP) (TCP/UDP) domain section.Edge determination module 530 receives initial data DD parallel with alignment of data module 510, and based on original Data DD carries out edge determination operation to generate boundary information DS, and wherein boundary information DS is judging the first layer protocol (IP) A boundary between domain section and the domain section of the Layer2 protocol (TCP/UDP).Verification and module 520 couple alignment of data module 510, be configured to the first valid data DA dismantling be at least one second valid data DB, and be based on boundary information DS and Second valid data DB calculate verification and.
In one embodiment, verification and module 520 further may include verification and control module 520b, data dismantling module 520c and verification and computing module 520d, however, the present invention is not limited thereto, such as in one embodiment, verify and control shown in Fig. 5 A Molding block 520b and data dismantling module 520c can be integrated in a module, the module of dismantling data as shown in Figure 5 B.
First, alignment of data module 510 can receive initial data DD (its bit wide is, for example, 64 bits), and by initial data DD reconfigures as the first valid data DA (its bit wide is, for example, 64 bits).Later, alignment of data module 510 can have first Verification and module 520 are given in the DA offers of effect data.In one embodiment, alignment of data module 510 can carry the first valid data DA Module 520c is disassembled for giving data, it is with sharp data dismantling module 520c that the first valid data DA dismantlings is effective for multiple second Data DB (its bit wide is, for example, 16 bits).The details of technological means can refer to alignment of data module in Fig. 3 A embodiments herein 310 related description, details are not described herein.Further, verification and control module 520b are receiving boundary information DS, and base It includes a control signal and the domain the first layer protocol (IP) section to generate control information IS, control information IS in boundary information DS One length (length correspond to the verification for subsequently calculating virtual stem and when filling table 3 " length of upper-layer protocol domain section " domain Section).Verification and computing module 520d to according to the control signal, the domain the first layer protocol (IP) section the length and this second Valid data DB calculate the verification and.
Different from Fig. 3 A embodiments, it includes invalid that edge determination module 530 receives parallel with alignment of data module 510 The initial data DD of data, and edge determination operation is carried out based on initial data DD.In one embodiment, edge determination module 530 by received initial data DD invalid data remove to generate third valid data, (its bit wide is, for example, 64 ratios It is special).Later, edge determination module 530 can carry out edge determination operation according to third valid data, and judge in exercise boundary It is based on exercise boundary decision as a result, generate a boundary information after the completion of operation, and boundary information DS is transmitted to verification With control module 520b, with generate control information IS, however, the present invention is not limited thereto, for example, edge determination module 530 can directly according to Carry out exercise boundary decision according to initial data DD.
In one embodiment, edge determination module 530 can refer to table 1 and directly be extracted from third valid data The domain section of " Payload Length ", to obtain the payload length of IP, to carry out " the length of upper-layer protocol domain section of table 3 The correlation computations of degree ", details can refer to the explanation in preceding embodiment, and details are not described herein.
In one embodiment, after edge determination module 530 completes edge determination operation, edge determination module 530 can Boundary information DS is generated, and provides and gives verification and control module 520b.530 exercise boundary decision of edge determination module, example Such as, judge that whether there is or not extend stem and extend the number of stem in initial data according to next stem domain section " Next header " If (having extension stem), the Layer2 protocol in initial data is Transmission Control Protocol or UPD agreements, and generates boundary information DS, In, boundary information DS may include indicating that whether there is or not extend the information of stem, the type of extension stem and/or prolong in the initial data The information such as the length of stem are stretched, if for example, judging that the type for extending stem is " destination according to " Next header " Options header " (abbreviation DH), the domain the next field section " header extension length " of " Next header " The value that section (abbreviation Ext Len) is prestored is the length information of then DH, and the value as the domains Ext Len section is prestored can be 1.
From the foregoing, it will be observed that the edge determination module 530 in the present embodiment is not based on, with smaller bit wide, (its bit wide is, for example, 16 bits) the second valid data DB carry out edge determination operation, and be based on directly on the original number after removing invalid data Edge determination operation is carried out in advance according to DD (that is, third valid data, bit wide is, for example, 64 bits), as shown in Figure 5 B.
In addition, in the present embodiment, after data dismantling module 520c generates the second valid data DB, can correspondingly give birth to At and send count information EA and give verification and control module 520b, wherein when data dismantling module 520c is based on the first significant figure During generating the second valid data DB according to DA, data disassemble module 520c and generate count information EA, for characterize this second The starting of valid data.For example, the second valid data of data dismantling module 520c outputs are defeated as unit of 16 bits Go out, when data dismantling module 520c starts to export head data (the IP header) of the first layer protocol in the second valid data When preceding 16 bit of the data structure of table 2 and table 4 (such as data dismantling module 520c exports aforementioned table 1), generates counting letter Cease EA.Then, verification and control module 520b can be based on count information EA and boundary information DS and generate control information IS, and will control Verification and computing module 520d are given in information IS offers processed, and required verification is correspondingly calculated with triggering verification and computing module 520d If (such as initial data be " IPV6+TCP " data packet, verification and be virtual stem+TCP stems+TCP payload Verification and).
In one embodiment, the control information IS that verification and control module 520b are generated includes control signal and second layer association Discuss the length of domain section, wherein the length of Layer2 protocol domain section can be by verification and control module 520b according to received side Boundary information DS is calculated.Particularly, the domain " Payload Length " section that the length of Layer2 protocol domain section can be as shown in Table 1 In value subtract it is each extend stem length after calculate.For example, if the type for extending stem is a DH, boundary letter It includes DH length informations to cease DS, that is, the value in the section of the domains Ext Len, then the length that DH extends stem is Ext Len*8+8;Its Middle control signal means the domain section and the Layer2 protocol for showing that second valid data DB reaches first layer protocol (IP) (TCP/UDP) domain section boundary can be given birth to by verification and control module 520b according to count information EA and boundary information DS At.Start to generate the second valid data specifically, verification and control module 520b after receiving count information EA, are learnt DB, when regular length domain section (such as table 1, table 2 and table of the starting from the second valid data DB by the domain section of the first layer protocol Until Des IP Ad, these are the fixed domain section of length by the DA of 4 data structure, SA, Type/Length, Ver ...), then pass through (reach first and second layers of association when the domain section for being not fixed length for crossing the domain section of the first layer protocol indicated by boundary information DS When the domain section boundary of view), the control signal is generated, is started to Layer2 protocol (IP) with instruction verification and computing module 520d Domain section calculate verification and.
Verification and computing module 520d calculate the explanation that the aforementioned details for verifying sum can refer to preceding embodiment, but the present invention It is without being limited thereto, for example, in one embodiment, verification and computing module 520d further include a register, for keeping in virtual stem Verification and, virtual stem verification and be to carry out accumulating operation to the domain section in virtual stem (as shown in table 3), virtual stem is By the source address domain section (source IP addresses in such as table 3) of the first layer protocol, destination address domain section (such as table of the first layer protocol Purpose IP address in 3) and Layer2 protocol domain section length field section (in such as table 3 upper-layer protocol domain section length) domain Section rebuilds and obtains.
In one embodiment, verification and computing module 520d are receiving second after data dismantling module 520c dismantlings After the part domain section for the virtual stem for including in valid data, begin to calculate virtual stem verification and assist when receiving the second layer After the length for discussing domain section, the calculating of virtual stem verification sum is completed.
In one embodiment, verification and computing module 520d are in the control letter for receiving verification and control module 520b is sent After number, start the verification for calculating the domain Layer2 protocol (TCP/UDP) section and, wherein the control signal is triggering verification and meter Module 520d is calculated to start to carry out calculating second to the data in the Layer2 protocol domain section after data dismantling module 520c dismantlings The domain layer protocol (TCP/UDP) section verification and.In one embodiment, verification and computing module 520d are calculating Layer2 protocol (TCP/UDP) domain section verification and after, then by the domain Layer2 protocol (TCP/UDP) section verification and with having calculated it is virtual Stem verify and carry out accumulating operation, with calculate final verification and.
Fig. 6 is please referred to, is the signal timing diagram being painted according to Fig. 5 A and Fig. 5 B.In fig. 6, it is supposed that data D0, D1, D2, D3 and D4 are the different data in the section of IP (the first layer protocol) domain in " IPV6+TCP " data packet respectively, and after data D4 (data D5 as shown in FIG. 6) is TCP (Layer2 protocol) domain section.Compared to Fig. 4, under similarity condition, the data of Fig. 6 Control information IS is generated in the 18th clock (that is, the 9th period).Also that is, the embodiment of the present invention simplifies whole data road The logic of diameter also shortens and calculates verification and data delay before.Specifically, Fig. 6 embodiments are compared to Fig. 4 embodiments Shorten 3 periods.
Simultaneously as data path shortens, and the data bit width considered is 64 bits, and the embodiment of the present invention saves altogether 192 (that is, 64x3) D type flip-flops, also simplify relevant control logic, thus also reduce NIC to a certain extent The overall power and area of circuit.
In other embodiments, a NIC can include multiple transmitting terminals (TX) simultaneously, alignment of data module and/verification and Module can be integrated on transmitting terminal.In one embodiment, multiple TX can share the module of an executable edge determination operation And/or the module of an executable alignment of data operation, use saving circuit.As shown in fig. 7, NIC can include four TX simultaneously 701,702,703 and 704, wherein every TX includes a verification and control module 520b, a data dismantling module 520c and school It tests and computing module 520d.
Fig. 7 is please referred to, is according to Fig. 5 B verifications being painted and computing mechanism schematic diagram.In one embodiment, NIC includes The rectangle frame slightly to be overlapped with four in four TX 701,702,703 and 704, Fig. 7 characterizes, and various components symbol in Fig. 7 Meaning is all identical as shown in Fig. 5 B.As shown in fig. 7, aforementioned four TX 701,702,703 and 704, can share same executable The module of the module (edge determination module 530 as shown in Figure 5A) of edge determination operation and an executable alignment of data operation (alignment of data module 510 as shown in Figure 5A), for example, when TX 701 is aligned based on this alignment of data module 510 The control information IS corresponding to the data packet that a data packet and edge determination module 530 afterwards is provided carries out the data packet When verifying the calculating of sum, if alignment of data module 510 and/or edge determination module 530 start to receive the original of another data packet Beginning data will then execute the initial data of another data packet the result after edge determination operation and data alignment operation Send to another transmitting terminal (such as TX 703) carry out subsequent operation, with generate another data packet accordingly verification and.It changes Yan Zhi, multiple transmitting terminals may include multiple data dismantling modules to execute data dismantling behaviour to multiple first valid data respectively Make, generates multiple second valid data;Multiple verifications are received respectively with control module corresponding to the more of multiple initial data A boundary information;Multiple verifications and computing module calculate separately to be based on multiple boundary informations and multiple second valid data Multiple verifications and, wherein data are disassembled mould block sum check and control module and can be integrated in a module, and as shown in Figure 7 tears open Solve data module.Also that is, the NIC that the present embodiment is considered is not required to all be arranged in each TX one group for carrying out edge determination behaviour The module of work and/or the module of an executable alignment of data operation, thus can reach the effect for saving circuit area and cost.
In conclusion network interface controller proposed by the present invention can be in advance based on initial data (it includes invalid data) Carry out edge determination operation to generate control information, without wait until the first valid data be disassembled for the second valid data it is right again Edge determination operation is carried out based on the second valid data, so as to shorten calculating verification and required time and improve efficiency. In addition, calculate verification and when, can first start to calculate virtual stem verification and, and by the result of calculation it is temporary after, wait and have been calculated The verification of the domain Layer2 protocol (TCP/UDP) section is with after, then is based on virtual stem verification and and the Layer2 protocol (TCP/ UDP) domain section verification and calculate final verification and, rather than first have been calculated the domain Layer2 protocol (TCP/UDP) section school It tests with after, then starts the verification of virtual stem and the domain Layer2 protocol (TCP/UDP) section and carry out accumulating operation, calculate Final verification and, in this way, be advanced by the time point for starting to calculate verification sum, calculated earlier verification and.Also, it is contracting While short calculating verification and required time, required hardware (for example, D type flip-flops) quantity can be also reduced, is also simplified Relevant control logic, thus reduce the overall power and area of circuit.In addition, existing simultaneously the feelings of multiple TX in NIC Under condition, since these TX can share the module that the same executable edge determination operates and/or an executable alignment of data behaviour The module of work, thus can further achieve the effect that save circuit area and cost.
Although the present invention is disclosed as above with embodiment, however, it is not to limit the invention, any technical field Technical staff, without departing from the spirit and scope of the present invention, when can make some changes and embellishment, therefore the protection of the present invention Range is when subject to appended claims institute restriction person.
【Symbol description】
300、700:Network interface controller NIC
310、510:Alignment of data module
320、520:Verification and module
530:Edge determination module
520b:Verification and control module
520c:Data disassemble module
520d:Verification and computing module
505:TX
D1、D2、D3、D4、D5:Domain section
DD:Initial data
DA:First valid data
DB:Second valid data
DS:Boundary information
EA:Count information
IS:Control information.

Claims (20)

1. a kind of network interface controller, including:
One alignment of data module receives an at least initial data, and the initial data is reconfigured as one first valid data, Wherein the initial data includes the domain section of one first layer protocol and the domain section of a Layer2 protocol;
One boundary determination module receives the initial data with the alignment of data modular concurrent, and carries out one based on the initial data Edge determination operation to generate a boundary information, wherein the boundary information to judge first layer protocol domain section and this second A boundary between the domain section of layer protocol;And
One verification and module, couple the alignment of data module, are configured to:
It is at least one second valid data by first valid data dismantling;And
Based on the boundary information and second valid data calculate a verification and.
2. network interface controller as described in claim 1, wherein the verification and module further include:
One verification and control module to receive the boundary information, and generate a control information based on the boundary information, wherein The control information includes a length of a control signal and the domain section of the Layer2 protocol;And
One verification and computing module, to according to the length of the domain of the control signal, Layer2 protocol section and this second have Effect data calculate the verification and.
3. network interface controller as claimed in claim 2, wherein the verification and computing module are as unit of 2 bytes to this Second valid data carry out the calculating of the verification sum.
4. network interface controller as claimed in claim 2, wherein the verification and module further include:
One data disassemble module, to receive first valid data, and by first valid data dismantling for this second effectively Data, and execute data dismantling during generate a count information, wherein the count information to indicate this second effectively The starting of data.
5. network interface controller as claimed in claim 4, wherein the verification and control module and the data disassemble module collection At in the same hardware module.
6. network interface controller as claimed in claim 4, wherein the verification and control module are receiving the count information Later, which is generated according to the boundary information, wherein the control signal designation second valid data reach this first The domain section boundary of the domain section and the Layer2 protocol of layer protocol.
7. network interface controller as described in claim 1, wherein the verification and module further include multiple data dismantling moulds Block, multiple verifications and control module and multiple verifications and computing module, wherein:
The multiple data dismantling module executes data tear down operations to multiple first valid data respectively, generate it is multiple this Two valid data;
The multiple verification and control module receive multiple boundary informations corresponding to multiple initial data respectively;And
The multiple verification and computing module are based respectively on multiple boundary informations and the calculating of multiple second valid data is multiple The verification and.
8. network interface controller as claimed in claim 2, the wherein verification and computing module also to:
Calculate a virtual stem verification and;
Based on the control signal calculate the Layer2 protocol domain section verification and;And
Verification based on the virtual stem and and the Layer2 protocol domain section verification and calculate the verification and.
9. network interface controller as claimed in claim 8, wherein the virtual stem includes a source of first layer protocol The length of the domain section of address field section, the destination address domain section of first layer protocol and the Layer2 protocol.
10. network interface controller as claimed in claim 8, wherein the verification and computing module are receiving the control signal Afterwards, start to calculate the domain section of the Layer2 protocol verification and, and after the length for the domain section for receiving the Layer2 protocol, Complete the calculating of the verification sum of the virtual stem.
11. network interface controller as claimed in claim 7, wherein the verification and computing module further include a register, are used With keep in the virtual stem verification and.
12. network interface controller as described in claim 1, wherein the edge determination module will be wrapped in the initial data The invalid data contained is removed to generate a third valid data, and should in the initial data to determine based on the third valid data The information of the information of the domain section of first layer protocol and the domain section of the Layer2 protocol;And
The information of the information of domain section based on first layer protocol and the domain section of the Layer2 protocol generates the boundary information.
13. network interface controller as described in claim 1, wherein the edge determination Module-embedding is in the verification and module In.
14. the domain section of network interface controller as described in claim 1, the wherein Layer2 protocol is included in first layer association In one payload of the domain section of view, which is a network layer protocol, including Internet protocol, the Layer2 protocol For a transport layer protocol, including transmission control protocol and User Datagram Protocol.
15. network interface controller as described in claim 1, wherein the edge determination module is based in the initial data One next stem domain section judges the type of the Layer2 protocol.
16. network interface controller as described in claim 1, wherein the edge determination module is based in the initial data At least one next stem domain section generates the boundary information, and next stem domain section is first whether there is or not extending in the initial data including indicating The information in portion, if the initial data include at least one extend stem, the boundary information further include each extensions stem type and respectively Extend the length information of stem.
17. network interface controller as described in claim 1, wherein the network interface controller is embedded in a chipset.
18. network interface controller as described in claim 1, wherein the network interface controller is a gigabit network Adapter.
19. network interface controller as described in claim 1, wherein the length of the initial data is 64 bits, this first has The length for imitating data is 64 bits, and the length of second valid data is 16 bits.
20. network interface controller as described in claim 1, wherein the network interface controller further includes at least one transmission End after the verification and module the verification and will be filled into a data packet, then via the transmitting terminal sends out the data packet.
CN201810298515.2A 2018-03-27 2018-03-30 Network interface controller Active CN108600194B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201810298515.2A CN108600194B (en) 2018-03-30 2018-03-30 Network interface controller
US16/141,985 US10771364B2 (en) 2018-03-27 2018-09-26 Network interface controller
US16/159,719 US11082318B2 (en) 2018-03-27 2018-10-15 Network interface controller
US16/364,204 US10735290B2 (en) 2018-03-27 2019-03-26 Network device for processing various types of requests

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810298515.2A CN108600194B (en) 2018-03-30 2018-03-30 Network interface controller

Publications (2)

Publication Number Publication Date
CN108600194A true CN108600194A (en) 2018-09-28
CN108600194B CN108600194B (en) 2021-03-23

Family

ID=63624464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810298515.2A Active CN108600194B (en) 2018-03-27 2018-03-30 Network interface controller

Country Status (1)

Country Link
CN (1) CN108600194B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040218623A1 (en) * 2003-05-01 2004-11-04 Dror Goldenberg Hardware calculation of encapsulated IP, TCP and UDP checksums by a switch fabric channel adapter
US7042898B2 (en) * 1997-10-14 2006-05-09 Alacritech, Inc. Reducing delays associated with inserting a checksum into a network message
CN1997982A (en) * 2003-12-11 2007-07-11 国际商业机器公司 Increasing TCP re-transmission process speed
CN101091318A (en) * 2003-12-11 2007-12-19 国际商业机器公司 Data transfer error checking
CN101997859A (en) * 2009-08-28 2011-03-30 国际商业机器公司 Method and equipment for identifying load of packet in TCP stream
CN103532668A (en) * 2013-10-12 2014-01-22 成都阜特科技股份有限公司 Method for ensuring integrity and correctness of TCP (transmission control protocol) communication data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7042898B2 (en) * 1997-10-14 2006-05-09 Alacritech, Inc. Reducing delays associated with inserting a checksum into a network message
US20040218623A1 (en) * 2003-05-01 2004-11-04 Dror Goldenberg Hardware calculation of encapsulated IP, TCP and UDP checksums by a switch fabric channel adapter
CN1997982A (en) * 2003-12-11 2007-07-11 国际商业机器公司 Increasing TCP re-transmission process speed
CN101091318A (en) * 2003-12-11 2007-12-19 国际商业机器公司 Data transfer error checking
CN101997859A (en) * 2009-08-28 2011-03-30 国际商业机器公司 Method and equipment for identifying load of packet in TCP stream
CN103532668A (en) * 2013-10-12 2014-01-22 成都阜特科技股份有限公司 Method for ensuring integrity and correctness of TCP (transmission control protocol) communication data

Also Published As

Publication number Publication date
CN108600194B (en) 2021-03-23

Similar Documents

Publication Publication Date Title
CN104871508B (en) configurable communication controller
US8447884B1 (en) Methods for mapping virtual addresses to physical addresses in a network device and systems thereof
US8543754B2 (en) Low latency precedence ordering in a PCI express multiple root I/O virtualization environment
CN106605399A (en) Technologies for offloading a virtual service endpoint to a network interface card
CN107889529A (en) Share the dynamic data link selection on physical interface
CN103077148B (en) A kind of host communication method of Based PC IE and main frame
CN106796638A (en) Data verification is carried out using enclave certification
US9965405B2 (en) Initial enumeration of empty endpoint slots using endpoint emulation
CN109067807A (en) Safety protecting method, device and electronic equipment based on WEB application firewall overload
CN109587112A (en) It is a kind of send data method, receive data method, equipment and system
US20210034546A1 (en) Transparent encryption
CN205983466U (en) Algorithm accelerator card based on FPGA
US11082318B2 (en) Network interface controller
CN113377596A (en) Method for storing and reading waveform data and related device
CN110392066A (en) A kind of method and apparatus of access service
CN104123173B (en) A kind of method and device for realizing inter-virtual machine communication
WO2022179120A1 (en) Gateway interception method and apparatus, electronic device and storage medium
CN108600194A (en) Network interface controller
CN106650411A (en) Verification system for cryptographic algorithms
US8533377B2 (en) System and method for allocating transaction ID in a system with a plurality of processing modules
CN110149247A (en) A kind of detection method and device of network state
CN117056249B (en) MDIO-to-AHB conversion method, system, equipment and medium
CN108599907B (en) Network interface controller
CN113872826B (en) Network card port stability testing method, system, terminal and storage medium
CN104714911B (en) It can be used for device associated at least one host, method and computer-readable memory at least partly

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 301, 2537 Jinke Road, Zhangjiang High Tech Park, Pudong New Area, Shanghai 201203

Patentee after: Shanghai Zhaoxin Semiconductor Co.,Ltd.

Address before: Room 301, 2537 Jinke Road, Zhangjiang hi tech park, Shanghai 201203

Patentee before: VIA ALLIANCE SEMICONDUCTOR Co.,Ltd.