New! View global litigation for patent families

CN102014076B - PCIe retry buffer area and realization method thereof - Google Patents

PCIe retry buffer area and realization method thereof Download PDF

Info

Publication number
CN102014076B
CN102014076B CN 201010620829 CN201010620829A CN102014076B CN 102014076 B CN102014076 B CN 102014076B CN 201010620829 CN201010620829 CN 201010620829 CN 201010620829 A CN201010620829 A CN 201010620829A CN 102014076 B CN102014076 B CN 102014076B
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
area
buffer
data
index
pcie
Prior art date
Application number
CN 201010620829
Other languages
Chinese (zh)
Other versions
CN102014076A (en )
Inventor
付旺超
吴晓晔
周志波
安佰岳
殷晔
王石记
Original Assignee
北京航天测控技术有限公司
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
Grant date

Links

Abstract

The invention discloses a PCIe retry buffer and a realization method thereof. The method comprises the following steps: developing two independent storage areas respectively as a data buffer area and an index buffer area; utilizing the data buffer area to a massage submitted to a PCIe data link layer by a PCIe transaction layer; dividing the index buffer area into a plurality of areas with the same length; utilizing each area as an index unit to store the index information of the massages in the data buffer area, wherein the index units are organized in a linked list mode, and the index information comprises an occupying sign, a linked list head sign, a linked list indicator, a massage initial address and the massage length; and utilizing a management unit to realize the dynamic management of the data buffer area and the index buffer area. In the invention, the realization method of the PCIe retry buffer area is a key technology for the PCIe data link layer and can ensure the integrity of data massage transmission of the PCIe data link layer.

Description

一种PC I e重试缓冲区及其实现方法 One kind of PC I e retry buffer and Implementation

技术领域 FIELD

[0001] 本发明涉及计算机总线技术领域,特别是涉及一种PCIe重试缓冲区及其实现方法。 [0001] The present invention relates to the field of computer bus technology, particularly to a PCIe retry buffer and implementation.

背景技术 Background technique

[0002] 为了适应计算机技术的发展,提出了第3代计算机I/O技术,即PCIe总线技术,相对于传统的PCI总线技术,PCIe总线在带宽、时延、简化I/O等方面都有不同等级的性能提升,如在带宽指标方面,PCIe相对于PCI可提升几倍至上百倍。 [0002] In order to adapt to the development of computer technology, proposed third generation computer I / O technology, i.e. PCIe bus, a PCI bus with respect to the conventional technique, the PCIe bus bandwidth, delay, simplification of I / O and the like have different levels to enhance the performance, such as bandwidth indicators, PCI can be improved with respect to the PCIe oriented hundred times. PCIe采用了PCI所建立的软件构架,能在无需改动原有的PCI测试系统软件架构的基础上采用PCI Express新技术, 能和操作系统、BIOS保持100%的兼容。 PCIe uses a software architecture PCI established, can in no need to change the use of PCI Express technology based on the original PCI test system software architecture, performance and operating system, BIOS compatibility 100%.

[0003] 在PCIe协议中包括PCIe物理层、PCIe数据链路层和PCIe事务层。 [0003] In PCIe PCIe protocol comprises a physical layer, data link layer and PCIe PCIe transaction layer. 其中,PCIe数据链路层具有数据重发功能:在PCIe事务层提交给PCIe数据链路层报文时,当检测到报文未成功发送至数据链路层时,执行重发功能。 Wherein, data having a PCIe data link layer retransmission function: when submitted to the PCIe data link layer in the PCIe transaction layer packet, when detecting that packets are not successfully transmitted to the data link layer performs a retransmission function. 但是,目前还没有公开文件披露如何简便地实现该功能。 However, there are no public documents disclose how to easily implement this functionality.

发明内容 SUMMARY

[0004] 有鉴于此,本发明提供了一种PCIe总线接口中的重试缓冲区,能够在PCIe事务层提交给PCIe数据链路层的报文未成功发送至数据链路层时,实现报文重发功能,从而保证PCIe数据链路层数据报文传输的完整性。 When [0004] Accordingly, the present invention provides a retry buffer is one kind of PCIe bus interface, can be presented to the data link layer in the PCIe PCIe transaction layer packets is not successfully transmitted to the data link layer, to achieve packet packet retransmission function to ensure the integrity of the PCIe data link layer data packet transmission.

[0005] 该方案是这样实现的: [0005] The program is implemented:

[0006] 一种PCIe重试缓冲区的实现方法,包括: [0006] A PCIe retry buffer implemented method, comprising:

[0007] 开辟两个独立的存储区作为数据缓冲区和索引缓冲区;数据缓冲区用于存储PCIe事务层提交给PCIe数据链路层的报文;索引缓冲区划分为多个长度相同的区域,每个区域作为一个索引单元存储数据缓冲区报文的索引信息,多个索引单元采用链表方式组织; [0007] open two separate storage area as the data and index buffers; data buffer for storing packets submitted to the PCIe transaction layer PCIe data link layer; index buffer is divided into a plurality of identical length region each region index as a data buffer unit storing index information packet, the plurality of linked list is organized indexing unit;

[0008] 所述索引信息包括: [0008] The index information comprises:

[0009] 占用标记:表示本索引单元是否被占用; [0009] occupancy flag: indicates whether the cell is occupied codebook index;

[0010] 链表头部标记:表示本索引信息对应的报文是否位于链表头部; [0010] list header mark: indicates index information corresponding to the packet linked list head is located;

