WO2012068895A1 - 一种实现atm多信元封装电路仿真的方法及网络处理器 - Google Patents

一种实现atm多信元封装电路仿真的方法及网络处理器 Download PDF

Info

Publication number
WO2012068895A1
WO2012068895A1 PCT/CN2011/077512 CN2011077512W WO2012068895A1 WO 2012068895 A1 WO2012068895 A1 WO 2012068895A1 CN 2011077512 W CN2011077512 W CN 2011077512W WO 2012068895 A1 WO2012068895 A1 WO 2012068895A1
Authority
WO
WIPO (PCT)
Prior art keywords
atm
queue
cell
network processor
egress
Prior art date
Application number
PCT/CN2011/077512
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 WO2012068895A1 publication Critical patent/WO2012068895A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 
    • H04L12/56Packet switching systems
    • H04L12/5601Transfer mode dependent, e.g. ATM
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 
    • H04L12/56Packet switching systems
    • H04L12/5601Transfer mode dependent, e.g. ATM
    • H04L2012/5638Services, e.g. multimedia, GOS, QOS
    • H04L2012/5646Cell characteristics, e.g. loss, delay, jitter, sequence integrity
    • H04L2012/5652Cell construction, e.g. including header, packetisation, depacketisation, assembly, reassembly
    • H04L2012/5653Cell construction, e.g. including header, packetisation, depacketisation, assembly, reassembly using the ATM adaptation layer [AAL]

