WO2009109126A1 - 数据缓存方法和装置 - Google Patents

数据缓存方法和装置 Download PDF

Info

Publication number
WO2009109126A1
WO2009109126A1 PCT/CN2009/070587 CN2009070587W WO2009109126A1 WO 2009109126 A1 WO2009109126 A1 WO 2009109126A1 CN 2009070587 W CN2009070587 W CN 2009070587W WO 2009109126 A1 WO2009109126 A1 WO 2009109126A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
cache
channel
unit
index table
Prior art date
Application number
PCT/CN2009/070587
Other languages
English (en)
French (fr)
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
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2009109126A1 publication Critical patent/WO2009109126A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/741Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6

Definitions

  • the present invention relates to the field of information storage, and in particular, to a data caching method and apparatus.
  • the source port needs to fragment the IP packets before sending IP packets.
  • the egress port of the network receives the packets. IP packets are reassembled into a complete IP packet from the same SP.
  • the outbound port of the network needs to cache the IP packet before reassembling the IP packet.
  • the specific cache step includes: receiving an IP packet from the egress port of the network, and obtaining SP information of the IP packet; and searching, in the reassembly information table, whether a data cache channel is allocated for the SP information, where the reassembly information table is The SP information records the cached channel address and status information of the cached data; stores the received IP packet in the found data cache channel.
  • the dynamic resource sharing apparatus includes: a receiving module, configured to receive an IP packet sent from N different SPs; and a shared data cache module, configured to receive the IP packet.
  • the file is cached; the shared data cache module is divided into m data cache channels, and each data cache channel corresponds to one address;
  • the dynamic resource sharing apparatus further includes: a reorganization information table, configured to record, for each SP information, a data cache channel address and status information that is cached;
  • the dynamic resource sharing apparatus further includes: an address allocation recovery module, configured to allocate an idle data cache channel address to the SP information.
  • the reassembly information table records the buffered data cache channel address and status information for each SP information.
  • Information when the number of SPs that the egress port of the network can receive increases, the information recorded in the reassembly information table also increases.
  • the number of data cache channels is fixed. When there is no free data cache channel, the outbound port of the network will discard the IP packets without the data cache channel allocated.
  • the reassembly information table records the cached channel address and status information of the cached data for the SP information (for example, the record cache channel address is empty, and the status information is abnormal), resulting in Waste of storage resources.
  • Embodiments of the present invention provide a data caching method and apparatus to save storage space occupied by information storing storage resource usage in a data caching process.
  • An embodiment of the present invention is directed to: a data caching method, comprising: receiving data, obtaining source information of the data; and searching, in a cache address index table, whether a data cache channel is allocated for the source information, where The cache address index table records source information of data buffered by each data cache channel; if a data cache channel is allocated for the source information, the received data is cached into the found data cache channel.
  • a data buffering device comprising: a data buffering unit, configured to cache data, wherein the data buffering unit is divided into at least one data buffering channel;
  • a cache address index table configured to record source information of data buffered by each data cache channel
  • a data receiving unit configured to receive data, obtain source information of the data
  • a first searching unit configured to search, in the cache address index table, whether a data cache channel is allocated for source information obtained by the data receiving unit;
  • a first data storage unit configured to: when the search result of the first search unit is a data cache channel allocated to the source information, buffer the received data into a data cache channel searched by the search unit .
  • the data caching method and apparatus obtains the source information of the received data, and stores the data in the cached address index table for the data source.
  • the cache address index table records the source information of the data cached by each data cache channel, and the storage space occupied by the cache address index table is related to the number of data cache channels. For the network out port, the number of data cache channels is fixed. Therefore, the storage space occupied by the cache address index table is also fixed, which solves the problem that the information of the cache resource usage saved in the prior art increases when the number of data sources increases, thereby causing waste of storage resources. Reduces the storage space used to store information about cache resource usage, saving on cache costs.
  • FIG. 1 is a schematic structural diagram of a dynamic resource sharing apparatus provided by the prior art
  • FIG. 2 is a flowchart of a data caching method according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a data cache apparatus according to an embodiment of the present invention.
  • an embodiment of the present invention provides a data caching method.
  • the data egress method provided by the embodiment of the present invention is described by using a network egress port to cache an IP packet.
  • the network egress port includes 512 data cache channels, which are used to provide buffer space for IP packets from different SPs, and each data cache channel stores IP packets from the same SP.
  • the outbound port of the network can receive IP packet information from 512K different SPs.
  • the data caching method provided by the embodiment of the present invention includes the following steps: Step 201: Receive an IP packet, and obtain SP information of the IP packet.
  • Step 202 Search, in the cache address index table, whether a data cache channel is allocated for the SP information, and the cache address index table records SP information of an IP packet buffered by each data cache channel.
  • the searching step is specifically: searching for a cache address index according to the SP information of the IP packet Whether the SP information with the same SP information of the received IP packet is recorded in the table, if yes, it indicates that the data cache channel has been allocated for the SP information; if not, it indicates that the data cache is not allocated for the SP information. aisle.
  • Step 203 If a data cache channel is allocated to the source information, buffer the received IP packet to the data cache channel found in step 202.
  • the cache address index table also records current state information of each data buffer channel buffer IP packet; as shown in FIG. 2, the present invention
  • the data caching method provided by the embodiment further includes:
  • Step 204 After buffering the IP packet to the data cache channel, modify the current state information recorded by the data channel in the cache address index table.
  • Step 205 When the current state information recorded in the cache address index table indicates that the request for message reassembly is met, all IP packet fragments in the data cache channel corresponding to the current state information are output, and the cache address index table is The SP information and the current state information corresponding to the data cache channel are set to be empty, which indicates that the data cache channel is in an idle state.
  • the data cache channel is not allocated to the SP information of the received IP packet in the cache address index table (that is, the cache information in the cache address index table is not the same as the SP information of the received IP packet).
  • the data caching method provided by the embodiment of the present invention further includes: searching for a free data buffer channel in the cache address index table, and if there is an idle data buffer channel, the received IP packet The SP information of the file is allocated to the data cache channel; the received IP packet is buffered into the allocated data cache channel address, and the SP information of the data cache channel in the cache address index table is changed to the received IP address. SP information of the message piece. When there is no free data buffer channel in the cache address index table, the received data is discarded.
  • the cache address index table needs to save SP information and current state information for 512 data cache channels. Since the network egress port can receive 512K IP packets sent by different SPs, the cache is cached.
  • the address index table saves the SP information with 19 bytes, and the lByte stores the current state information.
  • the reassembly information table records the cached channel address and status information of the cached data for each SP information.
  • the reorganization information table Save the data cache channel address with 9 bytes, and save the state information with 1 Byte.
  • the number of cache information saved by the data cache method according to the embodiment of the present invention is related to the number of data cache channels, and is independent of the number of SPs. When the number of SPs increases, the amount of cached information that is saved does not increase, saving storage resources.
  • an embodiment of the present invention provides a data caching apparatus.
  • the data buffer device provided by the embodiment of the present invention is described by using a network out port to cache an IP packet.
  • the network egress port is capable of receiving IP packets from 521 K different SPs.
  • the data caching apparatus provided by the embodiment of the present invention includes:
  • the data buffering unit 301 is configured to buffer the IP packet, and the data buffering unit 301 is divided into at least one data buffering channel. In this embodiment, the data buffering unit 301 is divided into 512 data buffering channels.
  • a cache address index table 302 configured to record SP information of an IP packet buffered by each data cache channel
  • the data receiving unit 303 is configured to receive the IP packet and obtain the SP information of the IP packet.
  • the first searching unit 304 is configured to search, in the cache address index table 302, whether the SP information obtained by the data receiving unit 303 is allocated.
  • the data cache channel, the specific search steps can be seen in the figure
  • the first data storage unit 305 is configured to buffer the received IP packet to the first check when the search result of the first searching unit 304 is that the data cache channel is allocated to the SP information. Look for the data cache channel found by unit 304.
  • the device may further include:
  • the second searching unit 306 is configured to search for the data in the cache address index table 302 when the search result of the first searching unit 304 is that the data cache channel is not allocated to the SP information obtained by the data receiving unit 303. Whether the data buffer unit 301 has an idle data buffer channel;
  • a data buffering channel allocating unit 307 configured to allocate a data buffering channel for the SP information obtained by the data receiving unit 303 when the search result of the second searching unit 306 is that the data buffering unit 301 has an idle data buffering channel ;
  • the second data storage unit 308 is configured to buffer the received data into a data cache channel allocated by the data cache channel allocating unit 307, and modify the SP information recorded in the cache address index table 302 by the data cache channel.
  • the device may further include: a discarding unit 309, configured to discard the received data when the search result of the second lookup unit 306 is a data buffer channel that is not free.
  • a discarding unit 309 configured to discard the received data when the search result of the second lookup unit 306 is a data buffer channel that is not free.
  • the buffer address index table 302 is further configured to record current state information of each data buffer channel buffer IP packet, in order to be able to determine whether the IP packet buffered in the data buffer channel can be output and reorganized;
  • the method may include: a state modifying unit 310, configured to modify the data channel after the first data storage unit 305 or the second data storage unit 308 buffers the received IP packet to a corresponding data cache channel
  • the current state information recorded in the address index table 302 is cached.
  • the device may further include:
  • the data output unit 311 is configured to: when the current state information recorded in the cache address index table 302 indicates that the request for message reassembly is met, output all IP packet fragments in the data cache channel corresponding to the current state information, and The SP information and the current state information corresponding to the data cache channel in the cache address index table 302 are set to be empty, which indicates that the data cache channel is in an idle state.
  • the cache address index table 302 and the lookup unit may be replaced with a content addressable memory (CAM).
  • CAM content addressable memory
  • the data cache device provided by this embodiment, the cache address index table, needs to be 512 data slow
  • the reorganization information table uses 9 bytes to store the data cache channel address, and uses 1 Byte to save the state information.
  • the number of cached information stored is related to the number of data cache channels, and the number of SPs is not Therefore, when the number of SP increase the number of cache information stored will not be increased, thereby saving storage resources.
  • the above embodiment is described by taking the example that the egress port of the network caches the received IP packet according to the SP information.
  • the data caching method and apparatus provided by the embodiments of the present invention may also be based on the source of the data. Information is cached in the process of other groups of data.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Description