[0011] 链表指针:记录下一包报文对应的索引单元在索引缓冲区中的起始地址; [0011] pointer list: recording start address of the next packet corresponding to the packet index in the index buffer unit;

[0012] 报文起始地址:记录本索引信息对应的报文在数据缓冲区中的起始地址; [0012] packet start address: recording index information corresponding to the starting address in data packets in the buffer;

[0013] 报文长度:记录本索引信息对应的报文长度; [0013] Packet length: length packet recording index information corresponding to the present;

[0014] 在检测到PCIe事务层报文发送事件时,将报文存入数据缓冲区,建立相应索引信息存入一未被占用的索引单元;当检测到数据链路层的ACK事件时,根据索引信息查找ACK 消息对应的报文,将该报文对应的索引单元置为未被占用并更新相关索引单元的链表头部标记和链表指针;当检测到数据链路层的NAK事件时,根据索引信息查找NAK消息对应的报文并重新发送。 [0014] Upon detecting the PCIe transaction layer packet transmission events, data packets stored in the buffer, establishing a corresponding index information into the index cell unoccupied; event upon detection of the ACK data link layer, the ACK message to find the index information corresponding to the packet, the packet is set to the corresponding index cell unoccupied and updates the list head pointer list and a flag associated index unit; when the event is detected NAK data link layer, according to the index information and resend the message to find the corresponding NAK message. [0015] 其中,所述在检测到PCIe事务层报文发送事件时,将报文存入数据缓冲区,建立相应索引信息存入一未被占用的索引单元的步骤包括: Step [0015] wherein, upon detection of the PCIe transaction layer packet transmission events, data packets stored in the buffer, to establish the corresponding index information is stored in an index cell unoccupied comprises:

[0016] 当检测到PCIe事务层发送给PCIe数据链路层的报文时,将所发送报文存储到数据缓冲区中,在索引缓冲区中查找一个占用标记为未被占用的索引单元,更新该查找到的索引单元中的字段内容,令链表指针指向下一个未被占用的索引单元。 [0016] When detecting the PCIe transaction layer packet to a PCIe data link layer, the transmitted message is stored into the data buffer, a lookup index cell is marked as occupied in the index unoccupied buffer, updating the contents of the field found in the index unit, so that the list index pointer to the next cell unoccupied.

[0017] 其中,所述当检测到数据链路层的ACK事件时,根据索引信息查找ACK消息对应的报文,将该报文对应的索引单元置为未被占用并更新相关索引单元的链表头部标记和链表指针的步骤为: [0017] wherein, when the ACK is detected event data link layer, according to the index information to find the corresponding ACK message packet, the corresponding packet is set to the index cell unoccupied and updates the index lists related to unit and the step of marking the list head pointer is:

[0018] 当收到来自数据链路层的接收确认ACK消息时,从ACK消息中获取报文序列号, 根据所述链表头部标记和所述链表指针,从链表头部位置开始依次查找各索引信息对应的报文是否符合获取的报文序列号,将报文序列号相同的报文对应的索引单元更新为未被占用,并更新相关索引单元中链表头部标记和链表指针的内容。 [0018] When receiving from the data link layer receives acknowledgment ACK message to obtain the packet sequence number from the ACK message, according to the head of the list and the list pointer flag, sequentially from the list to find the head position of each index information corresponding to the packet sequence numbers whether the acquired packet, the same packet unit corresponding to the index update packet sequence number is unoccupied, and updates the relevant contents of the index mark and the head unit in the linked list chain pointer.

[0019] 其中,所述当检测到数据链路层的NAK事件时,根据索引信息查找NAK消息对应的报文并重新发送的步骤为: [0019] wherein, when said event is detected NAK data link layer, the steps to find the index information corresponding to the NAK message and retransmitted packets is:

[0020] 当收到来自数据链路层的未接收到NAK消息时,从NAK消息中获取报文序列号,根据所述链表头部标记和所述链表指针,从链表头部位置开始依次查找各索引信息对应的报文是否符合获取的报文序列号,将报文序列号相同的报文重新发送。 [0020] When receiving from the data link layer is not received NAK message to obtain the packet sequence number in the NAK message, according to the head of the list and the list pointer flag, sequentially starting from the head position to find the list each index information corresponding to the message meets the packet sequence numbers acquired, it will resend the same packet sequence numbers of packets.

[0021] 较佳地,所述将所发送报文存储到数据缓冲区中为:将所发送报文存储到数据缓冲区中的数据尾部,当数据缓冲区存满后,从数据缓冲区的头部开始存储报文,并覆盖原有数据。 [0021] Preferably, the transmitted message will be stored in the data buffer is: The transmitted message is stored to the data tail in the data buffer, when the data buffer becomes full, data from the buffer head start storing messages and overwrite the original data.

[0022] 本发明还公开了一种PCIe重试缓冲区,包括:数据缓冲区、索引缓冲区和管理单元;数据缓冲区和索引缓冲区为两个独立的存储区; [0022] The present invention also discloses a PCIe retry buffer, comprising: a data buffer, the index buffer and management unit; data and index buffers of two separate memory areas;

[0023] 数据缓冲区用于存储PCIe事务层提交给PCIe数据链路层的报文; [0023] The data buffer for storing the PCIe transaction layer packets submitted to the PCIe data link layer;