Definitions

  • the present invention relates to the field of data transmission, and in particular to a method and a network processor for implementing an ATM (Asynchronous Transfer Mode) multi-cell package circuit simulation. Background technique
  • ATM technology has great flexibility, and can occupy resources at any time according to actual needs.
  • the transmission rate varies with the rate at which information arrives, and can adapt to any type of service, regardless of its rate, burstiness. Satisfactory service is provided by size, real-time requirements and quality requirements.
  • the ATM high-speed network can cause the bandwidth of the packet-switched network to be inefficient, mainly because the cell relay needs to exchange all the cell relay packets, thereby reducing the packet forwarding rate. That is, if it is necessary to transmit N ATM cells, the network core device exchanges N packets, which consumes the bandwidth of N packet forwarding.
  • cell packing techniques are used to pack N ATM cells into the same packet, the network core device only needs to exchange one packet and only consumes one packet forwarding bandwidth. Therefore, telecom operators often use cell packing technology to save packet forwarding bandwidth of network core devices.
  • FIG. 1 is a structural block diagram of an ATM multi-cell packaging system in the prior art.
  • the existing ATM multi-cell packaging system includes a Field - Programmable Gate Array (Field - Programmable Gate Array). Programming gate array) and hardware transfer ASIC (Application Specific Integrated Circuit), at the input At the edge of the vendor, the ATM cell is sent to the cell-packed FPGA.
  • Field - Programmable Gate Array Field - Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • the cell-packed FPGA will be based on the configuration parameters MNCP (Minimum Number Cell Packet) and MCPT (Maximum Cell Packet Time). Implement segmentation and reorganization of multiple cells.
  • the cell-packed FPGA will use the FIFO (First Input First Out) cache to queue incoming ATM cells into a single cell packet before the MCPT times out, until the predetermined cell packet size is reached, simultaneously
  • the cell packet group generates a sequence number, and the cell packet is forwarded to the hardware forwarding ASIC, and the hardware forwarding ASIC encapsulates the packet and forwards it out.
  • the ATM multi-cell packaging system is complicated in design and expensive, which limits the practical application scenarios.
  • the prior art network processor not only has the low price and high flexibility of the general-purpose processor, but also has the high speed and scalability of the ASIC, and is a high-speed forwarding chip with multi-engine parallel processing, which can be flexibly realized.
  • the present invention provides a method for implementing ATM multi-cell encapsulation circuit emulation and a network processor, which solves the problem that the network processor in the prior art does not have a FIFO mechanism and cannot implement ATM multi-cell encapsulation.
  • the technical solution of the present invention includes:
  • a method for implementing multi-cell package circuit simulation in asynchronous transmission mode comprising the steps of:
  • the exit of each ATM cell is determined by detecting the mouth table according to the attribute of the ATM cell.
  • the queue reaches a preset delivery condition as follows: the number of ATM cells in the queue reaches the minimum cell packing number or the timeout timer reaches the timeout value of the maximum cell packing timer.
  • the ATM cells are sequentially taken out from the queue to form an ATM payload, and when the ATM cell is taken, other engines are denied access to the queue. After the ATM cell is taken out, other engines are allowed to access the queue, and the ATM in the ATM payload is used. When the number of cells reaches the minimum cell packing number or the queue is empty, the ATM payload is sequentially transmitted from the egress.
  • the method includes: when the ATM cell is taken, applying a mutual semaphore, locking the queue, and rejecting other engines from accessing the queue; after the ATM cell is removed, releasing the mutually exclusive semaphore, The queue is unlocked, allowing other engines to access the queue at this time.
  • a network processor implementing an asynchronous transmission mode multi-cell encapsulation circuit emulation comprising: a microcode module, configured to extract an attribute of an ATM cell entering a network processor, determine an exit of each ATM cell, and pass a hardware lock The corresponding egress is locked, and when the queue reaches a preset delivery condition, the corresponding egress is unlocked, and the ATM cells in the queue are taken out to form an ATM payload, and then forwarded through the egress;
  • the network processor further includes:
  • the counter module is configured to allocate a corresponding queue pointer to the cached queue in the cache module, and allocate a mutually exclusive semaphore for each queue pointer.
  • the microcode module determines an exit of each ATM cell by detecting a mouth table according to an attribute of the ATM cell. Further, the preset sending condition is: the number of ATM cells in the queue reaches the minimum cell packing number or the timeout timer reaches the timeout value of the maximum cell packing timer.
  • the microcode module adopts a loopback manner to sequentially take out ATM cells from the queues in the cache module to form an ATM payload, and when the ATM cells are taken, apply for a mutually exclusive semaphore to reject other engines from accessing the queue, and ATM cells. Releasing the mutex semaphore after fetching allows other engines to access the queue.
  • the ATM payload is sequentially sent from the egress. Go out.
  • the present invention utilizes the network processor to implement the FIFO mechanism to implement the segmentation and reassembly functions, and utilizes its inherent hardware forwarding function to make the original Complex ATM multi-cell encapsulation is achieved with a single network processor.
  • the invention can realize complex multi-cell buffering and combining functions on a common network processor, thereby realizing multi-cell circuit emulation technology, which can greatly reduce the complexity of the ATM multi-cell encapsulation and reduce the system cost.
  • the flexibility and forwarding capability of the network processor itself can flexibly support multiple AAL services and QoS.
  • FIG. 1 is a structural block diagram of an ATM multi-cell encapsulation system in the prior art
  • FIG. 2 is a schematic flow chart of a preferred embodiment of a method for implementing an ATM multi-cell package circuit simulation according to the present invention
  • FIG. 3 is a schematic structural diagram of a preferred embodiment of a network processor for implementing ATM multi-cell package circuit emulation according to the present invention
  • FIG. 4 is a schematic flowchart of extracting ATM cells in a queue to form an ATM payload according to an embodiment of the present invention. detailed description
  • the basic idea of the present invention is: extracting the attributes of the ATM cells entering the network processor, determining the exit of each ATM cell and locking the corresponding exit through the hardware lock; and sequentially buffering the ATM cells having the same exit in the same In the queue, when the queue reaches the preset delivery condition, the corresponding egress is unlocked, and the ATM cells in the queue are taken out to form an ATM payload, and then forwarded through the egress.
  • the application scenario is set to ATM multi-cell circuit simulation on a MPLS (Multi-Protocol Label Switching) network, and the exit is PW (Pseudo). Wire, pseudowire) Exit, the corresponding exit table is the PW exit table.
  • MPLS Multi-Protocol Label Switching
  • PW Physical Wire, pseudowire
  • FIG. 2 is a schematic flowchart of a method for implementing an ATM multi-cell package circuit emulation, which includes the following steps:
  • the ATM cells with the same PW exit are sequentially cached in the same queue. Specifically, each ATM cell requests a mutual semaphore for it, and the queue is locked, and the corresponding queue pointers are sequentially sequenced. After the cell is stored in the queue, the mutual semaphore is released, and the queue is unlocked. At this time, other engines are allowed to access the queue, and the ATM cells with the same PW exit are guaranteed to be in the same queue in the order of entering the network processor. Line up
  • the queue When the queue reaches the preset delivery condition, the corresponding PW export entry is unlocked, and the team is The ATM cells in the column are taken out to form an ATM payload and then forwarded through the corresponding PW outlet.
  • the preset sending condition is: the number of ATM cells in the queue reaches the MNCP or the timeout timer reaches the timeout value of the MCPT.
  • the specific process of extracting the ATM cells in the queue to form an ATM payload is as follows: The ATM cell is sequentially taken out from the queue by the loopback method to form an ATM payload, and when the ATM cell is taken, the mutual semaphore is applied, and the queue is locked. Reject other engines from accessing the queue. After the ATM cell is removed, the mutual semaphore is released, the queue is unlocked, and other engines are allowed to access the queue. When the number of ATM cells in the ATM payload reaches MNCP or the queue is empty, The ATM payloads are forwarded sequentially from the corresponding PW outlets.
  • FIG. 3 is a schematic structural diagram of a network processor for implementing ATM multi-cell encapsulation circuit emulation, which mainly includes:
  • the microcode module is configured to extract the attributes of the ATM cells entering the network processor, determine the PW outlet of each ATM cell by checking the PW exit table according to the attributes of the ATM cell, and lock the corresponding PW exit table through the hardware lock. If the queue reaches the default conditions for sending packets, the corresponding PW egress entry is unlocked, and the ATM cells in the queue are taken out to form an ATM payload and then forwarded through the corresponding PW egress.
  • the default delivery conditions are: The number of ATM cells in the MNCP reaches or the timeout timer reaches the MCPT timeout value.
  • a cache module configured to store ATM cells having the same PW outlet in the same queue in sequence
  • a hash table may be opened in the network processor as a cache module, and each entry in the cache module stores an ATM letter. Yuan, a number of (X) entries as a queue, corresponding to a PW exit, the size of X depends on customer needs.
  • the counter module is configured to allocate a corresponding queue pointer to the cached queue in the cache module, point to the available position of the current queue (the pointer value ranges from 0 to X-1), and allocate a mutually exclusive semaphore for each queue pointer to prevent multiple
  • the engine simultaneously manipulates the out of order caused by the queue pointer.
  • the specific process of the microcode module taking out the ATM cells in the queue to form an ATM payload The microcode module adopts a loopback mode to sequentially take out ATM cells from the queues in the cache module to form an ATM payload, and when the ATM cells are taken, apply for a mutually exclusive semaphore to reject other engines from accessing the queue, and the ATM cells are released and released.
  • the mutex semaphore allows other engines to access the queue, and the ATM payload is sequentially forwarded from the PW egress when the number of ATM cells within the ATM payload reaches a minimum cell packing number or the queue is empty.
  • the present invention comprehensively utilizes network processor hardware and software resources to ensure the order of ATM multi-cells, and specifically includes a mutually exclusive semaphore of software resources and a lock hardware table mechanism of hardware resources, which are collectively referred to herein as a sequence-locking lock.
  • the mutually exclusive semaphore allocates a mutually exclusive semaphore for each queue.
  • the current engine operates the queue, it can lock the current queue to prevent it from being used by other processing engines, and ensure that the ATM cells in the queue are arranged in order.
  • the operation of the mutex semaphore is implemented by the microcode instructions semTake (application) and semGive (release) operations.
  • the semTake instruction sets the flag value of the external counter to 1 and denies access to other engines. After the current engine processes, the semGive instruction clears the flag value of the external counter to 0, allowing other engines to operate.
  • the lock hardware table mechanism uses the hardware lock to lock the corresponding egress entry when the port is detected, and then the ATM cell is sequentially written into the cache module to unlock the PW egress entry. In this way, the ATM cells output from the same PW outlet are written into the cache module in the order in which they enter the network processor, thereby ensuring that the ATM cells are not out of order.
  • FIG. 4 the figure is a flowchart for extracting ATM cells in a queue into an ATM payload according to an embodiment of the present invention.
  • the main implementation process is as follows:
  • the delivery condition is reached, and the packet is sent; otherwise, the ATM cells with the same PW exit are continuously written into the same queue of the cache.
  • the ATM cells with the same PW outlet need to be combined to form an ATM payload from the same PW outlet.
  • the ATM cells are sequentially taken in a loopback manner, and each loopback is used. The number is 1. One ATM cell is taken out of the queue once per loopback, and the ATM cells are taken to ensure the order of storage. Take out in order to prevent other engines from operating the queue. You need to apply for a mutex semaphore.
  • the queue is locked by the semTake command. After the cell is removed, the mutex semaphore needs to be released.
  • the queue is unlocked by the semGive command, and the ATM is sent.
  • the element is added to the end of the ATM payload. If the number of cells in the ATM payload reaches the MNCP value or the queue is empty, the ATM payload is forwarded from the corresponding PW outlet in a predetermined order, otherwise the loopback is continued, and the ATM cell is added to the tail of the ATM payload until the above is satisfied. After the condition is sent, the reassembled ATM payload is sent out from the PW exit.
  • the method and apparatus of the present invention can implement complex multi-cell buffering and combining functions on a common network processor, thereby implementing multi-cell circuit emulation technology, which can make the overall system design complexity. Significantly reduce the cost of the system, and the flexibility of the network processor itself. It can flexibly support multiple AAL (ATM Adaptation Layer) services and QoS (Quality Service). .
  • AAL ATM Adaptation Layer
  • QoS Quality Service

