WO2009093299A1 - パケット処理装置およびパケット処理プログラム - Google Patents

パケット処理装置およびパケット処理プログラム Download PDF

Info

Publication number
WO2009093299A1
WO2009093299A1 PCT/JP2008/050700 JP2008050700W WO2009093299A1 WO 2009093299 A1 WO2009093299 A1 WO 2009093299A1 JP 2008050700 W JP2008050700 W JP 2008050700W WO 2009093299 A1 WO2009093299 A1 WO 2009093299A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing
packet
cpu
queue
qos
Prior art date
Application number
PCT/JP2008/050700
Other languages
English (en)
French (fr)
Inventor
Daisuke Namihira
Original Assignee
Fujitsu Limited
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 Fujitsu Limited filed Critical Fujitsu Limited
Priority to PCT/JP2008/050700 priority Critical patent/WO2009093299A1/ja
Priority to JP2009550385A priority patent/JP5152201B2/ja
Publication of WO2009093299A1 publication Critical patent/WO2009093299A1/ja
Priority to US12/805,019 priority patent/US8832332B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/60Router architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/6215Individual queue per QOS, rate or priority

Definitions

  • the present invention relates to a packet processing device and a packet processing program, and in particular, when a plurality of CPUs execute processing on a packet in parallel, the frequency of exclusive processing among the plurality of CPUs is reduced to improve processing performance.
  • the present invention relates to a packet processing apparatus and a packet processing program.
  • a relay device such as a switch or a router is provided between a server and a client to perform packet relay processing.
  • Conventional relay devices only performed layer 2 (data link layer) and layer 3 (network layer) processing in the OSI (Open Systems Interconnection) reference model, but in recent years, higher layer processing has been relayed. May be implemented by device. Specifically, load balancing processing that distributes the load on the server, processing such as a firewall against external attacks, or IPsec (Security Architecture for Internet Protocol) or SSL-VPN (Secure) Relay devices that perform higher layer processing such as VPN processing such as Socket Layer-Virtual Private Network) have appeared. Furthermore, since the higher layer analysis can be performed by the relay device, QoS (Quality of Service) processing based on the information of the higher layer may be performed.
  • QoS Quality of Service
  • a device generally called a network server which performs both higher layer processing and layer 2 and layer 3 processing, has appeared and is arranged in a computer network.
  • Such a network server may be concentrated on the load in the network due to its multi-function, and a high level of basic performance is required. For this reason, the relay process in the network server does not include such a complicated process, and thus speeding up by hardware may be achieved.
  • high-level layer processing in network servers is difficult to achieve with simple hardware due to factors such as complicated processing and the need for flexible function expansion to accommodate new services. ing. Therefore, in order to speed up the higher layer processing in the network server, it is indispensable to speed up the software processing, in other words, improve the processing performance of the CPU (Central Processing Unit).
  • CPU Central Processing Unit
  • CPU CPU cores
  • FIG. 1 is a diagram showing the basic architecture of the parallel processing described above.
  • the packet to be processed is distributed by the distribution processing unit 10 to the CPUs 20-1 to 20-n (n is an integer of 2 or more) arranged in parallel, and processed by the distribution destination CPU. Is done.
  • Patent Document 1 discloses that a CPU as a distribution destination is determined by using information below layer 3 and a hash value. ing.
  • it is important to pay attention to the dependency among a plurality of CPUs. That is, for information shared by a plurality of CPUs, there is a possibility that the same information may be referenced / updated by a plurality of CPUs. However, if reference / updates by a plurality of CPUs are performed simultaneously, a malfunction may occur. is there. Therefore, while one CPU is accessing such shared information, an exclusive process for prohibiting access by other CPUs to the same information is required.
  • packets are distributed to different CPUs for each connection such as TCP (Transmission Control Protocol) and UDP (User Datagram Protocol), and packets transmitted through the same connection are sent to the same CPU. It can be considered to be processed by. Accordingly, each piece of connection information for each connection is accessed only from a single CPU, and exclusive processing associated with access to connection information serving as basic information for higher layer processing becomes unnecessary.
  • TCP Transmission Control Protocol
  • UDP User Datagram Protocol
  • a packet processed by the CPU 20-1 corresponding to the TCP # 1 connection and a packet processed by the CPU 20-2 corresponding to the TCP # 2 connection are both There is a possibility of mapping to the same queue in the QoS processing queue group 30 (the uppermost queue in FIG. 2). In order to prevent these mappings from occurring at the same time, exclusive processing between the CPU 20-1 and the CPU 20-2 becomes necessary.
  • the present invention has been made in view of this point, and when a plurality of CPUs execute processing on a packet in parallel, the frequency of exclusive processing among the plurality of CPUs is reduced to improve processing performance.
  • An object of the present invention is to provide a packet processing apparatus and a packet processing program capable of performing the above.
  • a packet processing device includes a plurality of processing units that simultaneously process a packet, and a distribution unit that distributes a processing target packet to any one of the plurality of processing units. And a plurality of processing units that are provided separately from the plurality of processing units, and that correspond to the quality of each of the packets to be processed that are distributed to any one of the plurality of processing units by the distribution unit. And a queue processing means for executing queue processing using the queue.
  • the packet processing apparatus employs a configuration in which, in the above configuration, the distribution unit distributes the processing target packet to a processing unit corresponding to a connection used for transmission of the processing target packet.
  • each of the plurality of processing means corresponds to one connection, and distribution to the processing means is performed according to the connection used for packet transmission.
  • the connection used for packet transmission When executing, there is no contention of access to the information of each connection, and exclusive processing among a plurality of processing means can be surely reduced.
  • the distribution unit when the processing target packet is input to the own device, the distribution unit performs processing corresponding to the reception connection that transmitted the processing target packet to the own device.
  • a configuration including distribution means is adopted.
  • the packet when a packet is input, the packet is distributed to the processing means corresponding to the reception connection, and when the packet is output, the packet is distributed to the processing means corresponding to the transmission connection. For this reason, even when the reception connection and transmission connection of the same packet are different, the packet can be distributed to the processing means corresponding to each connection. As a result, even when the reception connection is terminated in the packet processing device, for example, the processing for the packet can be executed by the processing means corresponding to the transmission connection different from the reception connection. The contention of access to the information does not occur, and the exclusion process among the plurality of processing means can be surely reduced.
  • the processing means identifies the quality of the processing target packet distributed by the distribution means, and the queue processing means is identified by the processing means.
  • a configuration is adopted in which queue processing using queues corresponding to quality is sequentially executed.
  • the packet quality identification is performed by a plurality of processing means, while the queue processing means performs the queue processing according to the packet quality, so that simultaneously executable packet quality identification is performed in parallel.
  • the queue processes that may cause access conflicts with respect to a plurality of queues are executed in order, so that the speed of the queue processes can be increased and the frequency of exclusive processes can be reduced.
  • the queue processing means includes a plurality of processors corresponding to a plurality of queue groups obtained by grouping the plurality of queues, and the plurality of processors Adopts a configuration for executing queue processing using a queue group corresponding to each processor.
  • the processors corresponding to each of the plurality of queue groups execute the queue processing, the queue processing by each processor can be executed in parallel, and the queue processing can be further speeded up.
  • the packet processing apparatus further includes a relay processing unit that is provided separately from the plurality of processing units and sets a transmission destination of a processing target packet after processing by the processing unit. Take the configuration.
  • the relay processing for setting the transmission destination of the packet is executed, for example, in a relay device such as a router or a switch, the frequency of exclusive processing among a plurality of CPUs is reduced to improve processing performance. Can do.
  • the packet processing device is provided as a separate body from the plurality of processing means in the above configuration, and more than the processing executed by the processing means on the processing target packet after processing by the processing means
  • a configuration is further provided which further includes upper processing means for executing higher processing.
  • the packet processing program according to the present invention is a packet processing program that is executed by a computer including a plurality of processors that simultaneously execute processing on packets.
  • the packet processing method is a packet processing method in a packet processing apparatus including a plurality of processors that simultaneously execute processing on packets, and the processing target packet is any one of the plurality of processors.
  • queue processing using a plurality of queues shared by a plurality of processors is executed by a dedicated processor, contention of access to the plurality of queues from a plurality of processors executing processing in parallel occurs. This eliminates the need for exclusive processing between a plurality of processors. In other words, when a plurality of CPUs execute processing on a packet in parallel, the frequency of exclusive processing among the plurality of CPUs can be reduced to improve processing performance.
  • the processing performance is reduced by reducing the frequency of exclusive processing among the plurality of CPUs. Can be improved.
  • FIG. 1 is a diagram showing a basic architecture of parallel processing.
  • FIG. 2 is a diagram illustrating an example of QoS processing contention.
  • FIG. 3 is a block diagram showing a schematic configuration of the packet processing apparatus according to the first embodiment.
  • FIG. 4 is a block diagram showing an internal configuration of the CPU unit according to the first embodiment.
  • FIG. 5 is a block diagram showing an internal configuration of the memory according to the first embodiment.
  • FIG. 6 is a diagram illustrating an example of the reception connection information table according to the first embodiment.
  • FIG. 7 is a diagram illustrating an example of a routing table according to the first embodiment.
  • FIG. 8 is a flowchart showing an operation at the time of packet relay according to the first embodiment.
  • FIG. 9 is a diagram illustrating an example of contention for connection information.
  • FIG. 9 is a diagram illustrating an example of contention for connection information.
  • FIG. 10 is a block diagram illustrating an internal configuration of the CPU unit according to the second embodiment.
  • FIG. 11 is a block diagram showing an internal configuration of the memory according to the second embodiment.
  • FIG. 12 is a flowchart showing an operation at the time of packet relay according to the second embodiment.
  • the essence of the present invention is to provide a processor dedicated to QoS processing for executing packet enqueue processing and dequeue processing for each of a plurality of queues corresponding to the required quality of the packet.
  • the processor is to execute.
  • FIG. 3 is a block diagram showing a schematic configuration of the packet processing apparatus according to Embodiment 1 of the present invention. Assume that the packet processing apparatus shown in the figure is mounted on a relay apparatus such as a network server. Note that this packet processing device may be mounted on a terminal device such as a server or a client. 3 includes a CPU section 100, a memory 200, a memory control section 300, MAC (Media Access Control) sections 400-1 to 400-n (n is an integer of 1 or more), and a PHY (PHYsical) section 500. -1 to 500-n, and an internal bus 600.
  • the CPU unit 100 includes a plurality of CPUs, and each CPU executes processing using information stored in the memory 200. At this time, the CPUs in the CPU unit 100 execute different processes in parallel.
  • the memory 200 stores information used by each CPU in the CPU unit 100 for processing. Specifically, the memory 200 stores information (hereinafter referred to as “packet information”) included in a packet input from the outside, connection information used for packet transmission, and the like.
  • packet information information included in a packet input from the outside, connection information used for packet transmission, and the like.
  • the memory control unit 300 controls the exchange of information between the CPU unit 100 and the memory 200 when the CPU unit 100 executes processing using the information stored in the memory 200. That is, the memory control unit 300 acquires necessary information from the memory 200 via the internal bus 600 and provides it to the CPU unit 100 when processing by the CPU unit 100 is executed.
  • the MAC units 400-1 to 400-n execute processing belonging to a part of layer 2 for setting a packet transmission / reception method, an error detection method, and the like.
  • the PHY units 500-1 to 500-n are connected to the external interfaces 1 to n, respectively, and execute processing belonging to the layer 1 (physical layer).
  • the MAC units 400-1 to 400-n and the PHY units 500-1 to 500-n correspond to combinations of two corresponding processing units (for example, combinations of the MAC unit 400-1 and the PHY unit 500-1). For example, it is integrally formed on a network card. Packets are input from the interfaces 1 to n to the inside of the packet processing device via the MAC units 400-1 to 400-n and the PHY units 500-1 to 500-n. A packet is output to n.
  • the internal bus 600 connects each processing unit in the packet processing device and transmits information. Specifically, for example, the internal bus 600 transmits packet information of packets input from the interfaces 1 to n from the MAC units 400-1 to 400-n to the memory 200, or transmits the packet information from the memory 200 to the memory. Or transmitted to the control unit 300.
  • 4 and 5 are block diagrams showing the internal configurations of the CPU unit 100 and the memory 200 according to the present embodiment, respectively.
  • 4 includes a reception distribution CPU 101, parallel processing CPUs 102-1 to 102-4, QoS processing CPUs 103-1 to 103-4, a relay processing CPU 104, and a host processing CPU 105.
  • 5 includes a packet information storage buffer 201, a reception connection information table 202, a routing table 203, and QoS processing queue groups 204-1 to 204-4.
  • the reception distribution CPU 101 refers to the reception connection information table 202 stored in the memory 200, and processes the packets in parallel so that the packets received from the same connection are received and processed by the same parallel processing CPU. Allocate to processing CPUs 102-1 to 102-4. That is, for example, when a packet received from a certain TCP connection is received and processed by the parallel processing CPU 102-1, the receiving distribution CPU 101 receives all packets received from the same TCP connection by the parallel processing CPU 102-1. Sort packets as they are.
  • the parallel processing CPUs 102-1 to 102-4 when the packet is distributed by the reception distribution CPU 101, acquires the packet information of this packet from the packet information storage buffer 201 of the memory 200, and executes a predetermined reception process. Then, the parallel processing CPUs 102-1 to 102-4 identify the input QoS of the packet, and notify the QoS processing CPUs 103-1 to 103-4 corresponding to the identified input QoS of the packet.
  • the parallel processing CPUs 102-1 to 102-4 acquire packet information of packets for which the higher layer processing in the upper processing CPU 105 has been completed from the packet information storage buffer 201 of the memory 200, and execute predetermined transmission processing. At this time, each of the parallel processing CPUs 102-1 to 102-4 acquires the packet information of the packet for which the reception processing has been executed, and also executes the transmission processing.
  • the parallel processing CPUs 102-1 to 102-4 identify the output QoS of the packet, and notify the QoS processing CPUs 103-1 to 103-4 corresponding to the identified output QoS of the packet.
  • parallel processing CPUs 102-1 to 102-4 are arranged in the CPU unit 100.
  • the number of parallel processing CPUs is not limited to four, and any two or more arbitrary numbers may be used. good.
  • the QoS processing CPUs 103-1 to 103-4 are provided corresponding to the QoS processing queue groups 204-1 to 204-4 of the memory 200, respectively, and use the corresponding QoS processing queue groups 204-1 to 204-4.
  • the QoS processing that has been performed is executed. Specifically, when the QoS processing CPUs 103-1 to 103-4 are notified of the input QoS or the output QoS of the packet from the parallel processing CPUs 102-1 to 102-4, the corresponding QoS processing queue groups 204-1 to 204-1 are used.
  • a packet enqueue process is executed in a queue corresponding to the notified input QoS or output QoS in 204-4, and a packet dequeue process is executed at a timing corresponding to each queue.
  • the QoS processing CPUs 103-1 to 103-4 execute the packet QoS processing separately from the reception processing and transmission processing executed by the parallel processing CPUs 102-1 to 102-4. Accordingly, the parallel processing CPUs 102-1 to 102-4 do not access the QoS processing queue groups 204-1 to 204-4, and exclusive processing between the parallel processing CPUs 102-1 to 102-4 is not required. It becomes. Since only one of the QoS processing CPUs 103-1 to 103-4 corresponds to each of the queues included in the QoS processing queue groups 204-1 to 204-4, the QoS processing CPUs 103-1 to 103-3 are compatible. -4 does not need to be excluded.
  • QoS processing queue groups 204-1 to 204-4 are arranged in the CPU unit 100, but the number of QoS processing queue groups is not limited to four.
  • the number of QoS processing queue groups does not have to be the same as the number of parallel processing CPUs, and each queue included in the QoS processing queue groups 204-1 to 204-4 corresponds to one QoS processing CPU. It should be.
  • the relay processing CPU 104 refers to the routing table 203 stored in the memory 200 and sets the transmission destination of the packet after the reception processing by the parallel processing CPUs 102-1 to 102-4.
  • the single relay processing CPU 104 executes the packet relay processing, it is sufficient that only one routing table 203 that is frequently updated and has a relatively large size is held in the memory 200. . Therefore, the storage capacity of the memory 200 can be saved and the processing load due to synchronization of the plurality of routing tables can be reduced as compared with the case where the plurality of CPUs execute the relay process while referring to the unique routing table. Can be reduced.
  • the relay processing executed by the relay processing CPU 104 is processing belonging to layer 2 and layer 3, and the processing load is relatively small. Therefore, the relay process can be executed only by the single relay process CPU 104, but even if the process performance of the relay process CPU 104 is insufficient, the process belonging to the layer 2 and the layer 3 can be easily realized by hardware. In addition, the relay processing can be speeded up.
  • the upper processing CPU 105 executes higher layer processing, which is difficult to execute in the parallel processing CPUs 102-1 to 102-4, on the packet. For example, when implementing a new function in the packet processing apparatus, the upper processing CPU 105 may temporarily implement the new function and execute processing on the packet.
  • the packet information storage buffer 201 stores packet information of packets input to the packet processing apparatus from the interfaces 1 to n. That is, the packet information storage buffer 201 acquires packet information of a packet input via a network card including a MAC unit and a PHY unit via the internal bus 600, and stores the packet information for each packet.
  • the reception connection information table 202 stores a correspondence relationship between a reception connection through which a packet input to the packet processing apparatus is transmitted and the parallel processing CPUs 102-1 to 102-4 as distribution destinations. Specifically, for example, as shown in FIG. 6, the reception connection information table 202 stores an IP address and a port corresponding to the reception connection in association with the parallel processing CPUs 102-1 to 102-4 as distribution destinations. In the example shown in FIG. 6, for example, a packet with an IP address “IPa” and a port “Pa” is distributed to the parallel processing CPU 102-1.
  • the correspondence relationship between the IP address and port in the reception connection information table 202 and the distribution destination CPU is determined and registered by the reception distribution CPU 101 every time a new reception connection is established.
  • the reception distribution CPU 101 refers to the reception connection information table 202, and becomes a distribution destination of a packet previously input from the same reception connection. Packets are distributed to the parallel processing CPUs 102-1 to 102-4. Therefore, all packets input from the same reception connection are subjected to reception processing by the same parallel processing CPUs 102-1 to 102-4. As a result, only one of the parallel processing CPUs 102-1 to 102-4 accesses the information related to each reception connection, and the exclusive process is not required.
  • the routing table 203 stores the packet transmission destination in the relay process. Specifically, the routing table 203 stores a correspondence relationship between the IP address of the packet transmission destination and the destination interface to which the packet is to be output, for example, as shown in FIG. In the example illustrated in FIG. 7, for example, a packet whose destination IP address is “IPa” is output to the interface 1.
  • the QoS processing queue groups 204-1 to 204-4 are queue groups in which a plurality of queues provided for each required quality of a packet are grouped in association with the QoS processing CPUs 103-1 to 103-4. It has one or more queues. Then, the QoS processing queue groups 204-1 to 204-4 enqueue or dequeue the packet in a queue according to the required quality of the packet in accordance with an instruction from the corresponding QoS processing CPUs 103-1 to 103-4. .
  • the packet information of this packet is stored in the packet information storage buffer 201 (step S102).
  • the receiving distribution CPU 101 detects that a packet has been input, the receiving distribution CPU 101 confirms the IP address and port from the packet information and refers to the receiving connection information table 202, so that the packet is received. It is determined whether or not the transmitted reception connection is an existing connection (step S103). That is, if the packet IP address and port are already registered in the reception connection information table 202, the reception distribution CPU 101 determines that the packet reception connection is an existing connection, and the packet IP address and port are the reception connection. If it is not registered in the information table 202, the reception distribution CPU 101 determines that the packet reception connection is a new connection.
  • the distribution CPU 101 reads out the distribution destination CPU corresponding to the IP address and port of the packet from the reception connection information table 202. Packet processing is distributed to the parallel processing CPU as a distribution destination. In other words, packet processing is distributed to the parallel processing CPU that has previously processed packets input from the same reception connection (step S104).
  • the reception distribution CPU 101 selects one free parallel processing CPU and determines the packet distribution destination, and also determines the IP address of the packet.
  • the correspondence relationship between the port and the parallel processing CPU as the distribution destination is registered in the reception connection information table 202. In other words, packet processing is distributed to a new parallel processing CPU that is not executing processing on the packet (step S105).
  • the processing for the packet input to the packet processing device is distributed to the same parallel processing CPU for each reception connection.
  • the description will be given assuming that the processing is distributed to the parallel processing CPU 102-1.
  • the parallel processing CPU 102-1 executes a predetermined reception process for the packet.
  • the parallel processing CPU 102-1 identifies the input QoS corresponding to the required quality of the packet (step S106), and notifies the QoS processing CPU corresponding to the identified input QoS. That is, the input QoS of the packet is notified to the QoS processing CPU that manages the QoS processing queue group including the queue corresponding to the input QoS among the QoS processing queue groups 204-1 to 204-4 in the memory 200. .
  • the QoS processing CPUs 103-1 to 103-4 are each notified of the input QoS of a packet using the same QoS processing queue group regardless of the reception connection through which the packet is transmitted. It will be.
  • the input QoS notifies the QoS processing CPU 103-1 that manages the QoS processing queue group 204-1. Is done.
  • the QoS processing CPU 103-1 executes the QoS processing in the queue corresponding to the input QoS in the QoS processing queue group 204-1 (step S107). That is, the QoS processing CPU 103-1 enqueues the packet to the queue corresponding to the input QoS, and dequeues the packet at a timing corresponding to this queue. At this time, only one of the QoS processing CPUs 103-1 to 103-4 (here, the QoS processing CPU 103-1) is in charge of the QoS processing in each queue. There is no contention in the dequeue process, and the exclusive process between the QoS process CPUs 103-1 to 103-4 is unnecessary. As a result, exclusive processing in the CPU unit 100 can be reduced, and the processing performance of the CPU unit 100 can be improved.
  • the relay process CPU 104 executes a relay process for setting a packet transmission destination (step S108). That is, the relay processing CPU 104 refers to the routing table 203 and sets the packet to be output to the interface corresponding to the packet destination IP address. Further, when executing a higher layer process that is difficult to execute in the parallel processing CPUs 102-1 to 102-4, the higher layer process CPU 105 executes the higher layer process.
  • the parallel processing CPU 102-1 identifies the output QoS of the packet (step S109), and notifies the QoS processing CPU corresponding to the identified output QoS of the output QoS.
  • the output QoS of the packet may be different from the input QoS at the time of reception processing.
  • the output QoS is notified to the QoS processing CPU 103-2 that manages the QoS processing queue group 204-2. Is done.
  • the QoS processing CPU 103-2 executes the QoS processing in the queue corresponding to the output QoS in the QoS processing queue group 204-2 (step S110). That is, the QoS processing CPU 103-2 enqueues the packet to the queue corresponding to the output QoS, and dequeues the packet at a timing corresponding to this queue. At this time, similarly to the QoS processing at the time of reception processing, only one of the QoS processing CPUs 103-1 to 103-4 (here, the QoS processing CPU 103-2) is in charge of the QoS processing in each queue.
  • the packet is output from the interface set by the relay processing CPU 104 (step S111). At this time, the buffer area for storing the packet information of the output packet in the packet information storage buffer 201 is released.
  • the reception connection is disconnected after the packet is output, the correspondence relationship between the IP address and port corresponding to the reception connection and the distribution destination CPU is deleted in the reception connection information table 202.
  • a plurality of QoS processing CPUs are provided in addition to a plurality of parallel processing CPUs for each reception connection, and each of the plurality of queues for each required quality of a packet is set as one of the QoS processing CPUs.
  • the QoS processing CPU executes QoS processing at the time of packet input and output. For this reason, for each queue, a single QoS processing CPU executes enqueue processing and dequeue processing, and there is no contention between multiple CPUs in the queue, and no exclusive processing is required.
  • the frequency of exclusive processing among the plurality of CPUs can be reduced to improve processing performance.
  • this reception connection “TCP # 1” when a packet from the reception connection “TCP # 1” is distributed to the parallel processing CPU 102-1, this reception connection “TCP # 1” is terminated, It may be transmitted by a transmission connection “TCP # 2” corresponding to the parallel processing CPU 102-2.
  • the parallel processing CPU 102-1 since the parallel processing CPU 102-1 that has executed the packet reception processing also executes the packet transmission processing, the parallel processing CPU 102-1 has the transmission connection “TCP” corresponding to the parallel processing CPU 102-2. With reference to the information of “# 2”, packet transmission processing by the transmission connection “TCP # 2” is executed. Therefore, at the time of outputting a packet, the parallel processing CPUs 102-1 and 102-2 may simultaneously access the information of the transmission connection “TCP # 2”, and an exclusive process is necessary.
  • a feature of the second embodiment of the present invention is that processing of a packet to be transmitted is assigned again to the parallel processing CPU, and a parallel processing CPU suitable for each of the reception connection and the transmission connection executes processing on the packet. .
  • FIG. 10 and FIG. 11 are block diagrams showing internal configurations of the CPU unit 100 and the memory 200 according to the present embodiment, respectively.
  • the CPU unit 100 shown in FIG. 10 has a configuration in which a transmission distribution CPU 151 is added to the CPU unit 100 shown in FIG.
  • the memory 200 shown in FIG. 11 has a configuration in which a transmission connection information table 251 is added to the memory 200 shown in FIG.
  • the transmission distribution CPU 151 refers to the transmission connection information table 251 stored in the memory 200, and processes the packets in parallel so that the packets transmitted through the same connection are transmitted by the same parallel processing CPU. Allocate to processing CPUs 102-1 to 102-4. That is, for example, when a packet transmitted through a certain TCP connection is subjected to transmission processing by the parallel processing CPU 102-2, the transmission distribution CPU 151 determines that all packets transmitted through the same TCP connection are transmitted by the parallel processing CPU 102-2. Sort packets as they are.
  • the transmission distribution CPU 151 determines the parallel processing CPU that executes the transmission process regardless of the parallel processing CPU that executes the reception process for the packet. Therefore, for example, as shown in FIG. 9, even if the packet is received by the parallel processing CPU 102-1 corresponding to the reception connection “TCP # 1”, this packet is transmitted by the transmission connection “TCP # 2”. In this case, the transmission distribution CPU 151 distributes the packet processing to the parallel processing CPU 102-2 corresponding to the transmission connection “TCP # 2”. However, when the packet reception connection is not terminated in the packet processing device, the reception connection and the transmission connection are the same, so the transmission distribution CPU 151 performs packet processing to the parallel processing CPU that has performed the reception processing for the packet. Sort out.
  • the packet processing device when the packet processing device relays a packet, if the reception connection and transmission connection of the same packet are different, the processing for the packet is distributed to the parallel processing CPU corresponding to each connection. . For this reason, as shown in FIG. 9, for example, even when the termination of the connection is performed in the packet processing device, exclusive processing between the parallel processing CPUs 102-1 to 102-4 becomes unnecessary.
  • the transmission connection information table 251 stores a correspondence relationship between a transmission connection to which a packet output from the packet processing apparatus is transmitted and the parallel processing CPUs 102-1 to 102-4 as distribution destinations.
  • the transmission connection information table 251 includes, for example, the IP address and port corresponding to the transmission connection and the parallel processing CPUs 102-1 to 102-4 corresponding to the distribution destination, similarly to the reception connection information table 202 shown in FIG. Are stored in association with each other.
  • the correspondence relationship between the IP address and port in the transmission connection information table 251 and the allocation destination CPU is determined and registered by the transmission allocation CPU 151 every time a new transmission connection is established.
  • the transmission distribution CPU 151 refers to the transmission connection information table 251 and becomes a distribution destination of a packet that has been previously output to the same transmission connection. Packets are distributed to the parallel processing CPUs 102-1 to 102-4. Therefore, all packets output to the same transmission connection are subjected to transmission processing by the same parallel processing CPUs 102-1 to 102-4. As a result, only one of the parallel processing CPUs 102-1 to 102-4 accesses the information related to each transmission connection, and the exclusive process is not required.
  • a packet received from the reception connection is input to the packet processing device (step S101), and the packet information is stored in the packet information storage buffer 201 (step S102). Then, the reception distribution CPU 101 refers to the reception connection information table 202 to determine whether or not the reception connection is an existing connection (step S103). According to the result of this determination, the receiving distribution CPU 101 distributes the packet processing to the distribution destination parallel processing CPU (steps S104 and S105).
  • the description will be made assuming that processing is distributed to the parallel processing CPU 102-1.
  • the parallel processing CPU 102-1 executes a predetermined reception process for the packet.
  • the parallel processing CPU 102-1 identifies the input QoS corresponding to the required quality of the packet (step S106), and notifies the QoS processing CPU corresponding to the identified input QoS.
  • the input QoS notifies the QoS processing CPU 103-1 that manages the QoS processing queue group 204-1. Is done.
  • the QoS processing CPU 103-1 executes the QoS processing in the queue corresponding to the input QoS in the QoS processing queue group 204-1 (step S107).
  • the relay process CPU 104 executes a relay process for setting a packet transmission destination (step S108). Further, when executing a higher layer process that is difficult to execute in the parallel processing CPUs 102-1 to 102-4, the higher layer process CPU 105 executes the higher layer process.
  • the transmission distribution CPU 151 confirms the IP address and port from the packet information, and refers to the transmission connection information table 251 so that the transmission connection for transmitting the packet is already present. It is determined whether or not the connection is established (step S201). That is, if the IP address and port of the packet are already registered in the transmission connection information table 251, the transmission distribution CPU 151 determines that the packet transmission connection is an existing connection, and the packet IP address and port are the transmission connection. If it is not registered in the information table 251, the transmission distribution CPU 151 determines that the packet transmission connection is a new connection.
  • the transmission destination CPU 151 reads out the distribution destination CPU corresponding to the IP address and port of the packet from the transmission connection information table 251. Packet processing is distributed to the parallel processing CPU as a distribution destination. In other words, the packet processing is distributed to the parallel processing CPU that has previously processed the packet output to the same transmission connection (step S202). For this reason, even if the packet reception connection is terminated in the packet processing apparatus and the reception connection and the transmission connection are different, the packet processing is distributed to the parallel processing CPU corresponding to the packet transmission connection.
  • the transmission distribution CPU 151 selects one free parallel processing CPU and determines it as a packet distribution destination, as well as the IP address of the packet.
  • the correspondence relationship between the port and the parallel processing CPU of the distribution destination is registered in the transmission connection information table 251.
  • packet processing is distributed to a new parallel processing CPU that is not executing processing on the packet (step S203). For this reason, even if the packet reception connection is terminated in the packet processing device and a transmission connection is newly established, the packet processing is distributed to the parallel processing CPU corresponding to the new transmission connection.
  • the processing for the packet output from the packet processing device is distributed to the same parallel processing CPU for each transmission connection.
  • the description will be made assuming that the processing is distributed to the parallel processing CPU 102-2.
  • the parallel processing CPU 102-2 executes a predetermined transmission process for the packet. Further, the parallel processing CPU 102-2 identifies the output QoS corresponding to the required quality of the packet (step S109), and the output QoS is notified to the QoS processing CPU corresponding to the identified output QoS. Then, the QoS processing CPU executes the QoS processing in the queue corresponding to the output QoS (step S110), and the packet is output from the interface set by the relay processing CPU 104 (step S111).
  • the processing is distributed to the parallel processing CPU according to the reception connection at the time of packet input, but also the processing is distributed to the parallel processing CPU according to the transmission connection at the time of packet output. For this reason, for example, even when the reception connection is terminated in the packet processing apparatus and the packet reception connection and the transmission connection are different, the processing can be distributed to the parallel processing CPUs corresponding to the respective connections. There is no contention for access to information related to one connection from the processing CPU, and no exclusive processing is required. As a result, when a plurality of CPUs execute processing on a packet in parallel, the frequency of exclusive processing among the plurality of CPUs can be more reliably reduced to improve processing performance.
  • the packet processing apparatus has been described as including a dedicated CPU such as the reception distribution CPU 101, the QoS processing CPUs 103-1 to 103-4, and the transmission distribution CPU 151.
  • a dedicated CPU such as the reception distribution CPU 101, the QoS processing CPUs 103-1 to 103-4, and the transmission distribution CPU 151.
  • the present invention is not limited to this, and when a general computer includes a plurality of general-purpose CPUs, a program for causing each CPU to execute the same processing as in each of the above embodiments is introduced into the computer, and the computer is configured in each of the above embodiments It is also possible to operate in the same manner.
  • the present invention can be applied to the case where a plurality of CPUs execute processing on a packet in parallel to improve processing performance by reducing the frequency of exclusive processing among the plurality of CPUs.