数据緩存方法和装置 本申请要求于 2008 年 3 月 6 日提交中国专利局、 申请号为 200810007686. 发明名称为"数据緩存方法和装置 "的中国专利申请的优先 权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及信息存储领域, 特别涉及一种数据緩存方法和装置。
背景技术
为了使 IP报文能够在不同的网络中正常传输, 数据源端口 (Source Port, 简称: SP )在发送 IP报文之前, 经常需要对该 IP报文进行分片; 网络的出端 口接收所述 IP报文时,将来自相同 SP的 IP报文片重组成一个完整的 IP报文。
网络的出端口对 IP报文片重组之前, 需要对该 IP报文片进行緩存。具体 緩存步骤包括: 网络的出端口接收 IP报文片, 获得该 IP报文片的 SP信息; 在重组信息表中查找是否为所述 SP信息分配了数据緩存通道, 所述重组信息 表为每个 SP信息记录其緩存到的数据緩存通道地址和状态信息; 将接收到的 IP报文片存储到查找到的数据緩存通道中。
如图 1 所示, 现有技术提供的动态资源共享装置包括: 接收模块, 用于 接收来自 N个不同的 SP发送的 IP报文片; 共享数据緩存模块, 用于对所接 收到的 IP报文片进行緩存;所述共享数据緩存模块划分成 m个数据緩存通道, 每个数据緩存通道对应一个地址;
所述动态资源共享装置还包括: 重组信息表, 用于为每个 SP信息记录其 緩存到的数据緩存通道地址和状态信息;
所述动态资源共享装置还包括: 地址分配回收模块, 为所述 SP信息分配 空闲的数据緩存通道地址。
在实施本发明的过程中, 发明人发现, 现有技术存在如下技术问题: 由 于所述重组信息表为每个 SP信息记录其緩存到的数据緩存通道地址和状态信 息, 当网络的出端口能够接收到的 SP数量增多时, 所述重组信息表记录的信 息也会随之增多。 但是, 数据緩存通道的数量是固定不变的, 当没有空闲的 数据緩存通道时,网络的出端口会将没有分配数据緩存通道的 IP报文片丟弃。 即使没有为 SP分配数据緩存通道, 所述重组信息表也会为该 SP信息记录其 緩存到的数据緩存通道地址和状态信息 (例如: 记录緩存通道地址为空, 状 态信息为异常), 造成了存储资源的浪费。
发明内容
本发明的实施例提供一种数据緩存方法和装置, 以在数据緩存过程中, 节省存储緩存资源使用情况的信息占用的存储空间。
本发明解决上述技术问题的一个实施例是: 数据緩存方法, 包括: 接收 数据, 获得该数据的来源信息; 在緩存地址索引表中查找是否为所述来源信 息分配了数据緩存通道, 其中, 所述緩存地址索引表记录每个数据緩存通道 緩存的数据的来源信息; 若为所述来源信息分配了数据緩存通道, 则将所述 接收到的数据緩存到查找到的数据緩存通道中。
本发明解决上述技术问题的另一个实施例是: 数据緩存装置, 包括: 数据緩存单元, 用于緩存数据, 所述数据緩存单元划分成至少一条数据 緩存通道;
緩存地址索引表, 用于记录每个数据緩存通道緩存的数据的来源信息; 数据接收单元, 用于接收数据, 获得该数据的来源信息;
第一查找单元 , 用于在緩存地址索引表中查找是否为数据接收单元获得 的来源信息分配了数据緩存通道;
第一数据存储单元, 用于在所述第一查找单元查的查找结果为为所述来 源信息分配了数据緩存通道时, 将所述接收到的数据緩存到查找单元查找到 的数据緩存通道中。
本发明实施例提供的数据緩存方法和装置, 通过获取接收到的数据的来 源信息, 并将所述数据存储到从緩存地址索引表中查找到的为该数据来源分 配的数据緩存通道中, 实现了对接收到的数据进行緩存的目的。 由于所述緩 存地址索引表记录每个数据緩存通道緩存的数据的来源信息, 其占用的存储 空间与数据緩存通道的数量有关, 对于网络出端口而言, 数据緩存通道的数 量是固定不变的, 所以緩存地址索引表占用的存储空间也是固定不变的, 解 决了现有技术在数据来源数量增多时, 保存的緩存资源使用情况的信息也会 随之增多, 从而造成存储资源浪费的问题, 减少了用于存储緩存资源使用情 况的信息所使用的存储空间, 节约了緩存成本。
附图说明
图 1为现有技术提供的动态资源共享装置结构示意图;
图 2为本发明实施例提供的数据緩存方法流程图;
图 3为本发明实施例提供的数据緩存装置结构示意图。
具体实施方式
为了解决数据緩存过程中, 用于存储緩存资源使用情况的信息占用过多 存储空间的问题, 本发明的实施例提供一种数据緩存方法。 下面结合附图和 实施例对本发明作详细说明:
本实施例以网络出端口对 IP报文片进行緩存为例, 对本发明实施例提供 的数据緩存方法进行说明:
在本实施例中, 所述网络出端口包含 512个数据緩存通道, 用于为来自 不同 SP的 IP报文片提供緩存空间,每个数据緩存通道保存来自相同 SP的 IP 报文片, 所述网络的出端口能够接收到来自 512K个不同 SP的 IP报文信息。
如图 2所示, 本发明实施例提供的数据緩存方法, 包括如下步骤: 步骤 201 , 接收 IP报文片, 获得该 IP报文片的 SP信息。
步骤 202, 在緩存地址索引表中查找是否为所述 SP信息分配了数据緩存 通道, 所述緩存地址索引表记录每个数据緩存通道緩存的 IP报文片的 SP信 息。
所述查找的步骤具体为: 根据 IP报文片的 SP信息, 查找緩存地址索引 表中是否记录了与接收到的 IP报文片的 SP信息相同的 SP信息, 如果有, 则 表明已经为该 SP信息分配了数据緩存通道; 如果没有, 则表明没有为该 SP 信息分配数据緩存通道。
步骤 203 , 若为所述来源信息分配了数据緩存通道, 将所接收的 IP报文 片緩存到步骤 202查找到的数据緩存通道中。
为了能够判断出数据緩存通道中緩存的 IP报文片是否可以输出重组, 所 述緩存地址索引表还记录每个数据緩存通道緩存 IP报文片的当前状态信息; 如图 2所示, 本发明实施例提供的数据緩存方法还包括:
步骤 204, 将所述 IP报文片緩存到数据緩存通道以后, 修改该数据通道 在緩存地址索引表中记录的当前状态信息。
步骤 205,所述緩存地址索引表中记录的当前状态信息指示满足报文重组 的要求时, 输出该当前状态信息所对应的数据緩存通道中的全部 IP报文片, 并将緩存地址索引表中该数据緩存通道对应的 SP信息和当前状态信息设置为 空, 即表明该数据緩存通道为空闲状态。
在步骤 202中, 当述緩存地址索引表中没有为接收到的 IP报文片的 SP 信息分配数据緩存通道 (即: 緩存地址索引表中没有记录与接收到的 IP报文 片的 SP信息相同的 SP信息)时, 本发明实施例提供的数据緩存方法还包括: 在緩存地址索引表中查找是否有空闲的数据緩存通道, 若有空闲的数据緩存 通道, 则为所述接收到的 IP报文片的 SP信息分配数据緩存通道; 将所述接 收到的 IP报文片緩存到分配的数据緩存通道地址中, 并将緩存地址索引表中 该数据緩存通道的 SP信息更改为接收到的 IP报文片的 SP信息。 当所述緩存 地址索引表中没有空闲的数据緩存通道时, 将所接收到的数据丟弃。
本实施例提供的数据緩存方法, 所述緩存地址索引表需要为 512个数据 緩存通道保存 SP信息和当前状态信息, 由于所述网络出端口能够接收 512K 个不同 SP发送的 IP报文,所以緩存地址索引表用 19Byte保存 SP信息, lByte 保存当前状态信息,緩存地址索引表所占用的存储空间大小为: 512 * ( 19+1 ) Byte=10Kbyte; 而使用现有技术保存信息时, 重组信息表为每个 SP信息记录 其緩存到的数据緩存通道地址和状态信息, 由于网络的出端口包含 512个数 据緩存通道, 所以重组信息表用 9Byte保存数据緩存通道地址, 用 1 Byte保存 状态信息, 重组信息表占用的存储空间为: 512K* ( 9+1 ) Byte=5Mbyte, 通过 比较不难看出, 本发明实施例提供的数据緩存方法在緩存数据时, 用于保存 緩存信息所占用的存储空间减少, 由于本发明实施例提供的数据緩存方法保 存的緩存信息个数与数据緩存通道个数有关, 而与 SP个数无关, 所以在 SP 数量增加时, 所保存的緩存信息数量不会随之增加, 从而节约了存储资源。
为了解决数据緩存过程中, 用于存储緩存资源使用情况的信息占用过多 存储空间的问题, 本发明的实施例提供一种数据緩存装置。 下面结合附图和 实施例对本发明作详细说明:
本实施例以网络出端口对 IP报文片进行緩存为例, 对本发明实施例提供 的数据緩存装置进行说明:
在本实施例中,所述网络出端口能够接收来自 521K个不同 SP的 IP报文, 如图 3所示, 本发明实施例提供的数据緩存装置包括:
数据緩存单元 301 , 用于緩存 IP报文片, 所述数据緩存单元 301划分成 至少一条数据緩存通道, 在本实施例中, 所述数据緩存单元 301 划分成 512 个数据緩存通道;
緩存地址索引表 302, 用于记录每个数据緩存通道緩存的 IP报文片的 SP 信息;
数据接收单元 303 , 用于接收 IP报文片, 获得该 IP报文片的 SP信息; 第一查找单元 304,用于在緩存地址索引表 302中查找是否为数据接收单 元 303获得的 SP信息分配了数据緩存通道,其具体的查找步骤可以参见如图
2所示的步骤 202, 此处不再赘述;
第一数据存储单元 305,用于在所述第一查找单元 304的查找结果为为所 述 SP信息分配了数据緩存通道时, 将所述接收到的 IP报文片緩存到第一查 找单元 304查找到的数据緩存通道中。
进一步地, 所述装置还可以包括:
第二查找单元 306,用于在所述第一查找单元 304的查找结果为没有为所 述数据接收单元 303获得的 SP信息分配数据緩存通道时,在所述緩存地址索 引表 302中查找所述数据緩存单元 301是否有空闲的数据緩存通道;
数据緩存通道分配单元 307,用于在所述第二查找单元 306的查找结果为 所述数据緩存单元 301 有空闲的数据緩存通道时, 为所述数据接收单元 303 获得的 SP信息分配数据緩存通道;
第二数据存储单元 308,用于将所述接收到的数据緩存到数据緩存通道分 配单元 307分配的数据緩存通道中, 并修改该数据緩存通道在緩存地址索引 表 302中记录的 SP信息。
进一步地, 所述装置还可以包括: 丟弃单元 309, 用于当所述第二查找单 元 306的查找结果为没有空闲的数据緩存通道时, 将所述接收到的数据丟弃。
为了能够判断出数据緩存通道中緩存的 IP报文片是否可以输出重组, 所 述緩存地址索引表 302, 还用于记录每个数据緩存通道緩存 IP报文片的当前 状态信息; 所述装置还可以包括: 状态修改单元 310, 用于在所述第一数据存 储单元 305或第二数据存储单元 308将所述接收到的 IP报文片緩存到对应的 数据緩存通道之后, 修改该数据通道在緩存地址索引表 302 中记录的当前状 态信息。 进一步地, 所述装置还可以包括:
数据输出单元 311 ,用于当所述緩存地址索引表 302中记录的当前状态信 息指示满足报文重组的要求时, 输出该当前状态信息所对应的数据緩存通道 中的全部 IP报文片, 并将緩存地址索引表 302中该数据緩存通道对应的 SP 信息和当前状态信息设置为空, 即表明该数据緩存通道为空闲状态。
在实际的使用过程中, 所述緩存地址索引表 302和查找单元(第一查找 单元 304和第二查找单元 306 )可以用内容可寻址存储器(CAM )代替。
本实施例提供的数据緩存装置, 緩存地址索引表, 需要为 512个数据緩 存通道保存其所緩存的 IP报文片的 SP信息和当前状态信息, 由于所述网络 出端口能够接收 512K个不同 SP发送的 IP报文,所以用 19Byte保存 SP信息, lByte保存 IP报文片组状态信息, 所述信息存储单元占用的存储空间大小为: 512 * ( 19+1 ) Byte= 10Kbyte; 而使用现有技术保存信息时, 重组信息表为每 个 SP信息记录其緩存到的数据緩存通道地址和状态信息, 由于网络的出端口 包含 512个数据緩存通道, 所以重组信息表用 9Byte保存数据緩存通道地址, 用 lByte保存状态信息, 重组信息表占用占用的存储空间为: 512K* ( 9+1 ) Byte=5Mbyte, 通过比较不难看出, 本发明实施例提供的数据緩存装置, 在緩 存数据时, 用于保存緩存信息所占用的存储空间减少, 由于本发明实施例提 供的数据緩存装置, 在信息存储单元中, 保存的緩存信息个数与数据緩存通 道个数有关, 而与 SP个数无关, 所以在 SP数量增加时, 所保存的緩存信息 数量不会随之增加, 从而节约了存储资源。
上述实施例仅以网络的出端口根据 SP信息对接收到的 IP报文片緩存为 例进行说明, 在实际的使用中, 本发明实施例提供的数据緩存方法和装置, 还可以根据数据的来源信息对其他成组数据緩存的过程中。
以上所述, 仅为本发明实施例的具体实施方式, 但本发明实施例的保护 范围并不局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范 围内, 可轻易想到的变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明实施例的保护范围应该以权利要求的保护范围为准。