Landscapes

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

Abstract

本发明公开了一种实现ATM多信元封装电路仿真的方法及网络处理器,用以解决现有技术中网络处理器没有FIFO机制无法实现对ATM多信元封装的问题。其中所述方法包括:提取进入到网络处理器的ATM信元的属性,确定每个ATM信元的出口并通过硬件锁锁住相应的出口;将具有相同出口的ATM信元依次缓存在相同队列中;在所述队列达到预设的发包条件时,解锁相应的出口,将所述队列中的ATM信元取出组成ATM载荷后通过所述出口转发出去。所述网络处理器包括微码模块及缓存模块。采用本发明可以在普通的网络处理器上实现复杂的多信元缓存和组合的功能,可灵活的支持多种AAL业务及QoS。

Description

一种实现 ATM多信元封装电路仿真的方法及网络处理器 技术领域
本发明涉及数据传输领域, 具体的说, 涉及一种实现 ATM ( Asynchronous Transfer Mode, 异步传输模式) 多信元封装电路仿真的方 法及网络处理器。 背景技术
ATM技术的实质是电路交换和分组交换的综合。 因此 ATM技术具有 很大的灵活性, 任何时候都能按实际需要来占用资源; 对特定业务, 传送 速率随信息到达的速率而变化, 能够适应任何类型的业务, 无论其速率高 低、 突发性大小、 实时性要求和质量要求如何, 都能提供满意的服务。 但 ATM高速网络会导致分组交换网络的带宽效率低下, 主要是由于信元中继 需要交换所有信元中继分组, 因而会降低分组转发速率。即如果需要传输 N 个 ATM信元, 网络核心设备就要交换 N个分组, 耗费 N个分组转发的带 宽。 但是, 如果利用信元打包技术, 将 N个 ATM信元打包到同一个分组之 中, 网络核心设备只需要交换一个分组, 而且只需要耗费一个分组转发的 带宽。 因此, 电信运营商多利用信元打包技术节约网络核心设备的分组转 发带宽。
ATM多信元封装(又称为信元串联)是一种能够将多个信元中继 ATM 信元封装到同一个分组中的机制。 它让电信运营商能够克服信元中继传输 所固有的带宽效率低下问题。 请参阅图 1 , 该图为现有技术中 ATM多信元 封装系统的结构框图, 由图中可见, 现有的 ATM多信元封装系统包括信元 打包 FPGA ( Field - Programmable Gate Array, 现场可编程门阵列)及硬件 转发 ASIC ( Application Specific Integrated Circuit, 专用集成电路), 在输入 供应商边缘, 将 ATM信元发送到信元打包 FPGA , 信元打包 FPGA会根据 配置参数 MNCP( Minimum Number Cell Packet,最小信元打包数)和 MCPT ( Maximum Cell Packet Time , 最大信元打包计时器) 实现多信元的分段与 重组。信元打包 FPGA会在 MCPT超时之前, 利用其 FIFO ( First Input First Out, 先入先出)緩存将输入 ATM信元排队组合为一个信元包, 直到达到 预定的信元包大小为止, 同时为每个信元包分组生成一个序列号, 将该信 元包分组转发到硬件转发 ASIC, 硬件转发 ASIC会进行报文封装并转发出 去。 现有技术中 ATM多信元封装系统设计复杂而且价格昂贵, 局限了其实 际应用的场景。
现有技术中的网络处理器既具有通用处理器的低价格、 高灵活性的特 点, 又具有 ASIC的高速度和可扩展性特点,是具有多引擎并行处理的高速 转发芯片, 其可灵活实现二、 三层转发功能, 具有多引擎并行处理的特点 可达到很高的转发速率。 但也正因为如此, 和绝大多数通用处理器一样, 现有技术中的网络处理器没有 FIFO机制无法实现多个数据包的保序,所以 无法实现 ATM多信元封装的电路仿真。 发明内容
有鉴于此,本发明提供一种实现 ATM多信元封装电路仿真的方法及网 络处理器,用以解决现有技术中网络处理器没有 FIFO机制无法实现对 ATM 多信元封装的问题。
为解决上述技术问题, 本发明技术方案包括:
一种实现异步传输模式多信元封装电路仿真的方法, 包括步驟:
A、 提取进入到网络处理器的异步传输模式 ATM信元的属性, 确定每 个 ATM信元的出口并通过硬件锁锁住相应的出口;
B、 将具有相同出口的 ATM信元依次緩存在相同队列中;
C、 在所述队列达到预设的发包条件时, 解锁相应的出口, 将所述队列 中的 ATM信元取出组成 ATM载荷后通过所述出口转发出去。
进一步地, 所述步驟 A中,按照 ATM信元的属性通过查出口表确定每 个 ATM信元的出口。
进一步地, 所述队列达到预设的发包条件为: 队列中的 ATM信元数达 到最小信元打包数或者超时计时器达到最大信元打包计时器的超时值。
进一步地, 所述将队列中的 ATM信元取出组成 ATM载荷的具体过程 为:
采用环回方式从所述队列中依次取出 ATM信元组成 ATM 载荷, 取 ATM信元时拒绝其他引擎访问该队列, ATM信元取出后允许其他引擎访问 该队列, 在所述 ATM载荷内的 ATM信元数量达到最小信元打包数或所述 队列为空时, 将所述 ATM载荷从所述出口顺序发送出去。
进一步地, 该方法包括: 所述取 ATM信元时, 申请互斥信号量, 将所 述队列上锁, 此时拒绝其他引擎访问该队列; ATM信元取出后, 释放互斥 信号量, 将所述队列解锁, 此时允许其他引擎访问该队列。
一种实现异步传输模式多信元封装电路仿真的网络处理器, 包括: 微码模块, 用于提取进入到网络处理器的 ATM信元的属性, 确定每个 ATM信元的出口并通过硬件锁锁住相应的出口, 在所述队列达到预设的发 包条件时, 解锁相应的出口, 将所述队列中的 ATM信元取出组成 ATM载 荷后通过所述出口转发出去;
緩存模块, 用于将具有相同出口的 ATM信元依次緩存在相同队列中。 进一步地, 所述网络处理器还包括:
计数器模块, 用于为緩存模块中緩存的队列分配对应的队列指针, 并 为每个队列指针分配互斥信号量。
进一步地, 所述微码模块按照 ATM信元的属性通过查出口表确定每个 ATM信元的出口。 进一步地, 所述预设的发包条件为: 队列中的 ATM信元数达到最小信 元打包数或者超时计时器达到最大信元打包计时器的超时值。
进一步地, 所述微码模块采用环回方式从所述緩存模块内的队列中依 次取出 ATM信元组成 ATM载荷,取 ATM信元时申请互斥信号量拒绝其他 引擎访问该队列, ATM信元取出后释放互斥信号量允许其他引擎访问该队 列, 在所述 ATM载荷内的 ATM信元数量达到最小信元打包数或所述队列 为空时, 将所述 ATM载荷从所述出口顺序发送出去。
本发明有益效果如下:
为克服现有技术中网络处理器没有 FIFO机制无法实现分段和重组功 能的难题, 本发明利用网络处理器实现 FIFO机制进而实现分段和重组功 能, 同时利用其固有的硬件转发功能, 使原本复杂的 ATM多信元封装功能 利用一个网络处理器即可实现。 采用本发明可以在普通的网络处理器上实 现复杂的多信元緩存和组合的功能, 从而实现多信元电路仿真技术, 可以 让 ATM多信元封装的复杂度大大降低, 同时降低系统成本, 加之网络处理 器本身的灵活、 转发能力强的优点, 可灵活的支持多种 AAL业务及 QoS。 附图说明
图 1为现有技术中 ATM多信元封装系统的结构框图;
图 2为本发明所述实现 ATM多信元封装电路仿真的方法的一个较佳实 施例的流程示意图;
图 3为本发明所述实现 ATM多信元封装电路仿真的网络处理器一个较 佳实施例的结构示意图;
图 4为本发明实施例中将队列中的 ATM信元取出组成 ATM载荷的流 程示意图。 具体实施方式
本发明的基本思想是: 提取进入到网络处理器的 ATM信元的属性, 确 定每个 ATM信元的出口并通过硬件锁锁住相应的出口;将具有相同出口的 ATM信元依次緩存在相同队列中; 在所述队列达到预设的发包条件时, 解 锁相应的出口, 将所述队列中的 ATM信元取出组成 ATM载荷后通过所述 出口转发出去。
以下结合附图对本发明的优选实施例进行说明, 应当理解, 此处所描 述的优选实施例仅用于说明和解释本发明, 并不用于限定本发明。 为了清 晰描述本发明以其一典型应用为例展开描述,将其应用场景设为 ATM多信 元电路仿真 载于 MPLS( Multi-Protocol Label Switching,多协议标签交换 ) 网络, 则出口为 PW ( Pseudo Wire, 伪线) 出口, 对应的出口表为 PW出口 表。
请参阅图 2, 该图为本发明所述实现 ATM多信元封装电路仿真的方法 的一个较佳实施例的流程示意图, 具体包括如下步驟:
51、 提取进入到网络处理器的 ATM信元的属性, 按照 ATM信元的属 性通过查 PW出口表确定每个 ATM信元的 PW出口;
52、 开启硬件锁锁住接收到的 ATM信元对应的 PW出口表项, 将硬件 锁的位置与 ATM队列的 semID (信号量标识)和队列指针相对应, 通过该 方式可达到每一条队列对应一个 PW出口;
S3、 将具有相同 PW出口的 ATM信元依次緩存在相同队列中; 具体地, 每来一个 ATM信元都为其申请互斥信号量, 将该队列上锁, 将其相应的队列指针顺序后移; 信元存到该队列中后, 释放互斥信号量, 将该队列解锁, 此时允许其他引擎访问该队列, 保证具有相同 PW 出口的 ATM信元按进入网络处理器的顺序在同一队列中排队;
S4、 在队列达到预设的发包条件时, 解锁相应的 PW 出口表项, 将队 列中的 ATM信元取出组成 ATM载荷后通过相应的 PW出口转发出去。 其中, 所述预设的发包条件为: 队列中的 ATM信元数达到 MNCP或 者超时计时器达到 MCPT的超时值。
其中, 将队列中的 ATM信元取出组成 ATM载荷的具体过程为: 采用环回方式从队列中依次取出 ATM信元组成 ATM载荷,取 ATM信 元时, 申请互斥信号量, 将队列上锁, 拒绝其他引擎访问该队列, ATM信 元取出后, 释放互斥信号量, 将队列解锁, 允许其他引擎访问该队列, 在 ATM载荷内的 ATM信元数量达到 MNCP或所述队列为空时, 将 ATM载 荷从相应的 PW出口顺序转发出去。
请参阅图 3, 该图为本发明所述实现 ATM多信元封装电路仿真的网络 处理器一个较佳实施例的结构示意图, 其主要包括:
微码模块,用于提取进入到网络处理器的 ATM信元的属性,按照 ATM 信元的属性通过查 PW出口表确定每个 ATM信元的 PW出口并通过硬件锁 锁住相应的 PW出口表项, 在队列达到预设的发包条件时, 解锁相应的 PW 出口表项, 将队列中的 ATM信元取出组成 ATM载荷后通过相应的 PW出 口转发出去; 其中, 预设的发包条件为: 队列中的 ATM信元数达到 MNCP 或者超时计时器达到 MCPT的超时值。
緩存模块, 用于将具有相同 PW出口的 ATM信元依次存放在相同队列 中, 可以在所述网络处理器开辟一张哈希表作为緩存模块, 緩存模块中的 每一个表项存放一个 ATM信元, 将若干条(X条)表项作为一个队列, 对 应一个 PW出口, X的大小由客户需求而定。
计数器模块, 用于为緩存模块中緩存的队列分配对应的队列指针, 指 向当前队列可用的位置(指针值范围 0~X-1 ), 同时为每个队列指针分配互 斥信号量, 防止多个引擎同时操作队列指针带来的乱序。
其中, 微码模块将队列中的 ATM信元取出组成 ATM载荷的具体过程 为: 微码模块采用环回方式从所述緩存模块内的队列中依次取出 ATM信元 组成 ATM载荷,取 ATM信元时申请互斥信号量拒绝其他引擎访问该队列, ATM信元取出后释放互斥信号量允许其他引擎访问该队列, 在所述 ATM 载荷内的 ATM信元数量达到最小信元打包数或所述队列为空时, 将所述 ATM载荷从所述 PW出口顺序转发出去。
为实现 FIFO机制, 本发明综合利用网络处理器软硬件资源保证 ATM 多信元的顺序, 具体包括软件资源的互斥信号量和硬件资源的锁硬件表机 制, 在此统称为保序锁。 其中, 互斥信号量是为每一个队列分配一个互斥 信号量, 在当前引擎操作该队列时, 能够锁住当前队列, 防止被其他处理 引擎使用, 保证队列中的 ATM信元按顺序排列。 互斥信号量的操作由微码 指令 semTake (申请 )和 semGive (释放 )操作实现。 semTake指令将外部 计数器的标志值置为 1 , 此时拒绝其他引擎的访问, 当前引擎处理后, semGive指令将外部计数器的标志值清 0, 允许其他引擎操作。 锁硬件表机 制是查出口表时利用硬件锁将对应的出口表项锁住, 然后将 ATM信元依次 写入緩存模块后将 PW出口表项解锁。 通过这种方式将从同一条 PW出口 输出的 ATM信元按照其进入网络处理器的顺序写入緩存模块中, 能够保证 ATM信元的不乱序。
请参阅图 4, 该图为本发明实施例中将队列中的 ATM信元取出组成 ATM载荷的流程图, 主要实现过程如下:
当队列中的 ATM信元数量达到 MNCP值或者超时计时器达到 MCPT 的超时值 T时, 达到发包条件, 启动发包; 否则, 继续将具有相同 PW出 口的 ATM信元写入緩存的相同队列中。 启动发包流程后, 由于需要将具有 相同 PW出口的多个 ATM信元组成一个 ATM载荷从同一个 PW出口发出, 本实施例中采用环回的方式依次取 ATM信元, 每次环回的份数都为 1。 每 环回一次从队列中取出一个 ATM信元, 取 ATM信元时为确保以存放顺序 依次取出, 防止其它引擎操作该队列, 需要申请互斥信号量, 将该队列通 过 semTake指令上锁, 信元取出后, 需要释放互斥信号量, 将该队列通过 semGive指令解锁, 并将 ATM信元添加到 ATM载荷的尾部。 如果 ATM载 荷内的信元数量达到 MNCP值或队列为空则将 ATM载荷从相应的 PW出 口按照预定的顺序转发出去, 否则继续环回, 将 ATM信元添加到 ATM载 荷的尾部, 直到满足上述发送条件后, 将重组后的 ATM载荷从 PW出口发 送出去。
综上所述, 应用本发明的方法及装置, 可以在普通的网络处理器上实 现复杂的多信元緩存和组合的功能, 从而实现多信元电路仿真技术, 可以 让整个系统设计的复杂度大大降低, 同时降低系统成本, 加之网络处理器 本身的灵活、转发能力强的优点,可灵活的支持多种 AAL ( ATM Adaptation Layer, ATM适配层)业务及 QoS ( Quality of Service, 质量服务)。
显然, 本领域的技术人员可以对本发明进行各种改动和变型而不脱离 本发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明权 利要求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在 内。