Landscapes

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

Abstract

 パケットに対する処理を複数のCPUが並列して実行する場合に、複数のCPUの間における排他処理の頻度を低減して処理性能を向上すること。この課題を解決するために、受信振分CPU(101)は、メモリに記憶された受信コネクション情報テーブルを参照し、同一のコネクションから受信されるパケットが同一の並列処理CPUによって受信処理されるように、パケットを並列処理CPU(102-1~102-4)に振り分ける。並列処理CPU(102-1~102-4)は、パケットの入力QoSを識別し、識別された入力QoSに対応するQoS処理CPU(103-1~103-4)へパケットの入力QoSを通知する。QoS処理CPU(103-1~103-4)は、それぞれメモリのQoS処理用キュー群に対応して設けられ、対応するQoS処理用キュー群に対するQoS処理を実行する。

Description

パケット処理装置およびパケット処理プログラム
 本発明は、パケット処理装置およびパケット処理プログラムに関し、特に、パケットに対する処理を複数のCPUが並列して実行する場合に、複数のCPUの間における排他処理の頻度を低減して処理性能を向上することができるパケット処理装置およびパケット処理プログラムに関する。
 通常、コンピュータネットワークにおいては、サーバとクライアントの間にスイッチやルータなどの中継装置が設けられ、パケットの中継処理が行われる。従来の中継装置は、OSI(Open Systems Interconnection)参照モデルにおけるレイヤ2(データリンク層)およびレイヤ3(ネットワーク層)の処理を実施するのみであったが、近年は、より高位レイヤの処理が中継装置によって実施されることがある。具体的には、サーバに対する負荷を分散させる負荷分散処理、外部からの攻撃に対するファイアウォールなどの処理、またはクライアントとサーバの間の通信を秘匿するIPsec(Security Architecture for Internet Protocol)やSSL-VPN(Secure Socket Layer-Virtual Private Network)などのVPN処理のような高位レイヤ処理を行う中継装置が登場している。さらに、中継装置によって高位レイヤの解析も実施可能であることから、高位レイヤの情報を基にしたQoS(Quality of Service)処理などが実施されることもある。
 また、一般にネットワークサーバと呼ばれ、高位レイヤ処理とレイヤ2およびレイヤ3の処理との双方の処理を実施する装置も登場し、コンピュータネットワークに配置されるようになっている。このようなネットワークサーバには、多機能であることに起因してネットワーク内の負荷が集中することがあり、基本的な性能についても高度なものが求められている。このため、ネットワークサーバにおける中継処理に関しては、それほど複雑な処理を含まないため、ハードウェア化による高速化が図られることがある。一方、ネットワークサーバにおける高位レイヤ処理に関しては、複雑な処理を含むことや新規サービスに対応する柔軟な機能拡張が必要とされることなどの要因から、単純なハードウェア化による高速化は困難となっている。したがって、ネットワークサーバにおける高位レイヤ処理を高速化するためには、ソフトウェア処理の高速化、換言すればCPU(Central Processing Unit)の処理性能の向上が不可欠となる。
 近年では、CPU単体の処理性能がほぼ限界に近づいているため、複数のCPUやCPUコア(以下、これらをまとめて「CPU」という)を単一の装置に搭載することでソフトウェア処理の高速化が図られることがある。このとき、単に複数のCPUそれぞれに同一の処理をさせるのではソフトウェア処理の高速化が図られないため、処理対象の複数のパケットがネットワークサーバに到着すると、各パケットは複数のCPUに振り分けられ、それぞれのCPUによって並列に処理が実行される。
 図1は、上述した並列処理の基本アーキテクチャを示す図である。同図に示すように、処理対象のパケットは、振分処理部10によって、並列に配置されたCPU20-1~20-n(nは2以上の整数)に振り分けられ、振り分け先のCPUによって処理される。振分処理部10によるパケットの振分方式には様々なものがあるが、例えば特許文献1においては、レイヤ3以下の情報とハッシュ値とを用いて振り分け先のCPUを決定することが開示されている。このような並列処理では、複数のCPU間における依存性に留意することが重要となる。すなわち、複数のCPUが共有する情報については、同一の情報が複数のCPUによって参照・更新される可能性があるが、複数のCPUによる参照・更新が同時に行われると、誤動作が発生する虞がある。したがって、このような共有情報に対して1つのCPUがアクセスしている間は、同一の情報に対する他のCPUによるアクセスを禁ずる排他処理が必要となる。