Claims

权利 要求 书
1、 一种数据緩存方法, 其特征在于, 包括:
接收数据, 获得该数据的来源信息;
在緩存地址索引表中查找是否为所述来源信息分配了数据緩存通道, 其中 , 所述緩存地址索引表记录每个数据緩存通道緩存的数据的来源信息;
若为所述来源信息分配了数据緩存通道, 则将所述接收到的数据緩存到查 找到的数据緩存通道中。
2、 根据权利要求 1所述的数据緩存方法, 其特征在于, 当没有为所述来源 信息分配数据緩存通道时, 还包括:
在緩存地址索引表中查找是否有空闲的数据緩存通道, 若有空闲的数据緩 存通道, 则为所述来源信息分配数据緩存通道;
将所述接收到的数据緩存到分配的数据緩存通道地址中, 并修改该数据緩 存通道在緩存地址索引表中记录的来源信息。
3、 根据权利要求 2所述的数据緩存方法, 其特征在于, 当没有空闲的数据 緩存通道地址时, 将所接收到的数据丟弃。
4、根据权利要求 1至 3中任一权利要求所述的数据緩存方法,其特征在于, 所述緩存地址索引表还记录每个数据緩存通道緩存数据的当前状态信息;
将所述接收到的数据緩存到数据緩存通道之后, 修改该数据通道在緩存地 址索引表中记录的当前状态信息。
5、 根据权利要求 4所述的数据緩存方法, 其特征在于, 当所述緩存地址索 引表中记录的当前状态信息指示满足报文重组的要求时, 还包括:
输出该当前状态信息所对应的数据緩存通道中的全部数据, 并将緩存地址 索引表中该数据緩存通道对应的来源信息和当前状态信息设置为空。
6、 一种数据緩存装置, 其特征在于, 包括:
数据緩存单元, 用于緩存数据, 所述数据緩存单元划分成至少一条数据緩 存通道; 緩存地址索引表, 用于记录每个数据緩存通道緩存的数据的来源信息; 数据接收单元, 用于接收数据, 获得该数据的来源信息;
第一查找单元, 用于在緩存地址索引表中查找是否为数据接收单元获得的 来源信息分配了数据緩存通道;
第一数据存储单元, 用于在所述第一查找单元的查找结果为为所述来源信 息分配了数据緩存通道时, 将所述接收到的数据緩存到第一查找单元查找到的 数据緩存通道中。
7、 根据权利要求 6所述的数据緩存装置, 其特征在于, 还包括: 第二查找单元, 用于在所述第一查找单元的查找结果为没有为所述数据接 收单元获得的来源信息分配数据緩存通道时, 在所述緩存地址索引表中查找所 述数据緩存单元是否有空闲的数据緩存通道;
数据緩存通道分配单元, 用于在所述第二查找单元的查找结果为所述数据 緩存单元有空闲的数据緩存通道时, 为所述数据接收单元获得的来源信息分配 数据緩存通道;
第二数据存储单元, 用于将所述接收到的数据緩存到数据緩存通道分配单 元分配的数据緩存通道中, 并修改该数据緩存通道在緩存地址索引表中记录的 来源信息。
8、 根据权利要求 7所述的数据緩存装置, 其特征在于, 所述装置还包括: 丟弃单元, 用于当所述第二查找单元的查找结果为没有空闲的数据緩存通 道时, 将所述接收到的数据丟弃。
9、 根据权利要求 7或 8所述的数据緩存装置, 其特征在于, 所述緩存地址 索引表, 还用于记录每个数据緩存通道緩存数据的当前状态信息;
所述装置还包括:
状态修改单元, 用于在所述第一数据存储单元或所述第二数据存储单元将 所述接收到的数据緩存到对应的数据緩存通道之后, 修改该数据通道在緩存地 址索引表中记录的当前状态信息。
10、 根据权利要求 9所述的数据缓存装置, 其特征在于, 还包括: 数据输出单元, 用于当所述緩存地址索引表中记录的当前状态信息指示满 足报文重组的要求时, 输出该当前状态信息所对应的数据緩存通道中的全部数 据, 并将缓存地址索引表中该数据緩存通道对应的来源信息和当前状态信息设 置为空。
PCT/CN2009/070587 2008-03-06 2009-02-27 数据缓存方法和装置 WO2009109126A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810007686.1 2008-03-06
CN200810007686A CN101237405B (zh) 2008-03-06 2008-03-06 数据缓存方法和装置