Claims

权利要求书
1、 一种实现异步传输模式多信元封装电路仿真的方法, 其特征在于, 包括步驟:
A、 提取进入到网络处理器的异步传输模式 ATM信元的属性, 确定每 个 ATM信元的出口并通过硬件锁锁住相应的出口;
B、 将具有相同出口的 ATM信元依次緩存在相同队列中;
C、 在所述队列达到预设的发包条件时, 解锁相应的出口, 将所述队列 中的 ATM信元取出组成 ATM载荷后通过所述出口转发出去。
2、如权利要求 1所述的方法, 其特征在于, 所述步驟 A中,按照 ATM 信元的属性通过查出口表确定每个 ATM信元的出口。
3、 如权利要求 1所述的方法, 其特征在于, 所述队列达到预设的发包 条件为: 队列中的 ATM信元数达到最小信元打包数或者超时计时器达到最 大信元打包计时器的超时值。
4、 如权利要求 1、 2或 3所述的方法, 其特征在于, 所述将队列中的 ATM信元取出组成 ATM载荷的具体过程为:
采用环回方式从所述队列中依次取出 ATM信元组成 ATM 载荷, 取 ATM信元时拒绝其他引擎访问该队列, ATM信元取出后允许其他引擎访问 该队列, 在所述 ATM载荷内的 ATM信元数量达到最小信元打包数或所述 队列为空时, 将所述 ATM载荷从所述出口顺序发送出去。
5、 如权利要求 4所述的方法, 其特征在于, 该方法包括: 所述取 ATM 信元时, 申请互斥信号量, 将所述队列上锁, 此时拒绝其他引擎访问该队 列; ATM信元取出后, 释放互斥信号量, 将所述队列解锁, 此时允许其他 引擎访问该队列。
6、 一种实现异步传输模式多信元封装电路仿真的网络处理器, 其特征 在于, 包括: 微码模块, 用于提取进入到网络处理器的 ATM信元的属性, 确定每个
ATM信元的出口并通过硬件锁锁住相应的出口, 在所述队列达到预设的发 包条件时, 解锁相应的出口, 将所述队列中的 ATM信元取出组成 ATM载 荷后通过所述出口转发出去;
緩存模块, 用于将具有相同出口的 ATM信元依次緩存在相同队列中。
7、 如权利要求 6所述的网络处理器, 其特征在于, 还包括:
计数器模块, 用于为緩存模块中緩存的队列分配对应的队列指针, 并 为每个队列指针分配互斥信号量。
8、 如权利要求 6或 7所述的网络处理器, 其特征在于, 所述微码模块 按照 ATM信元的属性通过查出口表确定每个 ATM信元的出口。
9、 如权利要求 6所述的网络处理器, 其特征在于, 所述预设的发包条 件为: 队列中的 ATM信元数达到最小信元打包数或者超时计时器达到最大 信元打包计时器的超时值。
10、 如权利要求 7所述的网络处理器, 其特征在于, 所述微码模块采 用环回方式从所述緩存模块内的队列中依次取出 ATM信元组成 ATM载荷, 取 ATM信元时申请互斥信号量拒绝其他引擎访问该队列, ATM信元取出 后释放互斥信号量允许其他引擎访问该队列, 在所述 ATM载荷内的 ATM 信元数量达到最小信元打包数或所述队列为空时,将所述 ATM载荷从所述 出口顺序发送出去。
PCT/CN2011/077512 2010-11-24 2011-07-22 一种实现atm多信元封装电路仿真的方法及网络处理器 WO2012068895A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010556901.0 2010-11-24
CN2010105569010A CN101984609A (zh) 2010-11-24 2010-11-24 一种实现atm多信元封装电路仿真的方法及网络处理器