[0024] 索引缓冲区划分为多个长度相同的区域,每个区域作为一个索引单元存储数据缓冲区报文的索引信息,多个索引单元采用链表方式组织;所述索引信息包括: [0024] The index buffer is divided into a plurality of regions of the same length, each area storing data as a packet buffer unit index index information, a plurality of linked list is organized indexing unit; the index information comprises:

[0025] 占用标记:表示本索引单元是否被占用; [0025] occupancy flag: indicates whether the cell is occupied codebook index;

[0026] 链表头部标记:表示本索引信息对应的报文是否位于链表头部; [0026] The list header mark: indicates index information corresponding to the packet linked list head is located;

[0027] 链表指针:记录下一包报文对应的索引单元在索引缓冲区中的起始地址; [0027] The pointer list: recording start address of the next packet corresponding to the packet index in the index buffer unit;

[0028] 报文起始地址:记录本索引信息对应的报文在数据缓冲区中的起始地址; [0028] The packet start address: recording index information corresponding to the starting address in data packets in the buffer;

[0029] 报文长度:记录本索引信息对应的报文长度; [0029] Packet length: length packet recording index information corresponding to the present;

[0030] 所述管理单元,用于轮询检测PCIe事务层报文发送事件、来自数据链路层的ACK 事件和来自数据链路层的NAK事件,在检测到PCIe事务层报文发送事件时,将报文存入数据缓冲区,建立相应索引信息存入未被占用的索引单元;当检测到数据链路层的ACK事件时,根据索引信息查找ACK消息对应的报文,将该报文对应的索引单元置为未被占用并更新相关索引单元的链表头部标记和链表指针;当检测到数据链路层的NAK事件时,根据索引信息查找NAK消息对应的报文并重新发送。 [0030] The management unit, for detecting a polling event message transmission PCIe transaction layer, data link layer events from the ACK and the NAK from the data link layer event, upon detection of the PCIe transaction layer packets event , the packet data stored in the buffer, to establish the corresponding index information into the index cell unoccupied; when the detected event data link layer ACK, ACK message to find the corresponding packet according to the index information, the packet unit is set to the corresponding index unoccupied and updates the list head pointer list and a flag associated index unit; upon detection of the event data link layer NAK, NAK message to find the corresponding packet according to the index information and resend.

[0031] 其中,所述管理单元包括接口适配模块、报文添加管理模块、报文重新发送管理模块和报文删除管理模块; [0031] wherein the management unit includes an interface adapter module, adding the message management module, the message re-transmission management module and the management module deleting the message;

[0032] 所述接口适配模块,用于轮询检测PCIe事务层报文发送事件、来自数据链路层的ACK事件和来自数据链路层的NAK事件;如果检测到PCIe事务层报文发送事件则启动报文添加管理模块,如果收到来自数据链路层的ACK消息,则启动报文删除管理模块,如果收到来自数据链路层的NAK消息,则启动报文重新发送管理模块; [0032] The interface adapter module for polling detecting PCIe transaction layer packet transmission events, events from the ACK and NAK data link layer event from the data link layer; if it is detected PCIe transaction layer packets start adding the event message management module, if you receive an ACK message from the data link layer, then start deleting the message management module, if NAK message is received from the data link layer, then start re-send the message management module;

[0033] 所述报文添加管理模块包括空闲索引单元检索子模块、数据空间检索子模块、索引信息添加子模块和数据写入子模块;所述空闲索引单元检索子模块,在索引缓冲区中查找一个占用标记为未被占用的索引单元,将查找到的索引单元的地址告知索引信息添加子模块;数据空间检索子模块在数据缓冲区中查找可分配空间,将可分配空间地址告知索引信息添加子模块和数据写入子模块;索引信息添加子模块根据被告知信息更新未被占用的索引单元中的索引信息,令链表指针指向下一个未被占用的索引单元;数据写入子模块将PCIe事务层报文写入被告知的地址; [0033] The packet management module comprises adding cell search submodule free index, the data sub-module space retrieval, indexing information and data write submodule submodule; the cell search submodule free index in the index buffer Find the index mark occupying a unit is not occupied, the index into the address lookup unit informs index information adding submodule; Find data space retrieval sub-module may allocate space in the data buffer, the address space can be assigned index information informed adding submodule and data write sub-module; index information adding submodule according to the index information in the index information updating unit is informed of unoccupied, so that the list index pointer to a unit unoccupied; data write sub-module PCIe transaction layer packet written address to be informed;

[0034] 所述报文删除管理模块包括索引单元检索子模块1、报文序列号比对子模块1和索引信息更新子模块;所述索引单元检索子模块1用于根据所述链表头部标记和所述链表指针,从链表头部位置开始依次查找各索引单元;报文序列号比对子模块1用于对比索引单元检索子模块1查找到的索引单元对应的报文的序列号与ACK消息中的报文序列号,当序列号相同时,通知索引信息更新子模块;所述索引信息更新子模块在收到通知时,将当前索引单元更新为未被占用,并更新相关索引单元中链表头部标记和链表指针的内容; [0034] The packet management module includes an index deleting unit retrieves a sub-module, the packet sequence number than sub-module 1 and index information updating sub-module; unit retrieves the index sub-module 1 according to the head of the linked list marker and the pointer list, each index units sequentially find the starting position of the head from the list; packet sequence numbers than the comparative index submodule 1 cell search for a sub-module to find an index corresponding to the cell and the packet sequence number ACK message packet sequence number when the sequence number is the same, the index information notification updating sub-module; the index information updating sub-module upon receipt of the notification, the unit updates the current index is unoccupied, and update the index unit content list head pointer list and marking;

