CN114070796B - Electronic device and frame transmission method for electronic device - Google Patents
Electronic device and frame transmission method for electronic device Download PDFInfo
- Publication number
- CN114070796B CN114070796B CN202010765935.4A CN202010765935A CN114070796B CN 114070796 B CN114070796 B CN 114070796B CN 202010765935 A CN202010765935 A CN 202010765935A CN 114070796 B CN114070796 B CN 114070796B
- Authority
- CN
- China
- Prior art keywords
- frame
- electronic device
- pause
- data packet
- sent
- 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.)
- Active
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 44
- 238000000034 method Methods 0.000 title claims abstract description 21
- 239000000725 suspension Substances 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 4
- 238000009825 accumulation Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/36—Flow control; Congestion control by determining packet size, e.g. maximum transfer unit [MTU]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
Abstract
本公开的实施例涉及电子装置与用于电子装置的帧传送方法,帧传送方法包含有以下步骤:与另一电子装置连线;从另一电子装置接收暂停帧,其中该暂停帧包含了多个数据分组大小范围及对应的多个暂停时间;参考该暂停帧的内容,并根据目前要被发送至该另一电子装置的第一数据分组的大小属于该多个数据分组大小范围中的哪一者,以确定第一帧间距;以及在包含该第一数据分组的第一帧被发送至该另一电子装置后,至少等待该第一帧间距之后才开始发送第二帧至该另一电子装置。
Embodiments of the present disclosure relate to an electronic device and a frame transmission method for the electronic device. The frame transmission method includes the following steps: connecting with another electronic device; receiving a pause frame from the other electronic device, wherein the pause frame includes multiple a data packet size range and corresponding multiple pause times; refer to the content of the pause frame, and according to which of the multiple data packet size ranges the size of the first data packet to be sent to the other electronic device belongs to at present One, to determine the first frame interval; and after the first frame containing the first data packet is sent to the other electronic device, wait at least the first frame interval before starting to send the second frame to the other electronic device electronic device.
Description
技术领域technical field
本发明系关于用于电子装置的帧传送方法。The present invention relates to a frame transmission method for an electronic device.
背景技术Background technique
在IEEE 802.3x规范中,提到了一种暂停帧(pause frame),以供接收端在网络拥塞时传送给传送端,以通知传送端暂缓传送出数据分组来减缓拥塞现象;此外,传送端需要等到暂停帧所指示的暂停时间逾期、或是接收端发送另一数据分组来通知可以继续接收数据分组之后,才可以重新开始传送数据分组至接收端。然而,在上述的操作中,当遇到网络拥塞时,传送端在传输数据分组会一直在全速传输与暂停传输这两种状态之间切换,因而造成数据分组流量极不平均。此外,接收端需要一直检测目前数据分组缓冲器的状态来实时地传送暂停帧,也造成接收端的电路在处理上的负担。In the IEEE 802.3x specification, a pause frame (pause frame) is mentioned for the receiving end to transmit to the transmitting end when the network is congested, so as to inform the transmitting end to suspend the transmission of data packets to alleviate the congestion; in addition, the transmitting end needs Only after the pause time indicated by the pause frame expires, or the receiving end sends another data packet to notify that the data packet can continue to be received, can the data packet be transmitted to the receiving end again. However, in the above-mentioned operations, when the network is congested, the transmitting end will always switch between full-speed transmission and pause transmission when transmitting data packets, thus resulting in extremely uneven flow of data packets. In addition, the receiving end needs to constantly detect the status of the current data packet buffer to transmit the pause frame in real time, which also causes a processing burden on the circuit of the receiving end.
发明内容Contents of the invention
因此,本发明的目的之一在于提出一种用于网络装置的数据分组传送方法,其可以根据数据分组大小来调整在后续数据分组传输后的暂停时间,以使得整体流量较为平均,来避免发送端瞬间传输过多数据分组而导致接收端发生拥塞或是数据分组累积的现象。Therefore, one of the objectives of the present invention is to propose a data packet transmission method for network devices, which can adjust the pause time after subsequent data packet transmission according to the size of the data packet, so that the overall traffic is relatively average, to avoid sending The terminal transmits too many data packets instantaneously, which causes congestion or data packet accumulation at the receiving end.
在本发明的一个实施例中,公开了一种用于一电子装置的帧传送方法,其包含有以下步骤:与另一电子装置连线;从该另一电子装置接收暂停帧,其中该暂停帧包含了多个数据分组大小范围及对应的多个暂停时间;参考该暂停帧的内容,并根据目前要被发送至该另一电子装置的第一数据分组的大小属于该多个数据分组大小范围中的哪一者,以确定第一帧间距;以及在包含该第一数据分组的第一帧被发送至该另一电子装置后,至少等待该第一帧间距之后才开始发送第二帧至该另一电子装置。In one embodiment of the present invention, a frame transmission method for an electronic device is disclosed, which includes the following steps: connecting with another electronic device; receiving a pause frame from the other electronic device, wherein the pause The frame includes multiple data packet size ranges and corresponding multiple pause times; refer to the content of the pause frame and belong to the multiple data packet sizes according to the size of the first data packet currently to be sent to the other electronic device which one of the ranges to determine the first frame interval; and after the first frame containing the first data packet is sent to the other electronic device, wait at least the first frame interval before starting to send the second frame to the other electronic device.
在本发明的另一个实施例中,公开了一种电子装置,包含有:其包含有接收电路、帧间距控制器以及传送电路。该接收电路用以从另一电子装置接收暂停帧,其中该暂停帧包含了多个数据分组大小范围及对应的多个暂停时间;该帧间距控制器用以参考该暂停帧的内容,并根据目前要被发送至该另一电子装置的第一数据分组的大小属于该多个数据分组大小范围中的哪一者,以确定第一帧间距;以及该传送电路用以发送包含该第一数据分组的第一帧至该另一电子装置,并在该第一帧被发送之后,至少等待该第一帧间距之后才开始发送第二帧至该另一电子装置。In another embodiment of the present invention, an electronic device is disclosed, comprising: a receiving circuit, a frame interval controller, and a transmitting circuit. The receiving circuit is used to receive a pause frame from another electronic device, wherein the pause frame includes multiple data packet size ranges and corresponding multiple pause times; the frame interval controller is used to refer to the content of the pause frame, and according to the current Which one of the plurality of data packet size ranges does the size of the first data packet to be sent to the other electronic device belong to, so as to determine the first frame interval; and the transmission circuit is used to transmit the first data packet containing the first data packet to the other electronic device, and after the first frame is sent, at least wait for the first frame interval before starting to send the second frame to the another electronic device.
在本发明的另一个实施例中,公开了一种用于电子装置的帧传送方法,其包含有以下步骤:与另一电子装置连线;传送暂停帧至该另一电子装置,其中该暂停帧包含了多个数据分组大小范围及对应的多个暂停时间,以供该另一电子装置使用;以及从该另一电子装置接收多个帧,其中该多个帧的间距是由该另一电子装置根据该暂停帧所包含的该多个数据分组大小范围及对应的该多个暂停时间而确定的。In another embodiment of the present invention, a frame transmission method for an electronic device is disclosed, which includes the following steps: connecting with another electronic device; transmitting a pause frame to the other electronic device, wherein the pause The frame includes multiple data packet size ranges and corresponding multiple pause times for use by the other electronic device; and receiving multiple frames from the other electronic device, wherein the distance between the multiple frames is determined by the other electronic device The electronic device determines according to the multiple data packet size ranges included in the pause frame and the corresponding multiple pause times.
在本发明的另一个实施例中,公开了一种电子装置,其包含有传送电路以及接收电路。该传送电路用以传送暂停帧至另一电子装置,其中该暂停帧包含了多个数据分组大小范围及对应的多个暂停时间,以供该另一电子装置使用;以及该接收电路用以从该另一电子装置接收多个帧,其中该多个帧的间距是由该另一电子装置根据该暂停帧所包含的该多个数据分组大小范围及对应的该多个暂停时间而确定的。In another embodiment of the present invention, an electronic device including a transmitting circuit and a receiving circuit is disclosed. The sending circuit is used to send a pause frame to another electronic device, wherein the pause frame includes multiple data packet size ranges and corresponding multiple pause times for use by the other electronic device; and the receiving circuit is used for receiving from the other electronic device The other electronic device receives multiple frames, wherein the distance between the multiple frames is determined by the other electronic device according to the multiple data packet size ranges included in the pause frame and the corresponding multiple pause times.
附图说明Description of drawings
图1为根据本发明一实施例的网络系统的示意图。FIG. 1 is a schematic diagram of a network system according to an embodiment of the invention.
图2为根据本发明一实施例的用于电子装置的帧传送方法的流程图。FIG. 2 is a flowchart of a frame transmission method for an electronic device according to an embodiment of the invention.
图3为根据本发明一实施例的暂停帧的示意图。FIG. 3 is a schematic diagram of a pause frame according to an embodiment of the invention.
具体实施方式Detailed ways
图1为根据本发明一实施例的网络系统的示意图。如图1所示,网络系统包含了电子装置110、120,其中电子装置110、120是以网络线130进行连接来进行数据传输与接收,而在本实施例中,电子装置110、120支持全双工以太网络(Full-Duplex Ethernet),且支持IEEE802.3x规范。电子装置110包含了一处理电路111、一接收电路112、一暂停帧解析器114、一帧间距控制器116以及一传送电路118;以及电子装置120包含了一处理电路121、一接收电路122、一暂停帧解析器124、一帧间距控制器126以及一传送电路128。本实施例的电子装置110、120可以是任何可以使用网络线来进行数据传输与接收的电子装置,例如交换器、路由器、或是任何可以连接网络线的电子装置。FIG. 1 is a schematic diagram of a network system according to an embodiment of the invention. As shown in Figure 1, the network system includes electronic devices 110, 120, wherein the electronic devices 110, 120 are connected by a network cable 130 for data transmission and reception, and in this embodiment, the electronic devices 110, 120 support full Duplex Ethernet (Full-Duplex Ethernet), and supports IEEE802.3x specification. The electronic device 110 includes a processing circuit 111, a receiving circuit 112, a pause frame parser 114, a frame interval controller 116, and a transmission circuit 118; and the electronic device 120 includes a processing circuit 121, a receiving circuit 122, A pause frame parser 124 , an interframe controller 126 and a transmission circuit 128 . The electronic devices 110 and 120 in this embodiment can be any electronic devices that can use network cables for data transmission and reception, such as switches, routers, or any electronic devices that can be connected to network cables.
在电子装置110的操作中,同时参考图2所示的流程图。在步骤200,流程开始,且电子装置110与电子装置120建立连线并开始进行信号传送与接收。在步骤202中,接收电路112通过网络线130从电子装置120接收帧/数据分组,并对所接收的帧作解析后传送至处理电路111进行后续的处理,而在本实施例中,接收电路112从电子装置120接收一暂停帧,并将暂停帧传送给暂停帧解析器114来进行解析。在步骤204中,暂停帧解析器114分析所接收到的暂停帧,并判断暂停帧是否符合一特定格式,如果否,流程进入步骤206;如果是,流程进入步骤208。具体来说,参考图3所示的依据本发明一实施例的符合特定格式的暂停帧300的示意图,暂停帧300包含了多个字段,该多个字段依序是7字节的前导码(preamble)、1字节的帧起始定界符(Start Frame Delimiter,SFD)、6字节的目的地址(destinationaddress)、6字节的来源地址(source address)、2字节的类型(type)、2字节的操作码(opcode)、2字节的帧间距控制指标、时间信息#0、#1~#N…等等。需注意的是,图3所示之暂停帧300中的前导码、帧起始定界符、目的地址、来源地址、类型及操作码是IEEE 802.3x规范所定义的字段,其内容及作用可参考IEEE 802.3x规范所述。在本实施例中,由于其中IEEE 802.3x规范中对于2字节的操作码仅有部分码字具有定义,因此,暂停帧300可以通过将操作码设定为目前IEEE 802.3x规范尚未有定义的码字,例如0xff,来表示暂停帧300具有特定格式。在本实施例中,如果是操作码的内容已在目前的IEEE 802.3x规范中有定义,例如操作码0x0001,则暂停帧解析器114判断所接收的暂停帧不符合特定格式;而如果是操作码的内容符合对应到特定格式的码字,例如0xff,则暂停帧解析器114判断所接收的暂停帧符合特定格式。In the operation of the electronic device 110 , refer to the flowchart shown in FIG. 2 at the same time. In step 200, the process starts, and the electronic device 110 establishes a connection with the electronic device 120 and starts to transmit and receive signals. In step 202, the receiving circuit 112 receives the frame/data packet from the electronic device 120 through the network cable 130, and analyzes the received frame and sends it to the processing circuit 111 for subsequent processing. In this embodiment, the receiving circuit 112 receives a pause frame from the electronic device 120, and transmits the pause frame to the pause frame parser 114 for parsing. In step 204 , the pause frame parser 114 analyzes the received pause frame and determines whether the pause frame conforms to a specific format, if not, the process goes to step 206 ; if yes, the process goes to step 208 . Specifically, referring to the schematic diagram of a pause frame 300 conforming to a specific format according to an embodiment of the present invention shown in FIG. preamble), 1-byte start frame delimiter (Start Frame Delimiter, SFD), 6-byte destination address (destination address), 6-byte source address (source address), 2-byte type (type) , 2-byte operation code (opcode), 2-byte frame interval control index, time information #0, #1~#N...etc. It should be noted that the preamble, frame start delimiter, destination address, source address, type and operation code in the pause frame 300 shown in FIG. Refer to the IEEE 802.3x specification. In this embodiment, since only part of the codewords are defined for the 2-byte opcode in the IEEE 802.3x specification, the pause frame 300 can be set to a value that is not yet defined in the current IEEE 802.3x specification. A code word, such as 0xff, to indicate that the pause frame 300 has a specific format. In this embodiment, if the content of the operation code has been defined in the current IEEE 802.3x specification, such as the operation code 0x0001, then the pause frame parser 114 judges that the received pause frame does not conform to a specific format; If the content of the code conforms to a code word corresponding to a specific format, such as 0xff, then the pause frame parser 114 judges that the received pause frame conforms to the specific format.
在步骤204,判断所述符合特定格式的暂停帧300的主要内容在于操作码、帧间距控制指标及时间信息#0~#N的部分,而其余字段的操作与定义可参考IEEE 802.3x规范所述,故以下的叙述中主要针对操作码、帧间距控制指标及时间信息#0~#N来进行说明。In step 204, it is determined that the main content of the pause frame 300 conforming to the specific format is the operation code, the frame spacing control index and the part of time information #0~#N, and the operation and definition of the remaining fields can refer to the IEEE 802.3x specification. Therefore, the following description mainly focuses on the operation code, the inter-frame control index and the time information #0-#N.
在步骤206,由于接收电路112所接收到的暂停帧符合IEEE 802.3x规范所述,因此,电子装置110的操作可以略过帧间距控制器116,而传送电路118暂停后续帧的传送,直到暂停帧内所指示之暂停时间逾期、或是接收电路112接收到可以重启传输的消息为止。In step 206, since the pause frame received by the receiving circuit 112 conforms to the IEEE 802.3x specification, the operation of the electronic device 110 can skip the frame interval controller 116, and the transmission circuit 118 suspends the transmission of subsequent frames until the pause Until the pause time indicated in the frame expires, or the receiving circuit 112 receives a message that the transmission can be restarted.
在步骤208,帧间距控制器116将图3所示的帧间距控制指标及时间信息#0~#N暂存于内部的暂存器或内存中,以供确定后续帧传输时的帧间距。具体来说,帧间距控制指标及时间信息#0~#N整体来说可以视为包含了多个数据分组大小范围及对应的暂停时间,而当处理电路111需要将数据传送至电子装置120时,传送电路118会将目前要传送的数据分组大小的相关消息传送给帧间距控制器116,而帧间距控制器116根据目前要被发送至电子装置120的数据分组大小来确定对应的暂停时间,并据此确定帧间距,以在传送电路118将目前数据分组传送至电子装置120后暂停一段时间(即帧间距)后再开始传送下一个帧。在本实施例中,数据分组大小可以是包含在帧内的网络层或是数据链路层的数据分组的大小。In step 208, the frame spacing controller 116 temporarily stores the frame spacing control indicators and time information #0-#N shown in FIG. 3 in an internal register or memory for determining the frame spacing for subsequent frame transmission. Specifically, the frame spacing control index and time information #0-#N can be regarded as including a plurality of data packet size ranges and corresponding pause times as a whole, and when the processing circuit 111 needs to transmit data to the electronic device 120 , the transmission circuit 118 will transmit the relevant information about the size of the data packet to be transmitted to the interframe controller 116, and the interframe controller 116 determines the corresponding pause time according to the size of the data packet to be sent to the electronic device 120 at present, The frame interval is determined accordingly, so that the transmission circuit 118 pauses for a period of time (ie, the frame interval) after transmitting the current data packet to the electronic device 120 before starting to transmit the next frame. In this embodiment, the data packet size may be the size of a data packet contained in the frame at the network layer or the data link layer.
在一实施例中,暂停帧300的帧间距控制指标可以用来表示多个数据分组大小范围。举例来说,帧间距控制指标包含了2字节(16位),其中第0~3个位可以用来表示16个或16个以下有效的索引值,而第4~15个位可以用来表示一参数INC,其中帧间距控制指标所表示的数据分组大小范围可以如以下表一所示:In one embodiment, the interframe control index of the pause frame 300 may be used to represent multiple data packet size ranges. For example, the frame spacing control index includes 2 bytes (16 bits), of which the 0th to 3rd bits can be used to represent 16 or less valid index values, and the 4th to 15th bits can be used to Indicates a parameter INC, wherein the range of data packet size represented by the frame spacing control index can be shown in Table 1 below:
表一Table I
在表一的内容中,“PKT_S”用来表示数据分组的大小,“B”用来表示字节,而参数INC可以是任意适合的数值,例如64字节。In the content of Table 1, "PKT_S" is used to represent the size of the data packet, "B" is used to represent the byte, and the parameter INC can be any suitable value, such as 64 bytes.
在一实施例中,时间信息#0~#N中的每一者包含2字节(16位),其中第0~3个位可以用来表示与数据分组大小相关的暂停时间、而第0~3个位可以用来表示使用数据分组大小来计算的暂停时间、而第4~15个位可以用来表示固定的暂停时间,其中时间信息#0~#N可以如以下表二所示:In one embodiment, each of the time information #0~#N includes 2 bytes (16 bits), wherein the 0th to 3rd bits can be used to represent the pause time related to the size of the data packet, and the 0th bit ~3 bits can be used to indicate the pause time calculated using the data packet size, and the 4th to 15th bits can be used to represent a fixed pause time, wherein the time information #0~#N can be shown in Table 2 below:
表二Table II
在表二的内容中,时间信息#0对应到表一的索引值“0”、时间信息#1对应到表一的索引值“1”、时间信息#2对应到表一的索引值“2”、…以此类推。“T”用来表示暂停时间的长度,其中“T”可以是8位时间(bit time),且位时间是电子装置100传送8位数据所需的时间;举例来说,对于100Mbps(Million bits per second,每秒兆位)以太网络来说,1位时间是10纳秒;而对1000Mbps以太网络来说,1位时间是1纳秒。此外,使用数据分组大小来计算的暂停时间可以直接取计算结果的整数部分,且时间信息#0~#N的暂停时间为表二的使用数据分组大小来计算的暂停时间与固定的暂停时间的总和。In the content of Table 2, time information #0 corresponds to the index value "0" of Table 1, time information #1 corresponds to the index value "1" of Table 1, and time information #2 corresponds to the index value "2" of Table 1 ", ... and so on. "T" is used to indicate the length of the pause time, wherein "T" can be 8 bit time (bit time), and the bit time is the time required for the electronic device 100 to transmit 8-bit data; for example, for 100Mbps (Million bits per second, megabits per second) Ethernet, 1 bit time is 10 nanoseconds; and for 1000Mbps Ethernet, 1 bit time is 1 nanosecond. In addition, the pause time calculated using the data packet size can directly take the integer part of the calculation result, and the pause time of time information #0~#N is the difference between the pause time calculated using the data packet size and the fixed pause time in Table 2 sum.
在一范例中,假设目前传送电路118准备传送130字节的数据分组至电子装置120,当参数INC设为64字节,则由于数据分组大小对应到表一的索引值“2”,因此,其暂停时间的计算对应到表二的时间信息#2,其中使用数据分组大小来计算的暂停时间为65*T、而固定的暂停时间为2*T,因此,通过表二所计算出的暂停时间为67*T。In one example, assuming that the transmission circuit 118 is currently preparing to transmit a 130-byte data packet to the electronic device 120, when the parameter INC is set to 64 bytes, since the data packet size corresponds to the index value "2" in Table 1, therefore, The calculation of the pause time corresponds to the time information #2 in Table 2, where the pause time calculated using the data packet size is 65*T, and the fixed pause time is 2*T. Therefore, the pause time calculated by Table 2 The time is 67*T.
在确定传送电路118所需传送的帧的暂停时间之后,帧间距控制器116可以根据此暂停时间来确定帧间距。具体来说,由于IEEE802.3x定义了连续两笔帧的间距至少要有96位时间的一最小默认间距,因此,帧间距控制器116可以将上述根据表二所计算出的暂停时间加上96位时间来得到最终的帧间距。举例来说,假设目前传送电路118准备传送130字节的数据分组至电子装置120,根据表二所计算出的暂停时间为67*8位时间,则帧间距控制器116最终所确定的帧间距为(96+67*8)位时间。After determining the pause time of the frames to be transmitted by the transmission circuit 118, the frame interval controller 116 may determine the frame interval according to the pause time. Specifically, since IEEE802.3x defines a minimum default interval of at least 96 bit times for the interval between two consecutive frames, the frame interval controller 116 can add 96 to the above-mentioned pause time calculated according to Table 2 bit times to get the final frame spacing. For example, assuming that the transmitting circuit 118 is currently preparing to transmit a 130-byte data packet to the electronic device 120, and the pause time calculated according to Table 2 is 67*8 bit time, the frame spacing finally determined by the frame spacing controller 116 is (96+67*8) bit times.
需注意的是,上述计算出暂停时间以及帧间距的内容仅为范例说明,而并非作为本发明的限制,只要帧间距控制器116可以根据目前要传送的数据分组大小来确定不同的帧间距,上述表一、表二的内容可以做对应的修改、或是可以整合成单一个查找表来直接根据数据分组大小来确定对应的帧间距,而这些相关的实施变化均应隶属于本发明的范畴。It should be noted that the above calculation of the pause time and the frame interval is only an example and not a limitation of the present invention, as long as the frame interval controller 116 can determine different frame intervals according to the size of the data packet to be transmitted at present, The contents of the above Table 1 and Table 2 can be modified accordingly, or can be integrated into a single lookup table to directly determine the corresponding frame spacing according to the size of the data packet, and these related implementation changes should belong to the scope of the present invention .
在步骤210,传送电路118将帧传送至电子装置120中,且流程回到步骤208。此外,在完成帧传送之后,传送电路118会暂停一段时间后再传送下一个帧,以使得下一个帧与目前传送的帧具有上述所确定的帧间距。详细来说,假设传送电路118需要依序传送第一帧、第二帧以及第三帧,则帧间距控制器116可以根据上述机制来确定对应于第一帧的第一帧间距以及对应于第二帧的第二帧间距,以使得第一帧在结束传送后暂停第一帧间距的时间后才开始传送第二帧,并在第二帧在结束传送后暂停第二帧间距的时间后才开始传送第三帧。In step 210 , the transmitting circuit 118 transmits the frame to the electronic device 120 , and the process returns to step 208 . In addition, after the frame transmission is completed, the transmission circuit 118 will pause for a period of time before transmitting the next frame, so that the next frame and the currently transmitted frame have the above-mentioned determined frame distance. In detail, assuming that the transmitting circuit 118 needs to transmit the first frame, the second frame and the third frame in sequence, the frame interval controller 116 can determine the first frame interval corresponding to the first frame and the frame interval corresponding to the second frame according to the above mechanism. The second interframe interval for two frames, such that the first frame does not start transmitting the second frame until after the end of its transmission for a pause of the first interframe interval, and the second frame does not start transmitting until after the second frame pauses for the second interframe interval. Start transmitting the third frame.
需注意的是,如果是一开始电子装置120所传送而来的暂停帧为具有图3所示的暂停帧300,则帧间距控制器116会将暂停帧300所记载的数据分组大小范围与对应的暂停时间或是帧间距的信息暂存在其中,而后续每当传送电路118要被发送数据分组时,帧间距控制器116会逐一地确定每一个数据分组在传送之后与下一个帧的帧间距,以准确地控制电子装置110传送至电子装置120的网络流量,如此一来可以避免先前技术中所述电子装置110的传输速度严重不均的问题。此外,由于暂停帧300所记载的数据分组大小范围与对应的暂停时间或是帧间距的信息是暂存在内存或是帧间距控制器116中的暂存器,以供后续长期使用,故电子装置120可以不需要常常发送暂停帧至电子装置110,而只要在有需要的时候(例如,突然发生网络拥塞)再传送一个新的暂停帧300来更新数据分组大小范围与对应的暂停时间或是帧间距,以使得每一个数据分组在传输后续有更大的帧间距即可。It should be noted that if the pause frame transmitted by the electronic device 120 is the pause frame 300 shown in FIG. The pause time or the information of the frame interval is temporarily stored in it, and then whenever the transmission circuit 118 is to send a data packet, the frame interval controller 116 will determine the frame interval between each data packet after transmission and the next frame one by one , so as to accurately control the network traffic transmitted from the electronic device 110 to the electronic device 120, so that the problem of severe uneven transmission speed of the electronic device 110 in the prior art can be avoided. In addition, because the data packet size range recorded in the pause frame 300 and the corresponding pause time or frame interval information are temporarily stored in the internal memory or the temporary register in the frame interval controller 116 for subsequent long-term use, the electronic device 120 may not need to send a pause frame to the electronic device 110 frequently, but only needs to transmit a new pause frame 300 to update the data packet size range and the corresponding pause time or frame when necessary (for example, a sudden network congestion occurs) interval, so that each data packet has a larger frame interval after transmission.
此外,由于电子装置110、120之网络接口的速率不得高于网络供货商的承诺信息速率(Committed Information Rate,CIR),因此,电子装置110、120如果是使用最高速率来传输的话,会造成电子装置110、120持续在全速传输与暂停传输这两种状态之间切换。因此,电子装置120可以根据上述的承诺信息速率来确定数据分组大小范围与对应的暂停时间或是帧间距的信息,并将这些信息载在暂停帧300后传送给电子装置110,以使得电子装置110、120之间流量较为平均。In addition, since the speed of the network interface of the electronic device 110, 120 cannot be higher than the Committed Information Rate (CIR) of the network provider, if the electronic device 110, 120 uses the highest speed for transmission, it will cause The electronic devices 110, 120 are continuously switching between full speed transmission and pause transmission. Therefore, the electronic device 120 can determine the data packet size range and the corresponding pause time or frame interval information according to the above-mentioned committed information rate, and transmit these information to the electronic device 110 after the pause frame 300, so that the electronic device The traffic between 110 and 120 is relatively average.
在以上实施例的说明之中,电子装置110是接收来自电子装置120的暂停帧、并根据数据分组大小来确定帧间距后将帧传送至电子装置120,然而,由于电子装置110、120支持全双工以太网络,故类似地,电子装置120也可接收来自电子装置110的暂停帧、并根据数据分组大小来确定帧间距后将帧传送至电子装置110。由于具有相同或类似地操作,亦即电子装置120之处理电路121、接收电路122、暂停帧解析器124、帧间距控制器126及传送电路128的操作类似上述电子装置110的处理电路111、接收电路112、暂停帧解析器114、帧间距控制器116及传送电路118,故相关细节不再赘述。In the description of the above embodiments, the electronic device 110 receives the pause frame from the electronic device 120, determines the frame interval according to the size of the data packet, and then transmits the frame to the electronic device 120. Duplex Ethernet, so similarly, the electronic device 120 can also receive the pause frame from the electronic device 110 and transmit the frame to the electronic device 110 after determining the frame interval according to the size of the data packet. Due to the same or similar operations, that is, the processing circuit 121, receiving circuit 122, pause frame parser 124, frame interval controller 126, and transmitting circuit 128 of the electronic device 120 operate similarly to the processing circuit 111, receiving circuit 128 of the above-mentioned electronic device 110. The circuit 112 , the pause frame parser 114 , the frame interval controller 116 and the transmission circuit 118 , so the relevant details will not be repeated here.
简要归纳本发明,在本发明的电子装置与相关的帧传送方法中,在接收到来自另一电子装置的暂停帧之后,电子装置内部的帧间距控制器可以根据暂停帧中所记载的数据分组大小范围及对应的暂停时间,来确定后续传送帧后所需的帧间距。通过本发明,电子装置之间的流量可以被适当地控制,以避免先前技术中当网络拥塞时帧传输会一直在全速传输与暂停传输这两种状态之间切换的问题,且另一电子装置也不需要一直传送暂停帧而造成处理上的负担。To briefly summarize the present invention, in the electronic device and related frame transmission method of the present invention, after receiving a pause frame from another electronic device, the frame interval controller inside the electronic device can group data according to the data recorded in the pause frame The size range and the corresponding pause time are used to determine the frame spacing required after subsequent frames are transmitted. Through the present invention, the traffic between electronic devices can be properly controlled, so as to avoid the problem in the prior art that when the network is congested, the frame transmission will always switch between the two states of full speed transmission and pause transmission, and another electronic device There is also no need to transmit pause frames all the time to cause a processing burden.
以上所述仅为本发明之较佳实施例,凡依本发明申请专利范围所做之均等变化与修饰,皆应属本发明之涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the scope of the patent application of the present invention shall fall within the scope of the present invention.
【符号说明】【Symbol Description】
110:电子装置110: Electronic device
111:处理电路111: Processing circuit
112:接收电路112: Receive circuit
114:暂停帧解析器114:Pause frame parser
116:帧间距控制器116:Frame spacing controller
118:传送电路118: transmission circuit
120:电子装置120: electronic device
121:处理电路121: processing circuit
122:接收电路122: Receive circuit
124:暂停帧解析器124:Pause frame parser
126:帧间距控制器126:Frame spacing controller
128:传送电路128: transmission circuit
130:网络线130: network cable
200~210:步骤200~210: steps
300:暂停帧300: pause frame
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010765935.4A CN114070796B (en) | 2020-08-03 | 2020-08-03 | Electronic device and frame transmission method for electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010765935.4A CN114070796B (en) | 2020-08-03 | 2020-08-03 | Electronic device and frame transmission method for electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114070796A CN114070796A (en) | 2022-02-18 |
CN114070796B true CN114070796B (en) | 2023-08-29 |
Family
ID=80231612
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010765935.4A Active CN114070796B (en) | 2020-08-03 | 2020-08-03 | Electronic device and frame transmission method for electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114070796B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114513385B (en) * | 2022-03-24 | 2024-04-02 | 深圳市元征科技股份有限公司 | Data transmission method, device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6031821A (en) * | 1997-08-19 | 2000-02-29 | Advanced Micro Devices, Inc. | Apparatus and method for generating a pause frame in a buffered distributor based on lengths of data packets distributed according to a round robin repeater arbitration |
US6035333A (en) * | 1997-11-24 | 2000-03-07 | International Business Machines Corporation | Method and system for providing congestion control in a data communications network |
KR20040005185A (en) * | 2002-07-08 | 2004-01-16 | 삼성전자주식회사 | apparatus and method for flow control data frame transmission in the ethernet networks |
US7369496B1 (en) * | 1998-12-02 | 2008-05-06 | Notel Networks Limited | Flow control of frame based data over a synchronous digital network |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7061866B2 (en) * | 2002-01-10 | 2006-06-13 | Intel Corporation | Metered packet flow for packet switched networks |
US9231870B2 (en) * | 2011-12-22 | 2016-01-05 | International Business Machines Corporation | Flexible and scalable data link layer flow control for network fabrics |
-
2020
- 2020-08-03 CN CN202010765935.4A patent/CN114070796B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6031821A (en) * | 1997-08-19 | 2000-02-29 | Advanced Micro Devices, Inc. | Apparatus and method for generating a pause frame in a buffered distributor based on lengths of data packets distributed according to a round robin repeater arbitration |
US6035333A (en) * | 1997-11-24 | 2000-03-07 | International Business Machines Corporation | Method and system for providing congestion control in a data communications network |
US7369496B1 (en) * | 1998-12-02 | 2008-05-06 | Notel Networks Limited | Flow control of frame based data over a synchronous digital network |
KR20040005185A (en) * | 2002-07-08 | 2004-01-16 | 삼성전자주식회사 | apparatus and method for flow control data frame transmission in the ethernet networks |
Also Published As
Publication number | Publication date |
---|---|
CN114070796A (en) | 2022-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108418767B (en) | Data transmission method, device and computer storage medium | |
CN109412964B (en) | Message control method and network device | |
WO2018210117A1 (en) | Congestion control method, network device, and network interface controller thereof | |
CN101582839B (en) | Method, device and system for regulating data traffic | |
US8649398B2 (en) | Packet network interface apparatus and method | |
CN101322357A (en) | Explicit Flow Control in Gigabit/10 Gigabit Ethernet Systems | |
KR101422805B1 (en) | System and method for transferring data packets through a communication system | |
CN110943933A (en) | A method, device and system for realizing data transmission | |
US8908510B2 (en) | Communication link with intra-packet flow control | |
JP6236945B2 (en) | Transmission apparatus, transmission system, and transmission method | |
US11601375B2 (en) | Electronic device and frame transmission method of electronic device | |
CN114070796B (en) | Electronic device and frame transmission method for electronic device | |
US9548929B2 (en) | Frame transfer apparatus and frame transfer method | |
JP2008118281A (en) | Communication device | |
JP2006217242A (en) | Radio communication method and radio communication device | |
US8036128B2 (en) | Method for communicating backpressure messages in a data communications system | |
TWI789062B (en) | Electronic device and frame transmission method of electronic device | |
CN116074157B (en) | Electronic device and frame transmission method for electronic device | |
US8583822B2 (en) | Method and system for minimum frame size support for a communication protocol encapsulated over Ethernet | |
CN105959626B (en) | A kind of monitoring display screen configuration information transmission method and device | |
TWI799259B (en) | Electronic device and flow control method thereof | |
JP5588795B2 (en) | Transmission equipment | |
US8976812B2 (en) | Communication apparatus and band control method | |
JP6281338B2 (en) | Transmission apparatus and transmission method | |
WO2021073570A1 (en) | Communication method, apparatus and system |
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 |