Publications (1)

Publication Number Publication Date
WO2012068895A1 true WO2012068895A1 (zh) 2012-05-31

Family

ID=43641780

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/077512 WO2012068895A1 (zh) 2010-11-24 2011-07-22 一种实现atm多信元封装电路仿真的方法及网络处理器

Country Status (2)

Country Link
CN (1) CN101984609A (zh)
WO (1) WO2012068895A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984609A (zh) * 2010-11-24 2011-03-09 中兴通讯股份有限公司 一种实现atm多信元封装电路仿真的方法及网络处理器

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1665216A (zh) * 2004-03-01 2005-09-07 贾学卿 异步传输模式通信网络中连发信元方法及设备
CN1728691A (zh) * 2004-07-26 2006-02-01 华为技术有限公司 Atm数据与帧格式转换的电路、方法及传输交换系统及方法
US7197051B1 (en) * 2001-10-09 2007-03-27 Cisco Technology, Inc. System and method for efficient packetization of ATM cells transmitted over a packet network
CN101984609A (zh) * 2010-11-24 2011-03-09 中兴通讯股份有限公司 一种实现atm多信元封装电路仿真的方法及网络处理器

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100426765C (zh) * 2001-08-17 2008-10-15 中兴通讯股份有限公司 一种替代异步转移模式专用网络处理器的方法和装置
US7831974B2 (en) * 2002-11-12 2010-11-09 Intel Corporation Method and apparatus for serialized mutual exclusion

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7197051B1 (en) * 2001-10-09 2007-03-27 Cisco Technology, Inc. System and method for efficient packetization of ATM cells transmitted over a packet network
CN1665216A (zh) * 2004-03-01 2005-09-07 贾学卿 异步传输模式通信网络中连发信元方法及设备
CN1728691A (zh) * 2004-07-26 2006-02-01 华为技术有限公司 Atm数据与帧格式转换的电路、方法及传输交换系统及方法
CN101984609A (zh) * 2010-11-24 2011-03-09 中兴通讯股份有限公司 一种实现atm多信元封装电路仿真的方法及网络处理器