[0035] 所述报文重新发送管理模块包括索引单元检索子模块2、报文序列号比对子模块2和报文重发子模块;所述索引单元检索子模块2用于根据所述链表头部标记和所述链表指针,从链表头部位置开始依次查找各索引单元;报文序列号比对子模块2用于对比索引单元检索子模块2查找到的索引单元对应的报文序列表与NAK消息中的报文序列号,当序列号相同时,通知报文重发子模块;所述报文重发子模块在收到通知时,将序列号相同的报文重新发送。 [0035] The re-transmitting said packet management module 2, the packet sequence number than the sub-module 2 and retransmitted packets comprises a sub-module sub-module retrieval index unit; retrieves the index cell submodule 2 to the linked list in accordance with marker and the head pointer list, each index units sequentially find the starting position of the head from the list; packet sequence numbers than the submodule 2 cell search index used for comparison submodule 2 to find an index packet unit corresponding to sequence Listing the NAK message packet sequence numbers, when the serial number, and notify the packet retransmission sub-module; the packet retransmission sub-module upon receipt of the notification, the same re-transmission sequence number of packets.

[0036] 本发明的有益效果如下: [0036] Advantageous effects of the present invention are as follows:

[0037] 本发明提出的PCIe重试缓冲区实现方法提供了一种好的重试缓冲区实现架构, 是PCIe数据链路层一个重要关键技术,能够解决PCIe数据链路层数据报文传输完整性问题,而且该架构中的索引缓冲区由多个相同长度的索引单元组成,索引信息设计合理,便于工程实现和工程维护。 [0037] PCIe proposed retry buffer of the present invention provides a method to achieve good retry buffer implementation architecture, PCIe data link layer is an important key technology to solve the PCIe data link layer data packet transmission complete problems, and the index buffer architecture by the index unit composed of a plurality of the same length, the index information rational design, easy to implement engineering and maintenance works.

[0038] 此外,该方法中的数据缓冲区在使用时,新的数据增加到数据缓冲区尾部即可,当数据缓冲区存满后,从数据缓冲区的头部开始存储报文,并覆盖原有数据,这样不需要从数据缓冲区删除数据,节省了操作,而且支持可变报文长度可以有效地利用存储空间。 [0038] In addition, the process data in the buffer in use, the new data is added to the tail of the data buffer, when the buffer becomes full of data, starting from the head data buffer storing the message, and cover original data, this does not need to remove data from the data buffer, saving operation, and supports variable length packet storage space can be utilized effectively.

附图说明 BRIEF DESCRIPTION

[0039] 图1是本发明实施例的一种PCIe重试缓冲区实现方法的结构示意图。 [0039] FIG. 1 is a block diagram of an embodiment of the retry buffer PCIe implementation of the method embodiment of the present invention.

[0040] 图2是本发明PCIe重试缓冲区中管理单元的结构示意图。 [0040] PCIe FIG. 2 is a schematic structural diagram of the present invention, the retry buffer management unit.

具体实施方式 detailed description

[0041] 下面结合附图和实施例,对本发明的具体实施方式作进一步详细描述。 [0041] The following embodiments and the accompanying drawings, specific embodiments of the present invention will be further described in detail.

[0042] 本发明实施例的一种PCIe重试缓冲区实现方法如图1所示,该方法基于数据缓冲区、索引缓冲区和一个管理单元。 [0042] An embodiment of the present invention PCIe retry buffer implementation shown in Figure 1, which is based on data buffers, index buffers, and a management unit. 数据缓冲区和索引缓冲区为两个独立的存储区,数据缓冲区存储PCIe事务层提交给PCIe数据链路层的报文,索引缓冲区存储数据缓冲区报文的索引信息,索引缓冲区划分为多个长度相同的区域,多个索引单元采用链表方式组织,用户可根据重试报文个数确定索引缓冲区的大小。 Data and index buffers for the two separate storage areas, submit data to a buffer storage PCIe PCIe transaction layer packet the data link layer, the data buffer index buffer stores index information message, divide index buffer a plurality of the same length region, a plurality of indexing unit linked list is organized, a user can determine the size of the index buffer according to the retry number of packets.

[0043] 索引单元中存储的索引信息大小相同,包括如下字段: [0043] The index information in the index in the storage unit of the same size, comprising the following fields:

[0044] 占用标记:表示本索引单元是否被占用; [0044] occupancy flag: indicates whether the cell is occupied codebook index;

[0045] 链表头部标记:表示本索引信息对应的报文是否位于链表头部; [0045] The list header mark: indicates index information corresponding to the packet linked list head is located;

[0046] 链表指针:记录下一包报文对应的索引单元在索引缓冲区中的起始地址; [0046] The pointer list: recording start address of the next packet corresponding to the packet index in the index buffer unit;

[0047] 报文起始地址:记录本索引信息对应的报文在数据缓冲区中的起始地址;而报文起始地址体现了报文的物理位置,而链表体现了报文的逻辑顺序; [0047] The packet start address: recording index information corresponding to the packet start address in the data buffer; the packet start address reflects the physical location of the message, the list reflects the logical order of the packets ;

[0048] 报文长度:记录本索引信息对应的报文长度; [0048] Packet length: length packet recording index information corresponding to the present;

[0049] 保留信息:记录一些附加信息。 [0049] reservation information: record some additional information.