Publications (1)

Publication Number Publication Date
WO2009109126A1 true WO2009109126A1 (zh) 2009-09-11

Family

ID=39920771

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/070587 WO2009109126A1 (zh) 2008-03-06 2009-02-27 数据缓存方法和装置

Country Status (2)

Country Link
CN (1) CN101237405B (zh)
WO (1) WO2009109126A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101237405B (zh) * 2008-03-06 2012-10-17 华为技术有限公司 数据缓存方法和装置
CN102479195A (zh) * 2010-11-25 2012-05-30 中兴通讯股份有限公司 一种网管服务器及其实现业务数据存储和查询的方法
CN102546397A (zh) * 2011-12-16 2012-07-04 福建星网锐捷网络有限公司 上链聚合端口的流量均衡方法、装置及设备
CN105608021B (zh) * 2015-08-17 2019-03-19 上海磁宇信息科技有限公司 一种利用内容寻址mram存储装置和方法
CN114996023B (zh) * 2022-07-19 2022-11-22 新华三半导体技术有限公司 目标缓存装置、处理装置、网络设备及表项获取方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6714985B1 (en) * 2000-04-28 2004-03-30 Cisco Technology, Inc. Method and apparatus for efficiently reassembling fragments received at an intermediate station in a computer network
CN1494274A (zh) * 2002-10-31 2004-05-05 ����ͨѶ�ɷ����޹�˾ 基于网络处理器实现ip报文分片重组的方法
CN1713637A (zh) * 2004-06-27 2005-12-28 华为技术有限公司 一种分片报文的重组方法
US20060029102A1 (en) * 2004-08-03 2006-02-09 Fujitsu Limited Processing method of fragmented packet
US20060106946A1 (en) * 2004-10-29 2006-05-18 Broadcom Corporation Method and apparatus for hardware packets reassembly in constrained networks
CN101237405A (zh) * 2008-03-06 2008-08-06 华为技术有限公司 数据缓存方法和装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6714985B1 (en) * 2000-04-28 2004-03-30 Cisco Technology, Inc. Method and apparatus for efficiently reassembling fragments received at an intermediate station in a computer network
CN1494274A (zh) * 2002-10-31 2004-05-05 ����ͨѶ�ɷ����޹�˾ 基于网络处理器实现ip报文分片重组的方法
CN1713637A (zh) * 2004-06-27 2005-12-28 华为技术有限公司 一种分片报文的重组方法
US20060029102A1 (en) * 2004-08-03 2006-02-09 Fujitsu Limited Processing method of fragmented packet
US20060106946A1 (en) * 2004-10-29 2006-05-18 Broadcom Corporation Method and apparatus for hardware packets reassembly in constrained networks
CN101237405A (zh) * 2008-03-06 2008-08-06 华为技术有限公司 数据缓存方法和装置