Also Published As

Publication number Publication date
CN101984609A (zh) 2011-03-09

Similar Documents

Publication Publication Date Title
US6735773B1 (en) Method and apparatus for issuing commands to a network processor configured to provide a plurality of APIs
US10057387B2 (en) Communication traffic processing architectures and methods
US7621162B2 (en) Hierarchical flow-characterizing multiplexor
US9654406B2 (en) Communication traffic processing architectures and methods
US8737418B2 (en) Queue speed-up by using multiple linked lists
US8001335B2 (en) Low latency request dispatcher
US7342942B1 (en) Multi-service segmentation and reassembly device that maintains only one reassembly context per active output port
CN108833299B (zh) 一种基于可重构交换芯片架构的大规模网络数据处理方法
US8625427B1 (en) Multi-path switching with edge-to-edge flow control
US8897315B1 (en) Fabric traffic management in a network device
US20170331741A1 (en) Mac chaining load balancer
US20070053294A1 (en) Network load balancing apparatus, systems, and methods
US20080196033A1 (en) Method and device for processing network data
US20110110237A1 (en) Method and Apparatus for Aggregating Input Data Streams
US20040028067A1 (en) Two-dimensional queuing/de-queuing methods and systems for implementing the same
US9137166B2 (en) In-order traffic aggregation with reduced buffer usage
US7751319B2 (en) Method and processor for classifying data packet units
CN101136854B (zh) 一种实现数据包线速处理的方法和装置
JP2008512895A (ja) 通信ネットワーク内でヘッダを生成するための方法及び装置
US11258726B2 (en) Low latency packet switch architecture
US10764410B2 (en) Method and apparatus for processing packets in a network device
JP2001127766A (ja) ラインインターフェース装置、及び、パケット交換機
CN110505147A (zh) 无重组的分组片段转发
GB2462060A (en) Emulated LAN (ELAN) including specifying ports of a service member set and flooding a packet to the permitted members of the set.
WO2012068895A1 (zh) 一种实现atm多信元封装电路仿真的方法及网络处理器

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: 11842770

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: 11842770

Country of ref document: EP

Kind code of ref document: A1