[0050] 管理单元实现数据缓冲区和索引缓冲区的动态管理。 [0050] Snap dynamic management of data and index buffers. 具体来说,如图2所示,管理单元包括接口适配模块、报文添加管理模块、报文重新发送管理模块和报文删除管理模块。 Specifically, as shown, management unit includes an interface adapter module, the message management module is added, to re-transmit the message 2 and message delete management module management module.

[0051] 接口适配模块,用于轮询检测PCIe事务层报文发送事件、来自数据链路层的ACK 事件和来自数据链路层的NAK事件;如果检测到PCIe事务层报文发送事件则启动报文添加管理模块,如果收到来自数据链路层的ACK消息,则启动报文删除管理模块,如果收到来自数据链路层的NAK消息,则启动报文重新发送管理模块。 [0051] The interface adapter means for detecting a polling event message transmission PCIe transaction layer, data link layer events from the ACK and the NAK from the data link layer event; if the PCIe transaction layer packets to the detected event start adding the packet management module, if the ACK message is received from the data link layer, the packet is initiated delete management module, if the NAK is received from the data link layer message, initiating packet resend the management module.

[0052] 报文添加管理模块包括空闲索引单元检索子模块、数据空间检索子模块、索引信息添加子模块和数据写入子模块。 [0052] The packet management module comprises adding cell search submodule free index, the data sub-module space retrieval, indexing information sub-module and data write module. 空闲索引单元检索子模块,在索引缓冲区中查找一个占用标记为未被占用的索引单元,将查找到的索引单元的地址告知索引信息添加子模块。 Free index unit retrieves sub-module, a lookup index cell is marked as occupied unoccupied, to find the address index unit informs index information adding submodule in the index buffer. 数据空间检索子模块在数据缓冲区中查找可分配空间,将可分配空间地址告知索引信息添加子模块和数据写入子模块。 Finding space retrieval data sub-module may allocate space in the data buffer, the address space may be allocated to inform indexing information sub-module and data write module. 索引信息添加子模块根据被告知信息更新未被占用的索引单元中的索引信息,令链表指针指向下一个未被占用的索引单元。 The index information of the index information adding submodule indexing unit be informed of the updated unoccupied, so that the list index pointer to a unit unoccupied. 数据写入子模块将PCIe事务层报文写入被告知的地址。 The data write submodule PCIe transaction layer packet writing is informed address.

[0053] 报文删除管理模块包括索引单元检索子模块1、报文序列号比对子模块1和索引信息更新子模块。 [0053] The packet management module Delete, packet sequence number information updating sub-module comprises a sub-module than the index retrieval unit 1 and sub-module index. 索引单元检索子模块1用于根据索引信息中的链表头部标记和链表指针,从链表头部位置开始依次查找各索引单元;报文序列号比对子模块1用于对比索引单元检索子模块1查找到的索引单元对应的报文的序列号与ACK消息中的报文序列号,当序列号相同时,通知索引信息更新子模块。 Index unit retrieves sub-module 1 according to the index information and the tag list head pointer list, the list starting from the head position of each index lookup unit sequentially; packet sequence numbers than the comparative index for the sub-module 1 cell search submodule 1 to find the corresponding sequence index cell number of the packet and the ACK message packet sequence number when the sequence number is the same, the index information notification updating sub-module. 索引信息更新子模块在收到通知时,将当前索引单元更新为未被占用,并更新相关索引单元中链表头部标记和链表指针的内容。 Index information updating sub-module upon receipt of the notification, the unit updates the current index is unoccupied, and updates the relevant contents of the index mark and the head unit in the linked list chain pointer.

[0054] 报文重新发送管理模块包括索引单元检索子模块2、报文序列号比对子模块2和报文重发子模块。 [0054] The packet management module 2 resend packet sequence number than the sub-module 2 and the packet retransmission sub-module includes an index retrieving means submodule. 索引单元检索子模块2用于根据索引单元中的链表头部标记和链表指针,从链表头部位置开始依次查找各索引单元;报文序列号比对子模块2用于对比索引单元检索子模块2查找到的索引单元对应的报文的序列表与NAK消息中的报文序列号,当序列号相同时,通知报文重发子模块;所述报文重发子模块在收到通知时,将序列号相同的报文重新发送。 Submodule index retrieval unit 2 according to the index in the list head marker means and pointer list, sequentially starting from the head position to find the list of each indexing unit; packet sequence numbers than the submodule 2 cell search index used for comparison submodule 2 to find the unit sequence corresponding to the index table and the packet in the NAK message packet sequence numbers, when the serial number, and notify the packet retransmission sub-module; retransmit the packet when the notified sub-module , the same sequence number packet re-sent.

[0055] 下面针对管理单元的动态管理举例进行描述。 [0055] The following dynamic management unit for managing the example will be described.

[0056] 管理单元开始工作时,轮询检测PCIe事务层报文发送事件、来自数据链路层的ACK事件和来自数据链路层的NAK事件。 [0056] When the management unit begins operating, polling detection PCIe transaction layer packet transmission events, events from the ACK and NAK data link layer event from the data link layer. [0057] 假设首先检测到PCIe事务层发送给PCIe数据链路层的报文时,如第一个发送报文长度为64个字节,管理单元在索引缓冲区中查找一个占用标记为未被占用的索引单元, 由于是刚开始工作,所有索引单元均空闲,因此向索引缓冲区地址0处依次填入如下信息: When [0057] Suppose the first detected PCIe transaction layer sends packets to the PCIe data link layer, as in the first transmission packet length is 64 bytes, the management unit searches a mark in the index buffer occupancy is not unit occupied by the index, because the work is just beginning, all index units are idle, and therefore in turn fill in the following information to the index buffer address 0:

[0058] 占用标记=1,表示当前索引单元被占用; [0058] occupation flag = 1, the index indicates that the current unit is occupied;

[0059] 链表头部标记=1,表示当前索引单元对应的报文为索引缓冲区存储的报文序列号最小的报文,因此当前索引单元处于链表头部位置; [0059] The list header flag = 1, the index indicates that the current packet is a unit corresponding to the index buffer packet sequence numbers stored in the smallest packet, so the current head position indexing unit in the list;

[0060] 链表指针=6,表示当前索引单元后面的空闲索引单元的起始地址为6,该空闲索引单元将是下一包报文对应的索引单元;如果当前索引单元之后的相邻索引单元被占用, 则链表指针=12或18等等; [0060] 6 = list pointer indicates the start address of the current unit behind the free index indexing unit 6, the unit will be free index next packet corresponding to the packet index unit; the index if the adjacent cell after the current index units is occupied, the pointer list 18 = 12 or the like;

[0061] 报文起始地址=0,表示本索引单元对应的报文在数据缓冲区中的起始地址; [0061] The packet start address = 0, the message index corresponding to the cell start address of the data buffer;

[0062] 报文长度=64 ; [0062] packet length = 64;

[0063] 保留信息=0 ; [0063] The reservation information = 0;

[0064] 添加索引信息后,管理单元向数据缓冲区的地址0处依次写入报文数据,从而完成了第一个报文的记录。 [0064] After the addition of the index information, the data management unit to the buffer is sequentially written at address 0 of data packets, thereby completing the recording of the first packet.

[0065] 下面一段时间可能发生多种情况,包括继续接收到PCIe事务层发送报文、接收到来自数据链路层的报文正确接收确认信息即ACK、在一定时间内没有收到来自数据链路层的报文正确接收确认信息即NAK。 [0065] period of time may occur following a variety of circumstances, including the continued PCIe transaction layer sends the received packets, receives a message from the data link layer acknowledgment information correctly receiving the ACK i.e., does not receive data from the link at a certain time path layer packet reception acknowledgment information correctly i.e. NAK.

[0066] 如果收到PCIe事务层发送的报文,管理单元从索引缓冲区的第一个索引单元开始,搜索空闲索引单元,找到后向此处填入当前所接收报文的索引信息。 [0066] If you receive a message sent by the PCIe transaction layer, snap-in from the first unit index buffer index begins idle index search unit, after finding here to fill in the index information currently received packet. 如第二个发送的报文长度为32,则在索引缓冲区的地址6处依次填入1 (占用标记)、2 (链表非头部位置)、 12 (下一个空闲索引单元的起始地址)、64 (报文起始地址)、32 (报文长度)、0 (保留信息), 接着管理单元向数据缓冲区的地址64处依次写入报文数据,从而完成了第二个报文的记录。 The second transmission of the packet length is 32, then sequentially filled at the address index buffer 61 (labeled occupied), 2 (non-head position of the list), 12 (start address of the next free index units ), 64 (start address of the packet), 32 (packet length), 0 (reservation information), then the management unit to the data buffer 64 are sequentially written at the address message data, thereby completing a second packet record of.

[0067] 如果收到来自数据链路层的ACK消息,则管理单元从ACK消息中获取报文序列号, 查找链表头部标记的索引信息和根据“链表指针”字段依次查找链表非头部位置的索引信息,从中找出对应报文在数据缓冲区中的起始地址,对应的报文,从起始地址相应偏移处读出报文序列号,核对报文序列号和从ACK获取的报文序列号是否相同,如果相同则将索引缓冲区中该索引单元变为无效索引(即将占用标记置为0)并更改链表指针信息,包括将链表中前一个索引单元的链表指针更新为当前索引单元中链表指针的值,如果当前ACK对应的报文为链表头部报文,则需要将下一个索引单元的链表头部标记修改为1),如果报文序列号和ACK序列号不同则继续检索一直到报文序列号和ACK序列号相同为止。 [0067] If the ACK message is received from the data link layer, the management unit acquires the packet sequence number from the ACK message, the head of the linked list to find the index mark in accordance with information "list pointer" field sequentially linked list to find a non-head position index information, to find out the corresponding data packet start address in the buffer, corresponding to the packet, the offset from the start address of the respective packet sequence number is read out, and check the sequence numbers of packets acquired from the ACK packet sequence number is the same, if the buffer becomes inactive index indexing unit will be the same index (ie occupying flag is set to 0) and changing the pointer information list, the list including the list pointer is updated before a cell for the current index the index value of the pointer unit list, if the current packet corresponding to the ACK header packet to the linked list, the head of the list needs to be the next index mark cell modified to 1), if the packet sequence number and the serial numbers of the ACK continue until retrieved same ACK packet sequence numbers and serial numbers so far.