特開2005-64882号公報
 ところで、高位レイヤ処理のような複雑な処理では、複数のCPUが共有する共有情報へのアクセス頻度が高く、これに伴って排他処理の頻度も高くなる。そして、排他処理の頻度が高くなると、並列処理による処理向上の度合いが劣化してしまうことになる。具体的には、CPUの数を2倍にすれば理論的には処理性能が2倍になると考えられるが、実際にはCPU間の排他処理が発生するため、処理性能が2倍に到達することはない。極端な場合には、CPUの数を2倍にする前と比べて処理性能が低下することもある。したがって、処理性能を向上するためには、排他処理の頻度を低減することが非常に重要となる。
 そこで、高位レイヤ処理を実行する場合は、例えばTCP(Transmission Control Protocol)やUDP(User Datagram Protocol)などのコネクションごとに異なるCPUへパケットを振り分け、同一のコネクションによって伝送されたパケットは、同一のCPUによって処理させることが考えられる。これにより、コネクションごとのコネクション情報それぞれは、単一のCPUのみからアクセスされることになり、高位レイヤ処理の基本情報となるコネクション情報へのアクセスに伴う排他処理が不要となる。
 しかしながら、QoS処理を実行する場合は、たとえコネクションごとにパケットを振り分けても、異なるCPUから同一のQoS処理用のキューへの同時アクセスが発生することがあり、排他処理を解消することができないという問題がある。すなわち、QoS処理においては、通常、物理ポート単位でキューがマッピングされ、ポリシーの設定に従ってキューが割り振られるため、異なるコネクションによって伝送されたパケットが同一のキューにマッピングされることも定常的に発生する。
 具体的には、例えば図2に示すように、TCP#1のコネクションに対応するCPU20-1によって処理されるパケットとTCP#2のコネクションに対応するCPU20-2によって処理されるパケットとがいずれもQoS処理用キュー群30内の同一のキュー(図2においては最上段のキュー)にマッピングされる可能性がある。そして、これらのマッピングが同時に発生することを防止するために、CPU20-1およびCPU20-2の間での排他処理が必要となってしまう。
 本発明はかかる点に鑑みてなされたものであり、パケットに対する処理を複数のCPUが並列して実行する場合に、複数のCPUの間における排他処理の頻度を低減して処理性能を向上することができるパケット処理装置およびパケット処理プログラムを提供することを目的とする。
 上記課題を解決するために、本発明に係るパケット処理装置は、パケットに対してそれぞれ同時に処理を実行する複数の処理手段と、処理対象パケットを前記複数の処理手段のいずれか1つに振り分ける振分手段と、前記複数の処理手段とは別体として設けられ、前記振分手段によって前記複数の処理手段のいずれか1つに振り分けられた処理対象パケットに対し、それぞれパケットの品質に対応する複数のキューを用いたキュー処理を実行するキュー処理手段とを有する構成を採る。
 この構成によれば、複数の処理手段が共有する複数のキューを用いたキュー処理に関しては、専用のキュー処理手段が実行するため、並列に処理を実行する複数の処理手段から複数のキューに対するアクセスの競合が発生することがなく、複数の処理手段の間における排他処理が不要となる。換言すれば、パケットに対する処理を複数のCPUが並列して実行する場合に、複数のCPUの間における排他処理の頻度を低減して処理性能を向上することができる。
 また、本発明に係るパケット処理装置は、上記構成において、前記振分手段は、処理対象パケットの伝送に利用されるコネクションに対応する処理手段へ当該処理対象パケットを振り分ける構成を採る。
 この構成によれば、複数の処理手段のそれぞれが1つのコネクションに対応し、パケットの伝送に利用されたコネクションに応じて処理手段への振り分けを行うため、各処理手段がパケットに対して処理を実行する際、それぞれのコネクションの情報に対するアクセスの競合が発生することがなく、複数の処理手段の間における排他処理を確実に低減することができる。
 また、本発明に係るパケット処理装置は、上記構成において、前記振分手段は、処理対象パケットが自装置へ入力された際に、当該処理対象パケットを自装置へ伝送した受信コネクションに対応する処理手段へ処理対象パケットを振り分ける受信振分手段と、処理対象パケットが自装置から出力される際に、当該処理対象パケットを自装置から伝送する送信コネクションに対応する処理手段へ処理対象パケットを振り分ける送信振分手段とを含む構成を採る。
 この構成によれば、パケットの入力時には受信コネクションに対応する処理手段へパケットを振り分け、パケットの出力時には送信コネクションに対応する処理手段へパケットを振り分ける。このため、同一パケットの受信コネクションと送信コネクションが異なる場合でも、それぞれのコネクションに対応する処理手段へパケットを振り分けることができる。結果として、例えば受信コネクションがパケット処理装置において終端されるような場合でも、受信コネクションとは異なる送信コネクションに対応する処理手段によってパケットに対する処理を実行することができ、複数の処理手段から同一のコネクションの情報に対するアクセスの競合が発生することがなく、複数の処理手段の間における排他処理を確実に低減することができる。
 また、本発明に係るパケット処理装置は、上記構成において、前記処理手段は、前記振分手段によって振り分けられた処理対象パケットの品質を識別し、前記キュー処理手段は、前記処理手段によって識別された品質に対応するキューを用いたキュー処理を順次実行する構成を採る。
 この構成によれば、パケットの品質の識別は複数の処理手段が行う一方、パケットの品質に応じたキュー処理はキュー処理手段が行うため、同時に実行可能なパケットの品質識別は並列に実行されるとともに、複数のキューに対するアクセスの競合が発生する可能性があるキュー処理は順番に実行され、キュー処理の高速化を図ると同時に排他処理の頻度を低減することができる。
 また、本発明に係るパケット処理装置は、上記構成において、前記キュー処理手段は、前記複数のキューをグループ分けして得られる複数のキュー群それぞれに対応する複数のプロセッサを含み、前記複数のプロセッサは、それぞれ自プロセッサに対応するキュー群を用いたキュー処理を実行する構成を採る。
 この構成によれば、複数のキュー群それぞれに対応するプロセッサがキュー処理を実行するため、各プロセッサによるキュー処理を並列に実行することができ、さらにキュー処理の高速化を図ることができる。
 また、本発明に係るパケット処理装置は、上記構成において、前記複数の処理手段とは別体として設けられ、前記処理手段による処理後の処理対象パケットの送信先を設定する中継処理手段をさらに有する構成を採る。
 この構成によれば、パケットの送信先を設定する中継処理を実行するため、例えばルータやスイッチなどの中継装置において、複数のCPUの間における排他処理の頻度を低減して処理性能を向上することができる。
 また、本発明に係るパケット処理装置は、上記構成において、前記複数の処理手段とは別体として設けられ、前記処理手段による処理後の処理対象パケットに対して前記処理手段が実行する処理よりも上位の処理を実行する上位処理手段をさらに有する構成を採る。
 この構成によれば、並列な処理が困難な上位のレイヤに属する高位レイヤ処理を実行するため、例えばネットワークサーバなどの多機能な装置において、複数のCPUの間における排他処理の頻度を低減して処理性能を向上することができる。
 また、本発明に係るパケット処理プログラムは、パケットに対してそれぞれ同時に処理を実行する複数のプロセッサを備えたコンピュータによって実行されるパケット処理プログラムであって、前記コンピュータに、処理対象パケットを前記複数のプロセッサのいずれか1つに振り分ける振分ステップと、前記振分ステップにて前記複数のプロセッサのいずれか1つに振り分けられた処理対象パケットに対し、振り分け先のプロセッサによる処理を実行する処理ステップと、前記処理ステップにおける処理後の処理対象パケットに対し、前記複数のプロセッサとは異なるプロセッサによるキュー処理であって、それぞれパケットの品質に対応する複数のキューを用いたキュー処理を実行するキュー処理ステップとを実行させるようにした。
 また、本発明に係るパケット処理方法は、パケットに対してそれぞれ同時に処理を実行する複数のプロセッサを備えたパケット処理装置におけるパケット処理方法であって、処理対象パケットを前記複数のプロセッサのいずれか1つに振り分ける振分ステップと、前記振分ステップにて前記複数のプロセッサのいずれか1つに振り分けられた処理対象パケットに対し、振り分け先のプロセッサによる処理を実行する処理ステップと、前記処理ステップにおける処理後の処理対象パケットに対し、前記複数のプロセッサとは異なるプロセッサによるキュー処理であって、それぞれパケットの品質に対応する複数のキューを用いたキュー処理を実行するキュー処理ステップとを有するようにした。
 これらによれば、複数のプロセッサが共有する複数のキューを用いたキュー処理に関しては、専用のプロセッサが実行するため、並列に処理を実行する複数のプロセッサから複数のキューに対するアクセスの競合が発生することがなく、複数のプロセッサの間における排他処理が不要となる。換言すれば、パケットに対する処理を複数のCPUが並列して実行する場合に、複数のCPUの間における排他処理の頻度を低減して処理性能を向上することができる。
 本明細書に開示されたパケット処理装置およびパケット処理プログラムによれば、パケットに対する処理を複数のCPUが並列して実行する場合に、複数のCPUの間における排他処理の頻度を低減して処理性能を向上することができる。