Also Published As

Publication number Publication date
CN101237405A (zh) 2008-08-06
CN101237405B (zh) 2012-10-17

Similar Documents

Publication Publication Date Title
US11916781B2 (en) System and method for facilitating efficient utilization of an output buffer in a network interface controller (NIC)
US7751404B2 (en) Method, system, and computer program product for high performance bonding resequencing
US9836540B2 (en) System and method for direct storage access in a content-centric network
Perino et al. Caesar: A content router for high-speed forwarding on content names
US8359409B2 (en) Aligning protocol data units
US7257643B2 (en) Method and apparatus to improve network routing
US20090296683A1 (en) Transmitting a protocol data unit using descriptors
WO2009109126A1 (zh) 数据缓存方法和装置
WO2011088657A1 (zh) 互联网地址信息处理方法、装置以及互联网系统
CN108933756B (zh) 一种数据包的处理方法、接入网设备及计算机可读存储介质
CN107580079B (zh) 一种报文传输方法和装置
US20180270153A1 (en) Increasing entropy across routing table segments
US20140047188A1 (en) Method and Multi-Core Communication Processor for Replacing Data in System Cache
WO2009057109A2 (en) A grid router
KR20140034951A (ko) 무선 메쉬 네트워크에서 컨텍스트 기반의 IPv6 헤더 압축을 위한 컨텍스트 테이블 관리 방법
CN106713144A (zh) 一种报文出口信息的读写方法及转发引擎
EP3043527B1 (en) Resource allocation using ccn manifests
WO2013053266A1 (zh) 一种报文的学习方法、装置和系统
US9179473B2 (en) Receiving and processing protocol data units
WO2013020429A1 (zh) 网络处理器镜像实现方法及网络处理器
TWI360744B (en) Data packet processing device
US20090323584A1 (en) Method and Apparatus for Parallel Processing Protocol Data Units
US9160671B2 (en) Ingress traffic classification and prioritization with dynamic load balancing
CN106294191A (zh) 处理表的方法、访问表的方法和装置
CN116982305A (zh) 自适应源地址重写

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09716551

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09716551

Country of ref document: EP

Kind code of ref document: A1