[0068] 如果收到来自数据链路层的NAK消息,则管理单元从NAK消息中获取报文序列号, 查找链表头部标记和链表指针,从链表头部位置开始依次查找各索引信息,从中找出对应报文在数据缓冲区中的起始地址,从起始地址相应偏移处读出报文序列号,核对报文序列号和从NAK中提取的序列号是否相同,如果相同则将该报文重新发送;如果报文序列号和从NAK中提取的序列号不同,则继续检索一直到报文序列号和NAK序列号相同为止并将该报文发送出去。 [0068] If a NAK message is received from the data link layer, acquired from the management unit NAK message packet sequence number, and find the tag list head pointer list, sequentially from the list to find the head position of each index information, from find the corresponding message in the data buffer start address, the read offset corresponding packet sequence numbers from the starting address, check the sequence numbers of packets extracted from the NAK and serial number are the same, then if the same resend the message; if the packet sequence number and serial number extracted from the NAK different, continue all the way to retrieve the same packet sequence number and serial number until the NAK and the message sent.

[0069] 综上所述,以上仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。 [0069] In summary, the foregoing is only preferred embodiments of the present invention but are not intended to limit the scope of the present invention. 凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 Any modification within the spirit and principle of the present invention, made, equivalent substitutions, improvements, etc., should be included within the scope of the present invention.

Claims (5)

  1. 1. 一种PCIe重试缓冲区的实现方法,其特征在于,该方法包括:开辟两个独立的存储区作为数据缓冲区和索引缓冲区;数据缓冲区用于存储PCIe事务层提交给PCIe数据链路层的报文;索引缓冲区划分为多个长度相同的区域,每个区域作为一个索引单元存储数据缓冲区报文的索引信息,多个索引单元采用链表方式组织;所述索引信息包括:占用标记:表示本索引单元是否被占用;链表头部标记:表示本索引信息对应的报文是否位于链表头部;链表指针:记录下一包报文对应的索引单元在索引缓冲区中的起始地址;报文起始地址:记录本索引信息对应的报文在数据缓冲区中的起始地址;报文长度:记录本索引信息对应的报文长度;在检测到PCIe事务层报文发送事件时,将报文存入数据缓冲区,建立相应索引信息存入一未被占用的索引单元;当检测到数据链路 CLAIMS 1. A method implemented PCIe retry buffer, wherein the method comprises: two separate open storage area as the data and index buffers; submit data buffer for storing data PCIe transaction layer to PCIe link layer packet; index buffer is divided into a plurality of regions of the same length, each area storing data as a packet buffer unit index index information, a plurality of linked list is organized indexing unit; the index information comprises : occupying flag: indicates whether the cell is occupied codebook index; list header mark: indicates index information corresponding to the packet linked list head is located; pointer list: recording the next message packet unit corresponding to the index in the index buffer starting address; packet start address: recording index information corresponding to the starting address in data packets in the buffer; packet length: length packet recording index information corresponding to the present; detected PCIe transaction layer packets when sending an event, the packet data stored in the buffer, establishing a corresponding index information into the index cell unoccupied; when detecting that the data link 层的ACK事件时,根据索引信息查找ACK消息对应的报文,将该报文对应的索引单元置为未被占用并更新相关索引单元的链表头部标记和链表指针;当检测到数据链路层的NAK事件时,根据索引信息查找NAK消息对应的报文并重新发送。 When an event layer ACK, ACK message to find the corresponding packet according to the index information, the index section corresponding to the packet is set to unoccupied and updates the list head pointer list and a flag associated index unit; when detecting the data link when the layer of NAK event, look for the corresponding NAK message packet according to the index information and resend.
  2. 2.如权利要求1所述的方法,其特征在于,所述在检测到PCIe事务层报文发送事件时, 将报文存入数据缓冲区,建立相应索引信息存入一未被占用的索引单元的步骤包括:当检测到PCIe事务层发送给PCIe数据链路层的报文时,将所发送报文存储到数据缓冲区中,在索引缓冲区中查找一个占用标记为未被占用的索引单元,更新该查找到的索引单元中的字段内容,令链表指针指向下一个未被占用的索引单元。 2. The method according to claim 1, characterized in that, upon detection of the PCIe transaction layer packet transmission events, data packets stored in the buffer, establishing a corresponding index information into the index unoccupied the unit comprises the step of: when detecting packet transmitted to the PCIe transaction layer PCIe data link layer, the transmitted message is stored into the data buffer, a lookup index is marked as unoccupied occupied in the index buffer means to update the contents of the field found in the index unit, so that the list index pointer to the next cell unoccupied.
  3. 3.如权利要求1所述的方法,其特征在于,所述当检测到数据链路层的ACK事件时,根据索引信息查找ACK消息对应的报文,将该报文对应的索引单元置为未被占用并更新相关索引单元的链表头部标记和链表指针的步骤为:当收到来自数据链路层的接收确认ACK消息时,从ACK消息中获取报文序列号,根据所述链表头部标记和所述链表指针,从链表头部位置开始依次查找各索引信息对应的报文是否符合获取的报文序列号,将报文序列号相同的报文对应的索引单元更新为未被占用,并更新相关索引单元中链表头部标记和链表指针的内容。 3. The method according to claim 1, wherein, when the ACK is detected event data link layer ACK message to find the corresponding packet according to the index information, the index section corresponding to the packet is set to step unoccupied and updates the list head pointer list and a flag associated index cell is: when receiving from the data link layer receives acknowledgment ACK message to obtain the packet sequence number from the ACK message, according to the head of the list portion of the tag and the pointer list, in this order from the list to find the head position of each index information corresponding to the packet sequence numbers whether the acquired packet, the same packet unit corresponding to the index update packet sequence numbers unoccupied , and update the index in the list head unit content tagging and linked list pointer.
  4. 4.如权利要求1所述的方法,其特征在于,所述当检测到数据链路层的NAK事件时,根据索引信息查找NAK消息对应的报文并重新发送的步骤为:当收到来自数据链路层的未接收到NAK消息时,从NAK消息中获取报文序列号,根据所述链表头部标记和所述链表指针,从链表头部位置开始依次查找各索引信息对应的报文是否符合获取的报文序列号,将报文序列号相同的报文重新发送。 4. The method according to claim 1, wherein the step of detecting when the event data link layer NAK, NAK message according to the index information to find the corresponding packet and the retransmission is when: when receiving from when the data link layer is not received NAK message to obtain the packet sequence number in the NAK message according to the list head pointer mark and the list, the list starting from the head position of the index information corresponding to sequentially locate each packet whether the packet sequence numbers acquired, it will resend the same packet sequence numbers of packets.
  5. 5.如权利要求1至4任意一项所述的方法,其特征在于,所述将所发送报文存储到数据缓冲区中为:将所发送报文存储到数据缓冲区中的数据尾部,当数据缓冲区存满后,从数据缓冲区的头部开始存储报文,并覆盖原有数据。 5. The method of any one of claims 1 to 4, characterized in that, the message will be transmitted is stored in the data buffer is: The transmitted message is stored into the data buffer in the tail, when the data buffer is full, the message from the head start storing data buffer and overwrite the original data.