図1は、並列処理の基本アーキテクチャを示す図である。 図2は、QoS処理の競合の一例を示す図である。 図3は、実施の形態1に係るパケット処理装置の概要構成を示すブロック図である。 図4は、実施の形態1に係るCPU部の内部構成を示すブロック図である。 図5は、実施の形態1に係るメモリの内部構成を示すブロック図である。 図6は、実施の形態1に係る受信コネクション情報テーブルの一例を示す図である。 図7は、実施の形態1に係るルーティングテーブルの一例を示す図である。 図8は、実施の形態1に係るパケット中継時の動作を示すフロー図である。 図9は、コネクション情報に対する競合の一例を示す図である。 図10は、実施の形態2に係るCPU部の内部構成を示すブロック図である。 図11は、実施の形態2に係るメモリの内部構成を示すブロック図である。 図12は、実施の形態2に係るパケット中継時の動作を示すフロー図である。
符号の説明
 100 CPU部
 101 受信振分CPU
 102-1~102-4 並列処理CPU
 103-1~103-4 QoS処理CPU
 104 中継処理CPU
 105 上位処理CPU
 151 送信振分CPU
 200 メモリ
 201 パケット情報格納バッファ
 202 受信コネクション情報テーブル
 203 ルーティングテーブル
 204-1~204-4 QoS処理用キュー群
 251 送信コネクション情報テーブル
 本発明の骨子は、パケットの要求品質に応じた複数のキューそれぞれに対してパケットのエンキュー処理およびデキュー処理を実行するQoS処理専用のプロセッサを設け、パケット入出力時のQoS処理については、専用のプロセッサが実行することである。以下、本発明の実施の形態について、図面を参照して詳細に説明する。