CN 201010620829 2010-12-24 2010-12-24 PCIe retry buffer area and realization method thereof CN102014076B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010620829 CN102014076B (en) 2010-12-24 2010-12-24 PCIe retry buffer area and realization method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010620829 CN102014076B (en) 2010-12-24 2010-12-24 PCIe retry buffer area and realization method thereof

Publications (2)

Publication Number Publication Date
CN102014076A true CN102014076A (en) 2011-04-13
CN102014076B true CN102014076B (en) 2012-04-18

Family

ID=43844097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010620829 CN102014076B (en) 2010-12-24 2010-12-24 PCIe retry buffer area and realization method thereof

Country Status (1)

Country Link
CN (1) CN102014076B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012109869A1 (en) * 2011-08-01 2012-08-23 华为技术有限公司 Method and device for processing address request
CN102571609A (en) * 2012-03-01 2012-07-11 重庆中天重邮通信技术有限公司 Recombination sequencing method of fast serial interface programmable communication interface-express (PCI-E) protocol completion with data (CplD)
WO2014063370A1 (en) * 2012-10-27 2014-05-01 华为技术有限公司 Method, device, system and storage medium for achieving message transmission of pcie switch network
CN103023823B (en) * 2012-11-26 2015-06-10 北京航天测控技术有限公司 Five-slot shaped backboard for PXI (pulsed xenon illuminator) portable platform

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8090880B2 (en) * 2006-11-09 2012-01-03 Microsoft Corporation Data consistency within a federation infrastructure
CN101656636A (en) * 2009-03-04 2010-02-24 北京邮电大学 Test method of multi-layer protocol stack network equipment based on OPNET

Also Published As

Publication number Publication date Type
CN102014076A (en) 2011-04-13 application

Similar Documents

Publication Publication Date Title
US7930437B2 (en) Network adapter with shared database for message context information
US20040193816A1 (en) Reading virtual ordered writes at a remote storage device
US20070168754A1 (en) Method and apparatus for ensuring writing integrity in mass storage systems
US7496690B2 (en) Method, system, and program for managing memory for data transmission through a network
US20030103459A1 (en) Method and implementation for a flow specific modified selective-repeat ARQ communication system
US20090083392A1 (en) Simple, efficient rdma mechanism
US20120317153A1 (en) Caching responses for scoped and non-scoped domain name system queries
US5577211A (en) System and method using chained structure queues for ordering of message delivery between connected nodes wherein unsuccessful message portion is skipped and retried
US20040198223A1 (en) Flow control in a bluetooth wireless communication system
US7024591B2 (en) Mechanism for enabling enhanced fibre channel error recovery across redundant paths using SCSI level commands
US20030009432A1 (en) Access assurance for remote memory access over network
US20090086735A1 (en) Method of Skipping Nullified Packets During Mass Replay from Replay Buffer
US20040049612A1 (en) Data reordering mechanism for high performance networks
US20070002827A1 (en) Automated serial protocol target port transport layer retry mechanism
US20030023666A1 (en) System and method for low overhead message passing between domains in a partitioned server
US20060036817A1 (en) Method and system for supporting memory unaligned writes in a memory controller
US20040098369A1 (en) System and method for managing memory
US20080181224A1 (en) Apparatus and system for distributing block data on a private network without using tcp/ip
US20060242637A1 (en) Systems and methods for managing application configuration
US20070073831A1 (en) Providing direct access to distributed managed content
US8510496B1 (en) Scheduling access requests for a multi-bank low-latency random read memory device
CN101686209A (en) Method and device for storing message in message retransmission system
US7356662B2 (en) Compressed file system for non-volatile RAM
CN101262321A (en) Media data processing method, coding device and media platform
CN102306115A (en) Asynchronous remote copying method, system and equipment

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C53 Change or modification
COR Bibliographic change or correction in the description

Free format text: CORRECT: APPLICANT; FROM: BEIJING AEROSPACE MEASUREMENT + CONTROL TECHNOLOGY DEVELOPMENNT COMPANY TO: BEIJING AEROSPACE MEASUREMENT + CONTROL TECHNOLOGY CO., LTD.

C14 Granted