(実施の形態1)
 図3は、本発明の実施の形態1に係るパケット処理装置の概要構成を示すブロック図である。同図に示すパケット処理装置は、例えばネットワークサーバなどの中継装置に搭載されているものとする。なお、このパケット処理装置は、サーバやクライアントなどの端末装置に搭載されていても良い。図3に示すパケット処理装置は、CPU部100、メモリ200、メモリ制御部300、MAC(Media Access Control)部400-1~400-n(nは1以上の整数)、PHY(PHYsical)部500-1~500-n、および内部バス600を有している。
 CPU部100は、複数のCPUを備え、各CPUがメモリ200に格納された情報を用いた処理を実行する。このとき、CPU部100内の各CPUは、それぞれが異なる処理を並列に実行する。
 メモリ200は、CPU部100内の各CPUが処理に用いる情報を格納する。具体的には、メモリ200は、外部から入力されたパケットに含まれる情報(以下「パケット情報」という)やパケットの伝送に用いられるコネクションの情報などを格納する。
 メモリ制御部300は、CPU部100がメモリ200に格納された情報を用いて処理を実行する際に、CPU部100とメモリ200の間の情報のやり取りを制御する。すなわち、メモリ制御部300は、CPU部100による処理が実行される際に、内部バス600を介してメモリ200から必要な情報を取得し、CPU部100へ提供する。
 MAC部400-1~400-nは、パケットの送受信方法や誤り検出方法などを設定するレイヤ2の一部に属する処理を実行する。同様に、PHY部500-1~500-nは、それぞれ外部のインタフェース1~nに接続し、レイヤ1(物理層)に属する処理を実行する。これらのMAC部400-1~400-nとPHY部500-1~500-nとは、対応する2つの処理部の組み合わせ(例えばMAC部400-1とPHY部500-1の組み合わせ)ごとに例えばネットワークカード上に一体的に形成されている。そして、MAC部400-1~400-nおよびPHY部500-1~500-nを介して各インタフェース1~nからパケット処理装置内部へパケットが入力されたり、パケット処理装置内部から各インタフェース1~nへパケットが出力されたりする。
 内部バス600は、パケット処理装置内の各処理部を接続し、情報を伝達する。具体的には、内部バス600は、例えば各インタフェース1~nから入力されたパケットのパケット情報をMAC部400-1~400-nからメモリ200へ伝達したり、このパケット情報をメモリ200からメモリ制御部300へ伝達したりする。
 図4および図5は、それぞれ本実施の形態に係るCPU部100およびメモリ200の内部構成を示すブロック図である。図4に示すCPU部100は、受信振分CPU101、並列処理CPU102-1~102-4、QoS処理CPU103-1~103-4、中継処理CPU104、および上位処理CPU105を有している。また、図5に示すメモリ200は、パケット情報格納バッファ201、受信コネクション情報テーブル202、ルーティングテーブル203、およびQoS処理用キュー群204-1~204-4を有している。
 図4において、受信振分CPU101は、メモリ200に記憶された受信コネクション情報テーブル202を参照し、同一のコネクションから受信されるパケットが同一の並列処理CPUによって受信処理されるように、パケットを並列処理CPU102-1~102-4に振り分ける。すなわち、例えばあるTCPコネクションから受信されたパケットが並列処理CPU102-1によって受信処理された場合、受信振分CPU101は、同一のTCPコネクションから受信されるパケットは、すべて並列処理CPU102-1によって受信処理されるようにパケットを振り分ける。
 並列処理CPU102-1~102-4は、受信振分CPU101によってパケットが振り分けられると、このパケットのパケット情報をメモリ200のパケット情報格納バッファ201から取得し、所定の受信処理を実行する。そして、並列処理CPU102-1~102-4は、パケットの入力QoSを識別し、識別された入力QoSに対応するQoS処理CPU103-1~103-4へパケットの入力QoSを通知する。
 また、並列処理CPU102-1~102-4は、上位処理CPU105における高位レイヤ処理が終了したパケットのパケット情報をメモリ200のパケット情報格納バッファ201から取得し、所定の送信処理を実行する。このとき、並列処理CPU102-1~102-4のそれぞれは、自身が受信処理を実行したパケットのパケット情報を取得して、送信処理も実行する。そして、並列処理CPU102-1~102-4は、パケットの出力QoSを識別子、識別された出力QoSに対応するQoS処理CPU103-1~103-4へパケットの出力QoSを通知する。
 なお、ここでは、CPU部100に4つの並列処理CPU102-1~102-4が配置されるものとしたが、並列処理CPUの数は4つに限定されず、2つ以上の任意の数で良い。
 QoS処理CPU103-1~103-4は、それぞれメモリ200のQoS処理用キュー群204-1~204-4に対応して設けられ、対応するQoS処理用キュー群204-1~204-4を用いたQoS処理を実行する。具体的には、QoS処理CPU103-1~103-4は、並列処理CPU102-1~102-4からパケットの入力QoSまたは出力QoSが通知されると、対応するQoS処理用キュー群204-1~204-4のうち通知された入力QoSまたは出力QoSに対応するキューにパケットのエンキュー処理を実行し、それぞれのキューに応じたタイミングでパケットのデキュー処理を実行する。
 すなわち、QoS処理CPU103-1~103-4は、並列処理CPU102-1~102-4が実行する受信処理および送信処理とは別にパケットのQoS処理を実行する。したがって、並列処理CPU102-1~102-4からQoS処理用キュー群204-1~204-4に対するアクセスが行われることはなく、並列処理CPU102-1~102-4の間での排他処理が不要となる。また、QoS処理用キュー群204-1~204-4に含まれる各キューにはQoS処理CPU103-1~103-4のいずれか1つのみが対応しているため、QoS処理CPU103-1~103-4の間での排他処理も不要である。
 なお、ここでは、CPU部100に4つのQoS処理用キュー群204-1~204-4が配置されるものとしたが、QoS処理用キュー群の数は4つに限定されない。また、QoS処理用キュー群の数は、並列処理CPUと同数でなくても良く、QoS処理用キュー群204-1~204-4に含まれる各キューがいずれか1つのQoS処理CPUに対応していれば良い。
 中継処理CPU104は、メモリ200に記憶されたルーティングテーブル203を参照し、並列処理CPU102-1~102-4による受信処理後のパケットの送信先を設定する。本実施の形態においては、単一の中継処理CPU104がパケットの中継処理を実行するため、頻繁に更新され、比較的サイズが大きくなるルーティングテーブル203はメモリ200に1つだけ保持されていれば良い。このため、複数のCPUがそれぞれ固有のルーティングテーブルを参照しながら中継処理を実行する場合と比べて、メモリ200の記憶容量を節約することができるとともに、複数のルーティングテーブルの同期などによる処理負荷を軽減することができる。
 なお、中継処理CPU104が実行する中継処理はレイヤ2およびレイヤ3に属する処理であり、処理負荷は比較的小さい。したがって、単一の中継処理CPU104のみでも中継処理の実行が可能であるが、たとえ中継処理CPU104の処理性能が不足した場合でも、レイヤ2およびレイヤ3に属する処理をハードウェア化することにより、容易に中継処理を高速化することができる。
 上位処理CPU105は、並列処理CPU102-1~102-4においては実行が困難である高位レイヤ処理をパケットに対して実行する。また、上位処理CPU105は、例えばパケット処理装置に新規の機能を実装するにあたって、一時的に新規の機能を実装し、パケットに対する処理を実行するようにしても良い。
 一方、図5において、パケット情報格納バッファ201は、各インタフェース1~nからパケット処理装置に入力されたパケットのパケット情報を格納する。すなわち、パケット情報格納バッファ201は、MAC部およびPHY部を備えたネットワークカードを介して入力されたパケットのパケット情報を内部バス600を経由して取得し、パケットごとのパケット情報を格納する。
 受信コネクション情報テーブル202は、パケット処理装置に入力されたパケットが伝送された受信コネクションと振り分け先の並列処理CPU102-1~102-4との対応関係を記憶している。具体的には、受信コネクション情報テーブル202は、例えば図6に示すように、受信コネクションに応じたIPアドレスおよびポートと振り分け先の並列処理CPU102-1~102-4とを対応付けて記憶する。図6に示した例では、例えばIPアドレスが「IPa」でポートが「Pa」のパケットは、並列処理CPU102-1へ振り分けられることになる。
 ここで、受信コネクション情報テーブル202におけるIPアドレスおよびポートと振分先CPUとの対応関係は、新たな受信コネクションが確立されるたびに受信振分CPU101によって決定され登録される。そして、既存の受信コネクションからパケットが入力された場合には、受信振分CPU101によって受信コネクション情報テーブル202が参照されることにより、同一の受信コネクションから以前に入力されたパケットの振り分け先となっている並列処理CPU102-1~102-4へパケットが振り分けられることになる。したがって、同一の受信コネクションから入力されるパケットは、すべて同一の並列処理CPU102-1~102-4によって受信処理が施されることになる。これにより、それぞれの受信コネクションに関する情報に対しては、並列処理CPU102-1~102-4のいずれか1つのみがアクセスすることになり、排他処理が不要となる。
 ルーティングテーブル203は、中継処理におけるパケットの送信先を記憶している。具体的には、ルーティングテーブル203は、例えば図7に示すように、パケットの送信先のIPアドレスとパケットを出力すべき宛先インタフェースとの対応関係を記憶している。図7に示した例では、例えば送信先のIPアドレスが「IPa」のパケットは、インタフェース1へ出力されることになる。
 QoS処理用キュー群204-1~204-4は、パケットの要求品質ごとに設けられた複数のキューがQoS処理CPU103-1~103-4に対応づけてグループ分けされたキュー群であり、それぞれ1つ以上のキューを備えている。そして、QoS処理用キュー群204-1~204-4は、対応するQoS処理CPU103-1~103-4からの指示に従って、パケットの要求品質に応じたキューにパケットをエンキューしたりデキューしたりする。
 次いで、上記のように構成されたパケット処理装置のパケット中継時の動作について、図8に示すフロー図を参照しながら説明する。なお、以下においては、主にCPU部100内の各CPUの動作について説明するものとし、メモリ制御部300、MAC部400-1~400-n、およびPHY部500-1~500-nの詳細な動作については説明を省略する。
 まず、受信コネクションから受信されたパケットがパケット処理装置に入力されると(ステップS101)、このパケットのパケット情報は、パケット情報格納バッファ201に格納される(ステップS102)。そして、受信振分CPU101によってパケットが入力されたことが検知されると、受信振分CPU101によって、パケット情報からIPアドレスおよびポートが確認され、受信コネクション情報テーブル202が参照されることにより、パケットが伝送された受信コネクションが既存のコネクションであるか否かが判断される(ステップS103)。すなわち、パケットのIPアドレスおよびポートが受信コネクション情報テーブル202に登録済みであれば、受信振分CPU101によって、パケットの受信コネクションが既存のコネクションであると判断され、パケットのIPアドレスおよびポートが受信コネクション情報テーブル202に未登録であれば、受信振分CPU101によって、パケットの受信コネクションが新規のコネクションであると判断される。
 この判断の結果、受信コネクションが既存のコネクションである場合は(ステップS103Yes)、受信振分CPU101によって、パケットのIPアドレスおよびポートに対応する振分先CPUが受信コネクション情報テーブル202から読み出され、振り分け先の並列処理CPUへパケットの処理が振り分けられる。換言すれば、以前に同一の受信コネクションから入力されたパケットの処理を実行した並列処理CPUへパケットの処理が振り分けられる(ステップS104)。
 反対に、受信コネクションが新規のコネクションである場合は(ステップS103No)、受信振分CPU101によって、空いている並列処理CPUが1つ選択され、パケットの振り分け先に決定されるとともに、パケットのIPアドレスおよびポートと振り分け先の並列処理CPUとの対応関係が受信コネクション情報テーブル202に登録される。換言すれば、パケットに対する処理を実行中でない新規の並列処理CPUへパケットの処理が振り分けられる(ステップS105)。
 こうして、パケット処理装置へ入力されたパケットに対する処理は、受信コネクションごとに同一の並列処理CPUへ振り分けられるが、ここでは、並列処理CPU102-1に処理が振り分けられたものとして説明を進める。
 並列処理CPU102-1に対して処理が振り分けられると、並列処理CPU102-1によって、パケットに対する所定の受信処理が実行される。また、並列処理CPU102-1によって、パケットの要求品質に相当する入力QoSが識別され(ステップS106)、識別された入力QoSに対応するQoS処理CPUへ入力QoSが通知される。すなわち、メモリ200のQoS処理用キュー群204-1~204-4のうち入力QoSに対応するキューを含むQoS処理用キュー群を管理するQoS処理CPUに対して、パケットの入力QoSが通知される。このように、QoS処理CPU103-1~103-4のそれぞれに対しては、パケットが伝送された受信コネクションとは無関係に、同一のQoS処理用キュー群を使用するパケットの入力QoSが通知されることになる。ここでは、パケットの入力QoSに対応するキューが例えばQoS処理用キュー群204-1に含まれるものとすると、入力QoSは、QoS処理用キュー群204-1を管理するQoS処理CPU103-1へ通知される。
 QoS処理CPU103-1へ入力QoSが通知されると、QoS処理CPU103-1によって、QoS処理用キュー群204-1内の入力QoSに対応するキューにおけるQoS処理が実行される(ステップS107)。すなわち、QoS処理CPU103-1によって、入力QoSに対応するキューへパケットがエンキュー処理され、このキューに応じたタイミングでパケットがデキュー処理される。このとき、それぞれのキューにおけるQoS処理は、QoS処理CPU103-1~103-4のうちいずれか1つ(ここではQoS処理CPU103-1)のみが担当しているため、いずれのキューにおけるエンキュー処理およびデキュー処理にも競合が発生することはなく、QoS処理CPU103-1~103-4の間の排他処理は不要である。結果として、CPU部100における排他処理を低減することができ、CPU部100の処理性能を向上することができる。
 QoS処理が完了すると、中継処理CPU104によって、パケットの送信先を設定する中継処理が実行される(ステップS108)。すなわち、中継処理CPU104によって、ルーティングテーブル203が参照され、パケットの送信先IPアドレスに対応するインタフェースへパケットが出力されるように設定される。また、並列処理CPU102-1~102-4において実行が困難な高位レイヤ処理を実行する場合には、上位処理CPU105によって、高位レイヤ処理が実行される。
 そして、中継処理CPU104および上位処理CPU105による処理が完了すると、並列処理CPU102-1~102-4による所定の送信処理が実行される。このとき、パケットの受信処理を実行した並列処理CPUは、同一のパケットに対する送信処理も実行する。したがって、ここでは、並列処理CPU102-1によって、パケットの送信処理が実行される。また、並列処理CPU102-1によって、パケットの出力QoSが識別され(ステップS109)、識別された出力QoSに対応するQoS処理CPUへ出力QoSが通知される。パケットの出力QoSは、受信処理時の入力QoSと異なっていても良い。ここでは、パケットの出力QoSに対応するキューが例えばQoS処理用キュー群204-2に含まれるものとすると、出力QoSは、QoS処理用キュー群204-2を管理するQoS処理CPU103-2へ通知される。
 QoS処理CPU103-2へ出力QoSが通知されると、QoS処理CPU103-2によって、QoS処理用キュー群204-2内の出力QoSに対応するキューにおけるQoS処理が実行される(ステップS110)。すなわち、QoS処理CPU103-2によって、出力QoSに対応するキューへパケットがエンキュー処理され、このキューに応じたタイミングでパケットがデキュー処理される。このときも受信処理時のQoS処理と同様に、それぞれのキューにおけるQoS処理は、QoS処理CPU103-1~103-4のうちいずれか1つ(ここではQoS処理CPU103-2)のみが担当しているため、いずれのキューにおけるエンキュー処理およびデキュー処理にも競合が発生することはなく、QoS処理CPU103-1~103-4の間の排他処理は不要である。結果として、CPU部100における排他処理を低減することができ、CPU部100の処理性能を向上することができる。
 QoS処理が完了すると、パケットは、中継処理CPU104によって設定されたインタフェースから出力される(ステップS111)。このとき、パケット情報格納バッファ201のうち、出力されたパケットのパケット情報を格納するバッファ領域が解放される。また、パケットの出力後、受信コネクションが切断された場合は、受信コネクション情報テーブル202において、受信コネクションに対応するIPアドレスおよびポートと振分先CPUとの対応関係が削除される。
 以上のように、本実施の形態によれば、受信コネクションごとの複数の並列処理CPUとは別に複数のQoS処理CPUを設け、パケットの要求品質ごとの複数のキューそれぞれをいずれかのQoS処理CPUが管理し、パケット入力時および出力時におけるQoS処理をQoS処理CPUによって実行する。このため、それぞれのキューに対しては、単一のQoS処理CPUがエンキュー処理およびデキュー処理を実行することになり、キューにおける複数のCPUの競合が発生せず、排他処理が不要となる。結果として、パケットに対する処理を複数のCPUが並列して実行する場合に、複数のCPUの間における排他処理の頻度を低減して処理性能を向上することができる。
(実施の形態2)
 ところで、ネットワークサーバにおける高位レイヤ処理においては、クライアント側のコネクションおよびサーバ側のコネクションが終端されることが多い。すなわち、クライアントおよびネットワークサーバ間のコネクションとネットワークサーバおよびサーバ間のコネクションとが異なることがある。このため、実施の形態1における1つの並列処理CPUをパケットの入力時と出力時とで異なるコネクションに対応させる必要が生じることがある。
 具体的には、例えば図9に示すように、受信コネクション「TCP#1」からのパケットが並列処理CPU102-1に振り分けられた場合、この受信コネクション「TCP#1」が終端され、パケットは、並列処理CPU102-2に対応する送信コネクション「TCP#2」によって送信されることがある。しかし、実施の形態1においては、パケットの受信処理を実行した並列処理CPU102-1がパケットの送信処理も実行するため、並列処理CPU102-1は、並列処理CPU102-2に対応する送信コネクション「TCP#2」の情報を参照して、送信コネクション「TCP#2」によるパケットの送信処理を実行することになる。したがって、パケットの出力時には、送信コネクション「TCP#2」の情報に対して並列処理CPU102-1、102-2の双方が同時にアクセスする可能性があり、排他処理が必要となってしまう。
 そこで、本発明の実施の形態2の特徴は、送信されるパケットの処理を改めて並列処理CPUに振り分け、受信コネクションと送信コネクションのそれぞれに適した並列処理CPUがパケットに対する処理を実行することである。
 本実施の形態に係るパケット処理装置の概要構成は、実施の形態1(図3)と同様であるため、その説明を省略する。ただし、本実施の形態においては、CPU部100およびメモリ200の内部構成が実施の形態1とは異なっている。
 図10および図11は、それぞれ本実施の形態に係るCPU部100およびメモリ200の内部構成を示すブロック図である。これらの図において、図4および図5と同じ部分には同じ符号を付し、その説明を省略する。図10に示すCPU部100は、図4に示すCPU部100に送信振分CPU151を追加した構成を有している。また、図11に示すメモリ200は、図5に示すメモリ200に送信コネクション情報テーブル251を追加した構成を有している。
 図10において、送信振分CPU151は、メモリ200に記憶された送信コネクション情報テーブル251を参照し、同一のコネクションによって送信されるパケットが同一の並列処理CPUによって送信処理されるように、パケットを並列処理CPU102-1~102-4に振り分ける。すなわち、例えばあるTCPコネクションによって送信されたパケットが並列処理CPU102-2によって送信処理された場合、送信振分CPU151は、同一のTCPコネクションによって送信されるパケットは、すべて並列処理CPU102-2によって送信処理されるようにパケットを振り分ける。
 このとき、送信振分CPU151は、パケットに対する受信処理を実行した並列処理CPUとは無関係に送信処理を実行する並列処理CPUを決定する。したがって、例えば図9に示したように、受信コネクション「TCP#1」に対応する並列処理CPU102-1によって受信処理されたパケットであっても、このパケットが送信コネクション「TCP#2」によって送信される場合には、送信振分CPU151は、パケットの処理を送信コネクション「TCP#2」に対応する並列処理CPU102-2へ振り分ける。ただし、パケットの受信コネクションがパケット処理装置において終端されていない場合には、受信コネクションと送信コネクションが同一となるため、送信振分CPU151は、パケットに対する受信処理を実行した並列処理CPUへパケットの処理を振り分ける。
 このように、本実施の形態においては、パケット処理装置がパケットを中継する際、同一パケットの受信コネクションと送信コネクションが異なっていれば、それぞれのコネクションに対応する並列処理CPUへパケットに対する処理を振り分ける。このため、例えば図9に示したように、パケット処理装置においてコネクションの終端が行われる場合でも、並列処理CPU102-1~102-4の間での排他処理が不要となる。
 一方、図11において、送信コネクション情報テーブル251は、パケット処理装置から出力されるパケットが送信される送信コネクションと振り分け先の並列処理CPU102-1~102-4との対応関係を記憶している。具体的には、送信コネクション情報テーブル251は、例えば図6に示した受信コネクション情報テーブル202と同様に、送信コネクションに応じたIPアドレスおよびポートと振り分け先の並列処理CPU102-1~102-4とを対応付けて記憶する。
 ここで、送信コネクション情報テーブル251におけるIPアドレスおよびポートと振分先CPUとの対応関係は、新たな送信コネクションが確立されるたびに送信振分CPU151によって決定され登録される。そして、既存の送信コネクションへパケットが出力される場合には、送信振分CPU151によって送信コネクション情報テーブル251が参照されることにより、同一の送信コネクションへ以前に出力されたパケットの振り分け先となっている並列処理CPU102-1~102-4へパケットが振り分けられることになる。したがって、同一の送信コネクションへ出力されるパケットは、すべて同一の並列処理CPU102-1~102-4によって送信処理が施されることになる。これにより、それぞれの送信コネクションに関する情報に対しては、並列処理CPU102-1~102-4のいずれか1つのみがアクセスすることになり、排他処理が不要となる。
 次いで、上記のように構成されたパケット処理装置のパケット中継時の動作について、図12に示すフロー図を参照しながら説明する。同図において、図8と同じ部分には同じ符号を付し、その詳しい説明を省略する。したがって、以下においては、主にCPU部100内の送信振分CPU151の動作について詳しく説明する。
 まず、実施の形態1と同様に、受信コネクションから受信されたパケットがパケット処理装置に入力され(ステップS101)、パケット情報がパケット情報格納バッファ201に格納される(ステップS102)。そして、受信振分CPU101によって、受信コネクション情報テーブル202が参照されることにより、受信コネクションが既存のコネクションであるか否かが判断される(ステップS103)。この判断の結果に従って、受信振分CPU101により振り分け先の並列処理CPUへパケットの処理が振り分けられる(ステップS104、S105)。ここでは、並列処理CPU102-1に処理が振り分けられたものとして説明を進める。
 並列処理CPU102-1に対して処理が振り分けられると、並列処理CPU102-1によって、パケットに対する所定の受信処理が実行される。また、並列処理CPU102-1によって、パケットの要求品質に相当する入力QoSが識別され(ステップS106)、識別された入力QoSに対応するQoS処理CPUへ入力QoSが通知される。ここでは、パケットの入力QoSに対応するキューが例えばQoS処理用キュー群204-1に含まれるものとすると、入力QoSは、QoS処理用キュー群204-1を管理するQoS処理CPU103-1へ通知される。QoS処理CPU103-1へ入力QoSが通知されると、QoS処理CPU103-1によって、QoS処理用キュー群204-1内の入力QoSに対応するキューにおけるQoS処理が実行される(ステップS107)。
 QoS処理が完了すると、中継処理CPU104によって、パケットの送信先を設定する中継処理が実行される(ステップS108)。また、並列処理CPU102-1~102-4において実行が困難な高位レイヤ処理を実行する場合には、上位処理CPU105によって、高位レイヤ処理が実行される。
 これらの中継処理および高位レイヤ処理が完了すると、送信振分CPU151によって、パケット情報からIPアドレスおよびポートが確認され、送信コネクション情報テーブル251が参照されることにより、パケットを伝送する送信コネクションが既存のコネクションであるか否かが判断される(ステップS201)。すなわち、パケットのIPアドレスおよびポートが送信コネクション情報テーブル251に登録済みであれば、送信振分CPU151によって、パケットの送信コネクションが既存のコネクションであると判断され、パケットのIPアドレスおよびポートが送信コネクション情報テーブル251に未登録であれば、送信振分CPU151によって、パケットの送信コネクションが新規のコネクションであると判断される。
 この判断の結果、送信コネクションが既存のコネクションである場合は(ステップS201Yes)、送信振分CPU151によって、パケットのIPアドレスおよびポートに対応する振分先CPUが送信コネクション情報テーブル251から読み出され、振り分け先の並列処理CPUへパケットの処理が振り分けられる。換言すれば、以前に同一の送信コネクションへ出力されたパケットの処理を実行した並列処理CPUへパケットの処理が振り分けられる(ステップS202)。このため、たとえパケットの受信コネクションがパケット処理装置において終端されており、受信コネクションと送信コネクションが異なる場合でも、パケットの送信コネクションに応じた並列処理CPUへパケットの処理が振り分けられることになる。
 反対に、送信コネクションが新規のコネクションである場合は(ステップS201No)、送信振分CPU151によって、空いている並列処理CPUが1つ選択され、パケットの振り分け先に決定されるとともに、パケットのIPアドレスおよびポートと振り分け先の並列処理CPUとの対応関係が送信コネクション情報テーブル251に登録される。換言すれば、パケットに対する処理を実行中でない新規の並列処理CPUへパケットの処理が振り分けられる(ステップS203)。このため、たとえパケットの受信コネクションがパケット処理装置において終端されており、送信コネクションが新たに確立される場合でも、新たな送信コネクションに対応する並列処理CPUへパケットの処理が振り分けられることになる。
 こうして、パケット処理装置から出力されるパケットに対する処理は、送信コネクションごとに同一の並列処理CPUへ振り分けられるが、ここでは、並列処理CPU102-2に処理が振り分けられたものとして説明を進める。
 並列処理CPU102-2に対して処理が振り分けられると、並列処理CPU102-2によって、パケットに対する所定の送信処理が実行される。また、並列処理CPU102-2によって、パケットの要求品質に相当する出力QoSが識別され(ステップS109)、識別された出力QoSに対応するQoS処理CPUへ出力QoSが通知される。そして、QoS処理CPUによって、出力QoSに対応するキューにおけるQoS処理が実行され(ステップS110)、パケットは、中継処理CPU104によって設定されたインタフェースから出力される(ステップS111)。
 以上のように、本実施の形態によれば、パケット入力時に受信コネクションに応じた並列処理CPUへ処理を振り分けるだけではなく、パケット出力時にも送信コネクションに応じた並列処理CPUへ処理を振り分ける。このため、例えば受信コネクションがパケット処理装置において終端されており、パケットの受信コネクションと送信コネクションとが異なる場合にも、それぞれのコネクションに応じた並列処理CPUへ処理を振り分けることができ、複数の並列処理CPUから1つのコネクションに関する情報に対するアクセスの競合が発生せず、排他処理が不要となる。結果として、パケットに対する処理を複数のCPUが並列して実行する場合に、複数のCPUの間における排他処理の頻度をさらに確実に低減して処理性能を向上することができる。
 なお、上記各実施の形態においては、パケット処理装置に受信振分CPU101、QoS処理CPU103-1~103-4、および送信振分CPU151などの専用のCPUが備えられるものとして説明したが、本発明はこれに限定されず、一般のコンピュータに汎用のCPUが複数備えられる場合に、上記各実施の形態と同様の処理を各CPUに実行させるプログラムをコンピュータに導入し、コンピュータを上記各実施の形態と同様に動作させることも可能である。
 本発明は、パケットに対する処理を複数のCPUが並列して実行する場合に、複数のCPUの間における排他処理の頻度を低減して処理性能を向上する際などに適用することができる。

Claims (9)

  1.  パケットに対してそれぞれ同時に処理を実行する複数の処理手段と、
     処理対象パケットを前記複数の処理手段のいずれか1つに振り分ける振分手段と、
     前記複数の処理手段とは別体として設けられ、前記振分手段によって前記複数の処理手段のいずれか1つに振り分けられた処理対象パケットに対し、それぞれパケットの品質に対応する複数のキューを用いたキュー処理を実行するキュー処理手段と
     を有することを特徴とするパケット処理装置。
  2.  前記振分手段は、
     処理対象パケットの伝送に利用されるコネクションに対応する処理手段へ当該処理対象パケットを振り分けることを特徴とする請求項1記載のパケット処理装置。
  3.  前記振分手段は、
     処理対象パケットが自装置へ入力された際に、当該処理対象パケットを自装置へ伝送した受信コネクションに対応する処理手段へ処理対象パケットを振り分ける受信振分手段と、
     処理対象パケットが自装置から出力される際に、当該処理対象パケットを自装置から伝送する送信コネクションに対応する処理手段へ処理対象パケットを振り分ける送信振分手段と
     を含むことを特徴とする請求項2記載のパケット処理装置。
  4.  前記処理手段は、
     前記振分手段によって振り分けられた処理対象パケットの品質を識別し、
     前記キュー処理手段は、
     前記処理手段によって識別された品質に対応するキューを用いたキュー処理を順次実行する
     ことを特徴とする請求項1記載のパケット処理装置。
  5.  前記キュー処理手段は、
     前記複数のキューをグループ分けして得られる複数のキュー群それぞれに対応する複数のプロセッサを含み、
     前記複数のプロセッサは、
     それぞれ自プロセッサに対応するキュー群を用いたキュー処理を実行することを特徴とする請求項1記載のパケット処理装置。
  6.  前記複数の処理手段とは別体として設けられ、前記処理手段による処理後の処理対象パケットの送信先を設定する中継処理手段をさらに有することを特徴とする請求項1記載のパケット処理装置。
  7.  前記複数の処理手段とは別体として設けられ、前記処理手段による処理後の処理対象パケットに対して前記処理手段が実行する処理よりも上位の処理を実行する上位処理手段をさらに有することを特徴とする請求項1記載のパケット処理装置。
  8.  パケットに対してそれぞれ同時に処理を実行する複数のプロセッサを備えたコンピュータによって実行されるパケット処理プログラムであって、前記コンピュータに、
     処理対象パケットを前記複数のプロセッサのいずれか1つに振り分ける振分ステップと、
     前記振分ステップにて前記複数のプロセッサのいずれか1つに振り分けられた処理対象パケットに対し、振り分け先のプロセッサによる処理を実行する処理ステップと、
     前記処理ステップにおける処理後の処理対象パケットに対し、前記複数のプロセッサとは異なるプロセッサによるキュー処理であって、それぞれパケットの品質に対応する複数のキューを用いたキュー処理を実行するキュー処理ステップと
     を実行させることを特徴とするパケット処理プログラム。
  9.  パケットに対してそれぞれ同時に処理を実行する複数のプロセッサを備えたパケット処理装置におけるパケット処理方法であって、
     処理対象パケットを前記複数のプロセッサのいずれか1つに振り分ける振分ステップと、
     前記振分ステップにて前記複数のプロセッサのいずれか1つに振り分けられた処理対象パケットに対し、振り分け先のプロセッサによる処理を実行する処理ステップと、
     前記処理ステップにおける処理後の処理対象パケットに対し、前記複数のプロセッサとは異なるプロセッサによるキュー処理であって、それぞれパケットの品質に対応する複数のキューを用いたキュー処理を実行するキュー処理ステップと
     を有することを特徴とするパケット処理方法。
PCT/JP2008/050700 2008-01-21 2008-01-21 パケット処理装置およびパケット処理プログラム WO2009093299A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2008/050700 WO2009093299A1 (ja) 2008-01-21 2008-01-21 パケット処理装置およびパケット処理プログラム
JP2009550385A JP5152201B2 (ja) 2008-01-21 2008-01-21 パケット処理装置およびパケット処理プログラム
US12/805,019 US8832332B2 (en) 2008-01-21 2010-07-07 Packet processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2008/050700 WO2009093299A1 (ja) 2008-01-21 2008-01-21 パケット処理装置およびパケット処理プログラム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/805,019 Continuation US8832332B2 (en) 2008-01-21 2010-07-07 Packet processing apparatus

Publications (1)

Publication Number Publication Date
WO2009093299A1 true WO2009093299A1 (ja) 2009-07-30

Family

ID=40900818

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2008/050700 WO2009093299A1 (ja) 2008-01-21 2008-01-21 パケット処理装置およびパケット処理プログラム

Country Status (3)

Country Link
US (1) US8832332B2 (ja)
JP (1) JP5152201B2 (ja)
WO (1) WO2009093299A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011067408A1 (en) * 2009-12-04 2011-06-09 Napatech A/S An apparatus and a method of receiving and storing data packets controlled by a central controller
WO2011067405A1 (en) 2009-12-04 2011-06-09 Napatech A/S Distributed processing of data frames by mulitiple adapters using time stamping and a central controller
CN102763381A (zh) * 2009-12-04 2012-10-31 纳派泰克股份公司 在通过控制对队列填充级别进行更新来节省带宽的同时接收并存储数据的组件和方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9300570B2 (en) 2012-05-22 2016-03-29 Harris Corporation Multi-tunnel virtual private network
US11054884B2 (en) 2016-12-12 2021-07-06 Intel Corporation Using network interface controller (NIC) queue depth for power state management

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000083055A (ja) * 1998-09-04 2000-03-21 Hitachi Ltd ルータ
JP2000132411A (ja) * 1998-10-27 2000-05-12 Nec Corp ディスパッチ装置及びcpuの割り当て方法ならびにディスパッチ・プログラムを格納した記憶媒体
JP2002094556A (ja) * 2000-09-14 2002-03-29 Ntt Docomo Inc 業務支援装置、業務支援システムおよび業務支援方法
JP2006080936A (ja) * 2004-09-10 2006-03-23 Japan Radio Co Ltd 通信端末及び通信方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5941959A (en) * 1995-12-20 1999-08-24 Tandem Computers Incorporated System for transferring a data stream to a requestor without copying data segments to each one of multiple data source/sinks during data stream building
US6920112B1 (en) * 1998-06-29 2005-07-19 Cisco Technology, Inc. Sampling packets for network monitoring
JP3711752B2 (ja) * 1998-07-09 2005-11-02 株式会社日立製作所 パケット通信装置
US6370605B1 (en) * 1999-03-04 2002-04-09 Sun Microsystems, Inc. Switch based scalable performance storage architecture
JP3641996B2 (ja) * 2000-03-22 2005-04-27 日本電気株式会社 同一宛先セルの優先転送制御装置及びその方法
JP4041038B2 (ja) 2003-08-13 2008-01-30 富士通株式会社 高位レイヤ処理方法及びシステム
US6981074B2 (en) * 2003-10-14 2005-12-27 Broadcom Corporation Descriptor-based load balancing
US7957379B2 (en) * 2004-10-19 2011-06-07 Nvidia Corporation System and method for processing RX packets in high speed network applications using an RX FIFO buffer
US7647436B1 (en) * 2005-04-29 2010-01-12 Sun Microsystems, Inc. Method and apparatus to interface an offload engine network interface with a host machine
US20060277330A1 (en) * 2005-06-01 2006-12-07 Wilhelmus Diepstraten Techniques for managing priority queues and escalation considerations in USB wireless communication systems
US7610330B1 (en) * 2006-03-30 2009-10-27 Packeteer, Inc. Multi-dimensional computation distribution in a packet processing device having multiple processing architecture

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000083055A (ja) * 1998-09-04 2000-03-21 Hitachi Ltd ルータ
JP2000132411A (ja) * 1998-10-27 2000-05-12 Nec Corp ディスパッチ装置及びcpuの割り当て方法ならびにディスパッチ・プログラムを格納した記憶媒体
JP2002094556A (ja) * 2000-09-14 2002-03-29 Ntt Docomo Inc 業務支援装置、業務支援システムおよび業務支援方法
JP2006080936A (ja) * 2004-09-10 2006-03-23 Japan Radio Co Ltd 通信端末及び通信方法

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011067408A1 (en) * 2009-12-04 2011-06-09 Napatech A/S An apparatus and a method of receiving and storing data packets controlled by a central controller
WO2011067405A1 (en) 2009-12-04 2011-06-09 Napatech A/S Distributed processing of data frames by mulitiple adapters using time stamping and a central controller
CN102742220A (zh) * 2009-12-04 2012-10-17 纳派泰克股份公司 使用加时间戳和中央控制器由多个适配器对数据帧进行的分布式处理
CN102763381A (zh) * 2009-12-04 2012-10-31 纳派泰克股份公司 在通过控制对队列填充级别进行更新来节省带宽的同时接收并存储数据的组件和方法
US8874809B2 (en) 2009-12-04 2014-10-28 Napatech A/S Assembly and a method of receiving and storing data while saving bandwidth by controlling updating of fill levels of queues
US8934341B2 (en) 2009-12-04 2015-01-13 Napatech A/S Apparatus and a method of receiving and storing data packets controlled by a central controller
CN102763381B (zh) * 2009-12-04 2015-04-22 纳派泰克股份公司 在通过控制对队列填充程度进行更新来节省带宽的同时接收并存储数据的组件和方法
CN102742220B (zh) * 2009-12-04 2015-09-09 纳派泰克股份公司 使用加时间戳和中央控制器由多个适配器对数据帧进行的分布式处理
US9407581B2 (en) 2009-12-04 2016-08-02 Napatech A/S Distributed processing of data frames by multiple adapters using time stamping and a central controller

Also Published As

Publication number Publication date
US8832332B2 (en) 2014-09-09
JP5152201B2 (ja) 2013-02-27
US20100281190A1 (en) 2010-11-04
JPWO2009093299A1 (ja) 2011-05-26

Similar Documents

Publication Publication Date Title
US9450780B2 (en) Packet processing approach to improve performance and energy efficiency for software routers
US8904028B2 (en) Scalable cluster router
KR100992050B1 (ko) 가상화된 네트워크 환경에서 입력/출력 공유를 가지는프로토콜 오프로드 및 다이렉트 입력/출력을 위한 방법 및시스템
US9069722B2 (en) NUMA-aware scaling for network devices
US20210320820A1 (en) Fabric control protocol for large-scale multi-stage data center networks
US7788411B2 (en) Method and system for automatically reflecting hardware resource allocation modifications
US9590914B2 (en) Randomized per-packet port channel load balancing
US8005022B2 (en) Host operating system bypass for packets destined for a virtual machine
US7843919B2 (en) Ethernet virtualization using a network packet alteration
US8713220B2 (en) Multi-bank queuing architecture for higher bandwidth on-chip memory buffer
US7701849B1 (en) Flow-based queuing of network traffic
WO2020236291A1 (en) System and method for facilitating efficient load balancing in a network interface controller (nic)
US8743877B2 (en) Header processing engine
JP4898781B2 (ja) オペレーティング・システム・パーティションのためのネットワーク通信
JP5136564B2 (ja) パケット処理装置およびパケット処理プログラム
US20090006521A1 (en) Adaptive receive side scaling
US7733890B1 (en) Network interface card resource mapping to virtual network interface cards
JP2016510524A (ja) 通信トラフィック処理アーキテクチャおよび方法
US20120093159A1 (en) Scaling egress network traffic
US9077751B2 (en) Driver level segmentation
JP5152201B2 (ja) パケット処理装置およびパケット処理プログラム
US7404058B2 (en) Method and apparatus for avoiding collisions during packet enqueue and dequeue
US20060251071A1 (en) Apparatus and method for IP packet processing using network processor
US10257080B1 (en) Hardware resource allocation for equal-cost multi-path groups
US7672299B2 (en) Network interface card virtualization based on hardware resources and software rings

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2009550385

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08703550

Country of ref document: EP

Kind code of ref document: A1