WO2016008079A1 - 应用于网络设备的处理报文的方法和相关设备 - Google Patents

应用于网络设备的处理报文的方法和相关设备 Download PDF

Info

Publication number
WO2016008079A1
WO2016008079A1 PCT/CN2014/082171 CN2014082171W WO2016008079A1 WO 2016008079 A1 WO2016008079 A1 WO 2016008079A1 CN 2014082171 W CN2014082171 W CN 2014082171W WO 2016008079 A1 WO2016008079 A1 WO 2016008079A1
Authority
WO
WIPO (PCT)
Prior art keywords
packets
message
packet
flow
queue
Prior art date
Application number
PCT/CN2014/082171
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 华为技术有限公司
Priority to PCT/CN2014/082171 priority Critical patent/WO2016008079A1/zh
Priority to CN201480079047.XA priority patent/CN106464605B/zh
Priority to EP14897751.5A priority patent/EP3163818B1/en
Priority to TW104122748A priority patent/TWI669932B/zh
Publication of WO2016008079A1 publication Critical patent/WO2016008079A1/zh
Priority to US15/407,031 priority patent/US10116773B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • 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
    • 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/6295Queue scheduling characterised by scheduling criteria using multiple queues, one for each individual QoS, connection, flow or priority

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and related apparatus for processing a message applied to a network device.
  • Network devices carry a large number of end-to-end traffic flows.
  • the service flow is a continuous bit (English: bit) sequence based on the service perspective; and based on the packet transmission perspective, the service flow may be encapsulated into a message (for example, internet protocol (abbreviation: IP)) Sequence), each message is transmitted independently in the network.
  • IP internet protocol
  • the data plane of the network device needs to classify the packets according to the service flow to which they belong. For example, in the process, the packets of the same service flow are required to be processed in order.
  • a single-instance distributor (English: Classifier) is deployed in a traditional network device.
  • the single-instance distributor distributes each packet to multiple flow queues in the order of receiving.
  • Each network service processing unit processes the packets in parallel in units of flow queues.
  • the packets in the same flow queue are processed in sequence on a network service processing unit.
  • single-instance distributors in traditional network devices are difficult to implement to support high-performance and high-rate message distribution capabilities. Summary of the invention
  • the embodiment of the invention provides a method for processing a packet by a network device and related devices, so as to improve the packet distribution processing capability of the network device.
  • a method for processing a message applied to a network device wherein the K distributors and the S network service processing units are loaded into a memory of the network device, the K distributors including a distributor X and a distributor y, the K and the S being an integer greater than one;
  • the method includes: the distributor X acquiring P message identifiers from the queue area a corresponding to the distributor X in the network card receiving queue; the distributor X acquiring the location based on the P message identifiers The P packets identify the corresponding P packets, and the distributor X determines the P packets based on the P packets. And the distributors are configured to distribute the packet description information corresponding to the P packets to the flow queues corresponding to the flow queue identifiers corresponding to the P packets, where the P The packet description information corresponding to the packet i in the packet is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet i, and the packet i is any one of the P packets.
  • the message description information corresponding to the message i includes the message identifier of the message i; the Si network service processing units in the S network service processing units are based on the information distributed to the flow queue The packet description information corresponding to the P packets is used to process the P packets and send the processed P packets;
  • the distributor y obtains Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue; the distributor y acquires the Q pieces based on the Q message identifiers The message identifies the corresponding Q packets, and the distributor y determines the flow queue identifier corresponding to the Q packets based on the Q packets; and the P packets determined by the distributor X After the flow queue corresponding to the flow queue identifier is used to distribute the packet description information corresponding to the P packets, the distributor y sends the flow queue corresponding to the determined flow queue identifier corresponding to the Q packets.
  • the packet description information corresponding to the Q packets Distributing the packet description information corresponding to the Q packets, where the packet description information corresponding to the packet m in the Q packet identifiers is distributed to the determined flow queue identifier corresponding to the packet m
  • the message m is any one of the Q messages
  • the message description information corresponding to the message m includes the message identifier of the message m.
  • Q and the P are positive integers, where the Q packets are The time when the team is connected to the network card to the queue area a; the Sj network service processing units in the S network service processing units are processed according to the message description information corresponding to the Q messages distributed to the flow queue.
  • the Q packets are sent to the processed Q packets, where the intersection of the Si network service processing units and the Sj network service processing units is an empty set or a non-empty set.
  • the distributor X obtains P message identifiers from the queue area a corresponding to the distributor X in the network card receiving queue.
  • the distributor X searches in the configuration table based on the number of the distributor X. After the queue area corresponding to the distributor X in the network card receiving queue is the queue area a, the distributor X acquires P message identifiers from the queue area a corresponding to the distributor X;
  • the distributor y receives a queue area corresponding to the distributor y from the network card receiving queue Obtaining Q message identifiers in the domain b, the method includes: the distributor y searching, in the configuration table, the queue area corresponding to the distributor y in the network card receiving queue based on the number of the distributor y After the queue area b, the distributor y acquires Q message identifiers from the queue area b corresponding to the distributor y.
  • the distributor X determines the P packets based on the P packets
  • the corresponding flow queue identifier includes: the distributor X parses the P packets to obtain the packet feature information included in the P packets, and the distributor X is based on the report included in the P packets. And performing a table lookup operation to obtain a matching table entry corresponding to the P packets, where the P packets correspond to the flow queue identifiers corresponding to the P packets.
  • the distributor y determines the flow queue identifier information corresponding to the Q packets based on the Q packets, and the distributor y is based on the obtained packet feature information included in the Q packet messages. Performing a table lookup operation to obtain the matching entries of the Q packets, where the matching entries of the Q packets include the corresponding stream queue identifiers of the Q packets.
  • the P packets corresponding to the matching entry further include a flow identifier of the service flow to which the P packets belong; and the matching entries of the Q packets further include the flow of the service flow to which the Q packets belong.
  • the packet description information corresponding to the packet i further includes a flow of the service flow to which the packet i belongs And identifying, by the network service processing unit, the network service processing unit corresponding to the P packets that are distributed to the flow queue, based on the packet description corresponding to the P packets that are distributed to the flow queue The message identifiers of the P packets included in the information are used to obtain the P packets; the Si network service processing units are based on the packet description information corresponding to the P packets that are distributed to the flow queue.
  • the flow identifier of the service flow to which the P packets belong, and the flow context of the service flow to which the P packets belong; the Si network service processing unit is based on the obtained service flow of the P packets Stream context, processing Obtaining the P packets and sending the processed P packets;
  • the packet description information corresponding to the packet m further includes a flow identifier of the service flow to which the packet m belongs; the Sj network service processing units are based on the Q packets that are distributed to the flow queue.
  • the network service processing unit acquires the Q messages according to the message identifiers of the Q packets included in the packet description information corresponding to the Q packets in the flow queue; the Sj networks
  • the service processing unit acquires the flow of the service flow to which the Q packets belong based on the flow identifier of the service flow to which the Q packets are included in the packet description information corresponding to the Q packets that are distributed to the flow queue.
  • Context The Sj network service processing unit processes the obtained Q messages and sends the processed Q messages according to the obtained flow context of the service flow to which the Q packets belong.
  • a memory token is stored in a memory in the network device
  • the distributor X distributes the packet description information corresponding to the P packets to the flow queue identified by the flow queue identifier corresponding to the P packets, and includes: when the distributor X monitors When the number of the distributor X matches the current first value of the waiting token, the distributor X sends the identified flow queue identifier to the flow queue identifier corresponding to the P packets.
  • the packet description information corresponding to the P packets; the method further includes: the distributor X updating the current first value of the waiting token to a second value according to a preset policy;
  • the distributor y After the distributor X distributes the packet description information corresponding to the P packets to the flow queue corresponding to the flow queue identifier corresponding to the P packets, the distributor y Determining, by the flow queue corresponding to the flow queue identifier corresponding to the Q packets, the packet description information corresponding to the Q packets, including: when the distributor y monitors the number of the distributor y and When the current second value of the waiting token is matched, the distributor y distributes the Q messages corresponding to the identified flow queues corresponding to the Q packets corresponding to the Q packets.
  • the message description information wherein the method further includes: the distributor y updating the current second value of the waiting token according to the preset policy; wherein, the second value is greater than The first value, or the second value is less than the first value - Value.
  • the P messages further include a message j, and the message description information corresponding to the message j is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the message j, the message j
  • Corresponding message description information includes a message identifier of the message j; the message j is enqueued to the queue area a in the network card receiving queue, and the packet i is enqueued to the network card later than the message i
  • the time of the queue area a in the queue is received; the message description information corresponding to the message j is distributed to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message j, which is later than the report.
  • the message description information corresponding to the text i is distributed to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message j; the Si network service processing units are based on the distribution to the flow queue
  • the message description information corresponding to the message j processes the time of the message j, and the processing is processed by the Si network service processing unit based on the message description information corresponding to the message i distributed to the flow queue. i's time.
  • the Q packets further include a packet n, and the packet description information corresponding to the packet n is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet n, the packet n
  • the corresponding packet description information includes the packet identifier of the packet n; the packet n is queued to the queue region b in the network card receiving queue, and the packet is sent to the network card later than the packet m.
  • the message description information corresponding to the message n is distributed to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message n, which is later than the report
  • the message description information corresponding to the text m is distributed to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message m; wherein the Sj network service processing units are based on being distributed to the flow queue
  • the message description information corresponding to the message n processes the message n, and is later than the message description information processing station corresponding to the message m sent by the Sj network service processing unit based on the message queue The time of the message m.
  • a device for processing a message applied to a network device a device for processing a message applied to a network device
  • the apparatus includes K distributors and S network service processing units, the K distributors including a distributor X and a distributor y, wherein the K and the S are integers greater than one;
  • the distributor X is configured to obtain P message identifiers from the queue area a corresponding to the distributor X in the network card receiving queue, and obtain the P packets based on the P message identifiers.
  • the packet description information corresponding to the P packets wherein the packet description information corresponding to the packet i in the P packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet i
  • the packet i is any one of the P packets, and the packet description information corresponding to the packet i includes the packet identifier of the packet i;
  • the network service processing units of the S network service processing units are configured to process the P packets and send and process the packets according to the packet description information corresponding to the P packets that are distributed to the flow queue.
  • the distributor y is configured to obtain Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue, and obtain the Q messages based on the Q message identifiers. Identifying the corresponding Q packets, and determining the flow queue identifier corresponding to the Q packets based on the Q packets; and correspondingly corresponding to the flow queue identifiers corresponding to the P packets determined by the distributor X After the flow queues distribute the packet description information corresponding to the P packets, distribute the packet descriptions corresponding to the Q packets to the flow queues corresponding to the determined flow queue identifiers of the Q packets.
  • the message wherein the message description information corresponding to the message m in the Q message identifiers is distributed to the flow queue corresponding to the determined flow queue identifier corresponding to the message m, the message m is a packet of any one of the Q packets, wherein the packet description information corresponding to the packet m includes a packet identifier of the packet m; the Q and the P are positive integers, where Describe the Q packets into the team in the network card receiving queue Region b is later than the P packets enqueued in a queue area of the card receiving time queue;
  • the Sj network service processing units in the S network service processing units are configured to process the Q messages according to the message description information corresponding to the Q messages distributed in the flow queue, and send the processed messages.
  • the distributor X is specifically configured to be in the configuration table based on the number of the distributor X Find After the queue area corresponding to the distributor X in the network card receiving queue is the queue area a, the distributor X acquires P message identifiers from the queue area a corresponding to the distributor X;
  • the distributor y is specifically configured to be based on the distributor y After the number in the configuration table finds that the queue area corresponding to the distributor y in the network card receiving queue is the queue area b, the distributor y is from the queue area b corresponding to the distributor y Get Q talents in the logo.
  • the distributor X is configured to: obtain the packet feature information included in the P packets by parsing the P packets, and based on the packet features included in the P packets The information is performed to perform a table lookup operation to obtain a matching entry of the P packets, where the matching matching entry includes a flow queue identifier corresponding to the P packets;
  • the distributor y is specifically configured to: obtain the Q by parsing the Q packets, by using the Q packets to determine a flow queue identifier corresponding to the Q packets.
  • the packet feature information included in the packet is subjected to a table lookup operation based on the obtained packet feature information of the Q message packet to obtain a matching entry of the Q message, where the Q report is The corresponding matching entry includes the corresponding flow queue identifier of the Q packets.
  • the P packets corresponding to the matching entry further include a flow identifier of the service flow to which the P packets belong; and the matching entries of the Q packets further include the flow of the service flow to which the Q packets belong.
  • the packet description information corresponding to the packet i further includes a flow of the service flow to which the packet i belongs And the identifiers of the P packets of the P packets included in the packet description information corresponding to the P packets that are distributed to the flow queues.
  • the P packets are obtained; the traffic identifiers of the service flows to which the P packets belong to the packet description information corresponding to the P packets that are distributed to the flow queues are obtained, and the services of the P packets are obtained.
  • Flow context of the stream based on the acquisition Transmitting the obtained P packets and sending the processed P packets according to the flow context of the service flow to which the P packets belong;
  • the packet description information corresponding to the packet m further includes a flow identifier of the service flow to which the packet m belongs; the Sj network service processing unit is specifically configured to: based on the Q packets distributed to the flow queue
  • the packet identifiers of the Q packets included in the packet description information corresponding to the packet are used to obtain the Q packets, and the packet description information corresponding to the Q packets that are distributed to the flow queue is included in the packet description information.
  • the flow identifier of the service flow to which the Q packets belong obtain the flow context of the service flow to which the Q packets belong, and process the acquired location based on the obtained flow context of the service flow to which the Q packets belong.
  • the Q messages are described and the processed Q messages are sent.
  • the distributor X is specifically configured to monitor when the packet description information corresponding to the P packets is distributed to the specified flow queue identifier corresponding to the P packets corresponding to the P packets. When the number of the distributor X matches the current first value of the waiting token, the P packets are distributed to the identified flow queues corresponding to the P packets corresponding to the P packets. Corresponding message description information; the distributor X is further configured to: update the current first value of the waiting token to a second value according to a preset policy;
  • the distributor y After the packet description information corresponding to the P packets is distributed to the flow queue corresponding to the flow queue identifier corresponding to the P packets, the distributor y indicates the determined The flow queue corresponding to the flow queue identifier corresponding to the Q packets distributes the packet description information corresponding to the Q packets, and the distributor y is specifically configured to monitor the number and location of the distributor y. When the current second value of the waiting token is matched, the packet description information corresponding to the Q packets is distributed to the identified flow queue identifier corresponding to the Q queues.
  • the distributor y is further configured to: update the current second value of the waiting token according to the preset policy; where the second value is greater than the first value, Or the second value is smaller than the first value.
  • the P packets further include a message j, and the message description information corresponding to the message j is distributed by the distributor X to the flow queue corresponding to the determined flow queue identifier corresponding to the message j.
  • the message description information corresponding to the message j includes the message identifier of the message j; the message j is queued to the queue area a in the network card receiving queue later than the message i The time when the team reaches the queue area a in the NIC receiving queue; the message description information corresponding to the message j is distributed by the distributor X to the determined flow queue corresponding to the flow queue identifier corresponding to the text j The time in the flow queue corresponding to the flow queue identifier corresponding to the determined message j is distributed by the distributor X to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message j; Transmitting, by the network service processing unit, the time of the message j based on the message description information corresponding to the message j distributed in the flow queue,
  • the Q packets further include a packet n, and the packet description information corresponding to the packet n is distributed by the distributor y to the flow queue corresponding to the determined flow queue identifier corresponding to the packet n.
  • the message description information corresponding to the packet n includes the packet identifier of the packet n; the time when the packet n is queued to the network card connection area b; the packet description corresponding to the packet n.
  • the information is distributed by the distributor y to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message n, and the message description information corresponding to the message m is used by the distributor The y is distributed to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message m.
  • the Sj network service processing unit is based on the packet corresponding to the packet n distributed to the flow queue.
  • the time at which the description information processes the message n is later than the time when the Sj network service processing unit processes the message m based on the message description information corresponding to the message m distributed to the flow queue.
  • a network device includes:
  • Memory and a processor coupled to the memory
  • the processor configured to execute the code or instruction in the memory to send K distributors and S
  • the network service processing unit is loaded into the memory; wherein the K distributors include a distributor X and a distributor y, and the K and the S are integers greater than one;
  • the distributor x is configured to obtain P message identifiers from the queue area a corresponding to the distributor X in the network card receiving queue, and obtain the P packets based on the P message identifiers. Identifying the corresponding P packets, determining the flow queue identifier corresponding to the P packets based on the P packets, and distributing the flow queues corresponding to the flow queue identifiers corresponding to the P packets.
  • the packet description information corresponding to the P packets wherein the packet description information corresponding to the packet i in the P packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet i
  • the packet i is any one of the P packets, and the packet description information corresponding to the packet i includes the packet identifier of the packet i;
  • the network service processing units of the S network service processing units are configured to process the P packets and send and process the packets according to the packet description information corresponding to the P packets that are distributed to the flow queue.
  • the distributor y is configured to obtain Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue, and obtain the Q messages based on the Q message identifiers. Identifying the corresponding Q packets, and determining the flow queue identifier corresponding to the Q packets based on the Q packets; and correspondingly corresponding to the flow queue identifiers corresponding to the P packets determined by the distributor X After the flow queues distribute the packet description information corresponding to the P packets, distribute the packet descriptions corresponding to the Q packets to the flow queues corresponding to the determined flow queue identifiers of the Q packets.
  • the message wherein the message description information corresponding to the message m in the Q message identifiers is distributed to the flow queue corresponding to the determined flow queue identifier corresponding to the message m, the message m is a packet of any one of the Q packets, wherein the packet description information corresponding to the packet m includes a packet identifier of the packet m; the Q and the P are positive integers, where Describe the Q packets into the team in the network card receiving queue Region b is later in time than the P packets enqueued in a queue area of the card receiving time queue;
  • the Sj network service processing units in the S network service processing units are configured to process the Q messages according to the message description information corresponding to the Q messages distributed in the flow queue, and send the processed messages.
  • the slave network card is connected An aspect of obtaining a P message identifier in a queue area a corresponding to the distributor x in the receiving queue, where the distributor X is specifically configured to find a network card in the configuration table based on the number of the distributor X After the queue area corresponding to the distributor X in the receiving queue is the queue area a, the distributor X acquires P message identifiers from the queue area a corresponding to the distributor X;
  • the agent X is specifically used for obtaining the Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue, and the distributor X is specifically configured to be based on the distributor y After the number is found in the configuration table, the queue area corresponding to the distributor y in the network card receiving queue is the queue area b, and the distributor y is from the queue area b corresponding to the distributor y. Get Q message IDs.
  • the P packets correspond to the matching entries, and the P packets corresponding to the matching entries include the flow queue identifiers corresponding to the P packets.
  • the distributor y is specifically configured to: obtain the Q by parsing the Q packets, by using the Q packets to determine a flow queue identifier corresponding to the Q packets.
  • the packet feature information included in the packet is subjected to a table lookup operation based on the obtained packet feature information of the Q message packet to obtain a matching entry of the Q message, where the Q report is The corresponding matching entry includes the corresponding flow queue identifier of the Q packets.
  • the P matching message corresponding to the matching entry further includes the service flow to which the P packets belong And the flow identifier of the service flow to which the Q packets belong to the matching entry.
  • the packet description information corresponding to the packet i further includes a flow of the service flow to which the packet i belongs And the identifiers of the P packets of the P packets included in the packet description information corresponding to the P packets that are distributed to the flow queues. P messages; And obtaining a flow context of the service flow to which the P packets belong, based on the flow identifier of the service flow to which the P packets belong to the packet description information corresponding to the P packets that are allocated to the flow queue; Obtaining the flow context of the service flow to which the P packets belong, processing the obtained P packets, and sending the processed P packets;
  • the packet description information corresponding to the packet m further includes a flow identifier of the service flow to which the packet m belongs; the Sj network service processing unit is specifically configured to: based on the Q packets distributed to the flow queue
  • the packet identifiers of the Q packets included in the packet description information corresponding to the packet are used to obtain the Q packets, and the packet description information corresponding to the Q packets that are distributed to the flow queue is included in the packet description information.
  • the flow identifier of the service flow to which the Q packets belong obtain the flow context of the service flow to which the Q packets belong, and process the acquired location based on the obtained flow context of the service flow to which the Q packets belong.
  • the Q messages are described and the processed Q messages are sent.
  • the distributor X is specifically configured to monitor when the packet description information corresponding to the P packets is distributed to the specified flow queue identifier corresponding to the P packets corresponding to the P packets. When the number of the distributor X matches the current first value of the waiting token, the P packets are distributed to the identified flow queues corresponding to the P packets corresponding to the P packets. Corresponding message description information; the distributor X is further configured to: update the current first value of the waiting token to a second value according to a preset policy;
  • the distributor y After the packet description information corresponding to the P packets is distributed to the flow queue corresponding to the flow queue identifier corresponding to the P packets, the distributor y indicates the determined The flow queue corresponding to the flow queue identifier corresponding to the Q packets distributes the packet description information corresponding to the Q packets, and the distributor y is specifically configured to monitor the number and location of the distributor y. When the current second value of the waiting token is matched, the packet description information corresponding to the Q packets is distributed to the identified flow queue identifier corresponding to the Q queues.
  • the distributor y is further configured to: update the current second value of the waiting token according to the preset policy; where the second value is greater than the first value, Or the second take The value is less than the first value.
  • the P packets further include a message j, and the message description information corresponding to the message j is distributed by the distributor X to the flow queue corresponding to the determined flow queue identifier corresponding to the message j.
  • the message description information corresponding to the message j includes the message identifier of the message j; the message j is queued to the queue area a in the network card receiving queue later than the message i The time when the team reaches the queue area a in the NIC receiving queue; the message description information corresponding to the message j is distributed by the distributor X to the determined flow queue corresponding to the flow queue identifier corresponding to the text j The time in the flow queue corresponding to the flow queue identifier corresponding to the determined message j is distributed by the distributor X to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message j; Transmitting, by the network service processing unit, the time of the message j based on the message description information corresponding to the message j distributed in the flow queue,
  • the Q packets further include a packet n, and the packet description information corresponding to the packet n is distributed by the distributor y to the flow queue corresponding to the determined flow queue identifier corresponding to the packet n.
  • the message description information corresponding to the packet n includes the packet identifier of the packet n; the time when the packet n is queued to the network card connection area b; the packet description corresponding to the packet n.
  • the information is distributed by the distributor y to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message n, and the message description information corresponding to the message m is used by the distributor The y is distributed to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message m.
  • the Sj network service processing unit is based on the packet corresponding to the packet n distributed to the flow queue.
  • the time at which the description information processes the message n is later than the time when the Sj network service processing unit processes the message m based on the message description information corresponding to the message m distributed to the flow queue.
  • the network service processing unit that is, the distributor deploying the multi-software instance and the S network service processing units
  • the single network card receiving queue is divided into a plurality of queue areas, and each distributor can correspond to the distributor from the network card receiving queue.
  • the message identifier is obtained in the queue area, that is, the network card receiving queue has multiple information reading ports, which enables K distributors to read the message identifiers in parallel from the corresponding queue area of the network card receiving queue, K
  • the distributor can also determine the corresponding flow queue identifier based on the obtained packet identifier in parallel.
  • the related operations of the K distributors before distributing the message description information to the flow queue can be understood as parallel execution, and parallel execution makes the correlation
  • the processing time of the operation may be partially or completely overlapped, and the time and processing complexity required for the K distributors to distribute the message description information to the flow queue, usually greater than K distributors distributing the message description to the flow queue
  • the time and processing complexity of the information is advantageous for improving the packet distribution processing capability of the network device by introducing a distributor of the multiple software instances, thereby facilitating the network device to support a larger bandwidth scenario.
  • the distributor X distributes the packet description information corresponding to the P packets to the flow queue corresponding to the flow queue identifier corresponding to the P packets
  • the distributor y proceeds to the determined location.
  • the flow queue corresponding to the flow queue identifier corresponding to the Q packets distributes the packet description information corresponding to the Q packets, and the timing control is used to satisfy the order of the message distribution to a certain extent.
  • FIG. 1 is a schematic flowchart of a method for processing a message applied to a network device according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a configuration table of mapping relationship between a queue area edge and a distributor number according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a network card queue dividing queue area according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of another network card queue dividing queue area according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of a network architecture according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of another method for processing a message applied to a network device according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of an internal architecture of a service gateway according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a method for implementing the method shown in FIG. 3-b under the internal architecture of a service gateway according to an embodiment of the present invention
  • Data flow diagram ;
  • FIG. 4 is a schematic flowchart of another method for processing a message applied to a network device according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an apparatus for processing a message applied to a network device according to an embodiment of the present disclosure
  • 6-a is a schematic diagram of a network device according to an embodiment of the present invention.
  • FIG. 6-b is a schematic diagram of an element stored in a memory of a network device according to an embodiment of the present invention.
  • K distributors and S network service processing units are loaded into a memory of the network device, wherein the K distributors include The sender x and the distributor y, the K and the S being an integer greater than one.
  • the method for the network device to process the message may include: the distributor X acquiring P message identifiers from the queue area a corresponding to the distributor X in the network card receiving queue; the distributor X is based on the The P packets identify the P packets corresponding to the P packets, and the distributor X determines the flow queue identifiers corresponding to the P packets based on the P packets; the distributor X Distributing, to the flow queue corresponding to the flow queue identifier corresponding to the P packets, the packet description information corresponding to the P packets, where the packet corresponding to the packet i in the P packets The description information is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the message i, and the message i is any one of the P packets, and the report corresponding to the message i
  • the text description information includes the packet identifier of the packet i; the Si network service processing units in the S network service processing units are based on the packet description information corresponding to the P packets distributed to
  • the sender y obtains Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue; the distributor y acquires the Q messages based on the Q message identifiers Identifying the corresponding Q packets, the distributor X determines, according to the Q packets, a flow queue identifier corresponding to the Q packets; and the distributor X corresponds to the determined P packets. After the flow queue identifies the corresponding flow queue to distribute the packet description information corresponding to the P packets, the distributor y sends the flow queue distribution corresponding to the determined flow queue identifier corresponding to the Q packets.
  • the packet description information corresponding to the Q packets where the packet description information corresponding to the packet m in the Q packet identifiers is distributed to the determined flow queue identifier corresponding to the packet m
  • the message m is any one of the Q messages, wherein the message description information corresponding to the message m includes the message identifier of the message m
  • the P is a positive integer, where the Q packets are queued to the queue in the network card receiving queue.
  • the time of the area b is later than the time when the P packets are enqueued to the queue area a in the network card receiving queue; the Sj network service processing units in the S network service processing units are based on being distributed to the flow queue.
  • the intersection of the message network service processing unit corresponding to the Q messages and the Sj network service processing units is an empty set or a non-empty set.
  • FIG. 1 is a schematic flowchart diagram of a method for processing a packet by a network device according to an embodiment of the present invention.
  • K distributors and S network service processing units are loaded into a memory of the network device, the K distributors including a distributor X and a distributor y, wherein the K and the S are large An integer of 1, wherein a method for processing a message by a network device according to an embodiment of the present invention may include:
  • the distributor X obtains P message identifiers from the queue area a corresponding to the distributor X in the network card receiving queue.
  • the packet identifier may be a packet address or other packet identifier that can identify the packet.
  • the P message identifiers may be the packet address or the packet number of the P packets or other text identifiers that can identify the P packets.
  • the distributor X acquires P packets corresponding to the P packet identifiers by using the P packet identifiers.
  • the distributor X determines, according to the P packets, a flow queue identifier corresponding to the P packets.
  • the distributor X distributes the packet description information corresponding to the P packets to the flow queue corresponding to the flow queue identifier corresponding to the P packets.
  • the packet description information corresponding to the packet i in the P packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet i.
  • the packet i is any one of the P packets.
  • the packet description information corresponding to the packet i includes the packet identifier of the packet i.
  • the Si network service processing units in the S network service processing units process the P packets according to the packet description information corresponding to the P packets that are distributed to the flow queue, and send the processed packets.
  • the P messages The Si network service processing units in the S network service processing units process the P packets according to the packet description information corresponding to the P packets that are distributed to the flow queue, and send the processed packets.
  • the P messages The Si network service processing units in the S network service processing units.
  • the Si network service processing units in the S network service processing units process the P packets and send the processed packets based on the packet description information corresponding to the P packets distributed in the flow queue.
  • the P packets may include: the Si network service processing units are based on the packets of the P packets included in the packet description information corresponding to the P packets that are distributed to the flow queue. Identifying the P packets by the identifiers; the Si network service processing units process the acquired P packets and send the processed P packets.
  • the network service processing unit of the network service processing unit may obtain the packet identifier of the packet i included in the packet description information corresponding to the packet i in the flow queue. The message i; processing the obtained message i and transmitting the processed message i.
  • the processing of the packet i by the network service processing unit may specifically be the content of the encrypted/decoded message i, the header of the modified message i, and the like.
  • the distributor y obtains Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue.
  • the above-mentioned Q message identifiers may be the packet address or the packet number of the Q packets or other packet identifiers that can identify the Q packets.
  • the distributor y obtains the Q messages corresponding to the Q message identifiers based on the Q message identifiers.
  • the distributor y determines, according to the Q messages, a flow queue identifier corresponding to the Q packets.
  • the distributor y determines The flow queue corresponding to the flow queue identifier corresponding to the Q packets distributes the packet description information corresponding to the Q packets.
  • the packet description information corresponding to the message m in the Q message identifiers is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the message m.
  • the ⁇ ⁇ m is any one of the Q ⁇ ⁇ ⁇ .
  • the packet description information corresponding to the packet m includes the packet identifier of the packet m.
  • the Q and the P are positive integers, wherein the Q packets are enqueued to the time when the network card receives the column area a.
  • the time when the Q packets are queued to the queue area b in the network card receiving queue may be specifically that the Q packets are written to the queue area b in the network card receiving queue.
  • the time when the P packets are queued to the queue area a in the network card receiving queue refers to the memory recorded by the P packets in the queue area a in the network card receiving queue. The time in the memory space pointed to by the address.
  • the Sj network service processing units in the S network service processing units process the Q messages according to the message description information corresponding to the Q packets that are distributed to the flow queue, and send the processed device. Describe Q messages.
  • the Sj network service processing units in the S network service processing units process the Q messages based on the message description information corresponding to the Q messages distributed in the flow queue, and send the processed devices.
  • the Q messages may include: the Sj network service processing units are based on being distributed to the flow team.
  • the message identifiers of the Q packets included in the packet description information corresponding to the Q packets in the column obtain the Q packets; the Sj network service processing units process the acquired Q packets are sent and the processed Q messages are sent.
  • the network service processing unit of the Sj network service processing unit may obtain the packet identifier of the packet m included in the packet description information corresponding to the packet m that is distributed to the flow queue.
  • the message m processes the obtained message m and sends the message m after the processing.
  • the processing of the packet m by the network service processing unit may be the content of the encrypted/decoded message m, and the header of the message m is modified.
  • the intersection of the Si network service processing unit and the Sj network service processing unit is an empty set or a non-empty set, that is, the network service processing unit included in the Si network service processing units and the
  • the network service processing units included in the Sj network service processing units may be partially identical, all the same, or completely different.
  • the Si network service processing units include a network service processing unit C1, a network service processing unit C2, and a network service processing unit C3, and the Sj network service processing units may include a network service processing unit C1 and a network service processing unit C2.
  • the network service processing unit C3, that is, the network service processing unit included in the Si network service processing units and the network service processing unit included in the Sj network service processing units are all the same.
  • the Si network service processing units include a network service processing unit C1, a network service processing unit C2, and a network service processing unit C3, where the Sj network service processing units may include a network service processing unit C2 and a network service processing unit.
  • the C3 and the network service processing unit C4, that is, the network service processing unit included in the Si network service processing units and the network service processing unit included in the Sj network service processing units are the same.
  • the Si network service processing units include a network service processing unit C1, a network service processing unit C2, and a network service processing unit C3, and the Sj network service processing units may include a network service processing unit C5 and a network service processing unit C6.
  • the network service processing unit C4, that is, the network service processing unit included in the Si network service processing units and the network service processing unit included in the Sj network service processing units are completely different.
  • the network device in the embodiment of the present invention may be a serving gateway (English: Serving Gateway) or a packet data network gateway (English: Packet Data Network Gateway, abbreviation: PGW) or other types of gateways or other types in a communication network.
  • Data plane aggregation node When the network device is a data plane aggregation node, the network device may receive a large number of packets. In this scenario, a network is required. Network devices have strong packet distribution capabilities to meet high performance requirements.
  • the K distributors loaded into the memory of the network device are distributors of K software instances
  • the S network service processing units loaded into the memory of the network device are network service processing units of S software instances.
  • the distributor X acquires P message identifiers from the queue area a corresponding to the distributor X in the network card receiving queue, and the distributor y receives the context in the queue from the network card.
  • the step of acquiring Q message identifiers in the queue area b corresponding to the distributor y can be performed in parallel.
  • the step of identifying the corresponding Q messages can be performed in parallel.
  • Determining, by the distributor X, the flow queue identifier corresponding to the P packets based on the P packets, and determining, by the distributor X, the flow corresponding to the Q packets based on the Q packets The steps of the queue identification can be performed in parallel.
  • each distributor can obtain a message identifier from a queue area corresponding to the distributor in the network card receiving queue, that is, the network card receiving queue has multiple information reading ports, which makes K
  • the distributor can read the message identifier from the corresponding queue area of the network card receiving queue in parallel, and the K distributors can also determine the corresponding stream queue identifier based on the obtained packet identifier in parallel, and the K distributors are in the flow queue.
  • the related operations before the message description information is distributed may be performed in parallel, and the parallel execution may make the processing time of the related operations partially or completely overlap, and the related operations of the K distributors before distributing the message description information to the flow queue Time required and processing complexity, usually greater than the time required by K distributors to distribute message descriptions to the flow queue And handle the complexity. Therefore, the foregoing solution of the present embodiment is advantageous for improving the packet distribution processing capability of the network device by introducing a distributor of the multiple software instances, thereby facilitating the network device to support a larger bandwidth scenario.
  • the flow queue corresponding to the flow queue identifier corresponding to the P packets received by the distributor X is later than the time when the P packets are queued to the queue area a in the network card receiving queue.
  • the distributor y further distributes the Q packets corresponding to the flow queues corresponding to the determined flow queue identifiers of the Q packets.
  • the message description information through the above-mentioned timing control, is beneficial to satisfy the order-preserving requirements of message distribution to a certain extent.
  • the distributor X obtains P message identifiers from the queue area a corresponding to the distributor X in the network card receiving queue, where: the distributor X After the queue area corresponding to the distributor X in the network card receiving queue is found as the queue area a in the configuration table based on the number of the distributor X, the distributor X is from the corresponding to the distributor X. P message identifiers are obtained in the queue area a.
  • the configuration table can record the mapping relationship between the queue area and the distributor. It can be understood that the network card receiving queue can include K queue areas, K queue areas, and K queue areas - corresponding. A possible configuration table can be shown in Figure 2-a.
  • the mapping between the queue area and the distributor is recorded by recording the mapping relationship between the queue area number and the distributor number. relationship.
  • the distributor X can find a queue area (here, the queue area a) corresponding to the distributor X in the network card receiving queue in the configuration table based on the number of the distributor X.
  • the distributor X may also perform a setting function operation based on the number of the distributor X as a variable to derive a queue area number of a queue area corresponding to the distributor X in the network card receiving queue.
  • the distributor X may also determine a queue area corresponding to the distributor X in the network card receiving queue based on other manners.
  • the obtaining, by the distributor y, the Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue may include: The distributor y, after finding the queue area corresponding to the distributor y in the network card receiving queue as the queue area b in the configuration table based on the number of the distributor y, the distributor y from the The Q message identifiers are obtained in the queue area b corresponding to the distributor y.
  • the distributor y may also perform a setting function operation based on the number of the distributor y as a variable to derive a queue area number of a queue area corresponding to the distributor y in the network card receiving queue.
  • the distributor y may also determine a queue area corresponding to the distributor y in the network card receiving queue based on other means.
  • the member number of the queue member in the queue area corresponding to a distributor can be It is adjacent.
  • the queue area corresponding to a distributor may also include multiple queue sub-areas, and the member numbers of the queue members in the multi-queue sub-area are adjacent.
  • FIG. 2-b exemplifies that the member numbers of the queue members in the queue area corresponding to the distributor X are adjacent, and so on.
  • FIG. 2-c exemplifies that the queue area corresponding to the distributor X may include a plurality of queue sub-areas, and the member numbers of the queue members in the multi-queue sub-area are adjacent.
  • the queue area a corresponding to the distributor X includes the queue area a and the queue area a2
  • the queue area b corresponding to the distributor y includes the queue area bl and the queue area b2
  • the queue area c includes the queue area cl And queue area c2, and so on.
  • the P messages further include a message j
  • the message description information corresponding to the message j is distributed to the determined flow corresponding to the message j
  • the queue ID corresponds to the flow queue.
  • the message description information corresponding to the message j may include the message identifier of the message j, and the message description information corresponding to the message j may further include the length information of the message j.
  • the time that the message j is queued to the queue area a in the network card receiving queue is later than the time when the message i is enqueued to the queue area a in the network card receiving queue, and the message j corresponds to
  • the message description information is distributed to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message j, and the message description information corresponding to the message i is distributed to the determined report.
  • the flow queue corresponding to the text j identifies the time in the corresponding flow queue. That is, the earlier the packet is queued to the packet in the queue area a in the NIC receiving queue, the distributor X will first distribute its corresponding packet description information to the determined corresponding packet.
  • the distributor X will later distribute its corresponding message description information to the determined message.
  • the flow queue corresponding to the packet identifies the corresponding flow queue.
  • the Si network service processing unit processes the time of the message j based on the message description information corresponding to the message j distributed in the flow queue, and is later distributed based on the Si network service processing unit.
  • the packet description information corresponding to the packet i in the flow queue processes the time of the packet i.
  • the service processing unit processes the time of the message j based on the message description information corresponding to the message j distributed in the flow queue, which is later than the message distributed by the Si network service processing unit based on the flow queue
  • the message description information corresponding to the text i processes the time of the message i.
  • the above-mentioned timing control is beneficial to further satisfy the order-preserving requirements of message distribution.
  • the Q messages further include a packet n, and the packet description information corresponding to the packet n is distributed to the determined flow corresponding to the packet n
  • the queue ID corresponds to the flow queue.
  • the packet description information corresponding to the packet n includes the packet identifier of the packet n, and the packet description information corresponding to the packet j may further include the length information of the packet j.
  • the packet description information corresponding to the packet n is distributed to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the packet n, and the packet description information corresponding to the packet m is distributed.
  • the time in the flow queue corresponding to the flow queue identifier corresponding to the determined message m That is, the earlier the packet is queued to the packet in the queue area b in the NIC receiving queue, the distributor y will first distribute its corresponding message description information to the determined corresponding message.
  • the distributor y In the flow queue corresponding to the flow queue identifier, the later the packet is queued to the queue area b in the network card receiving queue, the distributor y will later distribute its corresponding message description information to the determined message.
  • the flow queue corresponding to the packet identifies the corresponding flow queue.
  • the Sj network service processing unit processes the time of the message n based on the message description information corresponding to the packet n distributed in the flow queue, and is later than the Sj network service processing unit based on the distribution to the flow queue.
  • the message description information corresponding to the message m in the process of processing the message m. For example, if the message i and the message j belong to the same service flow (when the message m and the message n belong to the same service flow, the message description information and the corresponding information in the message n The message description information corresponding to the message m will be distributed to the same flow queue by the distributor y, and the Sj network service processing units are based on the message description corresponding to the message n distributed to the flow queue.
  • the time for processing the message n is later than the time when the Sj network service processing unit processes the message m based on the message description information corresponding to the message m distributed to the flow queue.
  • the above-mentioned timing control is beneficial to further satisfy the order-preserving requirements of message distribution.
  • the determining, by the distributor X, the flow queue identifier corresponding to the P packets based on the P packets may include: P And the packet X is configured to obtain the packet matching information included in the P packets, and the distributor X performs a table lookup operation based on the packet feature information included in the P packets to obtain a matching table of the P packets.
  • the P-type packet corresponds to the flow queue identifier corresponding to the P packets in the matching entry.
  • the packet feature information included in the packet i of the obtained P packets may be, for example, the value of one or more fields in the packet header of the packet i.
  • the packet feature information included in the message j of the obtained P packets may be, for example, one or more of the packet headers of the message j.
  • the matching entries of the P packets may further include a flow identifier of the service flow to which the P packets belong.
  • the packet i corresponding to the matching entry may include the flow queue identifier corresponding to the packet i.
  • the matching entry of the packet i may further include the flow identifier of the service flow to which the packet i belongs.
  • the message j corresponding to the matching entry may include the flow queue identifier corresponding to the message j.
  • the matching entry of the message j may further include the flow identifier of the service flow to which the message j belongs.
  • other information can also be included.
  • the fact that the distributor X performs a table lookup operation based on the packet feature information included in the P packets to obtain the matching entries of the P packets may include: the distributor X uses the P devices The packet characteristic information included in the packet is used as a table lookup key value to perform a table lookup operation to obtain the matching entry of the P packets; or the distributor X may be based on the packet characteristics included in the P packets. The information is obtained by using the table lookup key value corresponding to the P packets, and the distributor X performs a table lookup operation based on the table lookup key value corresponding to the P packets to obtain the matching entries of the P packets.
  • the distributor X uses the message feature information included in the message i as a table lookup key value to perform a table lookup operation to obtain the match entry corresponding to the message i; or the distributor X includes the message based on the message i.
  • the message characteristic information is obtained by the table key corresponding to the message i (the table key value corresponding to the message i may be subjected to a certain table lookup operation or a function operation by the message feature information included in the message i And obtaining, by the distributor X, a table lookup operation based on the table lookup key value corresponding to the message i to obtain the matching entry corresponding to the message i.
  • the distributor X uses the message feature information included in the message j as a table lookup key value to perform a table lookup operation to obtain the match entry corresponding to the message j; or the distributor X is based on the message j.
  • the included message feature information obtains a table lookup key value corresponding to the message j (the table key value corresponding to the message j may be subjected to a certain table lookup operation or function by the message feature information included in the message j According to the calculation, the distributor X performs a table lookup operation based on the table lookup key value corresponding to the message j to obtain the match entry corresponding to the message j.
  • the table key value corresponding to the P messages may be obtained by performing a table lookup operation and/or a function operation on the message feature information included in the P messages.
  • the table key value corresponding to the P packets may be a stream identifier of the service flow to which the P packets belong.
  • the table key corresponding to the message i may be obtained by performing a table lookup operation and/or a function operation on the message feature information included in the message i, and further specifically, for example, the table corresponding to the message i
  • the key value may be a flow identifier of the service flow to which the message i belongs according to the table lookup operation of the message characteristic information of the message i.
  • the check key value corresponding to the message j may be obtained by performing a table lookup operation and/or a function operation on the message feature information included in the message j, and further specifically, for example, the check corresponding to the message j
  • the table key value may be a stream identifier of the service flow to which the message j belongs, which is obtained by performing a table lookup operation based on the message feature information of the message j.
  • the determining, by the distributor y, the flow queue identifier corresponding to the Q packets, based on the Q packets may include: the distributor y passes Extracting the packet feature information included in the Q message packets to perform a table lookup operation to obtain the matching entries of the Q packets, where the Q packets corresponding to the matching entries include the The Q packets correspond to the flow queue identifier.
  • the packet feature information included in the packet m of the obtained Q packets for example, may be a value of one or more fields in the packet header of the message m.
  • the obtained packet information included in the packet n of the Q packets may be, for example, one or more of the packet headers of the packet n.
  • the matching entries of the Q packets may further include a flow identifier of the service flow to which the Q packets belong.
  • the packet m corresponding to the matching entry may include the flow queue identifier corresponding to the packet m.
  • the matching entry of the packet m may further include the flow identifier of the service flow to which the packet m belongs.
  • other information can also be included.
  • the packet n corresponding to the matching entry may include a flow queue identifier corresponding to the packet n.
  • the matching entry of the packet n may further include a flow identifier of the service flow to which the packet n belongs.
  • other information can also be included.
  • the distributor X performs a table lookup operation based on the packet feature information included in the Q packets to obtain the matching entries of the Q packets, for example, the distributor X may include the Q devices.
  • the packet feature information included in the message is used as a table lookup key value to perform a table lookup operation to obtain the matching match entry of the Q message; or the distributor X may be based on the message feature included in the Q message.
  • Information gets the Q
  • the server X performs a table lookup operation based on the table lookup key value corresponding to the Q packets to obtain the matching entries of the Q packets.
  • the distributor X uses the message feature information included in the message m as a table lookup key value to perform a table lookup operation to obtain the match entry corresponding to the message m; or the distributor X may be included based on the message m.
  • the message characteristic information is obtained by the table key corresponding to the message m (the table key value corresponding to the message m may be subjected to a certain table lookup operation or a function operation by the message feature information included in the message m And obtaining, by the distributor X, a table lookup operation based on the table lookup key value corresponding to the message m to obtain the matching entry corresponding to the message m.
  • the distributor X uses the message feature information included in the message n as a table lookup key value to perform a table lookup operation to obtain the match entry corresponding to the message n; or the distributor X is based on the message n.
  • the included message feature information is obtained by the table lookup key value corresponding to the message n (the table key value corresponding to the message n may be subjected to a certain table lookup operation or function by the message feature information included in the message n
  • the distributor X performs a table lookup operation based on the table lookup key value corresponding to the message n to obtain the matching entry corresponding to the message n.
  • the table key value corresponding to the Q messages may be obtained by performing a table lookup operation and/or a function operation on the message feature information included in the Q messages.
  • the value of the table lookup key corresponding to the Q packets may be the stream identifier of the service flow to which the Q packets belong.
  • the value of the table key corresponding to the message m may be obtained by performing a table lookup operation and/or a function operation on the message feature information included in the message m, and further specifically, for example, the table lookup corresponding to the message m
  • the key value may be a flow identifier of the service flow to which the message m belongs according to the table lookup operation based on the message feature information of the message m.
  • the check key value corresponding to the message n may be obtained by performing a table lookup operation and/or a function operation on the message feature information included in the message n, and further specifically, for example, the check corresponding to the message n
  • the table key value may be a flow identifier of the service flow to which the message n belongs, which is obtained by performing a table lookup operation based on the message feature information of the message n.
  • the packet description information corresponding to the packet i further includes a flow identifier of the service flow to which the packet i belongs, that is, the P packets correspond to
  • the message description information further includes a flow identifier of the service flow to which the P packets belong.
  • the Sth network service processing unit processes the P packets and sends the processed P packets based on the packet description information corresponding to the P packets that are distributed to the flow queue, which may include
  • the Si network service processing unit acquires the P messages according to the packet identifiers of the P packets included in the packet description information corresponding to the P packets that are distributed to the flow queue; Said Si network service processing units based on distribution to the flow queue The flow identifier of the service flow to which the P packets belong to the packet description information corresponding to the P packets, and the flow context of the service flow to which the P packets belong; the Si network services
  • the processing unit processes the obtained P packets and sends the processed P packets according to the obtained flow context of the service flow to which the P packets belong.
  • the network service processing unit of the network service processing unit may obtain the packet identifier of the packet i included in the packet description information corresponding to the packet i in the flow queue.
  • the packet i; the flow identifier of the service flow to which the packet i belongs according to the packet description information corresponding to the packet i that is distributed to the flow queue, and the flow of the service flow to which the packet i belongs is obtained.
  • the network service processing unit of the network service processing unit may obtain the packet identifier of the packet j included in the packet description information corresponding to the packet j in the flow queue.
  • the message j can be obtained based on the flow identifier of the service flow to which the message j belongs in the message description information corresponding to the message j that is distributed to the flow queue, and obtain the service flow to which the message j belongs.
  • the flow context processing the obtained message j and transmitting the processed message j based on the obtained flow context of the service flow to which the message j belongs.
  • the packet description information corresponding to the packet m further includes a flow identifier of the service flow to which the packet m belongs, that is, the P packets correspond to
  • the message description information further includes a flow identifier of the service flow to which the P packets belong.
  • the Sj network service processing unit processes the Q messages and sends the processed Q messages based on the message description information corresponding to the Q packets that are distributed to the flow queue, and may include: The Sj network service processing unit acquires the Q messages according to the message identifiers of the Q packets included in the packet description information corresponding to the Q packets in the flow queue; The network service processing unit obtains the service flow of the Q packets according to the flow identifier of the service flow to which the Q packets are included in the packet description information corresponding to the Q packets that are distributed to the flow queue. And the Sj network service processing units are configured to process the obtained Q messages and send the processed Q messages according to the obtained flow context of the service flow to which the Q packets belong. .
  • the network service processing unit of the Sj network service processing unit may obtain the packet identifier of the packet m included in the packet description information corresponding to the packet m that is distributed to the flow queue.
  • the message m is obtained based on the flow identifier of the service flow to which the packet m belongs, which is included in the packet description information corresponding to the packet m that is distributed to the flow queue, The flow context of the service flow to which the message m belongs; processing the obtained message m and transmitting the processed message m based on the obtained flow context of the service flow to which the message m belongs.
  • the network service processing unit of the Sj network service processing unit may obtain the packet identifier of the packet n included in the packet description information corresponding to the packet n in the flow queue.
  • the packet n may be based on the flow identifier of the service flow to which the packet n belongs, which is included in the packet description information corresponding to the packet n in the flow queue, and obtain the service flow to which the packet n belongs.
  • the flow context the obtained message n is processed and the processed message n is sent based on the obtained flow context of the service flow to which the message n belongs.
  • the flow context of the service flow may include session state information of the service flow, and may also include information such as the packet statistics of the service flow.
  • the flow context of the service flow to which the message m belongs may include the session state information of the service flow to which the message m belongs, and may further include information such as the number of packets of the service flow to which the message m belongs.
  • the flow context of the service flow to which the message i belongs may include the session state information of the service flow to which the message i belongs, and may further include information such as the number of the message statistics of the service flow to which the message i belongs.
  • a waiting token may be stored in a memory in the network device.
  • the distributing, by the distributor X, the packet description information corresponding to the P packets to the flow queue identified by the flow queue identifier corresponding to the P packets may include: when the distributor X monitors The number to the distributor X matches the current first value of the waiting token (the number of the distributor X matches the current first value of the waiting token, for example, The number of the distributor X is the same as the current first value of the waiting token, or may refer to the difference between the number of the distributor X and the current first value of the waiting token.
  • the distributor X reports the P newspapers to the determined
  • the flow queue identifier corresponding to the flow queue identifier is used to distribute the packet description information corresponding to the P packets, where the method further includes : X
  • the distributor according to a preset policy to the waiting first current token value updated to the second value.
  • the distributor X updates the current first value of the waiting token to the second value according to the preset policy, and the method may include: the distributor X may pass the waiting token The current first value is incremented by one to update the current first value of the waiting token to a second value. If The current waiting value of the waiting token has a maximum value and a minimum value, and the current first value of the waiting token is the maximum value of the waiting token, then the distributor X will use the round The second value of the current first value of the token is updated to a minimum value of the waiting token.
  • the distributor y After the distributor X distributes the packet description information corresponding to the P packets to the flow queue corresponding to the flow queue identifier corresponding to the P packets, the distributor y Determining, by the flow queue corresponding to the flow queue identifier corresponding to the Q packets, the packet description information corresponding to the Q packets, specifically: when the distributor y monitors the number of the distributor y Matching the current second value of the waiting token (wherein the number of the distributor y matches the current second value of the waiting token, for example, the distributor y The number is the same as the current second value of the waiting token, or may be that the difference between the number of the distributor y and the current second value of the waiting token is the first set value.
  • the distributor y distributes the packet description information corresponding to the Q packets to the identified flow queue identifier corresponding to the Q packets corresponding to the Q packets;
  • the method further includes: the distributor y updating the current second value of the waiting token according to the preset policy; wherein, the second value is greater than the first value, or The second value 'J is the first value.
  • FIG. 3-a is a schematic diagram of a network architecture according to an embodiment of the present invention.
  • the method for processing the packet by the network device shown in Figure 3-b can be implemented on the service gateway in the network architecture shown in Figure 3-a.
  • the service gateway loads the K distributors and the S network service processing units into the memory of the service gateway.
  • the service gateway may include a multi-core processor, a memory (the memory includes a memory), a network card, and the like.
  • FIG. 3-c is a schematic diagram of an internal architecture of a service gateway 300 according to an embodiment of the present invention.
  • the K distributor includes the distributor Classifier-0, the distributor The distributor classifier-1 and the distributor classifier-2 are taken as an example, and the S network service processing units include the network service processing unit NT-0 and the network service processing unit NT-1 as an example.
  • a waiting token is stored in the memory of the service gateway.
  • the possible number of the waiting tokens is K.
  • the waiting tokens may have values of 0 and 1.
  • the initial value of the waiting token can be 0.
  • FIG. 3 is a schematic diagram of data flow conversion performed by the method shown in FIG. 3-b under the internal architecture of the service gateway 300 according to an embodiment of the present invention.
  • the distributor Classifier-0 obtains P message identifiers from the queue area a corresponding to the distributor Classifier-0 in the network card receiving queue of the serving gateway.
  • the distributor classifier-0 obtains P messages corresponding to the P message identifiers by using the P message identifiers.
  • the classifier-0 parses the P messages to obtain message feature information included in the P messages.
  • the distributor classifier-0 performs a table lookup operation by using the packet feature information included in the P packets as a table lookup key value, to obtain a matching entry corresponding to the P packets, where the P The matching entry corresponding to the packet includes the flow queue identifier corresponding to the P texts and the flow identifier of the service flow to which the P packets belong.
  • the distributor Classifier-0 detects that the current value of the waiting token is equal to the number of the distributor Classifier-0 (the current value of the waiting token is equal to the initial value 0 of the waiting token, and then equals the distribution.
  • the distributor classifier-0 distributes the packet description information corresponding to the P packets to the flow queue corresponding to the flow queue identifier corresponding to the P packets.
  • the packet description information corresponding to the packet i in the P packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the email i.
  • the message description information corresponding to the text j in the P packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the message j.
  • the packet i and the message j are any two of the P packets.
  • the packet description information corresponding to the packet i is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet i, before the time
  • the message description information corresponding to the message j is distributed to the determined time of the flow queue corresponding to the flow queue identifier corresponding to the message i.
  • the dispatcher Classifier-0 updates the current value of the waiting token to 1.
  • the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the packets of the P packets included in the packet description information corresponding to the P packets that are distributed to the flow queue. Identifying the P packets; the network service processing unit NT-0 and/or the network service processing unit NT-1 are based on the message description information corresponding to the P packets corresponding to the P packets distributed in the flow queue. The flow identifier of the service flow to which the P packets belong, and obtain the flow context of the service flow to which the P packets belong; the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the acquired P The P context of the service flow to which the packet belongs, the P packets received, and the processed P packets are sent.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the packet identifier of the packet i included in the packet description information corresponding to the packet i corresponding to the packet in the flow queue.
  • the message i; the flow identifier of the service flow to which the message i belongs according to the message description information corresponding to the message i corresponding to the message i, and the flow context of the service flow to which the message i belongs And processing the obtained message i and transmitting the processed message i based on the obtained flow context of the service flow to which the message i belongs.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the message j included in the message description information corresponding to the message j that is distributed to the flow queue.
  • the message j; the flow of the service flow to which the message j belongs may be obtained based on the flow identifier of the service flow to which the message j belongs in the message description information corresponding to the message j that is distributed to the flow queue Context; processing the obtained message j and transmitting the processed message j based on the obtained flow context of the service flow to which the message j belongs.
  • the distributor classifier-1 obtains Q message identifiers from the queue area b corresponding to the distributor Classifier-1 in the network card receiving queue of the serving gateway.
  • the distributor classifier-1 obtains the Q messages corresponding to the Q message identifiers based on the Q message identifiers. Feature information.
  • the distributor classifier-1 performs a table lookup operation by using the packet feature information included in the Q packets as a table lookup key value to obtain a matching entry corresponding to the Q packets, where the Q
  • the matching entry corresponding to the packet includes the flow queue identifier corresponding to the Q packets and the flow identifier of the service flow to which the Q packets belong.
  • the distributor Classifier-1 detects that the current value of the waiting token is equal to the number of the distributor Classifier-1 (the current value of the waiting token is updated to 1, in step 307, and thus equal to the distribution.
  • the identifier of the classifier-1 is 1), and the distributor classifier-1 distributes the packet description information corresponding to the Q packets to the corresponding flow queue of the flow queue identifier corresponding to the Q packets.
  • the packet description information corresponding to the packet m of the Q packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet m.
  • the packet description information corresponding to the packet n in the Q packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet n.
  • the message m and the message n may be any two of the Q messages.
  • the message corresponding to the message m is described before the packet n is queued to the queue area a in the NIC receiving queue.
  • the information is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet m, and the packet description information corresponding to the packet n is distributed to the determined flow queue corresponding to the packet m. Identifies the time of the corresponding stream queue.
  • the dispatcher Classifier-1 updates the current value of the waiting token to 2.
  • the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the packets of the Q packets included in the packet description information corresponding to the Q packets that are distributed to the flow queue. Identifying the Q messages; the network service processing unit NT-0 and/or the network service processing unit NT-1 are based on the message description information corresponding to the Q messages corresponding to the Q messages distributed in the flow queue.
  • the flow identifier of the service flow to which the Q packets belong, and obtain the flow context of the service flow to which the Q packets belong; the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the obtained Q And processing the obtained Q packets and sending the processed Q packets according to a flow context of the service flow to which the packet belongs.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may obtain the packet identifier of the packet m included in the packet description information corresponding to the packet m that is distributed to the flow queue.
  • the packet m is obtained based on the flow identifier of the service flow to which the packet m belongs, which is included in the packet description information corresponding to the packet m that is distributed to the flow queue, and obtains the flow of the service flow to which the packet m belongs.
  • Context processing the obtained message m and transmitting the processed message m based on the obtained flow context of the service flow to which the message m belongs.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the packet n included in the packet description information corresponding to the packet n that is distributed to the flow queue.
  • the message n; the flow of the service flow to which the packet n belongs may be obtained based on the flow identifier of the service flow to which the packet n belongs, which is included in the packet description information corresponding to the packet n in the flow queue.
  • Context processing the obtained packet n and transmitting the processed packet n based on the obtained flow context of the service flow to which the packet n belongs.
  • the distributor classifier-2 obtains R message identifiers from the queue area c corresponding to the distributor Classifier-2 in the network card receiving queue of the serving gateway.
  • the classifier-2 obtains R messages corresponding to the R message identifiers by using the R message identifiers.
  • the classifier-2 parses the R messages to obtain message feature information included in the R messages.
  • the distributor classifier-2 performs a table lookup operation by using the packet feature information included in the R packets as a table lookup key value, to obtain a matching entry corresponding to the R packets, where the R The matching entry corresponding to the packet includes the flow queue identifier corresponding to the R packets and the flow identifier of the service flow to which the R packets belong.
  • the classifier-2 distributes the packet description information corresponding to the R messages to the flow queue corresponding to the flow queue identifier corresponding to the R packets.
  • the packet description information corresponding to the packet e in the R packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet e.
  • the packet description information corresponding to the packet f in the R packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet f.
  • the packet e and the packet are any two of the R packets.
  • the packet is sent before the packet
  • the packet description information corresponding to the packet e is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet e, before the time
  • the packet description information corresponding to the packet f is distributed to the determined time of the flow queue corresponding to the flow queue identifier corresponding to the packet f.
  • the dispatcher Classifier-2 updates the current value of the waiting token to 0.
  • the Q, the P, and the R are positive integers, wherein the Q packets are enqueued to the time when the network card is connected to the queue area a.
  • the time when the R packets are queued to the queue area c in the network card receiving queue is later than the time when the Q packets are queued to the queue area b in the network card receiving queue.
  • the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the packets of the R packets included in the packet description information corresponding to the R packets that are distributed to the flow queue. Identifying the R messages; the network service processing unit NT-0 and/or the network service processing unit NT-1 are based on the information included in the message description information corresponding to the R messages distributed to the flow queue. And the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the obtained R pieces.
  • the R context of the service flow to which the packet belongs, the R packets received, and the processed R packets are sent.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the packet e included in the packet description information corresponding to the packet e corresponding to the packet in the flow queue.
  • the packet e is obtained, based on the flow identifier of the service flow to which the packet e belongs, which is included in the packet description information corresponding to the packet e that is distributed to the flow queue, and obtains the flow context of the service flow to which the packet e belongs. And processing the obtained packet e and transmitting the processed packet e according to the obtained flow context of the service flow to which the packet e belongs.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the packet f included in the packet description information corresponding to the packet f that is distributed to the flow queue.
  • the message f; the flow of the service flow to which the packet f belongs may be obtained based on the flow identifier of the service flow to which the packet f belongs, which is included in the packet description information corresponding to the packet f, which is distributed to the flow queue
  • Context processing the obtained packet f and transmitting the processed packet based on the obtained flow context of the service flow to which the packet f belongs.
  • steps 302-305 and steps 309-312 can be executed in parallel
  • steps 309-312 and Steps 316 ⁇ 319 can be executed in parallel.
  • the classifier-2 of the distributor can update the message address recorded in each area of the network card receiving queue, and the classifier-2 can notify the network card to continue receiving the message, and the network card can enroll the received message into the network card receiving queue, and then Steps 302-322 can be performed cyclically.
  • K distributors and S network service processing units are deployed in the service gateway, and the network card receiving queue is divided into multiple queue areas, and each distributor can receive the queues from the network card.
  • the packet identifier is obtained in the queue area corresponding to the distributor, that is, the network card receiving queue has multiple information reading ports, which enables K distributors to read the message identifiers in parallel from the corresponding queue area of the network card receiving queue.
  • the K distributors can also determine the corresponding flow queue identifiers based on the packet identifiers obtained by the K distributors.
  • the related operations of the K distributors before the message description information is distributed to the flow queues can be performed in parallel, and in parallel.
  • Execution makes the processing time of related operations partially or completely overlapping, and the time and processing complexity of the K distributors before the message description information is distributed to the flow queue is usually greater than K distributors.
  • the flow queue distributes the time and processing complexity of the message description information. Therefore, the foregoing solution of the present embodiment is advantageous for improving the packet distribution processing capability of the serving gateway by introducing a distributor of multiple software instances, thereby facilitating the service gateway to support a larger bandwidth scenario.
  • the distributor X distributes the packet description information corresponding to the P packets to the flow queue corresponding to the flow queue identifier corresponding to the P packets
  • the distributor y proceeds to the determined location.
  • the flow queue corresponding to the flow queue identifier corresponding to the Q packets distributes the packet description information corresponding to the Q packets, and the timing control is used to satisfy the order of the message distribution to a certain extent.
  • the network device may be a service gateway.
  • the network device that implements the method of the embodiment of the present invention may also be a PGW or other type of gateway device or other types of data plane aggregation nodes in the communication network.
  • FIG. 3-a is a schematic diagram of a network architecture according to an embodiment of the present invention.
  • the method for processing the packet by the network device shown in FIG. 4 may be specifically implemented on the service gateway in the network architecture shown in FIG. 3-a. 401.
  • the serving gateway loads the K distributors and the S network service processing units into the memory of the service gateway.
  • the service gateway may include a multi-core processor, a memory (the memory includes a memory), a network card, and the like.
  • the K distributors include a distributor Classifier-0, a distributor dispatcher Classifier-1, and a distributor Classifier-2
  • the S network service processing units include a network service processing unit NT-0 and The network service processing unit NT-1 is taken as an example.
  • a waiting token is stored in the memory of the service gateway.
  • the possible number of the waiting tokens is K.
  • the waiting tokens may have values of 0 and 1.
  • the initial value of the waiting token can be 0.
  • the distributor Classifier-0 obtains P message identifiers from the queue sub-area a in the queue area a corresponding to the distributor Classifier-0 in the network card receiving queue of the serving gateway.
  • the NIC receive queue is divided into three queue areas, namely queue area a, queue area b, and queue area c.
  • the queue area a includes the queue sub-area a and the queue sub-area a2.
  • the member numbers of the queue members in the queue sub-area a are adjacent, and the member numbers of the queue members in the queue sub-area a2 are adjacent.
  • the member numbers of the queue members between the queue sub-area a1 and the queue sub-area a2 are not adjacent.
  • the queue area b includes the queue sub-area bl and the queue sub-area b2.
  • the member numbers of the queue members in the queue sub-area bl are adjacent, and the members of the queue members in the queue sub-area b2 are not adjacent.
  • the queue area c includes a queue sub-area cl and a queue sub-area c2.
  • the member numbers of the queue members in the queue sub-area cl are adjacent.
  • the member numbers of the queue members in the queue sub-area c2 are adjacent, and the queue members between the queue sub-area cl and the queue sub-area c2 are adjacent.
  • the member numbers are not adjacent.
  • the distributor classifier-0 obtains P packets corresponding to the P packet identifiers by using the P packet identifiers. Feature information.
  • the distributor classifier-O the packet feature information included in the P message is a table lookup key for performing a table lookup operation, to obtain a matching entry corresponding to the P packets, where the P packets are
  • the matching entry corresponding to the text includes the flow queue identifier corresponding to the P texts and the flow identifier of the service flow to which the P packets belong.
  • the distributor Classifier-0 detects that the current value of the waiting token is equal to the number of the distributor Classifier-0 (the current value of the waiting token is equal to the initial value of the waiting token 0, and then equal to the distribution.
  • the distributor classifier-0 distributes the packet description information corresponding to the P packets to the flow queue corresponding to the flow queue identifier corresponding to the P packets.
  • the packet description information corresponding to the packet i in the P packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the email i.
  • the message description information corresponding to the text j in the P packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the message j.
  • the packet i and the message j are any two of the P packets.
  • the packet is queued before the packet j to the queue in the queue area a in the network card receiving queue.
  • the time of the area a, the message description information corresponding to the message i is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the message i, and the message description information corresponding to the message j is The time of the flow queue corresponding to the flow queue identifier corresponding to the determined text i.
  • the dispatcher Classifier-0 updates the current value of the waiting token to 1.
  • the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the packets of the P packets included in the packet description information corresponding to the P packets that are distributed to the flow queue. Identifying the P packets; the network service processing unit NT-0 and/or the network service processing unit NT-1 are based on the message description information corresponding to the P packets corresponding to the P packets distributed in the flow queue. The flow identifier of the service flow to which the P packets belong, and obtain the flow context of the service flow to which the P packets belong; the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the acquired P The P context of the service flow to which the packet belongs, the P packets received, and the processed P packets are sent.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the packet i included in the packet description information corresponding to the packet i corresponding to the packet in the flow queue.
  • the message i; the flow identifier of the service flow to which the message i belongs according to the message description information corresponding to the message i corresponding to the message i, and the flow context of the service flow to which the message i belongs And processing the obtained message i and transmitting the processed message i based on the obtained flow context of the service flow to which the message i belongs.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the message j included in the message description information corresponding to the message j that is distributed to the flow queue.
  • the message j; the flow of the service flow to which the message j belongs may be obtained based on the flow identifier of the service flow to which the message j belongs in the message description information corresponding to the message j that is distributed to the flow queue Context; processing the obtained message j and transmitting the processed message j based on the obtained flow context of the service flow to which the message j belongs.
  • the distributor Classifier-1 receives the queue from the service gateway with the network card and the distributor
  • the distributor classifier-1 obtains the Q messages corresponding to the Q message identifiers based on the Q message identifiers.
  • the classifier-1 parses the Q messages to obtain message feature information included in the Q messages.
  • the distributor classifier-1 performs a table lookup operation by using the packet feature information included in the Q packets as a table lookup key value, to obtain a matching entry corresponding to the Q packets, where the Q
  • the matching entry corresponding to the packet includes the flow queue identifier corresponding to the Q packets and the flow identifier of the service flow to which the Q packets belong.
  • the distributor Classifier-1 detects that the current value of the waiting token is equal to the number of the distributor Classifier-1 (the current value of the waiting token is updated to 1, in step 407, and is equal to the distribution.
  • the identifier of the classifier-1 is 1), and the distributor classifier-1 distributes the packet description information corresponding to the Q packets to the corresponding flow queue of the flow queue identifier corresponding to the Q packets.
  • the packet description information corresponding to the packet m of the Q packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet m.
  • the packet description information corresponding to the packet n in the Q packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet n.
  • the message m and the message n may be any two of the Q messages.
  • the message m is queued to the queue sub-area in the queue area a in the network card receiving queue
  • the time of the packet is sent to the determined packet in the queue sub-area in the queue area a in the NIC receiving queue.
  • the time of the flow queue corresponding to the flow queue corresponding to the text m is the time when the packet description information corresponding to the packet n is distributed to the flow queue corresponding to the flow queue identifier corresponding to the text m.
  • the dispatcher Classifier-1 updates the current value of the waiting token to 2.
  • the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the packets of the Q packets included in the packet description information corresponding to the Q packets that are distributed to the flow queue. Identifying the Q messages; the network service processing unit NT-0 and/or the network service processing unit NT-1 are based on the message description information corresponding to the Q messages corresponding to the Q messages distributed in the flow queue.
  • the flow identifier of the service flow to which the Q packets belong, and obtain the flow context of the service flow to which the Q packets belong; the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the obtained Q And processing the obtained Q packets and sending the processed Q packets according to a flow context of the service flow to which the packet belongs.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the packet m included in the packet description information corresponding to the packet m that is distributed to the flow queue.
  • the message m is obtained based on the flow identifier of the service flow to which the message m belongs, and the flow context of the service flow to which the message m belongs is obtained based on the flow identifier of the service flow to which the message m belongs in the message description information corresponding to the message m that is distributed to the flow queue.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the packet n included in the packet description information corresponding to the packet n that is distributed to the flow queue.
  • the message n; the flow of the service flow to which the packet n belongs may be obtained based on the flow identifier of the service flow to which the packet n belongs, which is included in the packet description information corresponding to the packet n in the flow queue.
  • Context processing the obtained packet n and transmitting the processed packet n based on the obtained flow context of the service flow to which the packet n belongs.
  • the distributor classifier-2 obtains R message identifiers from the queue sub-area cl of the queue area c corresponding to the distributor Classifier-2 in the network card receiving queue of the serving gateway.
  • the distributor classifier-2 obtains R messages corresponding to the R message identifiers by using the R message identifiers. Feature information.
  • the distributor classifier-2 performs a table lookup operation by using the packet feature information included in the R packets as a table lookup key value, to obtain a matching entry corresponding to the R packets, where the R The matching entry corresponding to the packet includes the flow queue identifier corresponding to the R packets and the flow identifier of the service flow to which the R packets belong.
  • the distributor Classifier-2 detects that the current value of the waiting token is equal to the number of the distributor Classifier-2 (the current value of the waiting token is updated to 2 in step 414, and is equal to the distribution.
  • the classifier-2 distributes the packet description information corresponding to the R messages to the flow queue corresponding to the flow queue identifier corresponding to the R packets.
  • the packet description information corresponding to the packet e in the R packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet e.
  • the packet description information corresponding to the packet f in the R packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet f.
  • the packet e and the packet are any two of the R packets.
  • the packet corresponding to the packet e is described.
  • the information is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet e, and the packet description information corresponding to the packet f is distributed to the determined flow queue corresponding to the packet f Identifies the time of the corresponding stream queue.
  • the dispatcher Classifier-2 updates the current value of the waiting token to 0.
  • the Q, the P and the R are positive integers, wherein the Q packets are enqueued to the time of the queue sub-area a in the queue area a in the network card receiving queue.
  • the time when the R packets are queued to the queue sub-area cl in the queue area c in the network card receiving queue is later than the Q packets are enqueued into the queue area b in the network card receiving queue.
  • the time of the queue sub-area bl is positive integers, wherein the Q packets are enqueued to the time of the queue sub-area a in the queue area a in the network card receiving queue.
  • the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the packets of the R packets included in the packet description information corresponding to the R packets that are distributed to the flow queue. Identifying the R messages; the network service processing unit NT-0 and/or the network service processing unit NT-1 are based on the information included in the message description information corresponding to the R messages distributed to the flow queue. R messages belong to the industry And the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the obtained service flow of the R messages. The stream context, processing the obtained R messages and transmitting the processed R messages.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the packet e included in the packet description information corresponding to the packet e corresponding to the packet in the flow queue.
  • the packet e is obtained, based on the flow identifier of the service flow to which the packet e belongs, which is included in the packet description information corresponding to the packet e that is distributed to the flow queue, and obtains the flow context of the service flow to which the packet e belongs. And processing the obtained packet e and transmitting the processed packet e according to the obtained flow context of the service flow to which the packet e belongs.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the packet f included in the packet description information corresponding to the packet f that is distributed to the flow queue.
  • the message f; the flow of the service flow to which the packet f belongs may be obtained based on the flow identifier of the service flow to which the packet f belongs, which is included in the packet description information corresponding to the packet f, which is distributed to the flow queue
  • Context processing the obtained packet f and transmitting the processed packet based on the obtained flow context of the service flow to which the packet f belongs.
  • steps 402-405 and steps 409-412 can be executed in parallel, and steps 409-412 and steps 416-419 can be executed in parallel.
  • the distributor classifier-0 obtains P2 packet identifiers from the queue sub-area a2 in the queue area a corresponding to the Classifier-0 in the network card receiving queue of the serving gateway.
  • the distributor classifier-0 obtains the P2 packets corresponding to the P2 message identifiers based on the P2 packet identifiers.
  • the classifier-0 parses the P2 messages to obtain message feature information included in the P2 messages.
  • the distributor classifier-0 performs a table lookup operation by using the packet feature information included in the P2 packets as a table lookup key value, to obtain a matching entry corresponding to the P2 packets, where the P2
  • the matching entry corresponding to the packet includes the flow queue identifier corresponding to the P2 packets and the flow identifier of the service flow to which the P2 packets belong.
  • the distributor Classifier-0 detects that the current value of the waiting token is equal to the number of the distributor Classifier-0 (the current value of the waiting token is updated to 0 in step 421, and so on, etc.
  • the distributor classifier-0 distributes the packet description information corresponding to the P2 packets to the flow queue corresponding to the flow queue identifier corresponding to the P2 packets.
  • the packet description information corresponding to the packet i in the P2 packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet i2.
  • the packet description information corresponding to the packet j2 in the P2 packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet j2.
  • the message i2 and the message j2 are any two of the P2 messages.
  • the queue is forwarded to the queue in the queue area a in the network card receiving queue before the message j2.
  • the time of the area a2 the message description information corresponding to the message i2 is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the message i2, and the message description information corresponding to the message j2 is The time of the flow queue corresponding to the flow queue identifier corresponding to the determined text i2.
  • the dispatcher Classifier-0 updates the current value of the waiting token to 1.
  • the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the P2 packets included in the packet description information corresponding to the P2 packets that are distributed to the flow queue. Determining the P2 messages; the network service processing unit NT-0 and/or the network service processing unit NT-1 are based on the message description information corresponding to the P2 messages that are distributed to the flow queue.
  • the flow identifier of the service flow to which the P2 packets belong, and obtain the flow context of the service flow to which the P2 packets belong; the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the obtained P2
  • the P2 packets of the service flow are processed, and the P2 packets are processed.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the message i2 included in the message description information corresponding to the message i2 that is distributed to the flow queue.
  • the message i2 is obtained, based on the flow identifier of the service flow to which the message i2 belongs, which is included in the message description information corresponding to the message i2, which is distributed to the flow queue, and obtains the flow context of the service flow to which the message i2 belongs. And processing the obtained message i2 and transmitting the processed message i2 based on the obtained flow context of the service flow to which the message i2 belongs.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the message j2 included in the message description information corresponding to the message j2 that is distributed to the flow queue.
  • the message j2 may correspond to the message j2 distributed to the flow queue.
  • the flow identifier of the service flow to which the message j2 belongs is included in the message description information, and obtains the flow context of the service flow to which the message j2 belongs; based on the obtained flow context of the service flow to which the message j2 belongs, Obtaining the message j2 and transmitting the processed message j2.
  • the distributor Classifier-1 receives the queue from the service gateway's network card with the distributor wi ⁇ .
  • the distributor classifier-1 obtains the Q2 packets corresponding to the Q2 message identifiers based on the Q2 message identifiers.
  • the classifier-1 parses the Q2 messages to obtain message feature information included in the Q2 messages.
  • the classifier-1 is configured to perform a table lookup operation by using the packet feature information included in the Q2 packets as a table key to obtain a matching entry corresponding to the Q2 packets, where the Q2
  • the matching entry corresponding to the packet includes the flow queue identifier corresponding to the Q2 packets and the flow identifier of the service flow to which the Q2 packets belong.
  • the distributor Classifier-1 detects that the current value of the waiting token is equal to the number of the distributor Classifier-1 (the current value of the waiting token is updated to 1, in step 428, and is equal to the distribution.
  • the identifier of the classifier-1 is 1), and the distributor classifier-1 distributes the packet description information corresponding to the Q2 packets to the flow queue corresponding to the flow queue identifier corresponding to the Q2 packets.
  • the message description information corresponding to the message m2 in the Q2 packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the m2.
  • the message description information corresponding to the message n2 in the Q2 packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the message n2.
  • the message m2 and the message n2 may be any two of the Q2 messages.
  • the message corresponding to the message m2 is described before the packet n2 is queued to the queue area a2 in the NIC receiving queue.
  • the information is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet m2, and the packet description information corresponding to the packet n2 is distributed to the determined flow queue corresponding to the packet m2. Identifies the time of the corresponding stream queue.
  • the distributor Classifier-1 updates the current value of the waiting token to 2. 436.
  • the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the packets of the Q2 packets included in the packet description information corresponding to the Q2 packets that are distributed to the flow queue. Determining the Q2 messages; the network service processing unit NT-0 and/or the network service processing unit NT-1 are based on the message description information corresponding to the Q2 messages distributed to the flow queue.
  • the flow identifier of the service flow to which the Q2 packets belong, and obtain the flow context of the service flow to which the Q2 messages belong; the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the obtained Q2 And processing the obtained Q2 packets and sending the processed Q2 packets.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may obtain the report based on the message identifier of the message m2 included in the message description information corresponding to the message m2 distributed in the flow queue. And obtaining a flow identifier of the service flow to which the packet m2 belongs, based on the flow identifier of the service flow to which the packet m2 belongs, which is included in the packet description information corresponding to the packet m2 that is distributed to the flow queue; Obtaining the flow context of the service flow to which the message m2 belongs, processing the obtained message m2, and transmitting the processed message m2.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the packet n2 included in the packet description information corresponding to the packet n2 that is distributed to the flow queue.
  • the message n2; the flow of the service flow to which the message n2 belongs may be obtained based on the flow identifier of the service flow to which the message n2 belongs in the message description information corresponding to the message n2 that is distributed to the flow queue Context; processing the obtained message n2 and transmitting the processed message n2 based on the obtained flow context of the service flow to which the message n2 belongs.
  • the distributor classifier-2 obtains R2 message identifiers from the queue sub-area c2 of the queue area c corresponding to the distributor Classifier-2 in the network card receiving queue of the serving gateway.
  • the distributor classifier-2 obtains the R2 packets corresponding to the R2 packet identifiers based on the R2 packet identifiers.
  • the classifier-2 parses the R2 messages to obtain message feature information included in the R2 messages.
  • the distributor classifier-2 performs a table lookup operation by using the packet feature information included in the R2 packets as a table lookup key value, to obtain a matching entry corresponding to the R2 packets, where the R2
  • the matching entry corresponding to the packet includes the flow queue identifier corresponding to the R2 packets and the R2 packets The flow identifier of the business flow.
  • the distributor Classifier-2 detects that the current value of the waiting token is equal to the number of the distributor Classifier-2 (the current value of the waiting token is updated to 2 in step 435, which is equal to the distribution.
  • the classifier-2 distributes the packet description information corresponding to the R2 packets to the corresponding flow queue of the R2 packets corresponding to the R2 packets.
  • the packet description information corresponding to the packet e2 in the R2 packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet e2.
  • the packet description information corresponding to the packet f2 in the R2 packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet f2.
  • the packet e2 and the packet f2 may be any two of the R2 packets.
  • the queue is forwarded to the queue in the queue sub-area c in the network card receiving queue before the message f2.
  • the sub-area c2 time, the packet description information corresponding to the packet e2 is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet e2, and the packet description information corresponding to the packet f2 is The time of the flow queue corresponding to the flow queue identifier corresponding to the determined text f2.
  • the dispatcher Classifier-2 updates the current value of the waiting token to 0.
  • the Q2, the P2, and the R2 are positive integers, wherein the Q2 packets are queued to the queue sub-area a2 in the queue area a in the network card receiving queue of the network.
  • the time when the R2 packets are enqueued to the queue sub-region c2 in the queue area c in the network card receiving queue is later than the Q2 packets enqueued into the queue area b in the network card receiving queue.
  • the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the message of the R2 packets included in the packet description information corresponding to the R2 packets that are distributed to the flow queue. Determining the R2 messages; the network service processing unit NT-0 and/or the network service processing unit NT-1 are based on the message description information corresponding to the R2 messages that are distributed to the flow queue.
  • the flow identifier of the service flow to which the R2 packets belong, and obtain the flow context of the service flow to which the R2 packets belong; the network service processing unit NT-0 and/or the network service processing unit NT-1 is based on the obtained R2
  • the flow context of the service flow to which the message belongs is processed by the obtained R2 messages and the processed R2 messages are sent.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the packet e included in the packet description information corresponding to the packet e2 that is distributed to the flow queue.
  • the message e2 is obtained, based on the flow identifier of the service flow to which the packet e2 belongs, which is included in the packet description information corresponding to the packet e2 that is distributed to the flow queue, and obtains the flow context of the service flow to which the packet e2 belongs. And processing the obtained packet e2 and transmitting the processed packet e2 based on the obtained flow context of the service flow to which the packet e2 belongs.
  • the network service processing unit NT-0 or the network service processing unit NT-1 may acquire the message identifier of the packet f2 included in the packet description information corresponding to the packet f2 that is distributed to the flow queue.
  • the flow of the service flow to which the packet f2 belongs may be obtained based on the flow identifier of the service flow to which the packet f2 belongs, which is included in the packet description information corresponding to the packet f2 in the flow queue. Context; processing the obtained message f2 and transmitting the processed message f2 based on the obtained flow context of the service flow to which the message f2 belongs.
  • steps 423 ⁇ 426 and steps 430 ⁇ 433 can be executed in parallel, and steps 430 ⁇ 433 and steps 437 ⁇ 440 can be executed in parallel.
  • the classifier-2 of the distributor can update the message address recorded in each area of the network card receiving queue, and the classifier-2 can notify the network card to continue receiving the message, and the network card can enroll the received message into the network card receiving queue, and then Steps 402-443 can be executed cyclically.
  • K distributors and S network service processing units are deployed in the service gateway, and the network card receiving queue is divided into multiple queue areas, and each queue area includes multiple queue sub-areas, and each Each batch of distributors can obtain a message identifier from a queue sub-area in the queue area corresponding to the distributor in the network card receiving queue, that is, the network card receiving queue has multiple information reading ports, which
  • the K distributors can read the message identifiers from the corresponding queue area of the network card receiving queue in parallel, and the K distributors can also determine the corresponding stream queue identifiers based on the obtained packet identifiers in parallel, and the K distributors are
  • the related operations before the message description information is distributed to the flow queue may be performed in parallel, and the parallel execution may make the processing time of the related operations partially or completely overlap, before the K distributors distribute the message description information to the flow queue.
  • the foregoing solution of the present embodiment is advantageous for improving the packet distribution processing capability of the serving gateway by introducing a distributor of multiple software instances, thereby facilitating the service gateway to support a larger bandwidth scenario.
  • the distributor X distributes the packet description information corresponding to the P packets to the flow queue corresponding to the flow queue identifier corresponding to the P packets
  • the distributor y proceeds to the determined location.
  • the flow queue corresponding to the flow queue identifier corresponding to the Q packets distributes the packet description information corresponding to the Q packets, and the timing control is used to satisfy the order of the message distribution to a certain extent.
  • the network device may be a service gateway.
  • the network device that implements the method of the embodiment of the present invention may also be a PGW or other type of gateway device or other types of data plane aggregation nodes in the communication network.
  • an apparatus 500 for processing a message applied to a network device according to an embodiment of the present invention may include K distributors 510 and S network service processing units 520, wherein the K distributors include a distributor. X and distributor y, said K and said S being an integer greater than one.
  • the distributor x is configured to obtain P message identifiers from the queue area a corresponding to the distributor X in the network card receiving queue, and obtain the P packets based on the P message identifiers. Identifying the corresponding P packets, determining the flow queue identifier corresponding to the P packets based on the P packets, and distributing the flow queues corresponding to the flow queue identifiers corresponding to the P packets.
  • the packet description information corresponding to the P packets wherein the packet description information corresponding to the packet i in the P packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet i
  • the packet i is any one of the P packets, and the packet description information corresponding to the packet i includes the packet identifier of the packet i.
  • the network service processing units of the S network service processing units are configured to process the P packets and send and process the packets according to the packet description information corresponding to the P packets that are distributed to the flow queue.
  • the P messages are configured to process the P packets and send and process the packets according to the packet description information corresponding to the P packets that are distributed to the flow queue.
  • the distributor y is configured to obtain Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue, and obtain the Q messages based on the Q message identifiers. Identifying the corresponding Q packets, and determining the flow queue identifier corresponding to the Q packets based on the Q packets; and correspondingly corresponding to the flow queue identifiers corresponding to the P packets determined by the distributor X After the flow queues distribute the packet description information corresponding to the P packets, the flow queue identifier corresponding to the determined Q packets is And the message description information corresponding to the message m of the Q message identifiers is distributed to the determined message corresponding to the message m.
  • the packet m is any one of the Q packets, and the packet description information corresponding to the packet m includes the packet of the packet m.
  • the Q and the P are positive integers, wherein the Q packets are queued to the queue area b in the network card receiving queue, and the P packets are enqueued to the network card. The time at which queue area a in the queue is received.
  • the Sj network service processing units in the S network service processing units are configured to process the Q messages according to the message description information corresponding to the Q messages distributed in the flow queue, and send the processed messages.
  • the distributor X may be specifically used to determine, according to the P packets, a flow queue identifier corresponding to the P packets. Performing a table lookup operation by using the parsed message feature information to obtain a matching match entry of the P packets, where the P packets corresponding to the match entry include the flow queue identifier corresponding to the P packets.
  • the distributor y may be specifically used to determine, according to the Q packets, a flow queue identifier corresponding to the Q packets. Pass
  • the packet feature information included in the Q message packets is subjected to a table lookup operation to obtain the matching entries of the Q packets, wherein the Q messages corresponding to the matching entries include the Q reports.
  • the text corresponds to the flow queue identifier.
  • the P packets corresponding to the matching entry further include a flow identifier of the service flow to which the P packets belong; the Q packets corresponding to the matching table
  • the item further includes a flow identifier of the service flow to which the Q packets belong.
  • the packet description information corresponding to the packet i further includes a flow identifier of the service flow to which the packet i belongs; wherein, the Si network service processing units Specifically, the method may be used to obtain the P packets according to the packet identifiers of the P packets included in the packet description information corresponding to the P packets that are distributed to the flow queue; The P in the The flow identifier of the service flow to which the P packets belong to the packet description information corresponding to the packet, the flow context of the service flow to which the P packets belong, and the service to which the P packets belong are obtained. Flowing the context of the flow, processing the obtained P packets, and transmitting the processed P packets.
  • the packet description information corresponding to the packet m further includes a flow identifier of the service flow to which the packet m belongs;
  • the Sj network service processing unit may be specific And acquiring, according to the packet identifier of the Q packets included in the packet description information corresponding to the Q packets that are allocated to the flow queue, acquiring the Q packets; based on being distributed to the flow queue And the flow identifier of the service flow to which the Q packets belong to the message description information corresponding to the Q packets, and the flow context of the service flow to which the Q packets belong; And processing the obtained Q packets and sending the processed Q packets.
  • the packet description corresponding to the P packets is distributed in the flow queue identified by the flow queue identifier corresponding to the determined P packets.
  • the distributor X may be specifically configured to: when it is detected that the number of the distributor X matches the current first value of the waiting token, to the determined P documents.
  • the flow queue identifier identified by the corresponding flow queue identifier distributes the packet description information corresponding to the P packets.
  • the distributor X is further configured to update the current first value of the waiting token to a second value according to a preset policy.
  • the distributor y After the packet description information corresponding to the P packets is distributed to the flow queue corresponding to the flow queue identifier corresponding to the P packets, the distributor y indicates the determined The flow queue corresponding to the flow queue identifier corresponding to the Q packets distributes the packet description information corresponding to the Q packets, and the distributor y is specifically configured to monitor the number and location of the distributor y. When the current second value of the waiting token is matched, the packet description information corresponding to the Q packets is distributed to the identified flow queue identifier corresponding to the Q queues.
  • the distributor y may be further configured to: update the current second value of the waiting token according to the preset policy; where the second value is greater than the first value, Or the second value is smaller than the first value.
  • the P messages further include a message j
  • the message description information corresponding to the message j is distributed by the distributor X to the determined Message j corresponds
  • the message description information corresponding to the message j includes the message identifier of the message j; the message j is queued to the queue area in the network card reception queue. The time is later than the time when the message i is enqueued to the queue area a in the network card receiving queue; the message description information corresponding to the message j is distributed by the distributor X to the determined report.
  • the time in the flow queue corresponding to the flow queue identifier corresponding to the text j, the message description information corresponding to the message i is distributed by the distributor X to the determined flow queue identifier corresponding to the message j a time in the corresponding flow queue; the Si network service processing unit processes the time of the message j based on the message description information corresponding to the message j distributed in the flow queue, later than the Si networks The service processing unit processes the time of the message i based on the message description information corresponding to the message i distributed to the flow queue.
  • the Q messages further include a packet n, where the packet description information corresponding to the packet n is distributed by the distributor y to determine In the flow queue corresponding to the flow queue identifier corresponding to the packet n, the packet description information corresponding to the packet n includes the packet identifier of the packet n; the packet n is enqueued to the The time of the queue area b in the NIC receiving queue is later than the time when the message m is queued to the queue area b in the NIC receiving queue; the message description information corresponding to the message n is used by the distributor y Distributing to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message n, the message description information corresponding to the message m is distributed by the distributor y to the determined report The stream queue corresponding to the text m identifies the time in the corresponding flow queue; wherein the Sj network service processing unit processes the packet n based on the packet description information corresponding
  • the network card receiving queue is divided. For multiple queue areas, each distributor can obtain a message identifier from a queue area corresponding to the distributor in the network card receiving queue, that is, the network card receiving queue has multiple information reading ports, which makes K Distributors can read in parallel from the corresponding queue area of the NIC receive queue The packet identifiers are obtained, and the K distributors can also determine the corresponding stream queue identifiers based on the packet identifiers obtained by the K distributors.
  • the related operations of the K distributors before the message description information is distributed to the flow queues can be performed in parallel. And the parallel execution makes the processing time of the related operations partially or completely overlap, and the time and processing complexity of the K distributors before the message description information is distributed to the flow queue is usually greater than K distributors.
  • the time and processing complexity required to distribute message description information to a flow queue. Therefore, the foregoing solution of the present embodiment is advantageous for improving the packet distribution processing capability of the network device by introducing a distributor of the multiple software instances, thereby facilitating the network device to support a larger bandwidth scenario.
  • the distributor X distributes the packet description information corresponding to the P packets to the flow queue corresponding to the flow queue identifier corresponding to the P packets
  • the distributor y proceeds to the determined location.
  • the flow queue corresponding to the flow queue identifier corresponding to the Q packets distributes the packet description information corresponding to the Q packets, and the timing control is used to satisfy the order of the message distribution to a certain extent.
  • FIG. 6-a is a structural block diagram of a network device 600 according to another embodiment of the present invention.
  • the network device 600 may include: at least one processor 601, a memory 605, and at least one communication bus 602.
  • Communication bus 602 is used to implement connection communication between these components.
  • the network device 600 may further include: at least one network card 604, optionally including a user interface 603, including a display (such as a touch screen, a liquid crystal display, a holographic imaging (English: Holographic) or a projection (English: Projector), etc.) Click on a device (such as a mouse, trackball (touchball) touchpad or touch screen, etc.), camera and/or pickup device, etc.
  • a display such as a touch screen, a liquid crystal display, a holographic imaging (English: Holographic) or a projection (English: Projector), etc.
  • Click on a device such as a mouse, trackball (touchball) touchpad or touch screen, etc.
  • camera and/or pickup device etc.
  • the memory 605 can include read only memory and random access memory, and provides instructions and data to the processor 601. A portion of the memory 605 may also include non-volatile random access memory.
  • memory 605 stores the following elements, executable modules or data structures, or a subset of them, or their extension set:
  • the code or instruction, the K distributors, and the S network service processing units may also include a network card receiving queue and at least one stream queue.
  • the processor 601 is configured to execute code or instructions in the memory 605 to load K distributors and S network service processing units into the memory; wherein the K distributions
  • the device includes a distributor x and a distributor y, and the K and the S are integers greater than one.
  • the processor configured to execute code or instructions in the memory to load K distributors and S network service processing units into the memory; wherein the K distributors include a distributor X and a distributor y, the K and the S being an integer greater than one;
  • the distributor x is configured to obtain P message identifiers from the queue area a corresponding to the distributor X in the network card receiving queue, and obtain the P packets based on the P message identifiers. Identifying the corresponding P packets, determining the flow queue identifier corresponding to the P packets based on the P packets, and distributing the flow queues corresponding to the flow queue identifiers corresponding to the P packets.
  • the packet description information corresponding to the P packets wherein the packet description information corresponding to the packet i in the P packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet i
  • the packet i is any one of the P packets, and the packet description information corresponding to the packet i includes the packet identifier of the packet i;
  • the network service processing units of the S network service processing units are configured to process the P packets and send and process the packets according to the packet description information corresponding to the P packets that are distributed to the flow queue.
  • the P messages are configured to process the P packets and send and process the packets according to the packet description information corresponding to the P packets that are distributed to the flow queue.
  • the distributor y is configured to obtain Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue, and obtain the Q messages based on the Q message identifiers. Identifying the corresponding Q packets, and determining the flow queue identifier corresponding to the Q packets based on the Q packets; and correspondingly corresponding to the flow queue identifiers corresponding to the P packets determined by the distributor X After the flow queues distribute the packet description information corresponding to the P packets, distribute the packet descriptions corresponding to the Q packets to the flow queues corresponding to the determined flow queue identifiers of the Q packets.
  • the message wherein the message description information corresponding to the message m in the Q message identifiers is distributed to the flow queue corresponding to the determined flow queue identifier corresponding to the message m, the message m is a packet of any one of the Q packets, wherein the packet description information corresponding to the packet m includes a packet identifier of the packet m; the Q and the P are positive integers, where Describe the Q packets into the team in the network card receiving queue Region b is later in time than the P packets enqueued in the card receiving area of the queues a time.
  • the Sj network service processing units in the S network service processing units are configured to process the Q messages according to the message description information corresponding to the Q messages distributed in the flow queue, and send the processed messages.
  • the Q packets, wherein the Si network service processing units and the Sj network service processing The intersection of cells is an empty set or a non-empty set.
  • the aspect of acquiring P message identifiers in the queue area a corresponding to the distributor X in the slave network card receiving queue the distributor X Specifically, after the queue area corresponding to the distributor X in the network card receiving queue is found as the queue area a in the configuration table based on the number of the distributor X, the distributor X is from the distribution Obtaining P message identifiers in the queue area a corresponding to the device X;
  • the agent X is specifically used for obtaining the Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue, and the distributor X is specifically configured to be based on the distributor y After the number is found in the configuration table, the queue area corresponding to the distributor y in the network card receiving queue is the queue area b, and the distributor y is from the queue area b corresponding to the distributor y. Get Q message IDs.
  • the P packets correspond to the matching entries, and the P packets corresponding to the matching entries include the flow queue identifiers corresponding to the P packets.
  • the distributor y is specifically configured to: obtain the Q by parsing the Q packets, by using the Q packets to determine a flow queue identifier corresponding to the Q packets.
  • the packet feature information included in the packet is subjected to a table lookup operation based on the obtained packet feature information of the Q message packet to obtain a matching entry of the Q message, where the Q report is The corresponding matching entry includes the corresponding flow queue identifier of the Q packets.
  • the P packets corresponding to the matching entry further include a flow identifier of the service flow to which the P packets belong; the Q packets corresponding to the matching table
  • the item further includes a flow identifier of the service flow to which the Q packets belong.
  • the packet description information corresponding to the packet i further includes a flow identifier of the service flow to which the packet i belongs; wherein, the Si network service processing units Specifically, the method is included in the packet description information corresponding to the P packets that are distributed to the flow queue.
  • the packet identifier of the P packets is obtained by the P packets; the service flows of the P packets that are included in the packet description information corresponding to the P packets that are distributed to the flow queue And the flow identifier is obtained, and the flow context of the service flow to which the P packets belong is obtained; and the obtained P packets are processed and sent after the processing is performed, based on the obtained flow context of the service flow to which the P packets belong.
  • P messages are included in the packet description information corresponding to the P packets that are distributed to the flow queue.
  • the packet description information corresponding to the packet m further includes a flow identifier of the service flow to which the packet m belongs; and the Sj network service processing units are specifically used. And acquiring, according to the packet identifier of the Q packets included in the packet description information corresponding to the Q packets that are distributed to the flow queue, the Q packets are based on being distributed to the flow queue.
  • the flow identifier of the service flow to which the Q packets belong to the message description information corresponding to the Q packets, and the flow context of the service flow to which the Q packets belong; the obtained Q reports are obtained. And processing the obtained Q packets and sending the processed Q packets.
  • the packet description corresponding to the P packets is distributed in the flow queue identified by the flow queue identifier corresponding to the determined P packets.
  • the distributor X is specifically configured to: when it is detected that the number of the distributor X matches the current first value of the waiting token, to the flow corresponding to the determined P texts
  • the flow queue identified by the queue identifier distributes the packet description information corresponding to the P packets;
  • the distributor X is further configured to: update the current first value of the waiting token to a second value according to a preset policy
  • the distributor y After the packet description information corresponding to the P packets is distributed to the flow queue corresponding to the flow queue identifier corresponding to the P packets, the distributor y indicates the determined The flow queue corresponding to the flow queue identifier corresponding to the Q packets distributes the packet description information corresponding to the Q packets, and the distributor y is specifically configured to monitor the number and location of the distributor y. When the current second value of the waiting token is matched, the packet description information corresponding to the Q packets is distributed to the identified flow queue identifier corresponding to the Q queues.
  • the distributor y is further configured to: update the current second value of the waiting token according to the preset policy; where the second value is greater than the first value, Or the second value is smaller than the first value.
  • the P packets further include a message j, and the message description information corresponding to the message j is distributed by the distributor X to the flow queue corresponding to the determined flow queue identifier corresponding to the message j.
  • the message description information corresponding to the message j includes the message identifier of the message j; the message j is queued to the queue area a in the network card receiving queue later than the message i The time when the team reaches the queue area a in the NIC receiving queue; the message description information corresponding to the message j is distributed by the distributor X to the determined flow queue corresponding to the flow queue identifier corresponding to the text j The time in the flow queue corresponding to the flow queue identifier corresponding to the determined message j is distributed by the distributor X to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message j; Transmitting, by the network service processing unit, the time of the message j based on the message description information corresponding to the message j distributed in the flow queue, after the Si network service processing unit is based on the distribution to the flow queue When the message description information corresponding to the message i processes the message i between.
  • the Q packets further include a packet n, and the packet description information corresponding to the packet n is distributed by the distributor y to the flow queue corresponding to the determined flow queue identifier corresponding to the packet n.
  • the message description information corresponding to the packet n includes the packet identifier of the packet n; the time when the packet n is queued to the network card connection area b; the packet description corresponding to the packet n.
  • the information is distributed by the distributor y to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message n, and the message description information corresponding to the message m is used by the distributor The y is distributed to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message m.
  • the Sj network service processing unit is based on the packet corresponding to the packet n distributed to the flow queue.
  • the time at which the description information processes the message n is later than the time when the Sj network service processing unit processes the message m based on the message description information corresponding to the message m distributed to the flow queue.
  • the network device 600 can be a serving gateway or a PGW or other type of gateway or other types of data plane aggregation nodes in the communication network. It can be seen that, in the embodiment of the present invention, since K distributors and S network service processing units are deployed in the network device, that is, a distributor of multiple software instances and S network service processing units are deployed, the network card receiving queue is divided.
  • each distributor can obtain a message identifier from a queue area corresponding to the distributor in the network card receiving queue, that is, the network card receiving queue has multiple information reading ports, which makes K
  • the distributors can read the message identifiers in parallel from the corresponding queue area of the network card receiving queue, and the K distributors can also determine the corresponding stream queue identifiers based on the obtained packet identifiers in parallel, and the K distributors are in the forward stream.
  • the related operations before the queue distribution message description information may be performed in parallel, and the parallel execution makes the processing time of the related operations partially or completely overlap, and the K distributors perform related operations before the message description information is distributed to the flow queue.
  • the required time and processing complexity usually greater than the time and processing complexity of the K distributors to distribute message description information to the flow queue degree. Therefore, the foregoing solution of the present embodiment is advantageous for improving the packet distribution processing capability of the network device by introducing a distributor of the multiple software instances, thereby facilitating the network device to support a larger bandwidth scenario.
  • the distributor X distributes the packet description information corresponding to the P packets to the flow queue corresponding to the flow queue identifier corresponding to the P packets
  • the distributor y proceeds to the determined location.
  • the flow queue corresponding to the flow queue identifier corresponding to the Q packets distributes the packet description information corresponding to the Q packets, and the timing control is used to satisfy the order of the message distribution to a certain extent.
  • an embodiment of the present invention further provides another network device 600, including: a memory 605, and a processor 601 connected to the memory; wherein the memory stores a code or an instruction.
  • K distributors and S network service processing units K distributors and S network service processing units loaded into the memory upon initialization .
  • the processor 601 is configured to execute code or instructions in the memory, and execute K distributors and S network service processing units; the K distributors include a distributor X and a distributor y, the K And said S is an integer greater than one;
  • the distributor x is configured to obtain P message identifiers from the queue area a corresponding to the distributor X in the network card receiving queue, and obtain the P packets based on the P message identifiers.
  • the flow queue identifiers corresponding to the P packets are determined based on the P packets; and the P packets are distributed to the flow queues corresponding to the flow queue identifiers corresponding to the P packets a packet description information corresponding to the text, wherein the packet description information corresponding to the packet i in the P packets is distributed to the determined flow queue corresponding to the flow queue identifier corresponding to the packet i.
  • the message i is any one of the P messages, and the message description information corresponding to the message i includes the message identifier of the message i;
  • the network service processors of the S network service processors are configured to process the P packets and send and process the packets based on the packet description information corresponding to the P packets that are distributed to the flow queue.
  • the P messages are configured to process the P packets and send and process the packets based on the packet description information corresponding to the P packets that are distributed to the flow queue.
  • the distributor y is configured to obtain Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue, and obtain the Q messages based on the Q message identifiers. Identifying the corresponding Q packets, and determining the flow queue identifier corresponding to the Q packets based on the Q packets; and correspondingly corresponding to the flow queue identifiers corresponding to the P packets determined by the distributor X After the flow queues distribute the packet description information corresponding to the P packets, distribute the packet descriptions corresponding to the Q packets to the flow queues corresponding to the determined flow queue identifiers of the Q packets.
  • the message wherein the message description information corresponding to the message m in the Q message identifiers is distributed to the flow queue corresponding to the determined flow queue identifier corresponding to the message m, the message m is a packet of any one of the Q packets, wherein the packet description information corresponding to the packet m includes a packet identifier of the packet m; the Q and the P are positive integers, where Describe the Q packets into the team in the network card receiving queue Region b is later than the P packets enqueued in a queue area of the card receiving time queue;
  • the Sj network service processors in the S network service processors are configured to process the Q messages based on the message description information corresponding to the Q messages distributed to the flow queue, and send the processed messages.
  • the aspect of acquiring P message identifiers in the queue area a corresponding to the distributor X in the slave network card receiving queue, the distributor X Specifically, after the queue area corresponding to the distributor X in the network card receiving queue is found as the queue area a in the configuration table based on the number of the distributor X, the distributor X is from the distribution Obtaining P message identifiers in the queue area a corresponding to the device X;
  • the agent X is specifically used for obtaining the Q message identifiers from the queue area b corresponding to the distributor y in the network card receiving queue, and the distributor X is specifically configured to be based on the distributor y
  • the queue area corresponding to the distributor y in the network card receiving queue is the queue area b
  • the distributor y is from the queue area b corresponding to the distributor y.
  • the P packets correspond to the matching entries, and the P packets corresponding to the matching entries include the flow queue identifiers corresponding to the P packets.
  • the distributor y is specifically configured to: obtain the Q by parsing the Q packets, by using the Q packets to determine a flow queue identifier corresponding to the Q packets.
  • the packet feature information included in the packet is subjected to a table lookup operation based on the obtained packet feature information of the Q message packet to obtain a matching entry of the Q message, where the Q report is The corresponding matching entry includes the corresponding flow queue identifier of the Q packets.
  • the P packets corresponding to the matching entry further include a flow identifier of the service flow to which the P packets belong; the Q packets corresponding to the matching table
  • the item further includes a flow identifier of the service flow to which the Q packets belong.
  • the packet description information corresponding to the packet i further includes a flow identifier of the service flow to which the packet i belongs; wherein, the Si network service processing units Specifically, the method is configured to acquire the P packets according to the packet identifiers of the P packets included in the packet description information corresponding to the P packets that are distributed to the flow queue; The flow identifier of the service flow to which the P packets belong to the packet description information corresponding to the P packets, and obtain the flow context of the service flow to which the P packets belong; The P contexts of the service flows to which the packets belong are processed, and the P packets received are processed and the processed P packets are sent.
  • the packet description information corresponding to the packet m further includes a flow identifier of the service flow to which the packet m belongs;
  • the Sj network service processing units are specifically And acquiring, according to the packet identifier of the Q packets included in the packet description information corresponding to the Q packets that are allocated to the flow queue, acquiring the Q packets; based on being distributed to the flow queue And the flow identifier of the service flow to which the Q packets belong to the message description information corresponding to the Q packets, and the flow context of the service flow to which the Q packets belong; And processing the obtained Q packets and sending the processed Q packets.
  • the packet description corresponding to the P packets is distributed in the flow queue identified by the flow queue identifier corresponding to the determined P packets.
  • the distributor X is specifically configured to: when it is detected that the number of the distributor X matches the current first value of the waiting token, to the flow corresponding to the determined P texts
  • the flow queue identified by the queue identifier distributes the packet description information corresponding to the P packets;
  • the distributor X is further configured to: update the current first value of the waiting token to a second value according to a preset policy
  • the distributor y After the packet description information corresponding to the P packets is distributed to the flow queue corresponding to the flow queue identifier corresponding to the P packets, the distributor y indicates the determined The flow queue corresponding to the flow queue identifier corresponding to the Q packets distributes the packet description information corresponding to the Q packets, and the distributor y is specifically configured to monitor the number and location of the distributor y. When the current second value of the waiting token is matched, the packet description information corresponding to the Q packets is distributed to the identified flow queue identifier corresponding to the Q queues.
  • the distributor y is further configured to: update the current second value of the waiting token according to the preset policy; where the second value is greater than the first value, Or the second value is smaller than the first value.
  • the P packets further include a message j, and the message description information corresponding to the message j is distributed by the distributor X to the flow queue corresponding to the determined flow queue identifier corresponding to the message j.
  • the message description information corresponding to the message j includes the message identifier of the message j; the message j is queued to the queue area a in the network card receiving queue later than the message i The time when the team reaches the queue area a in the NIC receiving queue; the message description information corresponding to the message j is distributed by the distributor X to the determined flow queue corresponding to the flow queue identifier corresponding to the text j Time in the middle, later than the corresponding ⁇ ⁇ i
  • the text description information is distributed by the distributor X to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message j; the Si network service processing units are based on the report distributed in the flow queue
  • the message description information corresponding to the message j processes the message j
  • the Q packets further include a packet n, and the packet description information corresponding to the packet n is distributed by the distributor y to the flow queue corresponding to the determined flow queue identifier corresponding to the packet n.
  • the message description information corresponding to the packet n includes the packet identifier of the packet n; the time when the packet n is queued to the network card connection area b; the packet description corresponding to the packet n.
  • the information is distributed by the distributor y to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message n, and the message description information corresponding to the message m is used by the distributor The y is distributed to the determined time in the flow queue corresponding to the flow queue identifier corresponding to the message m.
  • the Sj network service processing unit is based on the packet corresponding to the packet n distributed to the flow queue.
  • the time at which the description information processes the message n is later than the time when the Sj network service processing unit processes the message m based on the message description information corresponding to the message m distributed to the flow queue.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, where the program includes any part of the message processing method applied to the network device described in the foregoing method embodiment or All steps.
  • the disclosed apparatus may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integration into another system, or some features can be ignored, or not executed.
  • Another point, the mutual coupling or direct connection or communication connection shown or discussed The connection may be an indirect connection or communication connection through some interface, device or unit, and may be in electrical or other form.
  • the components displayed by the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the instructions include a plurality of instructions for causing a computer device (which may be a personal computer, server or network device, etc., and in particular a processor in a computer device) to perform all or part of the steps of the methods of the various embodiments of the present invention.
  • the foregoing storage medium may include: a USB flash drive, a removable hard disk, a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), and the like. The medium of the code.

Abstract

一种应用于网络设备的报文处理方法和相关装置。其中,本发明实施例在网络设备中部署了K个分发器和S个网络业务处理单元,网卡接收队列被划分为了多个队列区域,每个分发器可从网卡接收队列中的与该分发器对应的队列区域中获取报文标识,也就是说,网卡接收队列具有了多个信息读取口,这使得K个分发器可以并行的从网卡接收队列的相应队列区域读取报文标识,K个分发器也可以并行的基于其获取的报文标识来确定对应的流队列标识,K个分发器在向流队列分发报文描述信息之前的相关操作都可以是并行执行,而并行执行使得相关操作的处理时间变得可部分或全部重叠。因此本发明实施例的上述方案有利于提高网络设备的报文分发处理能力。

Description

应用于网络设备的处理报文的方法和相关设备 技术领域
本发明涉及通信技术领域,具体涉及一种应用于网络设备的处理报文的方 法和相关装置。
网络设备(例如网关等)承载了大量端到端的业务流。 其中, 基于业务的 视角, 业务流是连续的比特(英文: bit )序列; 而基于包传输视角, 业务流可 能被封装为报文(例如网际互联协议(英文: internet protocol, 缩写: IP )报 文)序列, 各个报文在网络中独立传输。
其中, 网络设备的数据面在处理这些报文的过程中, 经常需要将这些报文 按照其所属的业务流来分类处理,例如在处理过程中要求同一个业务流的各报 文按序处理。
传统的网络设备中部署单实例的分发器 (英文: Classifier ), 该单实例的 分发器将各报文按照接收顺序分发到多个流队列,各网络业务处理单元以流队 列为单位并行处理报文,同一个流队列中的报文在某网络业务处理单元上串行 按序处理。 然而,传统的网络设备中的单实例的分发器难以实现支持高性能高 速率的报文分发能力。 发明内容
本发明实施例提供一种网络设备处理报文的方法和相关设备,以提高网络 设备的报文分发处理能力。
本发明实施例提供以下技术方案:
第一方面, 一种应用于网络设备的处理报文方法, K个分发器和 S个网络 业务处理单元被加载到所述网络设备的内存之中, 所述 K个分发器包括分发器 X和分发器 y, 所述 K和所述 S为大于 1的整数;
所述方法包括:所述分发器 X从网卡接收队列中的与所述分发器 X对应的队 列区域 a中获取 P个报文标识; 所述分发器 X基于所述 P个报文标识获取所述 P个 报文标识对应的 P个报文, 所述分发器 X基于所述 P个报文确定所述 P个报文对 应的流队列标识;所述分发器 X向确定出的所述 P个报文对应的流队列标识对应 的流队列分发所述 P个报文对应的报文描述信息,其中,所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出的所述报文 i对应的流队列标识对应的 流队列中,所述报文 i为所述 P个报文中任意一个报文,所述报文 i对应的报文描 述信息包含所述报文 i的报文标识; 所述 S个网络业务处理单元中的 Si个网络业 务处理单元基于分发到流队列中的所述 P个报文对应的报文描述信息对处理所 述 P个报文并发送处理后的所述 P个报文;
所述分发器 y从所述网卡接收队列中的与所述分发器 y对应的队列区域 b中 获取 Q个报文标识; 所述分发器 y基于所述 Q个报文标识获取所述 Q个报文标识 对应的 Q个报文, 所述分发器 y基于所述 Q个报文确定所述 Q个报文对应的流队 列标识;在所述分发器 X向确定出的所述 P个报文对应的流队列标识对应的流队 列分发所述 P个报文对应的报文描述信息之后, 所述分发器 y向确定出的所述 Q 个报文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述 信息, 其中, 所述 Q个报文标识中的报文 m对应的报文描述信息被分发到了确 定出的所述报文 m对应的流队列标识对应的流队列中, 所述报文 m为所述 Q个 报文中任意一个报文, 其中, 所述报文 m对应的报文描述信息包含所述报文 m 的报文标识; 所述 Q和所述 P为正整数, 其中, 所述 Q个报文入队到所述网卡接 队列区域 a的时间; 所述 S个网络业务处理单元中的 Sj个网络业务处理单元基于 分发到流队列中的所述 Q个报文对应的报文描述信息处理所述 Q个报文并发送 处理后的所述 Q个报文, 其中, 所述 Si个网络业务处理单元和所述 Sj个网络业 务处理单元的交集为空集或非空集。
结合第一方面, 在第一方面的第一种可能的实施方式中,
所述分发器 X从网卡接收队列中的与所述分发器 X对应的队列区域 a中获取 P个报文标识包括: 所述分发器 X在基于所述分发器 X的编号在配置表中查找到 网卡接收队列中的与所述分发器 X对应的队列区域为队列区域 a之后,所述分发 器 X从与所述分发器 X对应的所述队列区域 a中获取 P个报文标识;
其中,所述分发器 y从所述网卡接收队列中的与所述分发器 y对应的队列区 域 b中获取 Q个报文标识, 包括: 所述分发器 y在基于所述分发器 y的编号在所 述配置表中查找到网卡接收队列中的与所述分发器 y对应的队列区域为队列区 域 b之后, 所述分发器 y从与所述分发器 y对应的所述队列区域 b中获取 Q个报文 标识。
结合第一方面或第一方面的第一种可能的实施方式,在第一方面的第二种 可能的实施方式中, 所述分发器 X基于所述 P个报文确定所述 P个报文对应的流 队列标识包括: 所述分发器 X通过解析所述 P个报文以获取所述 P个报文包含的 报文特征信息,所述分发器 X基于所述 P个报文包含的报文特征信息进行查表操 作以获得所述 P个报文对应匹配表项, 所述 P个报文对应匹配表项中包含所述 P 个才艮文对应的流队列标识;
其中,所述分发器 y基于所述 Q个报文确定所述 Q个报文对应的流队列标识 信息, 所述分发器 y基于获取的所述 Q个报文报文包含的报文特征信息进行查 表操作以获得所述 Q个报文对应匹配表项, 其中, 所述 Q个报文对应匹配表项 中包含所述 Q个报文对应流队列标识。
结合第一方面的第二种可能的实施方式,在第一方面的第三种可能的实施 方式中,
所述 P个报文对应匹配表项中还包含所述 P个报文所属业务流的流标识;所 述 Q个报文对应匹配表项中还包含所述 Q个报文所属业务流的流标识。
结合第一方面的第三种可能的实施方式,在第一方面的第四种可能的实施 方式中,所述报文 i对应的报文描述信息还包括所述报文 i所属业务流的流标识; 其中, 所述 Si个网络业务处理单元基于分发到流队列中的所述 P个报文对应的 个网络业务处理单元基于分发到流队列中的所述 P个报文对应的报文描述信息 中包含的所述 P个报文的报文标识获取所述 P个报文; 所述 Si个网络业务处理单 元基于分发到流队列中的所述 P个报文对应的报文描述信息中包含的所述 P个 报文所属业务流的流标识, 获取所述 P个报文所属业务流的流上下文; 所述 Si 个网络业务处理单元基于获取到的所述 P个报文所属业务流的流上下文, 处理 获取到的所述 P个报文并发送所述处理后的 P个报文;
其中, 所述报文 m对应的报文描述信息还包括所述报文 m所属业务流的流 标识; 所述 Sj个网络业务处理单元基于分发到流队列中的所述 Q个报文对应的 个网络业务处理单元基于分发到流队列中的所述 Q个报文对应的报文描述信 息中包含的所述 Q个报文的报文标识获取所述 Q个报文; 所述 Sj个网络业务处 理单元基于分发到流队列中的所述 Q个报文对应的报文描述信息中包含的所 述 Q个报文所属业务流的流标识, 获取所述 Q个报文所属业务流的流上下文; 所述 Sj个网络业务处理单元基于获取到的所述 Q个报文所属业务流的流上下 文, 处理获取到的所述 Q个报文并发送处理后的所述 Q个报文。
结合第一方面或第一方面的第一种可能的实施方式或第一方面的第二种 可能的实施方式或第一方面的第三种可能的实施方式或第一方面的第四种可 能的实施方式,在第一方面的第五种可能的实施方式中, 所述网络设备中的内 存中存储有轮候令牌;
所述分发器 X向确定出的所述 P个报文对应的流队列标识所标识的流队列 分发所述 P个报文对应的报文描述信息, 包括: 当所述分发器 X监测到所述分发 器 X的编号与所述轮候令牌的当前的第一取值匹配时,所述分发器 X向确定出的 所述 P个报文对应的流队列标识所标识的流队列分发所述 P个报文对应的报文 描述信息; 其中, 所述方法还包括: 所述分发器 X按照预设策略将所述轮候令 牌的当前的第一取值更新为第二取值;
其中,所述在所述分发器 X向确定出的所述 P个报文对应的流队列标识对应 的流队列分发所述 P个报文对应的报文描述信息之后,所述分发器 y向确定出的 所述 Q个报文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文 描述信息, 包括: 当所述分发器 y监测所述分发器 y的编号与所述轮候令牌的当 前的第二取值匹配时, 所述分发器 y向确定出的所述 Q个报文对应的流队列标 识所标识的流队列分发所述 Q个报文对应的报文描述信息; 其中, 所述方法还 包括: 所述分发器 y按照所述预设策略对所述轮候令牌的当前的第二取值进行 更新; 其中, 所述第二取值大于所述第一取值, 或者所述第二取值小于所述第 —取值。
结合第一方面或第一方面的第一种可能的实施方式或第一方面的第二种 可能的实施方式或第一方面的第三种可能的实施方式或第一方面的第四种可 能的实施方式或第一方面的第五种可能的实施方式,在第一方面的第六种可能 的实施方式中,
所述 P个报文还包括报文 j,所述报文 j对应的报文描述信息被分发到了确定 出的所述报文 j对应的流队列标识对应的流队列中, 所述报文 j对应的报文描述 信息包含所述报文 j的报文标识; 所述报文 j入队到所述网卡接收队列中的队列 区域 a的时间晚于所述报文 i入队到所述网卡接收队列中的队列区域 a的时间; 所述报文 j对应的报文描述信息被分发到确定出的所述报文 j对应的流队列标识 对应的流队列中的时间, 晚于所述报文 i对应的报文描述信息被分发到确定出 的所述 ^艮文 j对应的流队列标识对应的流队列中的时间;所述 Si个网络业务处理 单元基于分发到流队列中的所述报文 j对应的报文描述信息处理所述报文 j的时 间,晚于所述 Si个网络业务处理单元基于分发到流队列中的所述报文 i对应的报 文描述信息处理所述 文 i的时间。
所述 Q个报文还包括报文 n, 所述报文 n对应的报文描述信息被分发到了确 定出的所述报文 n对应的流队列标识对应的流队列中,所述报文 n对应的报文描 述信息包含所述报文 n的报文标识;所述报文 n入队到所述网卡接收队列中的队 列区域 b的时间晚于所述报文 m入队到所述网卡接收队列中的队列区域 b的时 间;所述报文 n对应的报文描述信息被分发到确定出的所述报文 n对应的流队列 标识对应的流队列中的时间, 晚于所述报文 m对应的报文描述信息被分发到确 定出的所述 ^艮文 m对应的流队列标识对应的流队列中的时间; 其中, 所述 Sj个 网络业务处理单元基于分发到流队列中的所述报文 n对应的报文描述信息处理 所述报文 n的时间, 晚于所述 Sj个网络业务处理单元基于分发到流队列中的所 述报文 m对应的报文描述信息处理所述报文 m的时间。
第二方面, 一种应用于网络设备的处理报文的装置,
所述装置包括 K个分发器和 S个网络业务处理单元,所述 K个分发器包括分 发器 X和分发器 y, 所述 K和所述 S为大于 1的整数; 其中, 所述分发器 X, 用于从网卡接收队列中的与所述分发器 X对应的队列 区域 a中获取 P个报文标识;基于所述 P个报文标识获取所述 P个报文标识对应的 P个报文, 基于所述 P个报文确定所述 P个报文对应的流队列标识; 向确定出的 所述 P个报文对应的流队列标识对应的流队列分发所述 P个报文对应的报文描 述信息, 其中, 所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出 的所述报文 i对应的流队列标识对应的流队列中,所述报文 i为所述 P个报文中任 意一个报文, 所述报文 i对应的报文描述信息包含所述报文 i的报文标识;
所述 S个网络业务处理单元中的 Si个网络业务处理单元, 用于基于分发到 流队列中的所述 P个报文对应的报文描述信息对处理所述 P个报文并发送处理 后的所述 P个报文;
所述分发器 y,用于从所述网卡接收队列中的与所述分发器 y对应的队列区 域 b中获取 Q个报文标识; 基于所述 Q个报文标识获取所述 Q个报文标识对应的 Q个报文, 基于所述 Q个报文确定所述 Q个报文对应的流队列标识; 在所述分 发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个报 文对应的报文描述信息之后, 向确定出的所述 Q个报文对应的流队列标识所对 应的流队列分发所述 Q个报文对应的报文描述信息, 其中, 所述 Q个报文标识 中的报文 m对应的报文描述信息被分发到了确定出的所述报文 m对应的流队列 标识对应的流队列中, 所述报文 m为所述 Q个报文中任意一个报文, 其中, 所 述报文 m对应的报文描述信息包含所述报文 m的报文标识; 所述 Q和所述 P为正 整数, 其中, 所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间晚 于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间;
所述 S个网络业务处理单元中的 Sj个网络业务处理单元, 用于基于分发到 流队列中的所述 Q个报文对应的报文描述信息处理所述 Q个报文并发送处理后 的所述 Q个报文, 其中, 所述 Si个网络业务处理单元和所述 Sj个网络业务处理 单元的交集为空集或非空集。
结合第二方面, 在第二方面的第一种可能的实施方式中,
在从网卡接收队列中的与所述分发器 X对应的队列区域 a中获取 P个报文标 识的方面, 所述分发器 X具体用于,在基于所述分发器 X的编号在配置表中查找 到网卡接收队列中的与所述分发器 X对应的队列区域为队列区域 a之后,所述分 发器 X从与所述分发器 X对应的所述队列区域 a中获取 P个报文标识;
其中, 在所述从所述网卡接收队列中的与所述分发器 y对应的队列区域 b 中获取 Q个报文标识的方面, 所述分发器 y具体用于, 在基于所述分发器 y的编 号在所述配置表中查找到网卡接收队列中的与所述分发器 y对应的队列区域为 队列区域 b之后, 所述分发器 y从与所述分发器 y对应的所述队列区域 b中获取 Q 个才艮文标识。
结合第二方面或第二方面的第一种可能的实施方式,在第二方面的第二种 可能的实施方式中,在所述基于所述 P个报文确定所述 P个报文对应的流队列标 识的方面, 所述分发器 X具体用于, 通过解析所述 P个报文以获取所述 P个报文 包含的报文特征信息, 基于所述 P个报文包含的报文特征信息进行查表操作以 获得所述 P个报文对应匹配表项, 所述 P个报文对应匹配表项中包含所述 P个报 文对应的流队列标识;
其中, 在所述基于所述 Q个报文确定所述 Q个报文对应的流队列标识的方 面, 所述分发器 y具体用于, 通过解析所述 Q个报文以获取所述 Q个报文包含的 报文特征信息, 基于获取的所述 Q个报文报文包含的报文特征信息进行查表操 作以获得所述 Q个报文对应匹配表项, 其中, 所述 Q个报文对应匹配表项中包 含所述 Q个报文对应流队列标识。
结合第二方面的第二种可能的实施方式,在第二方面的第三种可能的实施 方式中,
所述 P个报文对应匹配表项中还包含所述 P个报文所属业务流的流标识;所 述 Q个报文对应匹配表项中还包含所述 Q个报文所属业务流的流标识。
结合第二方面的第三种可能的实施方式,在第二方面的第四种可能的实施 方式中,所述报文 i对应的报文描述信息还包括所述报文 i所属业务流的流标识; 其中, 所述 Si个网络业务处理单元具体用于, 基于分发到流队列中的所述 P个 报文对应的报文描述信息中包含的所述 P个报文的报文标识获取所述 P个报文; 基于分发到流队列中的所述 P个报文对应的报文描述信息中包含的所述 P个报 文所属业务流的流标识, 获取所述 P个报文所属业务流的流上下文; 基于获取 到的所述 P个报文所属业务流的流上下文,处理获取到的所述 P个报文并发送所 述处理后的 P个报文;
其中, 所述报文 m对应的报文描述信息还包括所述报文 m所属业务流的流 标识; 所述 Sj个网络业务处理单元具体用于, 基于分发到流队列中的所述 Q个 报文对应的报文描述信息中包含的所述 Q个报文的报文标识获取所述 Q个报 文; 基于分发到流队列中的所述 Q个报文对应的报文描述信息中包含的所述 Q 个报文所属业务流的流标识, 获取所述 Q个报文所属业务流的流上下文; 基于 获取到的所述 Q个报文所属业务流的流上下文, 处理获取到的所述 Q个报文并 发送处理后的所述 Q个报文。
结合第二方面或第二方面的第一种可能的实施方式或第二方面的第二种 可能的实施方式或第二方面的第三种可能的实施方式或第二方面的第四种可 能的实施方式, 在第二方面的第五种可能的实施方式中,
在所述向确定出的所述 P个报文对应的流队列标识所标识的流队列分发所 述 P个报文对应的报文描述信息的方面,所述分发器 X具体用于, 当监测到所述 分发器 X的编号与轮候令牌的当前的第一取值匹配时,向确定出的所述 P个报文 对应的流队列标识所标识的流队列分发所述 P个报文对应的报文描述信息; 所述分发器 X还用于, 按照预设策略将所述轮候令牌的当前的第一取值更 新为第二取值;
其中, 在所述向确定出的所述 P个报文对应的流队列标识对应的流队列分 发所述 P个报文对应的报文描述信息之后, 所述分发器 y向确定出的所述 Q个报 文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息 的方面, 所述分发器 y具体用于,在监测所述分发器 y的编号与所述轮候令牌的 当前的第二取值匹配时, 向确定出的所述 Q个才艮文对应的流队列标识所标识的 流队列分发所述 Q个报文对应的报文描述信息;
其中, 所述分发器 y还用于, 按照所述预设策略对所述轮候令牌的当前的 第二取值进行更新; 其中, 所述第二取值大于所述第一取值, 或者所述第二取 值小于所述第一取值。
结合第二方面或第二方面的第一种可能的实施方式或第二方面的第二种 可能的实施方式或第二方面的第三种可能的实施方式或第二方面的第四种可 能的实施方式或第二方面的第五种可能的实施方式,在第二方面的第六种可能 的实施方式中,
所述 P个报文还包括报文 j, 所述报文 j对应的报文描述信息被所述分发器 X 分发到了确定出的所述报文 j对应的流队列标识对应的流队列中, 所述报文 j对 应的报文描述信息包含所述报文 j的报文标识; 所述报文 j入队到所述网卡接收 队列中的队列区域 a的时间晚于所述报文 i入队到所述网卡接收队列中的队列 区域 a的时间; 所述报文 j对应的报文描述信息被所述分发器 X分发到确定出的 所述 文 j对应的流队列标识对应的流队列中的时间, 晚于所述 ^艮文 i对应的才艮 文描述信息被所述分发器 X分发到确定出的所述报文 j对应的流队列标识对应 的流队列中的时间; 所述 Si个网络业务处理单元基于分发到流队列中的所述报 文 j对应的报文描述信息处理所述报文 j的时间, 晚于所述 Si个网络业务处理单 元基于分发到流队列中的所述报文 i对应的报文描述信息处理所述报文 i的时 间。
所述 Q个报文还包括报文 n, 所述报文 n对应的报文描述信息被所述分发器 y分发到了确定出的所述报文 n对应的流队列标识对应的流队列中, 所述报文 n 对应的报文描述信息包含所述报文 n的报文标识;所述报文 n入队到所述网卡接 列区域 b的时间; 所述报文 n对应的报文描述信息被所述分发器 y分发到确定出 的所述 ^艮文 n对应的流队列标识对应的流队列中的时间, 晚于所述 ^艮文 m对应 的报文描述信息被所述分发器 y分发到确定出的所述报文 m对应的流队列标识 对应的流队列中的时间; 其中, 所述 Sj个网络业务处理单元基于分发到流队列 中的所述报文 n对应的报文描述信息处理所述报文 n的时间, 晚于所述 Sj个网络 业务处理单元基于分发到流队列中的所述报文 m对应的报文描述信息处理所 述报文 m的时间。
第三方面, 一种网络设备, 包括:
内存, 以及与所述内存连接的处理器;
所述处理器, 用于执行所述内存中的代码或指令, 以将 K个分发器和 S个 网络业务处理单元加载到所述内存中; 其中, 所述 K个分发器包括分发器 X和 分发器 y, 所述 K和所述 S为大于 1的整数;
其中, 所述分发器 x, 用于从网卡接收队列中的与所述分发器 X对应的队列 区域 a中获取 P个报文标识;基于所述 P个报文标识获取所述 P个报文标识对应的 P个报文, 基于所述 P个报文确定所述 P个报文对应的流队列标识; 向确定出的 所述 P个报文对应的流队列标识对应的流队列分发所述 P个报文对应的报文描 述信息, 其中, 所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出 的所述报文 i对应的流队列标识对应的流队列中,所述报文 i为所述 P个报文中任 意一个报文, 所述报文 i对应的报文描述信息包含所述报文 i的报文标识;
所述 S个网络业务处理单元中的 Si个网络业务处理单元, 用于基于分发到 流队列中的所述 P个报文对应的报文描述信息对处理所述 P个报文并发送处理 后的所述 P个报文;
所述分发器 y,用于从所述网卡接收队列中的与所述分发器 y对应的队列区 域 b中获取 Q个报文标识; 基于所述 Q个报文标识获取所述 Q个报文标识对应的 Q个报文, 基于所述 Q个报文确定所述 Q个报文对应的流队列标识; 在所述分 发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个报 文对应的报文描述信息之后, 向确定出的所述 Q个报文对应的流队列标识所对 应的流队列分发所述 Q个报文对应的报文描述信息, 其中, 所述 Q个报文标识 中的报文 m对应的报文描述信息被分发到了确定出的所述报文 m对应的流队列 标识对应的流队列中, 所述报文 m为所述 Q个报文中任意一个报文, 其中, 所 述报文 m对应的报文描述信息包含所述报文 m的报文标识; 所述 Q和所述 P为正 整数, 其中, 所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间晚 于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间;
所述 S个网络业务处理单元中的 Sj个网络业务处理单元, 用于基于分发到 流队列中的所述 Q个报文对应的报文描述信息处理所述 Q个报文并发送处理后 的所述 Q个报文, 其中, 所述 Si个网络业务处理单元和所述 Sj个网络业务处理 单元的交集为空集或非空集。
结合第三方面,在第三方面的第一种可能的实施方式中,在所述从网卡接 收队列中的与所述分发器 x对应的队列区域 a中获取 P个报文标识的方面, 所述 分发器 X具体用于,在基于所述分发器 X的编号在配置表中查找到网卡接收队列 中的与所述分发器 X对应的队列区域为队列区域 a之后, 所述分发器 X从与所述 分发器 X对应的所述队列区域 a中获取 P个报文标识;
其中,所述从所述网卡接收队列中的与所述分发器 y对应的队列区域 b中获 取 Q个报文标识的方面, 所述分发器 X具体用于, 在基于所述分发器 y的编号在 所述配置表中查找到网卡接收队列中的与所述分发器 y对应的队列区域为队列 区域 b之后, 所述分发器 y从与所述分发器 y对应的所述队列区域 b中获取 Q个报 文标识。
结合第三方面或第三方面的第一种可能的实施方式,在第三方面的第二种 可能的实施方式中,
在所述基于所述 P个报文确定所述 P个报文对应的流队列标识的方面,所述 信息,基于所述 P个报文包含的报文特征信息进行查表操作以获得所述 P个报文 对应匹配表项,所述 P个报文对应匹配表项中包含所述 P个报文对应的流队列标 识;
其中, 在所述基于所述 Q个报文确定所述 Q个报文对应的流队列标识的方 面, 所述分发器 y具体用于, 通过解析所述 Q个报文以获取所述 Q个报文包含的 报文特征信息, 基于获取的所述 Q个报文报文包含的报文特征信息进行查表操 作以获得所述 Q个报文对应匹配表项, 其中, 所述 Q个报文对应匹配表项中包 含所述 Q个报文对应流队列标识。
结合第三方面的第二种可能的实施方式,在第三方面的第三种可能的实施 方式中, 所述 P个报文对应匹配表项中还包含所述 P个报文所属业务流的流标 识; 所述 Q个报文对应匹配表项中还包含所述 Q个报文所属业务流的流标识。
结合第三方面的第三种可能的实施方式,在第三方面的第四种可能的实施 方式中,所述报文 i对应的报文描述信息还包括所述报文 i所属业务流的流标识; 其中, 所述 Si个网络业务处理单元具体用于, 基于分发到流队列中的所述 P个 报文对应的报文描述信息中包含的所述 P个报文的报文标识获取所述 P个报文; 基于分发到流队列中的所述 P个报文对应的报文描述信息中包含的所述 P个报 文所属业务流的流标识, 获取所述 P个报文所属业务流的流上下文; 基于获取 到的所述 P个报文所属业务流的流上下文,处理获取到的所述 P个报文并发送所 述处理后的 P个报文;
其中, 所述报文 m对应的报文描述信息还包括所述报文 m所属业务流的流 标识; 所述 Sj个网络业务处理单元具体用于, 基于分发到流队列中的所述 Q个 报文对应的报文描述信息中包含的所述 Q个报文的报文标识获取所述 Q个报 文; 基于分发到流队列中的所述 Q个报文对应的报文描述信息中包含的所述 Q 个报文所属业务流的流标识, 获取所述 Q个报文所属业务流的流上下文; 基于 获取到的所述 Q个报文所属业务流的流上下文, 处理获取到的所述 Q个报文并 发送处理后的所述 Q个报文。
结合第三方面或第三方面的第一种可能的实施方式或第三方面的第二种 可能的实施方式或第三方面的第三种可能的实施方式或第三方面的第四种可 能的实施方式, 在第三方面的第五种可能的实施方式中,
在所述向确定出的所述 P个报文对应的流队列标识所标识的流队列分发所 述 P个报文对应的报文描述信息的方面,所述分发器 X具体用于, 当监测到所述 分发器 X的编号与轮候令牌的当前的第一取值匹配时,向确定出的所述 P个报文 对应的流队列标识所标识的流队列分发所述 P个报文对应的报文描述信息; 所述分发器 X还用于, 按照预设策略将所述轮候令牌的当前的第一取值更 新为第二取值;
其中, 在所述向确定出的所述 P个报文对应的流队列标识对应的流队列分 发所述 P个报文对应的报文描述信息之后, 所述分发器 y向确定出的所述 Q个报 文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息 的方面, 所述分发器 y具体用于,在监测所述分发器 y的编号与所述轮候令牌的 当前的第二取值匹配时, 向确定出的所述 Q个才艮文对应的流队列标识所标识的 流队列分发所述 Q个报文对应的报文描述信息;
其中, 所述分发器 y还用于, 按照所述预设策略对所述轮候令牌的当前的 第二取值进行更新; 其中, 所述第二取值大于所述第一取值, 或者所述第二取 值小于所述第一取值。
结合第三方面或第三方面的第一种可能的实施方式或第三方面的第二种 可能的实施方式或第三方面的第三种可能的实施方式或第三方面的第四种可 能的实施方式或第三方面的第五种可能的实施方式,在第三方面的第六种可能 的实施方式中,
所述 P个报文还包括报文 j, 所述报文 j对应的报文描述信息被所述分发器 X 分发到了确定出的所述报文 j对应的流队列标识对应的流队列中, 所述报文 j对 应的报文描述信息包含所述报文 j的报文标识; 所述报文 j入队到所述网卡接收 队列中的队列区域 a的时间晚于所述报文 i入队到所述网卡接收队列中的队列 区域 a的时间; 所述报文 j对应的报文描述信息被所述分发器 X分发到确定出的 所述 文 j对应的流队列标识对应的流队列中的时间, 晚于所述 ^艮文 i对应的才艮 文描述信息被所述分发器 X分发到确定出的所述报文 j对应的流队列标识对应 的流队列中的时间; 所述 Si个网络业务处理单元基于分发到流队列中的所述报 文 j对应的报文描述信息处理所述报文 j的时间, 晚于所述 Si个网络业务处理单 元基于分发到流队列中的所述报文 i对应的报文描述信息处理所述报文 i的时 间。
所述 Q个报文还包括报文 n, 所述报文 n对应的报文描述信息被所述分发器 y分发到了确定出的所述报文 n对应的流队列标识对应的流队列中, 所述报文 n 对应的报文描述信息包含所述报文 n的报文标识;所述报文 n入队到所述网卡接 列区域 b的时间; 所述报文 n对应的报文描述信息被所述分发器 y分发到确定出 的所述 ^艮文 n对应的流队列标识对应的流队列中的时间, 晚于所述 ^艮文 m对应 的报文描述信息被所述分发器 y分发到确定出的所述报文 m对应的流队列标识 对应的流队列中的时间; 其中, 所述 Sj个网络业务处理单元基于分发到流队列 中的所述报文 n对应的报文描述信息处理所述报文 n的时间, 晚于所述 Sj个网络 业务处理单元基于分发到流队列中的所述报文 m对应的报文描述信息处理所 述报文 m的时间。
可以看出, 本发明实施例中, 由于在网络设备中部署了 K个分发器和 S个 网络业务处理单元, 即部署多软件实例的分发器和 S个网络业务处理单元, 单 个的网卡接收队列被划分为了多个队列区域,每个分发器可从网卡接收队列中 的与该分发器对应的队列区域中获取报文标识, 也就是说, 网卡接收队列具有 了多个信息读取口, 这使得 K个分发器可以并行的从网卡接收队列的相应队列 区域读取报文标识, K个分发器也可以并行的基于其获取的报文标识来确定对 应的流队列标识, K个分发器在向流队列分发报文描述信息之前的相关操作都 可以理解是并行执行,而并行执行使得相关操作的处理时间变得可部分或全部 重叠, K个分发器在向流队列分发报文描述信息之前的相关操作所需时间和处 理复杂度, 通常大于 K个分发器向流队列分发报文描述信息所需时间和处理复 杂度。 因此本实施例的上述方案通过引入多软件实例的分发器,有利于提高网 络设备的报文分发处理能力, 进而有利于使得网络设备支持更大的带宽场景。
并且, 由于所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间 晚于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间,因此在所述 分发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个 报文对应的报文描述信息之后, 所述分发器 y再向确定出的所述 Q个报文对应 的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息, 通过上 述的时序控制就有利于在一定程度上满足报文分发的保序要求。 附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述所需要 使用的附图作简单地介绍,显而易见地, 下面描述中的附图仅仅是本发明的一 些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还 可以根据这些附图获得其他的附图。
图 1是本发明实施例提供的一种应用于网络设备的处理报文的方法的流程 示意图;
图 2-a是本发明实施例提供的一种记录队列区域边和分发器编号的映射关 系的配置表的示意图;
图 2-b是本发明实施例提供的一种网卡队列划分队列区域的的示意图; 图 2-c是本发明实施例提供的另一种网卡队列划分队列区域的的示意图; 图 3-a是本发明实施例提供的一种网络架构的示意图;
图 3-b是本发明实施例提供的另一种应用于网络设备的处理报文的方法的 流程示意图;
图 3-c为本发明的实施例提供的一种服务网关的内部架构示意图; 图 3-d为本发明实施例提供的一种服务网关的内部架构下实施图 3-b所示 方法时的数据流转示意图;
图 4是本发明实施例提供的另一种应用于网络设备的处理报文的方法的流 程示意图;
图 5是本发明实施例提供的一种应用于网络设备的处理报文的装置的示意 图;
图 6-a是本发明实施例提供的一种网络设备的示意图;
图 6-b是本发明实施例提供的一种网络设备内存中所存储元素的示意图。 具体实施方式 网络设备的报文分发处理能力。
为使得本发明的发明目的、 特征、 优点能够更加的明显和易懂, 下面将结 合本发明实施例中的附图,对本发明实施例中的技术方案进行描述,显然下面 所描述的实施例仅仅是本发明一部分实施例, 而非全部的实施例。基于本发明 中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有 其它实施例, 都属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语 "第一"、 "第二"、 "第 三"、 "第四" 等是用于区别不同的对象, 而不是用于描述特定顺序。 此外, 术 语 "包括" 和 "具有" 以及它们任何变形, 意图在于覆盖不排他的包含。 例如 包含了一系列步骤或单元的过程、 方法、 系统、 产品或设备没有限定于已列出 的步骤或单元, 而是可选地还包括没有列出的步骤或单元, 或可选地还包括对 于这些过程、 方法、 产品或设备固有的其它步骤或单元。
本发明网络设备处理报文的方法的一个实施例, 其中, K个分发器和 S个 网络业务处理单元被加载到所述网络设备的内存之中, 所述 K个分发器包括分 发器 x和分发器 y, 所述 K和所述 S为大于 1的整数。 其中, 网络设备处理报文的 方法可以包括:所述分发器 X从网卡接收队列中的与所述分发器 X对应的队列区 域 a中获取 P个报文标识; 所述分发器 X基于所述 P个报文标识获取所述 P个报文 标识对应的 P个报文, 所述分发器 X基于所述 P个报文确定所述 P个报文对应的 流队列标识;所述分发器 X向确定出的所述 P个报文对应的流队列标识对应的流 队列分发所述 P个报文对应的报文描述信息, 其中, 所述 P个报文中的报文 i对 应的报文描述信息被分发到了确定出的所述报文 i对应的流队列标识对应的流 队列中,所述报文 i为所述 P个报文中任意一个报文,所述报文 i对应的报文描述 信息包含所述报文 i的报文标识; 所述 S个网络业务处理单元中的 Si个网络业务 处理单元基于分发到流队列中的所述 P个报文对应的报文描述信息对处理所述 P个报文并发送处理后的所述 P个报文; 所述分发器 y从所述网卡接收队列中的 与所述分发器 y对应的队列区域 b中获取 Q个报文标识;所述分发器 y基于所述 Q 个报文标识获取所述 Q个报文标识对应的 Q个报文, 所述分发器 X基于所述 Q个 报文确定所述 Q个报文对应的流队列标识; 在所述分发器 X向确定出的所述 P个 报文对应的流队列标识对应的流队列分发所述 P个报文对应的报文描述信息之 后, 所述分发器 y向确定出的所述 Q个报文对应的流队列标识所对应的流队列 分发所述 Q个报文对应的报文描述信息, 其中, 所述 Q个报文标识中的报文 m 对应的报文描述信息被分发到了确定出的所述报文 m对应的流队列标识对应 的流队列中, 所述报文 m为所述 Q个报文中任意一个报文, 其中, 所述报文 m 对应的报文描述信息包含所述报文 m的报文标识; 所述 Q和所述 P为正整数,其 中, 所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间晚于所述 P个 报文入队到所述网卡接收队列中的队列区域 a的时间;所述 S个网络业务处理单 元中的 Sj个网络业务处理单元基于分发到流队列中的所述 Q个报文对应的报文 络业务处理单元和所述 Sj个网络业务处理单元的交集为空集或非空集。
参见图 1,图 1是本发明的一个实施例提供的一种网络设备处理报文的方法 的流程示意图。 其中, K个分发器和 S个网络业务处理单元被加载到所述网络 设备的内存之中, 所述 K个分发器包括分发器 X和分发器 y, 所述 K和所述 S为大 于 1的整数, 其中, 本发明的一个实施例提供的一种网络设备处理报文的方法 可以包括:
101、 所述分发器 X从网卡接收队列中的与所述分发器 X对应的队列区域 a 中获取 P个报文标识。
其中,报文标识可能为报文地址或能够标识出报文的其他报文标识。例如 上述 P个报文标识可能为 P个报文的报文地址或报文编号或能够标识出 P个报 文的其他 文标识。
102、 所述分发器 X基于所述 P个报文标识获取所述 P个报文标识对应的 P个 报文。
103、 所述分发器 X基于所述 P个报文确定所述 P个报文对应的流队列标识。
104、 所述分发器 X向确定出的所述 P个报文对应的流队列标识对应的流队 列分发所述 P个报文对应的报文描述信息。
其中, 所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出的所 述报文 i对应的流队列标识对应的流队列中。所述报文 i为所述 P个报文中任意一 个报文。 所述报文 i对应的报文描述信息包含所述报文 i的报文标识。
105、 所述 S个网络业务处理单元中的 Si个网络业务处理单元基于分发到流 队列中的所述 P个报文对应的报文描述信息对处理所述 P个报文并发送处理后 的所述 P个报文。
其中, 所述 S个网络业务处理单元中的 Si个网络业务处理单元基于分发到 流队列中的所述 P个报文对应的报文描述信息对处理所述 P个报文并发送处理 后的所述 P个报文, 例如可包括: 所述 Si个网络业务处理单元基于分发到流队 列中的所述 P个报文对应的报文描述信息中包含的所述 P个报文的报文标识获 取所述 P个报文; 所述 Si个网络业务处理单元处理获取到的所述 P个报文并发送 所述处理后的 P个报文。 其中, 所述 Si个网络业务处理单元中的某个网络业务 处理单元可基于分发到流队列中的所述报文 i对应的报文描述信息中包含的所 述报文 i的报文标识获取所述报文 i; 处理获取到的所述报文 i并发送处理后的所 述报文 i。 网络业务处理单元对报文 i的处理具体可能为加密 /解码报文 i的内容, 修改报文 i的报文头等。 106、 所述分发器 y从所述网卡接收队列中的与所述分发器 y对应的队列区 域 b中获取 Q个报文标识。
其中, 上述 Q个报文标识可能为 Q个报文的报文地址或报文编号或能够标 识出 Q个报文的其他报文标识。
107、 所述分发器 y基于所述 Q个报文标识获取所述 Q个报文标识对应的 Q 个报文。
108、所述分发器 y基于所述 Q个报文确定所述 Q个报文对应的流队列标识。
109、 在所述分发器 X向确定出的所述 P个报文对应的流队列标识对应的流 队列分发所述 P个报文对应的报文描述信息之后,所述分发器 y向确定出的所述 Q个报文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述 信息。
其中, 所述 Q个报文标识中的报文 m对应的报文描述信息被分发到了确定 出的所述 ^艮文 m对应的流队列标识对应的流队列中。 所述 ^艮文 m为所述 Q个才艮 文中任意一个报文。 其中, 所述报文 m对应的报文描述信息包含所述报文 m的 报文标识。 所述 Q和所述 P为正整数, 其中, 所述 Q个报文入队到所述网卡接收 列区域 a的时间。
可以理解的是, 所述 Q个报文入队到所述网卡接收队列中的队列区域 b的 时间具体可指, 所述 Q个报文写入到所述网卡接收队列中的队列区域 b所记录 的内存地址所指向的内存空间的时间。 同理, 所述 P个 文入队到所述网卡接 收队列中的队列区域 a的时间具体是指,所述 P个报文写入到所述网卡接收队列 中的队列区域 a所记录的内存地址所指向的内存空间的时间。
110、所述 S个网络业务处理单元中的 Sj个网络业务处理单元基于分发到流 队列中的所述 Q个报文对应的报文描述信息处理所述 Q个报文并发送处理后的 所述 Q个报文。
其中, 所述 S个网络业务处理单元中的 Sj个网络业务处理单元基于分发到 流队列中的所述 Q个报文对应的报文描述信息处理所述 Q个报文并发送处理后 的所述 Q个报文, 例如可以包括: 所述 Sj个网络业务处理单元基于分发到流队 列中的所述 Q个报文对应的报文描述信息中包含的所述 Q个报文的报文标识获 取所述 Q个报文; 所述 Sj个网络业务处理单元处理获取到的所述 Q个报文并发 送所述处理后的 Q个报文。 其中, 所述 Sj个网络业务处理单元中的某个网络业 务处理单元可基于分发到流队列中的所述报文 m对应的报文描述信息中包含 的所述报文 m的报文标识获取所述报文 m, 处理获取到的所述报文 m并发送处 理之后的所述报文 m。 网络业务处理单元对报文 m的处理可能为加密 /解码报文 m的内容, 修改报文 m的报文头等。
其中, 所述 Si个网络业务处理单元和所述 Sj个网络业务处理单元的交集为 空集或非空集, 也就是说, 所述 Si个网络业务处理单元包括的网络业务处理单 元和所述 Sj个网络业务处理单元包括的网络业务处理单元可能部分相同、全部 相同或者完全不同。 例如, 所述 Si个网络业务处理单元包括网络业务处理单元 Cl、 网络业务处理单元 C2和网络业务处理单元 C3, 所述 Sj个网络业务处理单 元可能包括网络业务处理单元 C1、 网络业务处理单元 C2和网络业务处理单元 C3, 即所述 Si个网络业务处理单元包括的网络业务处理单元和所述 Sj个网络业 务处理单元包括的网络业务处理单元全部相同。 又例如, 所述 Si个网络业务处 理单元包括网络业务处理单元 C1、 网络业务处理单元 C2和网络业务处理单元 C3 , 所述 Sj个网络业务处理单元可能包括网络业务处理单元 C2、 网络业务处 理单元 C3和网络业务处理单元 C4, 即所述 Si个网络业务处理单元包括的网络 业务处理单元和所述 Sj个网络业务处理单元包括的网络业务处理单元部分相 同。 又例如所述 Si个网络业务处理单元包括网络业务处理单元 Cl、 网络业务处 理单元 C2和网络业务处理单元 C3, 所述 Sj个网络业务处理单元可能包括网络 业务处理单元 C5、 网络业务处理单元 C6和网络业务处理单元 C4, 即所述 Si个 网络业务处理单元包括的网络业务处理单元和所述 Sj个网络业务处理单元包 括的网络业务处理单元完全不同。
其中,本发明实施例中的网络设备可为服务网关(英文: Serving Gateway ) 或分组数据网络网关 (英文: Packet Data Network Gateway, 缩写: PGW )或 其他类型的网关或通信网络中的其他类型的数据面汇聚节点。其中, 当网络设 备为数据面汇聚节点时, 网络设备可能接收到海量的报文, 这种场景下需要网 络设备具有很强的报文分发能力才能满足高性能的要求。
可以理解的是, 加载到网络设备的内存中的 K个分发器为 K个软件实例的 分发器,加载到网络设备的内存中的 S个网络业务处理单元为 S个软件实例的网 络业务处理单元。 也就是说, 本发明实施例的技术方案中, 网络设备中部署了 多个软件实例的分发器, 多个软件实例的分发器在多数时候可以并行运行, 网 络设备中部署了多个软件实例的网络业务处理单元,多个软件实例的网络业务 处理单元可并行运行。
例如, 所述分发器 X从网卡接收队列中的与所述分发器 X对应的队列区域 a 中获取 P个报文标识的步骤,与所述分发器 y从所述网卡接收队列中的与所述分 发器 y对应的队列区域 b中获取 Q个报文标识的步骤可并行执行。 所述分发器 X 基于所述 P个报文标识获取所述 P个报文标识对应的 P个报文的步骤, 与所述分 发器 y基于所述 Q个报文标识获取所述 Q个报文标识对应的 Q个报文的步骤可 并行执行。 所述分发器 X基于所述 P个报文确定所述 P个报文对应的流队列标识 的步骤,与所述分发器 X基于所述 Q个报文确定所述 Q个报文对应的流队列标识 的步骤可并行执行。
可以看出, 本实施例方案中, 由于在网络设备中部署了 K个分发器和 S个 网络业务处理单元, 即部署多软件实例的分发器和 S个网络业务处理单元, 网 卡接收队列被划分为了多个队列区域,每个分发器可从网卡接收队列中的与该 分发器对应的队列区域中获取报文标识,也就是说网卡接收队列具有了多个信 息读取口, 这使得 K个分发器可以并行的从网卡接收队列的相应队列区域读取 报文标识, K个分发器也可以并行的基于其获取的报文标识来确定对应的流队 列标识, K个分发器在向流队列分发报文描述信息之前的相关操作都可以是并 行执行的, 而并行执行使得相关操作的处理时间变得可部分或全部重叠, K个 分发器在向流队列分发报文描述信息之前的相关操作所需时间和处理复杂度, 通常是大于 K个分发器在向流队列分发报文描述信息所需时间和处理复杂度 的。 因此本实施例的上述方案通过引入多软件实例的分发器,有利于提高网络 设备的报文分发处理能力, 进而有利于使得网络设备支持更大的带宽场景。
并且, 由于所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间 晚于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间,因此在所述 分发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个 报文对应的报文描述信息之后, 所述分发器 y再向确定出的所述 Q个报文对应 的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息, 通过上 述的时序控制就有利于在一定程度上满足报文分发的保序要求。
可选的, 在本发明一些可能的实施方式中, 所述分发器 X从网卡接收队列 中的与所述分发器 X对应的队列区域 a中获取 P个报文标识包括: 所述分发器 X 在基于所述分发器 X的编号在配置表中查找到网卡接收队列中的与所述分发器 X对应的队列区域为队列区域 a之后,所述分发器 X从与所述分发器 X对应的所述 队列区域 a中获取 P个报文标识。其中, 配置表中可记录队列区域和分发器之间 的映射关系, 可以理解, 网卡接收队列可包括 K个队列区域, K个队列区域和 K个队列区域之间——对应。 一种可能的配置表可如图 2-a所示, 图 2-a所示配 置表中通过记录队列区域编号和分发器编号之间的映射关系,来记录队列区域 和分发器之间的映射关系。 因此, 例如所述分发器 X可基于所述分发器 X的编号 在配置表中查找到网卡接收队列中的与所述分发器 X对应的队列区域(此处为 队列区域 a )。 可替换的, 所述分发器 X也可基于以所述分发器 X的编号为变量进 行设定函数运算以得出网卡接收队列中的与所述分发器 X对应的队列区域的队 列区域编号。 又可替换的, 所述分发器 X也可基于其他方式来确定网卡接收队 列中的与所述分发器 X对应的队列区域。
可选的, 在本发明一些可能的实施方式中, 所述分发器 y从所述网卡接收 队列中的与所述分发器 y对应的队列区域 b中获取 Q个报文标识可包括: 所述分 发器 y在基于所述分发器 y的编号在所述配置表中查找到网卡接收队列中的与 所述分发器 y对应的队列区域为队列区域 b之后,所述分发器 y从与所述分发器 y 对应的所述队列区域 b中获取 Q个报文标识。 可替换的, 所述分发器 y也可基于 以所述分发器 y的编号为变量进行设定函数运算以得出网卡接收队列中的与所 述分发器 y对应的队列区域的队列区域编号。 又可替换的, 所述分发器 y也可基 于其他方式来确定网卡接收队列中的与所述分发器 y对应的队列区域。
可以理解的是,某个分发器对应的队列区域中的队列成员的成员编号可以 是相邻的。或者某个分发器对应的队列区域也可能包括多个队列子区域, 该多 队列子区域中的队列成员的成员编号是相邻的。 例如图 2-b和图 2-c所示, 图 2-b 举例示出了分发器 X对应的队列区域中的队列成员的成员编号是相邻的, 以此 类推。 图 2-c举例示出分发器 X对应的队列区域可能包括多个队列子区域, 该多 队列子区域中的队列成员的成员编号是相邻的。 其中, 图 2-c举例示出分发器 X 对应的队列区域 a包括队列区域 al和队列区域 a2, 分发器 y对应的队列区域 b包 括队列区域 bl和队列区域 b2, 队列区域 c包括队列区域 cl和队列区域 c2, 以此 类推。
可选的, 在本发明一些可能实施方式中, 所述 P个报文还包括报文 j, 所述 报文 j对应的报文描述信息被分发到了确定出的所述报文 j对应的流队列标识对 应的流队列中。 其中, 所述报文 j对应的报文描述信息可包含所述报文 j的报文 标识, 所述报文 j对应的报文描述信息还可包含所述报文 j的长度信息。 所述报 文 j入队到所述网卡接收队列中的队列区域 a的时间晚于所述报文 i入队到所述 网卡接收队列中的队列区域 a的时间, 所述报文 j对应的报文描述信息被分发到 确定出的所述报文 j对应的流队列标识对应的流队列中的时间, 晚于所述报文 i 对应的报文描述信息被分发到确定出的所述报文 j对应的流队列标识对应的流 队列中的时间。 也就是说, 越早入队到所述网卡接收队列中的队列区域 a中的 报文, 所述分发器 X将越先将其对应的报文描述信息分发到确定出的该报文对 应的流队列标识对应的流队列中,越晚入队到所述网卡接收队列中的队列区域 a中的报文,所述分发器 X将越后将其对应的报文描述信息分发到确定出的该报 文对应的流队列标识对应的流队列中。 其中, 所述 Si个网络业务处理单元基于 分发到流队列中的所述报文 j对应的报文描述信息处理所述报文 j的时间, 晚于 所述 Si个网络业务处理单元基于分发到流队列中的所述报文 i对应的报文描述 信息处理所述报文 i的时间。例如,若所述报文 i和所述报文 j属于同一业务流(当 所述报文 i和所述报文 j属于同一业务流,则报文 i对应的报文描述信息和所述报 文 j对应的报文描述信息将被所述分发器 X分发到同一流队列中),所述 Si个网络 业务处理单元基于分发到流队列中的所述报文 j对应的报文描述信息处理所述 报文 j的时间,晚于所述 Si个网络业务处理单元基于分发到流队列中的所述报文 i对应的报文描述信息处理所述报文 i的时间。 其中, 通过上述的时序控制就有 利于进一步满足报文分发的保序要求。
可选的, 在本发明一些可能实施方式中, 所述 Q个报文还包括报文 n, 所 述报文 n对应的报文描述信息被分发到了确定出的所述报文 n对应的流队列标 识对应的流队列中。其中, 所述报文 n对应的报文描述信息包含所述报文 n的报 文标识, 所述报文 j对应的报文描述信息还可包含所述报文 j的长度信息。 所述 所述网卡接收队列中的队列区域 b的时间。所述报文 n对应的报文描述信息被分 发到确定出的所述报文 n对应的流队列标识对应的流队列中的时间, 晚于所述 报文 m对应的报文描述信息被分发到确定出的所述报文 m对应的流队列标识对 应的流队列中的时间。也就是说,越早入队到所述网卡接收队列中的队列区域 b中的报文,所述分发器 y将越先将其对应的报文描述信息分发到确定出的该报 文对应的流队列标识对应的流队列中,越晚入队到所述网卡接收队列中的队列 区域 b中的报文,所述分发器 y将越后将其对应的报文描述信息分发到确定出的 该报文对应的流队列标识对应的流队列中。 所述 Sj个网络业务处理单元基于分 发到流队列中的所述报文 n对应的报文描述信息处理所述报文 n的时间,晚于所 述 Sj个网络业务处理单元基于分发到流队列中的所述报文 m对应的报文描述信 息处理所述报文 m的时间。例如,若所述报文 i和所述报文 j属于同一业务流(当 所述报文 m和所述报文 n属于同一业务流, 在所述报文 n对应的报文描述信息和 所述报文 m对应的报文描述信息将被所述分发器 y分发到同一流队列中), 所述 Sj个网络业务处理单元基于分发到流队列中的所述报文 n对应的报文描述信息 处理所述报文 n的时间, 晚于所述 Sj个网络业务处理单元基于分发到流队列中 的所述报文 m对应的报文描述信息处理所述报文 m的时间。 其中, 通过上述的 时序控制就有利于进一步满足报文分发的保序要求。
可选的,在本发明一些可能的实施方式中,所述分发器 X基于所述 P个报文 确定所述 P个报文对应的流队列标识, 可包括: 所述分发器 X通过解析所述 P个 报文以获取所述 P个报文包含的报文特征信息, 所述分发器 X基于所述 P个报文 包含的报文特征信息进行查表操作以获得所述 P个报文对应匹配表项, 所述 P 个报文对应匹配表项中包含所述 P个报文对应的流队列标识。 其中, 获取的 P 个报文中的报文 i包含的报文特征信息, 例如可为报文 i的报文头中的一个或多 个字段的取值。 其中, 若所述 P个报文还包括报文 j, 获取的所述 P个报文中的 报文 j包含的报文特征信息, 例如可为报文 j的报文头中的一个或者多个字段的 取值。进一步的,所述 P个报文对应匹配表项中还可进一步包含所述 P个报文所 属业务流的流标识。 例如, 所述报文 i对应匹配表项中可包含报文 i对应的流队 列标识, 进一步的, 所述报文 i对应匹配表项中还可包含所述报文 i所属业务流 的流标识, 当然也还可包含其他信息。 例如所述报文 j对应匹配表项中可包含 报文 j对应的流队列标识, 进一步的, 所述报文 j对应匹配表项中还可包含所述 报文 j所属业务流的流标识, 当然也还可包含其他信息。
其中,所述分发器 X基于所述 P个报文包含的报文特征信息进行查表操作以 获得所述 P个报文对应匹配表项例如可以包括: 所述分发器 X以所述 P个报文包 含的报文特征信息作为查表键值, 进行查表操作以获得所述 P个报文对应匹配 表项; 或所述分发器 X可基于所述 P个报文包含的报文特征信息得到所述 P个报 文对应的查表键值,所述分发器 X基于所述 P个报文对应的查表键值进行查表操 作以获得所述 P个报文对应匹配表项。 例如, 所述分发器 X以报文 i包含的报文 特征信息作为查表键值, 进行查表操作以获得所述报文 i对应匹配表项; 或者 所述分发器 X基于报文 i包含的报文特征信息得到所述报文 i对应的查表键值(所 述报文 i对应的查表键值可能由所述报文 i包含的报文特征信息经过一定查表操 作或函数运算而得到 ), 所述分发器 X基于所述报文 i对应的查表键值进行查表 操作以获得所述报文 i对应匹配表项。 又例如,所述分发器 X以报文 j包含的报文 特征信息作为查表键值, 进行查表操作以获得所述报文 j对应匹配表项; 或者 所述分发器 X基于报文 j包含的报文特征信息得到所述报文 j对应的查表键值(所 述报文 j对应的查表键值可能由所述报文 j包含的报文特征信息经过一定查表操 作或函数运算而得到 ), 所述分发器 X基于所述报文 j对应的查表键值进行查表 操作以获得所述报文 j对应匹配表项。 其中,所述 P个报文对应的查表键值可能由所述 P个报文包含的报文特征信 息经过查表操作和 /或函数运算而得到。具体例如所述 P个报文对应的查表键值 可为所述 P个报文所属业务流的流标识。 具体例如, 所述报文 i对应的查表键值 可能由报文 i包含的报文特征信息经过查表操作和 /或函数运算而得到, 进一步 具体例如, 所述报文 i对应的查表键值可为基于所述报文 i的报文特征信息进行 查表操作而得到的所述报文 i所属业务流的流标识。 又具体例如, 所述报文 j对 应的查表键值可能由报文 j包含的报文特征信息经过查表操作和 /或函数运算而 得到, 进一步具体例如, 所述报文 j对应的查表键值可为基于所述报文 j的报文 特征信息进行查表操作而得到的所述报文 j所属业务流的流标识等。
可选的, 在本发明一些可能的实施方式中, 其中, 所述分发器 y基于所述 Q个报文确定所述 Q个报文对应的流队列标识, 可以包括: 所述分发器 y通过解 取的所述 Q个报文报文包含的报文特征信息进行查表操作以获得所述 Q个报文 对应匹配表项, 其中, 所述 Q个报文对应匹配表项中包含所述 Q个报文对应流 队列标识。 其中, 获取的所述 Q个报文中的报文 m包含的报文特征信息, 例如 可为报文 m的报文头中的一个或多个字段的取值。 其中, 若所述 Q个报文还包 括报文 n, 获取的所述 Q个报文中的报文 n包含的报文特征信息, 例如可为报文 n的报文头中的一个或者多个字段的取值。 进一步的, 所述 Q个报文对应匹配 表项中还可进一步包含所述 Q个报文所属业务流的流标识。 例如所述报文 m对 应匹配表项中可包含报文 m对应的流队列标识, 进一步的, 所述报文 m对应匹 配表项中还可包含所述报文 m所属业务流的流标识, 当然也还可包含其他信 息。例如所述报文 n对应匹配表项中可包含报文 n对应的流队列标识,进一步的, 所述报文 n对应匹配表项中还可包含所述报文 n所属业务流的流标识,当然也还 可包含其他信息。
其中, 所述分发器 X基于所述 Q个报文包含的报文特征信息进行查表操作 以获得所述 Q个报文对应匹配表项例如可以包括:所述分发器 X以所述 Q个报文 包含的报文特征信息作为查表键值, 进行查表操作以获得所述 Q个报文对应匹 配表项;或所述分发器 X可基于所述 Q个报文包含的报文特征信息得到所述 Q个 报文对应的查表键值, 所述分发器 X基于所述 Q个报文对应的查表键值进行查 表操作以获得所述 Q个报文对应匹配表项。例如所述分发器 X以报文 m包含的报 文特征信息作为查表键值, 进行查表操作以获得所述报文 m对应匹配表项; 或 者所述分发器 X可基于报文 m包含的报文特征信息得到所述报文 m对应的查表 键值 (所述报文 m对应的查表键值可能由所述报文 m包含的报文特征信息经过 一定查表操作或函数运算而得到), 所述分发器 X基于所述报文 m对应的查表键 值进行查表操作以获得所述报文 m对应匹配表项。 又例如, 所述分发器 X以报 文 n包含的报文特征信息作为查表键值,进行查表操作以获得所述报文 n对应匹 配表项; 或者所述分发器 X基于报文 n包含的报文特征信息得到所述报文 n对应 的查表键值(所述报文 n对应的查表键值可能由所述报文 n包含的报文特征信息 经过一定查表操作或函数运算而得到 ), 所述分发器 X基于所述报文 n对应的查 表键值进行查表操作以获得所述报文 n对应匹配表项。
其中, 所述 Q个报文对应的查表键值可能由所述 Q个报文包含的报文特征 信息经过查表操作和 /或函数运算而得到。例如所述 Q个报文对应的查表键值可 为所述 Q个报文所属业务流的流标识。 具体例如, 所述报文 m对应的查表键值 可能由报文 m包含的报文特征信息经过查表操作和 /或函数运算而得到,进一步 具体例如, 所述报文 m对应的查表键值可为基于所述报文 m的报文特征信息进 行查表操作而得到的所述报文 m所属业务流的流标识。 又具体例如, 所述报文 n对应的查表键值可能由报文 n包含的报文特征信息经过查表操作和 /或函数运 算而得到, 进一步具体例如, 所述报文 n对应的查表键值可为基于所述报文 n 的报文特征信息进行查表操作而得到的所述报文 n所属业务流的流标识等。
可选的, 在本发明一些可能的实施方式中, 所述报文 i对应的报文描述信 息还包括所述报文 i所属业务流的流标识, 也就是说, 所述 P个报文对应的报文 描述信息还包括所述 P个报文所属业务流的流标识。 其中, 所述 Si个网络业务 处理单元基于分发到流队列中的所述 P个报文对应的报文描述信息处理所述 P 个报文并发送处理后的所述 P个报文, 可包括: 所述 Si个网络业务处理单元基 于分发到流队列中的所述 P个报文对应的报文描述信息中包含的所述 P个报文 的报文标识获取所述 P个报文; 所述 Si个网络业务处理单元基于分发到流队列 中的所述 P个报文对应的报文描述信息中包含的所述 P个报文所属业务流的流 标识, 获取所述 P个报文所属业务流的流上下文; 所述 Si个网络业务处理单元 基于获取到的所述 P个报文所属业务流的流上下文,处理获取到的所述 P个报文 并发送所述处理后的 P个报文。 其中, 所述 Si个网络业务处理单元中的某个网 络业务处理单元可基于分发到流队列中的所述报文 i对应的报文描述信息中包 含的所述报文 i的报文标识获取所述报文 i; 基于分发到流队列中的所述报文 i 对应的报文描述信息中包含的所述报文 i所属业务流的流标识, 获取所述报文 i 所属业务流的流上下文; 基于获取到的所述报文 i所属业务流的流上下文, 处 理获取到的所述报文 i并发送处理后的所述报文 i。 其中, 所述 Si个网络业务处 理单元中的某个网络业务处理单元可基于分发到流队列中的所述报文 j对应的 报文描述信息中包含的所述报文 j的报文标识获取所述报文 j ; 可基于分发到流 队列中的所述报文 j对应的报文描述信息中包含的所述报文 j所属业务流的流标 识, 获取所述报文 j所属业务流的流上下文; 基于获取到的所述报文 j所属业务 流的流上下文, 处理获取到的所述报文 j并发送处理后的所述报文 j。
可选的, 在本发明一些可能的实施方式中, 所述报文 m对应的报文描述信 息还包括所述报文 m所属业务流的流标识, 也就是说, 所述 P个报文对应的报 文描述信息还包括所述 P个报文所属业务流的流标识。 所述 Sj个网络业务处理 单元基于分发到流队列中的所述 Q个报文对应的报文描述信息处理所述 Q个报 文并发送处理后的所述 Q个报文, 可包括: 所述 Sj个网络业务处理单元基于分 发到流队列中的所述 Q个报文对应的报文描述信息中包含的所述 Q个报文的报 文标识获取所述 Q个报文; 所述 Sj个网络业务处理单元基于分发到流队列中的 所述 Q个报文对应的报文描述信息中包含的所述 Q个报文所属业务流的流标 识, 获取所述 Q个报文所属业务流的流上下文; 所述 Sj个网络业务处理单元基 于获取到的所述 Q个报文所属业务流的流上下文, 处理获取到的所述 Q个报文 并发送处理后的所述 Q个报文。 其中, 所述 Sj个网络业务处理单元中的某个网 络业务处理单元可基于分发到流队列中的所述报文 m对应的报文描述信息中 包含的所述报文 m的报文标识获取所述报文 m; 基于分发到流队列中的所述报 文 m对应的报文描述信息中包含的所述报文 m所属业务流的流标识, 获取所述 报文 m所属业务流的流上下文; 基于获取到的所述报文 m所属业务流的流上下 文, 处理获取到的所述报文 m并发送处理后的所述报文 m。 其中, 所述 Sj个网 络业务处理单元中的某个网络业务处理单元可以基于分发到流队列中的所述 报文 n对应的报文描述信息中包含的所述报文 n的报文标识获取所述报文 n; 可 基于分发到流队列中的所述报文 n对应的报文描述信息中包含的所述报文 n所 属业务流的流标识, 获取所述报文 n所属业务流的流上下文; 可基于获取到的 所述报文 n所属业务流的流上下文,处理获取到的所述报文 n并发送处理后的所 述报文 n。
其中, 业务流的流上下文可包含该业务流的会话状态信息,还可包含该业 务流的报文统计数等信息。 例如, 报文 m所属业务流的流上下文可包含报文 m 所属业务流的会话状态信息, 还可进一步包含报文 m所属业务流的报文统计数 等信息。 又例如, 报文 i所属业务流的流上下文可包含报文 i所属业务流的会话 状态信息, 还可进一步包含报文 i所属业务流的报文统计数等信息。
可选的,在本发明一些可能的实施方式中, 所述网络设备中的内存中可存 储有轮候令牌。其中, 所述分发器 X向确定出的所述 P个报文对应的流队列标识 所标识的流队列分发所述 P个报文对应的报文描述信息可包括:当所述分发器 X 监测到所述分发器 X的编号与所述轮候令牌的当前的第一取值匹配(所述分发 器 X的编号与所述轮候令牌的当前的第一取值匹配,例如可指所述分发器 X的编 号与所述轮候令牌的当前的第一取值相同, 或者可指所述分发器 X的编号与所 述轮候令牌的当前的第一取值的差值为第一设定值,或者可指所述轮候令牌的 当前的第一取值除以所述 K得到的余数, 等于所述分发器 X的编号, 或者可指 所述轮候令牌的当前的第一取值除以所述 K得到的余数, 与所述分发器 X的编 号的差值为第二设定值)时, 所述分发器 X向确定出的所述 P个报文对应的流队 列标识所标识的流队列分发所述 P个报文对应的报文描述信息; 其中, 所述方 法还包括: 所述分发器 X按照预设策略将所述轮候令牌的当前的第一取值更新 为第二取值。 其中, 所述分发器 X按照预设策略将所述轮候令牌的当前的第一 取值更新为第二取值, 可包括: 所述分发器 X可通过将所述轮候令牌的当前的 第一取值自加 1, 以将所述轮候令牌的当前的第一取值更新为第二取值。 若所 述轮候令牌存在最大取值和最小取值,且所述轮候令牌的当前的第一取值为所 述轮候令牌的最大取值, 则所述分发器 X将所述轮候令牌的当前的第一取值更 新为的第二取值为轮候令牌的最小取值。
其中,所述在所述分发器 X向确定出的所述 P个报文对应的流队列标识对应 的流队列分发所述 P个报文对应的报文描述信息之后,所述分发器 y向确定出的 所述 Q个报文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文 描述信息, 具体包括: 当所述分发器 y监测所述分发器 y的编号与所述轮候令牌 的当前的第二取值匹配(其中, 所述分发器 y的编号与所述轮候令牌的当前的 第二取值匹配, 例如可指所述分发器 y的编号与所述轮候令牌的当前的第二取 值相同, 或者可指所述分发器 y的编号与所述轮候令牌的当前的第二取值的差 值为第一设定值, 或者可指所述轮候令牌的当前的第 y取值除以所述 K得到的 余数, 等于所述分发器 y的编号, 或者可指所述轮候令牌的当前的第二取值除 以所述 K得到的余数, 与所述分发器 y的编号的差值为第二设定值) 时, 所述 分发器 y向确定出的所述 Q个报文对应的流队列标识所标识的流队列分发所述 Q个报文对应的报文描述信息; 其中, 所述方法还包括: 所述分发器 y按照所 述预设策略对所述轮候令牌的当前的第二取值进行更新; 其中, 所述第二取值 大于所述第一取值, 或者所述第二取值 'J、于所述第一取值。
为便于更好的理解和实施上述方案,下面通过一些具体的应用场景进行举 例说明。
参见图 3-a, 图 3-a为本发明实施例提供的一种网络架构示意图。 其中, 图 3-b所示的网络设备处理报文的方法可以在图 3-a所示网络架构中的服务网关上 实施。
301、服务网关将 K个分发器和 S个网络业务处理单元被加载到所述服务网 关的内存之中。
其中, 服务网关中可以包括多核处理器、 存储器(该存储器包括内存)和 网卡等。
参见图 3-c,图 3-c为本发明的一个实施例提供的一种服务网关 300的内部架 构示意图。 下面的举例场面中, 以 K个分发器包括分发器 Classifier-0、 分发器 分发器 Classifier-1和分发器 Classifier-2为例, 以 S个网络业务处理单元包括网络 业务处理单元 NT-0和网络业务处理单元 NT-1为例。
其中, 服务网关的内存中存储有轮候令牌, 其中, 轮候令牌可能的取值数 量为 K个, 当 K=2时, 轮候令牌可能的取值为 0和 1。 当 Κ=3时, 轮候令牌可能 的取值为 0、 1和 2, 以此类推。 其中, 由于本实施例中以 Κ=3为例, 因此轮候 令牌可能的取值为 0、 1和 2。
其中, 轮候令牌的初始值可为 0。
其中, 图 3-d为本发明的一个实施例提供的一种服务网关 300的内部架构下 实施图 3-b所示方法是的数据流转示意图。
302、 分发器 Classifier-0从服务网关的网卡接收队列中的与所述分发器 Classifier-0对应的队列区域 a中获取 P个报文标识。
303、 分发器 Classifier-0基于所述 P个报文标识获取所述 P个报文标识对应 的 P个报文。
304、 分发器 Classifier-0解析所述 P个报文以获得所述 P个报文包含的报文 特征信息。
305、 分发器 Classifier-0以所述 P个报文包含的报文特征信息为查表键值进 行查表操作, 以获得所述 P个报文对应的匹配表项, 其中, 所述 P个报文对应的 匹配表项中包含所述 P个 文对应的流队列标识和所述 P个 4艮文所属业务流的 流标识。
306、 当分发器 Classifier-0检测到轮候令牌的当前的取值等于分发器 Classifier-0的编号 (轮候令牌的当前的取值等于轮候令牌的初始值 0, 进而等 于分发器 Classifier-0的编号 0 ) 时, 分发器 Classifier-0向所述 P个报文对应的流 队列标识对应的流队列分发所述 P个报文对应的报文描述信息。
其中, 所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出的所 述才艮文 i对应的流队列标识对应的流队列中。其中,所述 P个 4艮文中的 文 j对应 的报文描述信息被分发到了确定出的所述报文 j对应的流队列标识对应的流队 列中。 其中, 所述报文 i和所述报文 j为所述 P个报文中的任意两个报文。
其中, 若所述报文 i入队到网卡接收队列中的队列区域 a时间, 先于所述报 文 j入队到网卡接收队列中的队列区域 a时间,则报文 i对应的报文描述信息被分 发到确定出的所述报文 i对应的流队列标识对应的流队列的时间, 先于报文 j对 应的报文描述信息被分发到确定出的所述报文 i对应的流队列标识对应的流队 列的时间。
307、 分发器 Classifier-0将轮候令牌的当前的取值更新为 1。
308、网络业务处理单元 NT-0和 /或网络业务处理单元 NT- 1基于分发到流队 列中的所述 P个报文对应的报文描述信息中包含的所述 P个报文的报文标识获 取所述 P个报文;网络业务处理单元 NT-0和 /或网络业务处理单元 NT- 1基于分发 到流队列中的所述 P个报文对应的报文描述信息中包含的所述 P个报文所属业 务流的流标识, 获取所述 P个报文所属业务流的流上下文; 网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于获取到的所述 P个报文所属业务流的流 上下文, 处理获取到的所述 P个报文并发送所述处理后的 P个报文。
其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可以基于分发到 流队列中的所述报文 i对应的报文描述信息中包含的所述报文 i的报文标识获取 所述报文 i; 基于分发到流队列中的所述报文 i对应的报文描述信息中包含的所 述报文 i所属业务流的流标识, 获取所述报文 i所属业务流的流上下文; 基于获 取到的所述报文 i所属业务流的流上下文, 处理获取到的所述报文 i并发送处理 后的所述报文 i。 其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基 于分发到流队列中的所述报文 j对应的报文描述信息中包含的所述报文 j的报文 标识获取所述报文 j; 可基于分发到流队列中的所述报文 j对应的报文描述信息 中包含的所述报文 j所属业务流的流标识, 获取所述报文 j所属业务流的流上下 文; 基于获取到的所述报文 j所属业务流的流上下文, 处理获取到的所述报文 j 并发送处理后的所述报文 j。
309、 分发器 Classifier-1从服务网关的网卡接收队列中的与所述分发器 Classifier-1对应的队列区域 b中获取 Q个报文标识。
310、 分发器 Classifier-1基于所述 Q个报文标识获取所述 Q个报文标识对应 的 Q个报文。 特征信息。
312、分发器 Classifier-1以所述 Q个报文包含的报文特征信息为查表键值进 行查表操作, 以获得所述 Q个报文对应的匹配表项, 其中, 所述 Q个报文对应 的匹配表项中包含所述 Q个报文对应的流队列标识和所述 Q个报文所属业务流 的流标识。
313、 当分发器 Classifier-1检测到轮候令牌的当前的取值等于分发器 Classifier-1的编号时(轮候令牌的当前的取值在步骤 307中被更新为了 1, 进而 等于分发器 Classifier-1的编号 1 ),分发器 Classifier-1向所述 Q个报文对应的流队 列标识对应的流队列分发所述 Q个报文对应的报文描述信息。
其中, 所述 Q个报文中的报文 m对应的报文描述信息被分发到了确定出的 所述报文 m对应的流队列标识对应的流队列中。 其中, 所述 Q个报文中的报文 n 对应的报文描述信息被分发到了确定出的所述报文 n对应的流队列标识对应的 流队列中。其中,所述报文 m和所述报文 n可为所述 Q个报文中的任意两个报文。
其中, 若所述报文 m入队到网卡接收队列中的队列区域 a时间, 先于所述 报文 n入队到网卡接收队列中的队列区域 a时间, 则报文 m对应的报文描述信息 被分发到确定出的所述报文 m对应的流队列标识对应的流队列的时间, 先于报 文 n对应的报文描述信息被分发到确定出的所述报文 m对应的流队列标识对应 的流队列的时间。
314、 分发器 Classifier-1将轮候令牌的当前的取值更新为 2。
315、网络业务处理单元 NT-0和 /或网络业务处理单元 NT- 1基于分发到流队 列中的所述 Q个报文对应的报文描述信息中包含的所述 Q个报文的报文标识获 取所述 Q个报文; 网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于分 发到流队列中的所述 Q个报文对应的报文描述信息中包含的所述 Q个报文所属 业务流的流标识, 获取所述 Q个报文所属业务流的流上下文; 网络业务处理单 元 NT-0和 /或网络业务处理单元 NT-1基于获取到的所述 Q个报文所属业务流的 流上下文, 处理获取到的所述 Q个报文并发送所述处理后的 Q个报文。
其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流 队列中的所述报文 m对应的报文描述信息中包含的所述报文 m的报文标识获取 所述报文 m; 基于分发到流队列中的所述报文 m对应的报文描述信息中包含的 所述报文 m所属业务流的流标识, 获取所述报文 m所属业务流的流上下文; 基 于获取到的所述报文 m所属业务流的流上下文, 处理获取到的所述报文 m并发 送处理后的所述报文 m。 其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流队列中的所述报文 n对应的报文描述信息中包含的所述报 文 n的报文标识获取所述报文 n; 可基于分发到流队列中的所述报文 n对应的报 文描述信息中包含的所述报文 n所属业务流的流标识,获取所述报文 n所属业务 流的流上下文; 基于获取到的所述报文 n所属业务流的流上下文, 处理获取到 的所述报文 n并发送处理后的所述报文 n。
316、 分发器 Classifier-2从服务网关的网卡接收队列中的与所述分发器 Classifier-2对应的队列区域 c中获取 R个报文标识。
317、 分发器 Classifier-2基于所述 R个报文标识获取所述 R个报文标识对应 的 R个报文。
318、 分发器 Classifier-2解析所述 R个报文以获得所述 R个报文包含的报文 特征信息。
319、分发器 Classifier-2以所述 R个报文包含的报文特征信息为查表键值进 行查表操作, 以获得所述 R个报文对应的匹配表项, 其中, 所述 R个报文对应 的匹配表项中包含所述 R个报文对应的流队列标识和所述 R个报文所属业务流 的流标识。
320、 当分发器 Classifier-2检测到轮候令牌的当前的取值等于分发器 Classifier-2的编号时(轮候令牌的当前的取值在步骤 314中被更新为了 2, 进而 等于分发器 Classifier-2的编号 2 ),分发器 Classifier-2向所述 R个报文对应的流队 列标识对应的流队列分发所述 R个报文对应的报文描述信息。
其中,所述 R个报文中的报文 e对应的报文描述信息被分发到了确定出的所 述报文 e对应的流队列标识对应的流队列中。 其中, 所述 R个报文中的报文 f对 应的报文描述信息被分发到了确定出的所述报文 f对应的流队列标识对应的流 队列中。 其中, 所述报文 e和所述报文阿为所述 R个报文中的任意两个报文。
其中, 若所述报文 e入队到网卡接收队列中的队列区域 c时间, 先于所述报 文 f入队到网卡接收队列中的队列区域 c时间, 则报文 e对应的报文描述信息被 分发到确定出的所述报文 e对应的流队列标识对应的流队列的时间, 先于报文 f 对应的报文描述信息被分发到确定出的所述报文 f对应的流队列标识对应的流 队列的时间。
321、 分发器 Classifier-2将轮候令牌的当前的取值更新为 0。
所述 Q、 所述 P和所述 R为正整数, 其中, 所述 Q个报文入队到所述网卡接 队列区域 a的时间。 所述 R个报文入队到所述网卡接收队列中的队列区域 c的时 间晚于所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间。
322、网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于分发到流队 列中的所述 R个报文对应的报文描述信息中包含的所述 R个报文的报文标识获 取所述 R个报文;网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于分发 到流队列中的所述 R个报文对应的报文描述信息中包含的所述 R个报文所属业 务流的流标识, 获取所述 R个报文所属业务流的流上下文; 网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于获取到的所述 R个报文所属业务流的流 上下文, 处理获取到的所述 R个报文并发送所述处理后的 R个报文。
其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流 队列中的所述报文 e对应的报文描述信息中包含的所述报文 e的报文标识获取 所述报文 e;基于分发到流队列中的所述报文 e对应的报文描述信息中包含的所 述报文 e所属业务流的流标识, 获取所述报文 e所属业务流的流上下文; 基于获 取到的所述报文 e所属业务流的流上下文,处理获取到的所述报文 e并发送处理 后的所述报文 e。 其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基 于分发到流队列中的所述报文 f对应的报文描述信息中包含的所述报文 f的报 文标识获取所述报文 f; 可基于分发到流队列中的所述报文 f对应的报文描述信 息中包含的所述报文 f所属业务流的流标识, 获取所述报文 f所属业务流的流上 下文; 基于获取到的所述报文 f所属业务流的流上下文, 处理获取到的所述报 文 f并发送处理后的所述报文。
可以理解, 步骤 302~305与步骤 309~312之间可并行执行, 步骤 309~312与 步骤 316~319之间可并行执行。
进一步的, 分发器 Classifier-2可以更新网卡接收队列中各区域记录的报文 地址, 分发器 Classifier-2可通知网卡继续接收报文, 网卡将接收到的报文入队 到网卡接收队列, 而后可循环执行步骤 302~322。
可以看出, 本实施例中在服务网关中部署了 K个分发器和 S个网络业务处 理单元, 网卡接收队列被划分为了多个队列区域, 而每个分发器可从网卡接收 队列中的与该分发器对应的队列区域中获取报文标识,也就是说网卡接收队列 具有了多个信息读取口, 这使得 K个分发器可以并行的从网卡接收队列的相应 队列区域读取报文标识, K个分发器也可以并行的基于其获取的报文标识来确 定对应的流队列标识, K个分发器在向流队列分发报文描述信息之前的相关操 作都可以是并行执行的,而并行执行使得相关操作的处理时间变得可部分或全 部重叠, 而 K个分发器在向流队列分发报文描述信息之前的相关操作所需时间 和处理复杂度, 通常是大于 K个分发器在向流队列分发报文描述信息所需时间 和处理复杂度的。 因此本实施例的上述方案通过引入多软件实例的分发器,有 利于提高服务网关的报文分发处理能力,进而有利于使得服务网关支持更大的 带宽场景。
并且, 由于所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间 晚于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间,因此在所述 分发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个 报文对应的报文描述信息之后, 所述分发器 y再向确定出的所述 Q个报文对应 的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息, 通过上 述的时序控制就有利于在一定程度上满足报文分发的保序要求。
其中, 本实施例中主要以网络设备可为服务网关为例, 当然执行本发明实 施例方法的网络设备还可为 PGW或其他类型的网关设备或通信网络中的其他 类型的数据面汇聚节点。
参见图 3-a, 图 3-a为本发明实施例提供的一种网络架构示意图。 其中, 图 4 所示的网络设备处理报文的方法可以在图 3-a所示网络架构中的服务网关上具 体实施。 401、服务网关将 K个分发器和 S个网络业务处理单元被加载到所述服务网 关的内存之中。
其中, 服务网关中可以包括多核处理器、 存储器(该存储器包括内存)和 网卡等。
下面的举例场景中, 以 K个分发器包括分发器 Classifier-0、 分发器分发器 Classifier-1和分发器 Classifier-2为例, 以 S个网络业务处理单元包括网络业务处 理单元 NT-0和网络业务处理单元 NT- 1为例。
其中, 服务网关的内存中存储有轮候令牌, 其中, 轮候令牌可能的取值数 量为 K个, 当 K=2时, 轮候令牌可能的取值为 0和 1。 当 Κ=3时, 轮候令牌可能 的取值为 0、 1和 2, 以此类推。 其中, 由于本实施例中以 Κ=3为例, 因此轮候 令牌可能的取值为 0、 1和 2。
其中, 轮候令牌的初始值可为 0。
402、 分发器 Classifier-0从服务网关的网卡接收队列中的与所述分发器 Classifier-0对应的队列区域 a中的队列子区域 al中获取 P个报文标识。
其中, 网卡接收队列被划分为了三个队列区域, 即队列区域 a、 队列区域 b 和队列区域 c。 其中, 队列区域 a包含队列子区域 al和队列子区域 a2, 队列子区 域 al内的各队列成员的成员编号是相邻的,队列子区域 a2内的各队列成员的成 员编号是相邻的,队列子区域 al与队列子区域 a2之间的队列成员的成员编号是 不相邻的。 其中, 队列区域 b包含队列子区域 bl和队列子区域 b2, 队列子区域 bl内的各队列成员的成员编号是相邻的,队列子区域 b2内的各队列成员的成员 不相邻的。 其中, 队列区域 c包含队列子区域 cl和队列子区域 c2。 队列子区域 cl内的各队列成员的成员编号是相邻的, 队列子区域 c2内的各队列成员的成员 编号是相邻的,而队列子区域 cl与队列子区域 c2之间的队列成员的成员编号是 不相邻的。
403、 分发器 Classifier-0基于所述 P个报文标识获取所述 P个报文标识对应 的 P个报文。 特征信息。
405、 分发器 Classifier-O 所述 P个报文包含的报文特征信息为查表键值进 行查表操作, 以获得所述 P个报文对应的匹配表项, 其中, 所述 P个报文对应的 匹配表项中包含所述 P个 文对应的流队列标识和所述 P个 4艮文所属业务流的 流标识。
406、 当分发器 Classifier-0检测到轮候令牌的当前的取值等于分发器 Classifier-0的编号 (轮候令牌的当前的取值等于轮候令牌的初始值 0, 进而等 于分发器 Classifier-0的编号 0 ) 时, 分发器 Classifier-0向所述 P个报文对应的流 队列标识对应的流队列分发所述 P个报文对应的报文描述信息。
其中, 所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出的所 述才艮文 i对应的流队列标识对应的流队列中。其中,所述 P个 4艮文中的 文 j对应 的报文描述信息被分发到了确定出的所述报文 j对应的流队列标识对应的流队 列中。 其中, 所述报文 i和所述报文 j为所述 P个报文中的任意两个报文。
其中, 若所述报文 i入队到网卡接收队列中的队列区域 a中的队列子区域 al 的时间, 先于所述报文 j入队到网卡接收队列中的队列区域 a中的队列子区域 al 的时间, 则报文 i对应的报文描述信息被分发到确定出的所述报文 i对应的流队 列标识对应的流队列的时间, 先于报文 j对应的报文描述信息被分发到确定出 的所述 文 i对应的流队列标识对应的流队列的时间。
407、 分发器 Classifier-0将轮候令牌的当前的取值更新为 1。
408、网络业务处理单元 NT-0和 /或网络业务处理单元 NT- 1基于分发到流队 列中的所述 P个报文对应的报文描述信息中包含的所述 P个报文的报文标识获 取所述 P个报文;网络业务处理单元 NT-0和 /或网络业务处理单元 NT- 1基于分发 到流队列中的所述 P个报文对应的报文描述信息中包含的所述 P个报文所属业 务流的流标识, 获取所述 P个报文所属业务流的流上下文; 网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于获取到的所述 P个报文所属业务流的流 上下文, 处理获取到的所述 P个报文并发送所述处理后的 P个报文。
其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流 队列中的所述报文 i对应的报文描述信息中包含的所述报文 i的报文标识获取所 述报文 i; 基于分发到流队列中的所述报文 i对应的报文描述信息中包含的所述 报文 i所属业务流的流标识, 获取所述报文 i所属业务流的流上下文; 基于获取 到的所述报文 i所属业务流的流上下文, 处理获取到的所述报文 i并发送处理后 的所述报文 i。 其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于 分发到流队列中的所述报文 j对应的报文描述信息中包含的所述报文 j的报文标 识获取所述报文 j; 可基于分发到流队列中的所述报文 j对应的报文描述信息中 包含的所述报文 j所属业务流的流标识,获取所述报文 j所属业务流的流上下文; 基于获取到的所述报文 j所属业务流的流上下文, 处理获取到的所述报文 j并发 送处理后的所述报文 j。
409、 分发器 Classifier-1从服务网关的网卡接收队列中的与所述分发器
410、 分发器 Classifier-1基于所述 Q个报文标识获取所述 Q个报文标识对应 的 Q个报文。
411、 分发器 Classifier-1解析所述 Q个报文以获得所述 Q个报文包含的报文 特征信息。
412、分发器 Classifier-1以所述 Q个报文包含的报文特征信息为查表键值进 行查表操作, 以获得所述 Q个报文对应的匹配表项, 其中, 所述 Q个报文对应 的匹配表项中包含所述 Q个报文对应的流队列标识和所述 Q个报文所属业务流 的流标识。
413、 当分发器 Classifier-1检测到轮候令牌的当前的取值等于分发器 Classifier-1的编号时(轮候令牌的当前的取值在步骤 407中被更新为了 1, 进而 等于分发器 Classifier-1的编号 1 ),分发器 Classifier-1向所述 Q个报文对应的流队 列标识对应的流队列分发所述 Q个报文对应的报文描述信息。
其中, 所述 Q个报文中的报文 m对应的报文描述信息被分发到了确定出的 所述报文 m对应的流队列标识对应的流队列中。 其中, 所述 Q个报文中的报文 n 对应的报文描述信息被分发到了确定出的所述报文 n对应的流队列标识对应的 流队列中。其中,所述报文 m和所述报文 n可为所述 Q个报文中的任意两个报文。
其中, 若所述报文 m入队到网卡接收队列中的队列区域 a中的队列子区域 al的时间,先于所述报文 n入队到网卡接收队列中的队列区域 a中的队列子区域 al的时间, 则报文 m对应的报文描述信息被分发到确定出的所述报文 m对应的 流队列标识对应的流队列的时间, 先于报文 n对应的报文描述信息被分发到确 定出的所述 文 m对应的流队列标识对应的流队列的时间。
414、 分发器 Classifier-1将轮候令牌的当前的取值更新为 2。
415、网络业务处理单元 NT-0和 /或网络业务处理单元 NT- 1基于分发到流队 列中的所述 Q个报文对应的报文描述信息中包含的所述 Q个报文的报文标识获 取所述 Q个报文; 网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于分 发到流队列中的所述 Q个报文对应的报文描述信息中包含的所述 Q个报文所属 业务流的流标识, 获取所述 Q个报文所属业务流的流上下文; 网络业务处理单 元 NT-0和 /或网络业务处理单元 NT-1基于获取到的所述 Q个报文所属业务流的 流上下文, 处理获取到的所述 Q个报文并发送所述处理后的 Q个报文。
其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流 队列中的所述报文 m对应的报文描述信息中包含的所述报文 m的报文标识获取 所述报文 m; 基于分发到流队列中的所述报文 m对应的报文描述信息中包含的 所述报文 m所属业务流的流标识, 获取所述报文 m所属业务流的流上下文; 基 于获取到的所述报文 m所属业务流的流上下文, 处理获取到的所述报文 m并发 送处理后的所述报文 m。 其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流队列中的所述报文 n对应的报文描述信息中包含的所述报 文 n的报文标识获取所述报文 n; 可基于分发到流队列中的所述报文 n对应的报 文描述信息中包含的所述报文 n所属业务流的流标识,获取所述报文 n所属业务 流的流上下文; 基于获取到的所述报文 n所属业务流的流上下文, 处理获取到 的所述报文 n并发送处理后的所述报文 n。
416、 分发器 Classifier-2从服务网关的网卡接收队列中的与所述分发器 Classifier-2对应的队列区域 c的队列子区域 cl中获取 R个报文标识。
417、 分发器 Classifier-2基于所述 R个报文标识获取所述 R个报文标识对应 的 R个报文。 特征信息。
419、分发器 Classifier-2以所述 R个报文包含的报文特征信息为查表键值进 行查表操作, 以获得所述 R个报文对应的匹配表项, 其中, 所述 R个报文对应 的匹配表项中包含所述 R个报文对应的流队列标识和所述 R个报文所属业务流 的流标识。
420、 当分发器 Classifier-2检测到轮候令牌的当前的取值等于分发器 Classifier-2的编号时(轮候令牌的当前的取值在步骤 414中被更新为了 2, 进而 等于分发器 Classifier-2的编号 2 ),分发器 Classifier-2向所述 R个报文对应的流队 列标识对应的流队列分发所述 R个报文对应的报文描述信息。
其中,所述 R个报文中的报文 e对应的报文描述信息被分发到了确定出的所 述报文 e对应的流队列标识对应的流队列中。 其中, 所述 R个报文中的报文 f对 应的报文描述信息被分发到了确定出的所述报文 f对应的流队列标识对应的流 队列中。 其中, 所述报文 e和所述报文阿为所述 R个报文中的任意两个报文。
其中, 若所述报文 e入队到网卡接收队列中的队列区域 c时间, 先于所述报 文 f入队到网卡接收队列中的队列区域 c时间, 则报文 e对应的报文描述信息被 分发到确定出的所述报文 e对应的流队列标识对应的流队列的时间, 先于报文 f 对应的报文描述信息被分发到确定出的所述报文 f对应的流队列标识对应的流 队列的时间。
421、 分发器 Classifier-2将轮候令牌的当前的取值更新为 0。
所述 Q、 所述 P和所述 R为正整数, 其中, 所述 Q个报文入队到所述网卡接 网卡接收队列中的队列区域 a中的队列子区域 al的时间。所述 R个报文入队到所 述网卡接收队列中的队列区域 c中的队列子区域 cl的时间晚于所述 Q个报文入 队到所述网卡接收队列中的队列区域 b中的队列子区域 bl的时间。
422、网络业务处理单元 NT-0和 /或网络业务处理单元 NT- 1基于分发到流队 列中的所述 R个报文对应的报文描述信息中包含的所述 R个报文的报文标识获 取所述 R个报文;网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于分发 到流队列中的所述 R个报文对应的报文描述信息中包含的所述 R个报文所属业 务流的流标识, 获取所述 R个报文所属业务流的流上下文; 网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于获取到的所述 R个报文所属业务流的流 上下文, 处理获取到的所述 R个报文并发送所述处理后的 R个报文。
其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流 队列中的所述报文 e对应的报文描述信息中包含的所述报文 e的报文标识获取 所述报文 e;基于分发到流队列中的所述报文 e对应的报文描述信息中包含的所 述报文 e所属业务流的流标识, 获取所述报文 e所属业务流的流上下文; 基于获 取到的所述报文 e所属业务流的流上下文,处理获取到的所述报文 e并发送处理 后的所述报文 e。 其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基 于分发到流队列中的所述报文 f对应的报文描述信息中包含的所述报文 f的报 文标识获取所述报文 f; 可基于分发到流队列中的所述报文 f对应的报文描述信 息中包含的所述报文 f所属业务流的流标识, 获取所述报文 f所属业务流的流上 下文; 基于获取到的所述报文 f所属业务流的流上下文, 处理获取到的所述报 文 f并发送处理后的所述报文。
可以理解, 步骤 402~405与步骤 409~412之间可并行执行, 步骤 409~412与 步骤 416~419之间可并行执行。
423、分发器 Classifier-0从服务网关的网卡接收队列中的与所述 Classifier-0 对应的队列区域 a中的队列子区域 a2中获取 P2个报文标识。
424、 分发器 Classifier-0基于所述 P2个报文标识获取所述 P2个报文标识对 应的 P2个报文。
425、 分发器 Classifier-0解析所述 P2个报文以获得所述 P2个报文包含的报 文特征信息。
426、 分发器 Classifier-0以所述 P2个报文包含的报文特征信息为查表键值 进行查表操作, 以获得所述 P2个报文对应的匹配表项, 其中, 所述 P2个报文对 应的匹配表项中包含所述 P2个报文对应的流队列标识和所述 P2个报文所属业 务流的流标识。
427、 当分发器 Classifier-0检测到轮候令牌的当前的取值等于分发器 Classifier-0的编号(轮候令牌的当前的取值在步骤 421中被更新为了 0, 进而等 于分发器 Classifier-0的编号 0 )时, 分发器 Classifier-0向所述 P2个报文对应的流 队列标识对应的流队列分发所述 P2个报文对应的报文描述信息。
其中, 所述 P2个报文中的报文 i对应的报文描述信息被分发到了确定出的 所述报文 i2对应的流队列标识对应的流队列中。 其中, 所述 P2个报文中的报文 j2对应的报文描述信息被分发到了确定出的所述报文 j2对应的流队列标识对应 的流队列中。 其中, 所述报文 i2和所述报文 j2为所述 P2个报文中的任意两个报 文。
其中, 若所述报文 i2入队到网卡接收队列中的队列区域 a中的队列子区域 a2的时间, 先于所述报文 j2入队到网卡接收队列中的队列区域 a中的队列子区 域 a2的时间, 则报文 i2对应的报文描述信息被分发到确定出的所述报文 i2对应 的流队列标识对应的流队列的时间, 先于报文 j2对应的报文描述信息被分发到 确定出的所述 文 i2对应的流队列标识对应的流队列的时间。
428、 分发器 Classifier-0将轮候令牌的当前的取值更新为 1。
429、网络业务处理单元 NT-0和 /或网络业务处理单元 NT- 1基于分发到流队 列中的所述 P2个报文对应的报文描述信息中包含的所述 P2个报文的报文标识 获取所述 P2个报文; 网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于 分发到流队列中的所述 P2个报文对应的报文描述信息中包含的所述 P2个报文 所属业务流的流标识,获取所述 P2个报文所属业务流的流上下文; 网络业务处 理单元 NT-0和 /或网络业务处理单元 NT-1基于获取到的所述 P2个报文所属业务 流的流上下文, 处理获取到的所述 P2个报文并发送所述处理后的 P2个报文。
其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流 队列中的所述报文 i2对应的报文描述信息中包含的所述报文 i2的报文标识获取 所述报文 i2; 基于分发到流队列中的所述报文 i2对应的报文描述信息中包含的 所述报文 i2所属业务流的流标识, 获取所述报文 i2所属业务流的流上下文; 基 于获取到的所述报文 i2所属业务流的流上下文, 处理获取到的所述报文 i2并发 送处理后的所述报文 i2。 其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流队列中的所述报文 j2对应的报文描述信息中包含的所述 报文 j2的报文标识获取所述报文 j2; 可基于分发到流队列中的所述报文 j2对应 的报文描述信息中包含的所述报文 j2所属业务流的流标识, 获取所述报文 j2所 属业务流的流上下文; 基于获取到的所述报文 j2所属业务流的流上下文, 处理 获取到的所述报文 j2并发送处理后的所述报文 j2。
430、 分发器 Classifier- 1从服务网关的网卡接收队列中的与分发器 wi ^。
431、 分发器 Classifier-1基于所述 Q2个报文标识获取所述 Q2个报文标识对 应的 Q2个报文。
432、 分发器 Classifier-1解析所述 Q2个报文以获得所述 Q2个报文包含的报 文特征信息。
433、 分发器 Classifier-1以所述 Q2个报文包含的报文特征信息为查表键值 进行查表操作, 以获得所述 Q2个报文对应的匹配表项, 其中, 所述 Q2个报文 对应的匹配表项中包含所述 Q2个报文对应的流队列标识和所述 Q2个报文所属 业务流的流标识。
434、 当分发器 Classifier-1检测到轮候令牌的当前的取值等于分发器 Classifier-1的编号时(轮候令牌的当前的取值在步骤 428中被更新为了 1, 进而 等于分发器 Classifier-1的编号 1 ), 分发器 Classifier-1向所述 Q2个报文对应的流 队列标识对应的流队列分发所述 Q2个报文对应的报文描述信息。
其中, 所述 Q2个报文中的报文 m2对应的报文描述信息被分发到了确定出 的所述 ^艮文 m2对应的流队列标识对应的流队列中。 其中, 所述 Q2个 ^艮文中的 报文 n2对应的报文描述信息被分发到了确定出的所述报文 n2对应的流队列标 识对应的流队列中。 其中, 所述报文 m2和所述报文 n2可为所述 Q2个报文中的 任意两个报文。
其中, 若所述报文 m2入队到网卡接收队列中的队列区域 a2时间, 先于所 述报文 n2入队到网卡接收队列中的队列区域 a2时间, 则报文 m2对应的报文描 述信息被分发到确定出的所述报文 m2对应的流队列标识对应的流队列的时 间, 先于报文 n2对应的报文描述信息被分发到确定出的所述报文 m2对应的流 队列标识对应的流队列的时间。
435、 分发器 Classifier-1将轮候令牌的当前的取值更新为 2。 436、网络业务处理单元 NT-0和 /或网络业务处理单元 NT- 1基于分发到流队 列中的所述 Q2个报文对应的报文描述信息中包含的所述 Q2个报文的报文标识 获取所述 Q2个报文; 网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于 分发到流队列中的所述 Q2个报文对应的报文描述信息中包含的所述 Q2个报文 所属业务流的流标识, 获取所述 Q2个报文所属业务流的流上下文; 网络业务 处理单元 NT-0和 /或网络业务处理单元 NT-1基于获取到的所述 Q2个报文所属 业务流的流上下文, 处理获取到的所述 Q2个报文并发送所述处理后的 Q2个报 文。
网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流队列中 的所述报文 m2对应的报文描述信息中包含的所述报文 m2的报文标识获取所述 报文 m2; 基于分发到流队列中的所述报文 m2对应的报文描述信息中包含的所 述报文 m2所属业务流的流标识, 获取所述报文 m2所属业务流的流上下文; 基 于获取到的所述报文 m2所属业务流的流上下文, 处理获取到的所述报文 m2并 发送处理后的所述报文 m2。 其中, 网络业务处理单元 NT-0或网络业务处理单 元 NT-1可基于分发到流队列中的所述报文 n2对应的报文描述信息中包含的所 述报文 n2的报文标识获取所述报文 n2; 可基于分发到流队列中的所述报文 n2 对应的报文描述信息中包含的所述报文 n2所属业务流的流标识,获取所述报文 n2所属业务流的流上下文; 基于获取到的所述报文 n2所属业务流的流上下文, 处理获取到的所述报文 n2并发送处理后的所述报文 n2。
437、 分发器 Classifier-2从服务网关的网卡接收队列中的与所述分发器 Classifier-2对应的队列区域 c的队列子区域 c2中获取 R2个报文标识。
438、 分发器 Classifier-2基于所述 R2个报文标识获取所述 R2个报文标识对 应的 R2个报文。
439、 分发器 Classifier-2解析所述 R2个报文以获得所述 R2个报文包含的报 文特征信息。
440、 分发器 Classifier-2以所述 R2个报文包含的报文特征信息为查表键值 进行查表操作, 以获得所述 R2个报文对应的匹配表项, 其中, 所述 R2个报文 对应的匹配表项中包含所述 R2个报文对应的流队列标识和所述 R2个报文所属 业务流的流标识。
441、 当分发器 Classifier-2检测到轮候令牌的当前的取值等于分发器 Classifier-2的编号时(轮候令牌的当前的取值在步骤 435中被更新为了 2, 进而 等于分发器 Classifier-2的编号 2 ), 分发器 Classifier-2向所述 R2个报文对应的流 队列标识对应的流队列分发所述 R2个报文对应的报文描述信息。
其中,所述 R2个报文中的报文 e2对应的报文描述信息被分发到了确定出的 所述报文 e2对应的流队列标识对应的流队列中。其中,所述 R2个报文中的报文 f2对应的报文描述信息被分发到了确定出的所述报文 f2对应的流队列标识对 应的流队列中。 其中, 所述报文 e2和所述报文 f2可为所述 R2个报文中的任意两 个报文。
其中, 若所述报文 e2入队到网卡接收队列中的队列子区域 c中的队列子区 域 c2时间, 先于所述报文 f2入队到网卡接收队列中的队列子区域 c中的队列子 区域 c2时间,则报文 e2对应的报文描述信息被分发到确定出的所述报文 e2对应 的流队列标识对应的流队列的时间,先于报文 f2对应的报文描述信息被分发到 确定出的所述 文 f2对应的流队列标识对应的流队列的时间。
442、 分发器 Classifier-2将轮候令牌的当前的取值更新为 0。
所述 Q2、 所述 P2和所述 R2为正整数, 其中, 所述 Q2个报文入队到所述网 所述网卡接收队列中的队列区域 a中的队列子区域 a2的时间。 所述 R2个报文入 队到所述网卡接收队列中的队列区域 c中的队列子区域 c2的时间晚于所述 Q2个 报文入队到所述网卡接收队列中的队列区域 b中的队列子区域 b2的时间。
443、网络业务处理单元 NT-0和 /或网络业务处理单元 NT- 1基于分发到流队 列中的所述 R2个报文对应的报文描述信息中包含的所述 R2个报文的报文标识 获取所述 R2个报文; 网络业务处理单元 NT-0和 /或网络业务处理单元 NT-1基于 分发到流队列中的所述 R2个报文对应的报文描述信息中包含的所述 R2个报文 所属业务流的流标识, 获取所述 R2个报文所属业务流的流上下文; 网络业务 处理单元 NT-0和 /或网络业务处理单元 NT-1基于获取到的所述 R2个报文所属业 务流的流上下文处理获取到的所述 R2个报文并发送所述处理后的 R2个报文。 其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流 队列中的所述报文 e2对应的报文描述信息中包含的所述报文 e的报文标识获取 所述报文 e2;基于分发到流队列中的所述报文 e2对应的报文描述信息中包含的 所述报文 e2所属业务流的流标识, 获取所述报文 e2所属业务流的流上下文; 基 于获取到的所述报文 e2所属业务流的流上下文,处理获取到的所述报文 e2并发 送处理后的所述报文 e2。 其中, 网络业务处理单元 NT-0或网络业务处理单元 NT-1可基于分发到流队列中的所述报文 f2对应的报文描述信息中包含的所述 报文 f2的报文标识获取所述报文 f2; 可基于分发到流队列中的所述报文 f2对应 的报文描述信息中包含的所述报文 f2所属业务流的流标识, 获取所述报文 f2所 属业务流的流上下文; 基于获取到的所述报文 f2所属业务流的流上下文, 处理 获取到的所述报文 f2并发送处理后的所述报文 f2。
可以理解, 步骤 423~426与步骤 430~433之间可并行执行, 步骤 430~433与 步骤 437~440之间可并行执行。
进一步的, 分发器 Classifier-2可以更新网卡接收队列中各区域记录的报文 地址, 分发器 Classifier-2可通知网卡继续接收报文, 网卡将接收到的报文入队 到网卡接收队列, 而后可循环执行步骤 402~443。
可以看出, 本实施例中在服务网关中部署了 K个分发器和 S个网络业务处 理单元, 网卡接收队列被划分为了多个队列区域,每个队列区域包括多个队列 子区域,而每个分发器每批可从网卡接收队列中的与该分发器对应的队列区域 中的某个队列子区域中获取报文标识,也就是说, 网卡接收队列具有了多个信 息读取口, 这使得 K个分发器可以并行的从网卡接收队列的相应队列区域读取 报文标识, K个分发器也可以并行的基于其获取的报文标识来确定对应的流队 列标识, K个分发器在向流队列分发报文描述信息之前的相关操作都可以是并 行执行的, 并行执行使得相关操作的处理时间变得可部分或全部重叠, K个分 发器在向流队列分发报文描述信息之前的相关操作所需时间和处理复杂度,通 常大于 K个分发器在向流队列分发报文描述信息所需时间和处理复杂度。 因此 本实施例的上述方案通过引入多软件实例的分发器,有利于提高服务网关的报 文分发处理能力, 进而有利于使得服务网关支持更大的带宽场景。 并且, 由于所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间 晚于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间,因此在所述 分发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个 报文对应的报文描述信息之后, 所述分发器 y再向确定出的所述 Q个报文对应 的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息, 通过上 述的时序控制就有利于在一定程度上满足报文分发的保序要求。
其中, 本实施例中主要以网络设备可为服务网关为例, 当然执行本发明实 施例方法的网络设备还可为 PGW或其他类型的网关设备或通信网络中的其他 类型的数据面汇聚节点。 参见图 5,本发明实施例提供的一种应用于网络设备的处理报文的装置 500 可包括 K个分发器 510和 S个网络业务处理单元 520, 其中, 所述 K个分发器包括 分发器 X和分发器 y, 所述 K和所述 S为大于 1的整数。
其中, 所述分发器 x, 用于从网卡接收队列中的与所述分发器 X对应的队列 区域 a中获取 P个报文标识;基于所述 P个报文标识获取所述 P个报文标识对应的 P个报文, 基于所述 P个报文确定所述 P个报文对应的流队列标识; 向确定出的 所述 P个报文对应的流队列标识对应的流队列分发所述 P个报文对应的报文描 述信息, 其中, 所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出 的所述报文 i对应的流队列标识对应的流队列中,所述报文 i为所述 P个报文中任 意一个报文, 所述报文 i对应的报文描述信息包含所述报文 i的报文标识。
所述 S个网络业务处理单元中的 Si个网络业务处理单元, 用于基于分发到 流队列中的所述 P个报文对应的报文描述信息对处理所述 P个报文并发送处理 后的所述 P个报文。
所述分发器 y,用于从所述网卡接收队列中的与所述分发器 y对应的队列区 域 b中获取 Q个报文标识; 基于所述 Q个报文标识获取所述 Q个报文标识对应的 Q个报文, 基于所述 Q个报文确定所述 Q个报文对应的流队列标识; 在所述分 发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个报 文对应的报文描述信息之后, 向确定出的所述 Q个报文对应的流队列标识所对 应的流队列分发所述 Q个报文对应的报文描述信息, 其中, 所述 Q个报文标识 中的报文 m对应的报文描述信息被分发到了确定出的所述报文 m对应的流队列 标识对应的流队列中, 所述报文 m为所述 Q个报文中任意一个报文, 其中, 所 述报文 m对应的报文描述信息包含所述报文 m的报文标识; 所述 Q和所述 P为正 整数, 其中, 所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间晚 于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间。
所述 S个网络业务处理单元中的 Sj个网络业务处理单元, 用于基于分发到 流队列中的所述 Q个报文对应的报文描述信息处理所述 Q个报文并发送处理后 的所述 Q个报文, 其中, 所述 Si个网络业务处理单元和所述 Sj个网络业务处理 单元的交集为空集或非空集。
可选的, 在本发明的一些可能的实施方式中, 在所述基于所述 P个报文确 定所述 P个报文对应的流队列标识的方面, 所述分发器 X可具体用于,通过解析 的报文特征信息进行查表操作以获得所述 P个报文对应匹配表项,所述 P个报文 对应匹配表项中包含所述 P个报文对应的流队列标识。
可选的, 在本发明的一些可能的实施方式中, 在所述基于所述 Q个报文确 定所述 Q个报文对应的流队列标识的方面, 所述分发器 y可以具体用于, 通过
Q个报文报文包含的报文特征信息进行查表操作, 以获得所述 Q个报文对应匹 配表项, 其中, 所述 Q个报文对应匹配表项中包含有所述 Q个报文对应流队列 标识。
可选的, 在本发明的一些可能的实施方式中, 所述 P个报文对应匹配表项 中还包含所述 P个报文所属业务流的流标识; 所述 Q个报文对应匹配表项中还 包含所述 Q个报文所属业务流的流标识。
可选的, 在本发明的一些可能的实施方式中, 所述报文 i对应的报文描述 信息还包括所述报文 i所属业务流的流标识; 其中, 所述 Si个网络业务处理单元 可具体用于, 基于分发到流队列中的所述 P个报文对应的报文描述信息中包含 的所述 P个报文的报文标识获取所述 P个报文; 基于分发到流队列中的所述 P个 报文对应的报文描述信息中包含的所述 P个报文所属业务流的流标识, 获取所 述 P个报文所属业务流的流上下文;基于获取到的所述 P个报文所属业务流的流 上下文, 处理获取到的所述 P个报文并发送所述处理后的 P个报文。
可选的, 在本发明的一些可能的实施方式中, 所述报文 m对应的报文描述 信息还包括所述报文 m所属业务流的流标识; 所述 Sj个网络业务处理单元可以 具体用于, 基于分发到流队列中的所述 Q个报文对应的报文描述信息中包含的 所述 Q个报文的报文标识获取所述 Q个报文; 基于分发到流队列中的所述 Q个 报文对应的报文描述信息中包含的所述 Q个报文所属业务流的流标识, 获取所 述 Q个报文所属业务流的流上下文; 基于获取到的所述 Q个报文所属业务流的 流上下文, 处理获取到的所述 Q个报文并发送处理后的所述 Q个报文。
可选的, 在本发明的一些可能的实施方式中, 在所述向确定出的所述 P个 报文对应的流队列标识所标识的流队列分发所述 P个报文对应的报文描述信息 的方面, 所述分发器 X可具体用于, 当监测到所述分发器 X的编号与轮候令牌的 当前的第一取值匹配时, 向确定出的所述 P个才艮文对应的流队列标识所标识的 流队列分发所述 P个报文对应的报文描述信息。
所述分发器 X还可用于, 按照预设策略将所述轮候令牌的当前的第一取值 更新为第二取值。
其中, 在所述向确定出的所述 P个报文对应的流队列标识对应的流队列分 发所述 P个报文对应的报文描述信息之后, 所述分发器 y向确定出的所述 Q个报 文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息 的方面, 所述分发器 y具体用于,在监测所述分发器 y的编号与所述轮候令牌的 当前的第二取值匹配时, 向确定出的所述 Q个才艮文对应的流队列标识所标识的 流队列分发所述 Q个报文对应的报文描述信息。
其中, 所述分发器 y还可用于, 按照所述预设策略对所述轮候令牌的当前 的第二取值进行更新; 其中, 所述第二取值大于所述第一取值, 或者所述第二 取值小于所述第一取值。
可选的, 在本发明一些可能的实施方式中, 所述 P个报文还包括报文 j, 所 述报文 j对应的报文描述信息被所述分发器 X分发到了确定出的所述报文 j对应 的流队列标识对应的流队列中, 所述报文 j对应的报文描述信息包含所述报文 j 的报文标识; 所述报文 j入队到所述网卡接收队列中的队列区域 a的时间晚于所 述报文 i入队到所述网卡接收队列中的队列区域 a的时间;所述报文 j对应的报文 描述信息被所述分发器 X分发到确定出的所述报文 j对应的流队列标识对应的 流队列中的时间, 晚于所述报文 i对应的报文描述信息被所述分发器 X分发到确 定出的所述 ^艮文 j对应的流队列标识对应的流队列中的时间;所述 Si个网络业务 处理单元基于分发到流队列中的所述报文 j对应的报文描述信息处理所述报文 j 的时间,晚于所述 Si个网络业务处理单元基于分发到流队列中的所述报文 i对应 的报文描述信息处理所述报文 i的时间。
可选的, 在本发明的一些可能的实施方式中, 所述 Q个报文还进一步包括 报文 n, 其中, 所述报文 n对应的报文描述信息被所述分发器 y分发到了确定出 的所述报文 n对应的流队列标识对应的流队列中,所述报文 n对应的报文描述信 息包含所述报文 n的报文标识;所述报文 n入队到所述网卡接收队列中的队列区 域 b的时间晚于所述报文 m入队到所述网卡接收队列中的队列区域 b的时间; 所 述报文 n对应的报文描述信息被所述分发器 y分发到确定出的所述报文 n对应的 流队列标识对应的流队列中的时间, 晚于所述报文 m对应的报文描述信息被所 述分发器 y分发到确定出的所述报文 m对应的流队列标识对应的流队列中的时 间; 其中, 所述 Sj个网络业务处理单元基于分发到流队列中的所述报文 n对应 的报文描述信息处理所述报文 n的时间, 晚于所述 Sj个网络业务处理单元基于 分发到流队列中的所述报文 m对应的报文描述信息处理所述报文 m的时间。
可以理解的是,本实施例的装置的各功能模块的功能可根据上述方法实施 例中的方法具体实现, 其具体实现过程可以参照上述方法实施例的相关描述, 此处不再赘述。
可以看出, 本发明实施例中, 由于在网络设备中部署了 K个分发器和 S个 网络业务处理单元, 即部署多软件实例的分发器和 S个网络业务处理单元, 网 卡接收队列被划分为了多个队列区域,每个分发器可从网卡接收队列中的与该 分发器对应的队列区域中获取报文标识,也就是说, 网卡接收队列具有了多个 信息读取口, 这使得 K个分发器可以并行的从网卡接收队列的相应队列区域读 取报文标识, K个分发器也可以并行的基于其获取的报文标识来确定对应的流 队列标识, K个分发器在向流队列分发报文描述信息之前的相关操作都可以是 并行执行, 而并行执行使得相关操作的处理时间变得可部分或全部重叠, K个 分发器在向流队列分发报文描述信息之前的相关操作所需时间和处理复杂度, 通常大于 K个分发器在向流队列分发报文描述信息所需时间和处理复杂度。 因 此本实施例的上述方案通过引入多软件实例的分发器,有利于提高网络设备的 报文分发处理能力, 进而有利于使得网络设备支持更大的带宽场景。
并且, 由于所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间 晚于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间,因此在所述 分发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个 报文对应的报文描述信息之后, 所述分发器 y再向确定出的所述 Q个报文对应 的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息, 通过上 述的时序控制就有利于在一定程度上满足报文分发的保序要求。
参见图 6-a, 图 6-a是本发明另一个实施例提供的网络设备 600的结构框图。 其中, 网络设备 600可以包括: 至少 1个处理器 601、 内存 605和至少 1个通信总 线 602。 通信总线 602用于实现这些组件之间的连接通信。
其中, 如图 6-a所示, 该网络设备 600还可包括: 至少 1个网卡 604、 可选的 包含用户接口 603, 包括显示器 (如触摸屏、 液晶显示器、 全息成像(英文: Holographic )或者投影 (英文: Projector )等)、 点击设备(例如鼠标、 轨迹 球(英文: trackball )触感板或触摸屏等)、 摄像头和 /或拾音装置等。
其中, 内存 605可以包括只读内存和随机存取内存, 并向处理器 601提供指 令和数据。 内存 605中的一部分还可以包括非易失性随机存取内存。
在一些可能的实施方式中, 例图 6-b所示, 内存 605存储了如下的元素, 可 执行模块或者数据结构, 或者他们的子集, 或者他们的扩展集:
代码或指令、 K个分发器和 S个网络业务处理单元, 还可包含网卡接收队 列和至少一个流队列等。
在本发明实施例中, 处理器 601用于执行所述内存 605中的代码或指令, 以 将 K个分发器和 S个网络业务处理单元加载到所述内存中; 其中, 所述 K个分发 器包括分发器 x和分发器 y, 所述 K和所述 S为大于 1的整数。
所述处理器, 用于执行所述内存中的代码或指令, 以将 K个分发器和 S个 网络业务处理单元加载到所述内存中; 其中, 所述 K个分发器包括分发器 X和 分发器 y, 所述 K和所述 S为大于 1的整数;
其中, 所述分发器 x, 用于从网卡接收队列中的与所述分发器 X对应的队列 区域 a中获取 P个报文标识;基于所述 P个报文标识获取所述 P个报文标识对应的 P个报文, 基于所述 P个报文确定所述 P个报文对应的流队列标识; 向确定出的 所述 P个报文对应的流队列标识对应的流队列分发所述 P个报文对应的报文描 述信息, 其中, 所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出 的所述报文 i对应的流队列标识对应的流队列中,所述报文 i为所述 P个报文中任 意一个报文, 所述报文 i对应的报文描述信息包含所述报文 i的报文标识;
所述 S个网络业务处理单元中的 Si个网络业务处理单元, 用于基于分发到 流队列中的所述 P个报文对应的报文描述信息对处理所述 P个报文并发送处理 后的所述 P个报文。
所述分发器 y,用于从所述网卡接收队列中的与所述分发器 y对应的队列区 域 b中获取 Q个报文标识; 基于所述 Q个报文标识获取所述 Q个报文标识对应的 Q个报文, 基于所述 Q个报文确定所述 Q个报文对应的流队列标识; 在所述分 发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个报 文对应的报文描述信息之后, 向确定出的所述 Q个报文对应的流队列标识所对 应的流队列分发所述 Q个报文对应的报文描述信息, 其中, 所述 Q个报文标识 中的报文 m对应的报文描述信息被分发到了确定出的所述报文 m对应的流队列 标识对应的流队列中, 所述报文 m为所述 Q个报文中任意一个报文, 其中, 所 述报文 m对应的报文描述信息包含所述报文 m的报文标识; 所述 Q和所述 P为正 整数, 其中, 所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间晚 于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间。
所述 S个网络业务处理单元中的 Sj个网络业务处理单元, 用于基于分发到 流队列中的所述 Q个报文对应的报文描述信息处理所述 Q个报文并发送处理后 的所述 Q个报文, 其中, 所述 Si个网络业务处理单元和所述 Sj个网络业务处理 单元的交集为空集或非空集。
可选的,在本发明的一些可能的实施方式中,在所述从网卡接收队列中的 与所述分发器 X对应的队列区域 a中获取 P个报文标识的方面,所述分发器 X具体 用于, 在基于所述分发器 X的编号在配置表中查找到网卡接收队列中的与所述 分发器 X对应的队列区域为队列区域 a之后,所述分发器 X从与所述分发器 X对应 的所述队列区域 a中获取 P个报文标识;
其中,所述从所述网卡接收队列中的与所述分发器 y对应的队列区域 b中获 取 Q个报文标识的方面, 所述分发器 X具体用于, 在基于所述分发器 y的编号在 所述配置表中查找到网卡接收队列中的与所述分发器 y对应的队列区域为队列 区域 b之后, 所述分发器 y从与所述分发器 y对应的所述队列区域 b中获取 Q个报 文标识。
可选的, 在本发明的一些可能的实施方式中,
在所述基于所述 P个报文确定所述 P个报文对应的流队列标识的方面,所述 信息,基于所述 P个报文包含的报文特征信息进行查表操作以获得所述 P个报文 对应匹配表项,所述 P个报文对应匹配表项中包含所述 P个报文对应的流队列标 识;
其中, 在所述基于所述 Q个报文确定所述 Q个报文对应的流队列标识的方 面, 所述分发器 y具体用于, 通过解析所述 Q个报文以获取所述 Q个报文包含的 报文特征信息, 基于获取的所述 Q个报文报文包含的报文特征信息进行查表操 作以获得所述 Q个报文对应匹配表项, 其中, 所述 Q个报文对应匹配表项中包 含所述 Q个报文对应流队列标识。
可选的, 在本发明的一些可能的实施方式中, 所述 P个报文对应匹配表项 中还包含所述 P个报文所属业务流的流标识; 所述 Q个报文对应匹配表项中还 包含所述 Q个报文所属业务流的流标识。
可选的, 在本发明的一些可能的实施方式中, 所述报文 i对应的报文描述 信息还包括所述报文 i所属业务流的流标识; 其中, 所述 Si个网络业务处理单元 具体用于, 基于分发到流队列中的所述 P个报文对应的报文描述信息中包含的 所述 P个报文的报文标识获取所述 P个报文; 基于分发到流队列中的所述 P个报 文对应的报文描述信息中包含的所述 P个报文所属业务流的流标识,获取所述 P 个报文所属业务流的流上下文; 基于获取到的所述 P个报文所属业务流的流上 下文, 处理获取到的所述 P个报文并发送所述处理后的 P个报文。
可选的, 在本发明的一些可能的实施方式中, 所述报文 m对应的报文描述 信息还包括所述报文 m所属业务流的流标识; 所述 Sj个网络业务处理单元具体 用于, 基于分发到流队列中的所述 Q个报文对应的报文描述信息中包含的所述 Q个报文的报文标识获取所述 Q个报文; 基于分发到流队列中的所述 Q个报文 对应的报文描述信息中包含的所述 Q个报文所属业务流的流标识, 获取所述 Q 个报文所属业务流的流上下文; 基于获取到的所述 Q个报文所属业务流的流上 下文, 处理获取到的所述 Q个报文并发送处理后的所述 Q个报文。
可选的, 在本发明的一些可能的实施方式中, 在所述向确定出的所述 P个 报文对应的流队列标识所标识的流队列分发所述 P个报文对应的报文描述信息 的方面, 所述分发器 X具体用于, 当监测到所述分发器 X的编号与轮候令牌的当 前的第一取值匹配时, 向确定出的所述 P个 文对应的流队列标识所标识的流 队列分发所述 P个报文对应的报文描述信息;
所述分发器 X还用于, 按照预设策略将所述轮候令牌的当前的第一取值更 新为第二取值;
其中, 在所述向确定出的所述 P个报文对应的流队列标识对应的流队列分 发所述 P个报文对应的报文描述信息之后, 所述分发器 y向确定出的所述 Q个报 文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息 的方面, 所述分发器 y具体用于,在监测所述分发器 y的编号与所述轮候令牌的 当前的第二取值匹配时, 向确定出的所述 Q个才艮文对应的流队列标识所标识的 流队列分发所述 Q个报文对应的报文描述信息;
其中, 所述分发器 y还用于, 按照所述预设策略对所述轮候令牌的当前的 第二取值进行更新; 其中, 所述第二取值大于所述第一取值, 或者所述第二取 值小于所述第一取值。
可选的, 在本发明的一些可能的实施方式中, 所述 P个报文还包括报文 j, 所述报文 j对应的报文描述信息被所述分发器 X 分发到了确定出的所述报文 j对应的流队列标识对应的流队列中, 所述报文 j对 应的报文描述信息包含所述报文 j的报文标识; 所述报文 j入队到所述网卡接收 队列中的队列区域 a的时间晚于所述报文 i入队到所述网卡接收队列中的队列 区域 a的时间; 所述报文 j对应的报文描述信息被所述分发器 X分发到确定出的 所述 文 j对应的流队列标识对应的流队列中的时间, 晚于所述 ^艮文 i对应的才艮 文描述信息被所述分发器 X分发到确定出的所述报文 j对应的流队列标识对应 的流队列中的时间; 所述 Si个网络业务处理单元基于分发到流队列中的所述报 文 j对应的报文描述信息处理所述报文 j的时间, 晚于所述 Si个网络业务处理单 元基于分发到流队列中的所述报文 i对应的报文描述信息处理所述报文 i的时 间。
可选的, 在本发明的一些可能的实施方式中,
所述 Q个报文还包括报文 n, 所述报文 n对应的报文描述信息被所述分发器 y分发到了确定出的所述报文 n对应的流队列标识对应的流队列中, 所述报文 n 对应的报文描述信息包含所述报文 n的报文标识;所述报文 n入队到所述网卡接 列区域 b的时间; 所述报文 n对应的报文描述信息被所述分发器 y分发到确定出 的所述 ^艮文 n对应的流队列标识对应的流队列中的时间, 晚于所述 ^艮文 m对应 的报文描述信息被所述分发器 y分发到确定出的所述报文 m对应的流队列标识 对应的流队列中的时间; 其中, 所述 Sj个网络业务处理单元基于分发到流队列 中的所述报文 n对应的报文描述信息处理所述报文 n的时间, 晚于所述 Sj个网络 业务处理单元基于分发到流队列中的所述报文 m对应的报文描述信息处理所 述报文 m的时间。
可以理解的是,本实施例的网络设备的各功能模块的功能可根据上述方法 实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描 述, 此处不再赘述。
其中, 本实施例中主要以网络设备 600可为服务网关或 PGW或其他类型的 网关或通信网络中的其他类型的数据面汇聚节点。 可以看出, 本发明实施例中, 由于在网络设备中部署了 K个分发器和 S个 网络业务处理单元, 即部署多软件实例的分发器和 S个网络业务处理单元, 网 卡接收队列被划分为了多个队列区域,每个分发器可从网卡接收队列中的与该 分发器对应的队列区域中获取报文标识,也就是说, 网卡接收队列具有了多个 信息读取口, 这使得 K个分发器可以并行的从网卡接收队列的相应队列区域读 取报文标识, K个分发器也可以并行的基于其获取的报文标识来确定对应的流 队列标识, K个分发器在向流队列分发报文描述信息之前的相关操作都可以是 并行执行, 而并行执行使得相关操作的处理时间变得可部分或全部重叠, K个 分发器在向流队列分发报文描述信息之前的相关操作所需时间和处理复杂度, 通常大于 K个分发器在向流队列分发报文描述信息所需时间和处理复杂度。 因 此本实施例的上述方案通过引入多软件实例的分发器,有利于提高网络设备的 报文分发处理能力, 进而有利于使得网络设备支持更大的带宽场景。
并且, 由于所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间 晚于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间,因此在所述 分发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个 报文对应的报文描述信息之后, 所述分发器 y再向确定出的所述 Q个报文对应 的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息, 通过上 述的时序控制就有利于在一定程度上满足报文分发的保序要求。
参见图 6-a和图 6-b, 本发明实施例还提供另一种网络设备 600, 包括: 内存 605, 以及与所述内存连接的处理器 601 ; 其中, 所述内存存储有代码 或指令, 以及 K个分发器和 S个网络业务处理单元; 应当理解的是, K个分发器 和 S个网络业务处理单元是初始化时载入所述内存的 K个分发器和 S个网络业 务处理单元。
所述处理器 601, 用于执行所述内存中的代码或指令, 以及执行 K个分发 器和 S个网络业务处理单元; 所述 K个分发器包括分发器 X和分发器 y, 所述 K 和所述 S为大于 1的整数;
其中, 所述分发器 x, 用于从网卡接收队列中的与所述分发器 X对应的队列 区域 a中获取 P个报文标识;基于所述 P个报文标识获取所述 P个报文标识对应的 P个报文, 基于所述 P个报文确定所述 P个报文对应的流队列标识; 向确定出的 所述 P个报文对应的流队列标识对应的流队列分发所述 P个报文对应的报文描 述信息, 其中, 所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出 的所述报文 i对应的流队列标识对应的流队列中,所述报文 i为所述 P个报文中任 意一个报文, 所述报文 i对应的报文描述信息包含所述报文 i的报文标识;
所述 S个网络业务处理器中的 Si个网络业务处理器, 用于基于分发到流队 列中的所述 P个报文对应的报文描述信息对处理所述 P个报文并发送处理后的 所述 P个报文;
所述分发器 y,用于从所述网卡接收队列中的与所述分发器 y对应的队列区 域 b中获取 Q个报文标识; 基于所述 Q个报文标识获取所述 Q个报文标识对应的 Q个报文, 基于所述 Q个报文确定所述 Q个报文对应的流队列标识; 在所述分 发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个报 文对应的报文描述信息之后, 向确定出的所述 Q个报文对应的流队列标识所对 应的流队列分发所述 Q个报文对应的报文描述信息, 其中, 所述 Q个报文标识 中的报文 m对应的报文描述信息被分发到了确定出的所述报文 m对应的流队列 标识对应的流队列中, 所述报文 m为所述 Q个报文中任意一个报文, 其中, 所 述报文 m对应的报文描述信息包含所述报文 m的报文标识; 所述 Q和所述 P为正 整数, 其中, 所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间晚 于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间;
所述 S个网络业务处理器中的 Sj个网络业务处理器, 用于基于分发到流队 列中的所述 Q个报文对应的报文描述信息处理所述 Q个报文并发送处理后的所 述 Q个报文, 其中, 所述 Si个网络业务处理器和所述 Sj个网络业务处理器的交 集为空集或非空集。
可选的,在本发明的一些可能的实施方式中,在所述从网卡接收队列中的 与所述分发器 X对应的队列区域 a中获取 P个报文标识的方面,所述分发器 X具体 用于, 在基于所述分发器 X的编号在配置表中查找到网卡接收队列中的与所述 分发器 X对应的队列区域为队列区域 a之后,所述分发器 X从与所述分发器 X对应 的所述队列区域 a中获取 P个报文标识; 其中,所述从所述网卡接收队列中的与所述分发器 y对应的队列区域 b中获 取 Q个报文标识的方面, 所述分发器 X具体用于, 在基于所述分发器 y的编号在 所述配置表中查找到网卡接收队列中的与所述分发器 y对应的队列区域为队列 区域 b之后, 所述分发器 y从与所述分发器 y对应的所述队列区域 b中获取 Q个报 文标识。
可选的, 在本发明的一些可能的实施方式中,
在所述基于所述 P个报文确定所述 P个报文对应的流队列标识的方面,所述 信息,基于所述 P个报文包含的报文特征信息进行查表操作以获得所述 P个报文 对应匹配表项,所述 P个报文对应匹配表项中包含所述 P个报文对应的流队列标 识;
其中, 在所述基于所述 Q个报文确定所述 Q个报文对应的流队列标识的方 面, 所述分发器 y具体用于, 通过解析所述 Q个报文以获取所述 Q个报文包含的 报文特征信息, 基于获取的所述 Q个报文报文包含的报文特征信息进行查表操 作以获得所述 Q个报文对应匹配表项, 其中, 所述 Q个报文对应匹配表项中包 含所述 Q个报文对应流队列标识。
可选的, 在本发明的一些可能的实施方式中, 所述 P个报文对应匹配表项 中还包含所述 P个报文所属业务流的流标识; 所述 Q个报文对应匹配表项中还 包含所述 Q个报文所属业务流的流标识。
可选的, 在本发明的一些可能的实施方式中, 所述报文 i对应的报文描述 信息还包括所述报文 i所属业务流的流标识; 其中, 所述 Si个网络业务处理单元 具体用于, 基于分发到流队列中的所述 P个报文对应的报文描述信息中包含的 所述 P个报文的报文标识获取所述 P个报文; 基于分发到流队列中的所述 P个报 文对应的报文描述信息中包含的所述 P个报文所属业务流的流标识,获取所述 P 个报文所属业务流的流上下文; 基于获取到的所述 P个报文所属业务流的流上 下文, 处理获取到的所述 P个报文并发送所述处理后的 P个报文。
可选的, 在本发明的一些可能的实施方式中, 所述报文 m对应的报文描述 信息还包括所述报文 m所属业务流的流标识; 所述 Sj个网络业务处理单元具体 用于, 基于分发到流队列中的所述 Q个报文对应的报文描述信息中包含的所述 Q个报文的报文标识获取所述 Q个报文; 基于分发到流队列中的所述 Q个报文 对应的报文描述信息中包含的所述 Q个报文所属业务流的流标识, 获取所述 Q 个报文所属业务流的流上下文; 基于获取到的所述 Q个报文所属业务流的流上 下文, 处理获取到的所述 Q个报文并发送处理后的所述 Q个报文。
可选的, 在本发明的一些可能的实施方式中, 在所述向确定出的所述 P个 报文对应的流队列标识所标识的流队列分发所述 P个报文对应的报文描述信息 的方面, 所述分发器 X具体用于, 当监测到所述分发器 X的编号与轮候令牌的当 前的第一取值匹配时, 向确定出的所述 P个 文对应的流队列标识所标识的流 队列分发所述 P个报文对应的报文描述信息;
所述分发器 X还用于, 按照预设策略将所述轮候令牌的当前的第一取值更 新为第二取值;
其中, 在所述向确定出的所述 P个报文对应的流队列标识对应的流队列分 发所述 P个报文对应的报文描述信息之后, 所述分发器 y向确定出的所述 Q个报 文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息 的方面, 所述分发器 y具体用于,在监测所述分发器 y的编号与所述轮候令牌的 当前的第二取值匹配时, 向确定出的所述 Q个才艮文对应的流队列标识所标识的 流队列分发所述 Q个报文对应的报文描述信息;
其中, 所述分发器 y还用于, 按照所述预设策略对所述轮候令牌的当前的 第二取值进行更新; 其中, 所述第二取值大于所述第一取值, 或者所述第二取 值小于所述第一取值。
可选的, 在本发明的一些可能的实施方式中,
所述 P个报文还包括报文 j, 所述报文 j对应的报文描述信息被所述分发器 X 分发到了确定出的所述报文 j对应的流队列标识对应的流队列中, 所述报文 j对 应的报文描述信息包含所述报文 j的报文标识; 所述报文 j入队到所述网卡接收 队列中的队列区域 a的时间晚于所述报文 i入队到所述网卡接收队列中的队列 区域 a的时间; 所述报文 j对应的报文描述信息被所述分发器 X分发到确定出的 所述 文 j对应的流队列标识对应的流队列中的时间, 晚于所述 ^艮文 i对应的才艮 文描述信息被所述分发器 X分发到确定出的所述报文 j对应的流队列标识对应 的流队列中的时间; 所述 Si个网络业务处理单元基于分发到流队列中的所述报 文 j对应的报文描述信息处理所述报文 j的时间, 晚于所述 Si个网络业务处理单 元基于分发到流队列中的所述报文 i对应的报文描述信息处理所述报文 i的时 间。
可选的, 在本发明的一些可能的实施方式中,
所述 Q个报文还包括报文 n, 所述报文 n对应的报文描述信息被所述分发器 y分发到了确定出的所述报文 n对应的流队列标识对应的流队列中, 所述报文 n 对应的报文描述信息包含所述报文 n的报文标识;所述报文 n入队到所述网卡接 列区域 b的时间; 所述报文 n对应的报文描述信息被所述分发器 y分发到确定出 的所述 ^艮文 n对应的流队列标识对应的流队列中的时间, 晚于所述 ^艮文 m对应 的报文描述信息被所述分发器 y分发到确定出的所述报文 m对应的流队列标识 对应的流队列中的时间; 其中, 所述 Sj个网络业务处理单元基于分发到流队列 中的所述报文 n对应的报文描述信息处理所述报文 n的时间, 晚于所述 Sj个网络 业务处理单元基于分发到流队列中的所述报文 m对应的报文描述信息处理所 述报文 m的时间。
可以理解的是,本实施例的网络设备的各功能模块的功能可根据上述方法 实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描 述, 此处不再赘述。
本发明实施例还提供一种计算机存储介质, 其中, 该计算机存储介质可存 储有程序,该程序执行时包括上述方法实施例中记载的任何一种应用于网络设 备的报文处理方法的部分或全部步骤。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的装置, 可通过其 它的方式实现。 例如, 以上所描述的装置实施例仅仅是示意性的, 例如所述单 元的划分, 仅仅为一种逻辑功能划分, 实际实现时可以有另外的划分方式, 例 如多个单元或组件可以结合或者可以集成到另一个系统, 或一些特征可以忽 略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或直接辆合或通信连 接可以是通过一些接口, 装置或单元的间接辆合或通信连接, 可以是电性或其 它的形式。 单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者 也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部 单元来实现本实施例方案的目的。
另外,在本发明各实施例中的各功能单元可以集成在一个处理单元中,也 可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一个单元 中。上述集成的单元既可以釆用硬件的形式实现,也可以釆用软件功能单元的 形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售 或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发 明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全 部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储 介质中, 包括若干指令用以使得一台计算机设备(可以为个人计算机、 服务器 或者网络设备等, 具体可以是计算机设备中的处理器)执行本发明各个实施例 所述方法的全部或部分步骤。 其中, 而前述的存储介质可包括: U盘、 移动硬 盘、 磁碟、 光盘、 只读存储器 (ROM, Read-Only Memory )或者随机存取存 储器(RAM, Random Access Memory )等各种可以存储程序代码的介质。
以上所述, 以上实施例仅用以说明本发明的技术方案, 而非对其限制; 尽 管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理 解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分 技术特征进行等同替换; 而这些修改或者替换, 并不使相应技术方案的本质脱 离本发明各实施例技术方案的精神和范围。

Claims

权 利 要 求
1、 一种应用于网络设备的处理报文方法, 其特征在于, K个分发器和 S个 网络业务处理单元被加载到所述网络设备的内存之中, 所述 K个分发器包括分 发器 X和分发器 y, 所述 K和所述 S为大于 1的整数;
所述方法包括:所述分发器 X从网卡接收队列中的与所述分发器 X对应的队 列区域 a中获取 P个报文标识; 所述分发器 X基于所述 P个报文标识获取所述 P个 报文标识对应的 P个报文, 所述分发器 X基于所述 P个报文确定所述 P个报文对 应的流队列标识;所述分发器 X向确定出的所述 P个报文对应的流队列标识对应 的流队列分发所述 P个报文对应的报文描述信息,其中,所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出的所述报文 i对应的流队列标识对应的 流队列中,所述报文 i为所述 P个报文中任意一个报文,所述报文 i对应的报文描 述信息包含所述报文 i的报文标识; 所述 S个网络业务处理单元中的 Si个网络业 务处理单元基于分发到流队列中的所述 P个报文对应的报文描述信息对处理所 述 P个报文并发送处理后的所述 P个报文;
所述分发器 y从所述网卡接收队列中的与所述分发器 y对应的队列区域 b中 获取 Q个报文标识; 所述分发器 y基于所述 Q个报文标识获取所述 Q个报文标识 对应的 Q个报文, 所述分发器 y基于所述 Q个报文确定所述 Q个报文对应的流队 列标识;在所述分发器 X向确定出的所述 P个报文对应的流队列标识对应的流队 列分发所述 P个报文对应的报文描述信息之后, 所述分发器 y向确定出的所述 Q 个报文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述 信息, 其中, 所述 Q个报文标识中的报文 m对应的报文描述信息被分发到了确 定出的所述报文 m对应的流队列标识对应的流队列中, 所述报文 m为所述 Q个 报文中任意一个报文, 其中, 所述报文 m对应的报文描述信息包含所述报文 m 的报文标识; 所述 Q和所述 P为正整数, 其中, 所述 Q个报文入队到所述网卡接 队列区域 a的时间; 所述 S个网络业务处理单元中的 Sj个网络业务处理单元基于 分发到流队列中的所述 Q个报文对应的报文描述信息处理所述 Q个报文并发送 处理后的所述 Q个报文, 其中, 所述 Si个网络业务处理单元和所述 Sj个网络业 务处理单元的交集为空集或非空集。
2、 根据权利要求 1所述的方法, 其特征在于, 所述分发器 X从网卡接收队 列中的与所述分发器 X对应的队列区域 a中获取 P个报文标识包括:所述分发器 X 在基于所述分发器 X的编号在配置表中查找到网卡接收队列中的与所述分发器 X对应的队列区域为队列区域 a之后,所述分发器 X从与所述分发器 X对应的所述 队列区域 a中获取 P个报文标识;
其中,所述分发器 y从所述网卡接收队列中的与所述分发器 y对应的队列区 域 b中获取 Q个报文标识, 包括: 所述分发器 y在基于所述分发器 y的编号在所 述配置表中查找到网卡接收队列中的与所述分发器 y对应的队列区域为队列区 域 b之后, 所述分发器 y从与所述分发器 y对应的所述队列区域 b中获取 Q个报文 标识。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述分发器 于所述 P 个报文确定所述 P个报文对应的流队列标识包括: 所述分发器 X通过解析所述 P 个报文以获取所述 P个报文包含的报文特征信息, 所述分发器 X基于所述 P个报 文包含的报文特征信息进行查表操作以获得所述 P个报文对应匹配表项,所述 P 个报文对应匹配表项中包含所述 P个报文对应的流队列标识;
其中,所述分发器 y基于所述 Q个报文确定所述 Q个报文对应的流队列标识 信息, 所述分发器 y基于获取的所述 Q个报文报文包含的报文特征信息进行查 表操作以获得所述 Q个报文对应匹配表项, 其中, 所述 Q个报文对应匹配表项 中包含所述 Q个报文对应流队列标识。
4、 根据权利要求 3所述的方法, 其特征在于, 所述 P个报文对应匹配表项 中还包含所述 P个报文所属业务流的流标识; 所述 Q个报文对应匹配表项中还 包含所述 Q个报文所属业务流的流标识。
5、 根据权利要求 4所述的方法, 其特征在于, 所述报文 i对应的报文描述 信息还包括所述报文 i所属业务流的流标识; 其中, 所述 Si个网络业务处理单元 基于分发到流队列中的所述 P个报文对应的报文描述信息处理所述 P个报文并 发送处理后的所述 P个报文, 包括: 所述 Si个网络业务处理单元基于分发到流 队列中的所述 P个报文对应的报文描述信息中包含的所述 P个报文的报文标识 获取所述 P个报文; 所述 Si个网络业务处理单元基于分发到流队列中的所述 P个 报文对应的报文描述信息中包含的所述 P个报文所属业务流的流标识, 获取所 述 P个报文所属业务流的流上下文; 所述 Si个网络业务处理单元基于获取到的 所述 P个报文所属业务流的流上下文,处理获取到的所述 P个报文并发送所述处 理后的 P个报文;
其中, 所述报文 m对应的报文描述信息还包括所述报文 m所属业务流的流 标识; 所述 Sj个网络业务处理单元基于分发到流队列中的所述 Q个报文对应的 个网络业务处理单元基于分发到流队列中的所述 Q个报文对应的报文描述信 息中包含的所述 Q个报文的报文标识获取所述 Q个报文; 所述 Sj个网络业务处 理单元基于分发到流队列中的所述 Q个报文对应的报文描述信息中包含的所 述 Q个报文所属业务流的流标识, 获取所述 Q个报文所属业务流的流上下文; 所述 Sj个网络业务处理单元基于获取到的所述 Q个报文所属业务流的流上下 文, 处理获取到的所述 Q个报文并发送处理后的所述 Q个报文。
6、 根据权利要求 1至 5任一项所述的方法, 其特征在于, 所述网络设备中 的内存中存储有轮候令牌;
所述分发器 X向确定出的所述 P个报文对应的流队列标识所标识的流队列 分发所述 P个报文对应的报文描述信息, 包括: 当所述分发器 X监测到所述分发 器 X的编号与所述轮候令牌的当前的第一取值匹配时,所述分发器 X向确定出的 所述 P个报文对应的流队列标识所标识的流队列分发所述 P个报文对应的报文 描述信息; 其中, 所述方法还包括: 所述分发器 X按照预设策略将所述轮候令 牌的当前的第一取值更新为第二取值;
其中,所述在所述分发器 X向确定出的所述 P个报文对应的流队列标识对应 的流队列分发所述 P个报文对应的报文描述信息之后,所述分发器 y向确定出的 所述 Q个报文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文 描述信息, 包括: 当所述分发器 y监测所述分发器 y的编号与所述轮候令牌的当 前的第二取值匹配时, 所述分发器 y向确定出的所述 Q个报文对应的流队列标 识所标识的流队列分发所述 Q个报文对应的报文描述信息; 其中, 所述方法还 包括: 所述分发器 y按照所述预设策略对所述轮候令牌的当前的第二取值进行 更新; 其中, 所述第二取值大于所述第一取值, 或者所述第二取值小于所述第 —取值。
7、 根据权利要求 1至 6任一项所述的方法, 其特征在于,
所述 P个报文还包括报文 j,所述报文 j对应的报文描述信息被分发到了确定 出的所述报文 j对应的流队列标识对应的流队列中, 所述报文 j对应的报文描述 信息包含所述报文 j的报文标识; 所述报文 j入队到所述网卡接收队列中的队列 区域 a的时间晚于所述报文 i入队到所述网卡接收队列中的队列区域 a的时间; 所述报文 j对应的报文描述信息被分发到确定出的所述报文 j对应的流队列标识 对应的流队列中的时间, 晚于所述报文 i对应的报文描述信息被分发到确定出 的所述 ^艮文 j对应的流队列标识对应的流队列中的时间;所述 Si个网络业务处理 单元基于分发到流队列中的所述报文 j对应的报文描述信息处理所述报文 j的时 间,晚于所述 Si个网络业务处理单元基于分发到流队列中的所述报文 i对应的报 文描述信息处理所述 文 i的时间。
所述 Q个报文还包括报文 n, 所述报文 n对应的报文描述信息被分发到了确 定出的所述报文 n对应的流队列标识对应的流队列中,所述报文 n对应的报文描 述信息包含所述报文 n的报文标识;所述报文 n入队到所述网卡接收队列中的队 列区域 b的时间晚于所述报文 m入队到所述网卡接收队列中的队列区域 b的时 间;所述报文 n对应的报文描述信息被分发到确定出的所述报文 n对应的流队列 标识对应的流队列中的时间, 晚于所述报文 m对应的报文描述信息被分发到确 定出的所述 ^艮文 m对应的流队列标识对应的流队列中的时间; 其中, 所述 Sj个 网络业务处理单元基于分发到流队列中的所述报文 n对应的报文描述信息处理 所述报文 n的时间, 晚于所述 Sj个网络业务处理单元基于分发到流队列中的所 述报文 m对应的报文描述信息处理所述报文 m的时间。
8、 一种应用于网络设备的处理报文的装置, 其特征在于,
所述装置包括 K个分发器和 S个网络业务处理单元,所述 K个分发器包括分 发器 X和分发器 y, 所述 K和所述 S为大于 1的整数; 其中, 所述分发器 X, 用于从网卡接收队列中的与所述分发器 X对应的队列 区域 a中获取 P个报文标识;基于所述 P个报文标识获取所述 P个报文标识对应的 P个报文, 基于所述 P个报文确定所述 P个报文对应的流队列标识; 向确定出的 所述 P个报文对应的流队列标识对应的流队列分发所述 P个报文对应的报文描 述信息, 其中, 所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出 的所述报文 i对应的流队列标识对应的流队列中,所述报文 i为所述 P个报文中任 意一个报文, 所述报文 i对应的报文描述信息包含所述报文 i的报文标识;
所述 S个网络业务处理单元中的 Si个网络业务处理单元, 用于基于分发到 流队列中的所述 P个报文对应的报文描述信息对处理所述 P个报文并发送处理 后的所述 P个报文;
所述分发器 y,用于从所述网卡接收队列中的与所述分发器 y对应的队列区 域 b中获取 Q个报文标识; 基于所述 Q个报文标识获取所述 Q个报文标识对应的 Q个报文, 基于所述 Q个报文确定所述 Q个报文对应的流队列标识; 在所述分 发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个报 文对应的报文描述信息之后, 向确定出的所述 Q个报文对应的流队列标识所对 应的流队列分发所述 Q个报文对应的报文描述信息, 其中, 所述 Q个报文标识 中的报文 m对应的报文描述信息被分发到了确定出的所述报文 m对应的流队列 标识对应的流队列中, 所述报文 m为所述 Q个报文中任意一个报文, 其中, 所 述报文 m对应的报文描述信息包含所述报文 m的报文标识; 所述 Q和所述 P为正 整数, 其中, 所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间晚 于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间;
所述 S个网络业务处理单元中的 Sj个网络业务处理单元, 用于基于分发到 流队列中的所述 Q个报文对应的报文描述信息处理所述 Q个报文并发送处理后 的所述 Q个报文, 其中, 所述 Si个网络业务处理单元和所述 Sj个网络业务处理 单元的交集为空集或非空集。
9、 根据权利要求 8所述的装置, 其特征在于, 在所述基于所述 P个报文确 定所述 P个报文对应的流队列标识的方面, 所述分发器 X具体用于,通过解析所 述 P个报文以获取所述 P个报文包含的报文特征信息, 基于所述 P个报文包含的 报文特征信息进行查表操作以获得所述 P个报文对应匹配表项,所述 P个报文对 应匹配表项中包含所述 P个报文对应的流队列标识;
其中, 在所述基于所述 Q个报文确定所述 Q个报文对应的流队列标识的方 面, 所述分发器 y具体用于, 通过解析所述 Q个报文以获取所述 Q个报文包含的 报文特征信息, 基于获取的所述 Q个报文报文包含的报文特征信息进行查表操 作以获得所述 Q个报文对应匹配表项, 其中, 所述 Q个报文对应匹配表项中包 含所述 Q个报文对应流队列标识。
10、根据权利要求 9所述的装置, 其特征在于, 所述 P个报文对应匹配表项 中还包含所述 P个报文所属业务流的流标识; 所述 Q个报文对应匹配表项中还 包含所述 Q个报文所属业务流的流标识。
11、 根据权利要求 10所述的装置, 其特征在于, 所述报文 i对应的报文描 述信息还包括所述报文 i所属业务流的流标识; 其中, 所述 Si个网络业务处理单 元具体用于, 基于分发到流队列中的所述 P个报文对应的报文描述信息中包含 的所述 P个报文的报文标识获取所述 P个报文; 基于分发到流队列中的所述 P个 报文对应的报文描述信息中包含的所述 P个报文所属业务流的流标识, 获取所 述 P个报文所属业务流的流上下文;基于获取到的所述 P个报文所属业务流的流 上下文, 处理获取到的所述 P个报文并发送所述处理后的 P个报文;
其中, 所述报文 m对应的报文描述信息还包括所述报文 m所属业务流的流 标识; 所述 Sj个网络业务处理单元具体用于, 基于分发到流队列中的所述 Q个 报文对应的报文描述信息中包含的所述 Q个报文的报文标识获取所述 Q个报 文; 基于分发到流队列中的所述 Q个报文对应的报文描述信息中包含的所述 Q 个报文所属业务流的流标识, 获取所述 Q个报文所属业务流的流上下文; 基于 获取到的所述 Q个报文所属业务流的流上下文, 处理获取到的所述 Q个报文并 发送处理后的所述 Q个报文。
12、 根据权利要求 8至 11任一项所述的装置, 其特征在于,
在所述向确定出的所述 P个报文对应的流队列标识所标识的流队列分发所 述 P个报文对应的报文描述信息的方面,所述分发器 X具体用于, 当监测到所述 分发器 X的编号与轮候令牌的当前的第一取值匹配时,向确定出的所述 P个报文 对应的流队列标识所标识的流队列分发所述 P个报文对应的报文描述信息; 所述分发器 X还用于, 按照预设策略将所述轮候令牌的当前的第一取值更 新为第二取值;
其中, 在所述向确定出的所述 P个报文对应的流队列标识对应的流队列分 发所述 P个报文对应的报文描述信息之后, 所述分发器 y向确定出的所述 Q个报 文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息 的方面, 所述分发器 y具体用于,在监测所述分发器 y的编号与所述轮候令牌的 当前的第二取值匹配时, 向确定出的所述 Q个才艮文对应的流队列标识所标识的 流队列分发所述 Q个报文对应的报文描述信息;
其中, 所述分发器 y还用于, 按照所述预设策略对所述轮候令牌的当前的 第二取值进行更新; 其中, 所述第二取值大于所述第一取值, 或者所述第二取 值小于所述第一取值。
13、根据权利要求 8至 12任一项所述的装置, 其特征在于, 所述 P个报文还 包括报 ,所述报文 j对应的报文描述信息被所述分发器 X分发到了确定出的所 述报文 j对应的流队列标识对应的流队列中, 所述报文 j对应的报文描述信息包 含所述报文 j的报文标识; 所述报文 j入队到所述网卡接收队列中的队列区域 a 的时间晚于所述报文 i入队到所述网卡接收队列中的队列区域 a的时间; 所述报 文 j对应的报文描述信息被所述分发器 X分发到确定出的所述报文 j对应的流队 列标识对应的流队列中的时间, 晚于所述报文 i对应的报文描述信息被所述分 发器 X分发到确定出的所述报文 j对应的流队列标识对应的流队列中的时间; 所 述 Si个网络业务处理单元基于分发到流队列中的所述报文 j对应的报文描述信 息处理所述报文 j的时间,晚于所述 Si个网络业务处理单元基于分发到流队列中 的所述报文 i对应的报文描述信息处理所述报文 i的时间。
所述 Q个报文还包括报文 n, 所述报文 n对应的报文描述信息被所述分发器 y分发到了确定出的所述报文 n对应的流队列标识对应的流队列中, 所述报文 n 对应的报文描述信息包含所述报文 n的报文标识;所述报文 n入队到所述网卡接 列区域 b的时间; 所述报文 n对应的报文描述信息被所述分发器 y分发到确定出 的所述 ^艮文 n对应的流队列标识对应的流队列中的时间, 晚于所述 ^艮文 m对应 的报文描述信息被所述分发器 y分发到确定出的所述报文 m对应的流队列标识 对应的流队列中的时间; 其中, 所述 Sj个网络业务处理单元基于分发到流队列 中的所述报文 n对应的报文描述信息处理所述报文 n的时间, 晚于所述 Sj个网络 业务处理单元基于分发到流队列中的所述报文 m对应的报文描述信息处理所 述报文 m的时间。
14、 一种网络设备, 其特征在于, 包括: 内存, 以及与所述内存连接的处 理器; 所述处理器, 用于执行所述内存中的代码或指令, 以将 K个分发器和 S 个网络业务处理单元加载到所述内存中; 其中, 所述 K个分发器包括分发器 X 和分发器 y, 所述 K和所述 S为大于 1的整数;
其中, 所述分发器 x, 用于从网卡接收队列中的与所述分发器 X对应的队列 区域 a中获取 P个报文标识;基于所述 P个报文标识获取所述 P个报文标识对应的 P个报文, 基于所述 P个报文确定所述 P个报文对应的流队列标识; 向确定出的 所述 P个报文对应的流队列标识对应的流队列分发所述 P个报文对应的报文描 述信息, 其中, 所述 P个报文中的报文 i对应的报文描述信息被分发到了确定出 的所述报文 i对应的流队列标识对应的流队列中,所述报文 i为所述 P个报文中任 意一个报文, 所述报文 i对应的报文描述信息包含所述报文 i的报文标识;
所述 S个网络业务处理单元中的 Si个网络业务处理单元, 用于基于分发到 流队列中的所述 P个报文对应的报文描述信息对处理所述 P个报文并发送处理 后的所述 P个报文;
所述分发器 y,用于从所述网卡接收队列中的与所述分发器 y对应的队列区 域 b中获取 Q个报文标识; 基于所述 Q个报文标识获取所述 Q个报文标识对应的 Q个报文, 基于所述 Q个报文确定所述 Q个报文对应的流队列标识; 在所述分 发器 X向确定出的所述 P个报文对应的流队列标识对应的流队列分发所述 P个报 文对应的报文描述信息之后, 向确定出的所述 Q个报文对应的流队列标识所对 应的流队列分发所述 Q个报文对应的报文描述信息, 其中, 所述 Q个报文标识 中的报文 m对应的报文描述信息被分发到了确定出的所述报文 m对应的流队列 标识对应的流队列中, 所述报文 m为所述 Q个报文中任意一个报文, 其中, 所 述报文 m对应的报文描述信息包含所述报文 m的报文标识; 所述 Q和所述 P为正 整数, 其中, 所述 Q个报文入队到所述网卡接收队列中的队列区域 b的时间晚 于所述 P个报文入队到所述网卡接收队列中的队列区域 a的时间;
所述 S个网络业务处理单元中的 Sj个网络业务处理单元, 用于基于分发到 流队列中的所述 Q个报文对应的报文描述信息处理所述 Q个报文并发送处理后 的所述 Q个报文, 其中, 所述 Si个网络业务处理单元和所述 Sj个网络业务处理 单元的交集为空集或非空集。
15、 根据权利要求 14所述的网络设备, 其特征在于, 在所述从网卡接收队 列中的与所述分发器 X对应的队列区域 a中获取 P个报文标识的方面, 所述分发 器 X具体用于,在基于所述分发器 X的编号在配置表中查找到网卡接收队列中的 与所述分发器 X对应的队列区域为队列区域 a之后, 所述分发器 X从与所述分发 器 X对应的所述队列区域 a中获取 P个报文标识;
其中,所述从所述网卡接收队列中的与所述分发器 y对应的队列区域 b中获 取 Q个报文标识的方面, 所述分发器 X具体用于, 在基于所述分发器 y的编号在 所述配置表中查找到网卡接收队列中的与所述分发器 y对应的队列区域为队列 区域 b之后, 所述分发器 y从与所述分发器 y对应的所述队列区域 b中获取 Q个报 文标识。
16、 根据权利要求 14或 15所述的网络设备, 其特征在于,
在所述基于所述 P个报文确定所述 P个报文对应的流队列标识的方面,所述 信息,基于所述 P个报文包含的报文特征信息进行查表操作以获得所述 P个报文 对应匹配表项,所述 P个报文对应匹配表项中包含所述 P个报文对应的流队列标 识;
其中, 在所述基于所述 Q个报文确定所述 Q个报文对应的流队列标识的方 面, 所述分发器 y具体用于, 通过解析所述 Q个报文以获取所述 Q个报文包含的 报文特征信息, 基于获取的所述 Q个报文报文包含的报文特征信息进行查表操 作以获得所述 Q个报文对应匹配表项, 其中, 所述 Q个报文对应匹配表项中包 含所述 Q个报文对应流队列标识。
17、 根据权利要求 16所述的网络设备, 其特征在于, 所述 P个报文对应匹 配表项中还包含所述 P个报文所属业务流的流标识; 所述 Q个报文对应匹配表 项中还包含所述 Q个报文所属业务流的流标识。
18、 根据权利要求 17所述的网络设备, 其特征在于, 所述报文 i对应的报 文描述信息还包括所述报文 i所属业务流的流标识; 其中, 所述 Si个网络业务处 理单元具体用于, 基于分发到流队列中的所述 P个报文对应的报文描述信息中 包含的所述 P个报文的报文标识获取所述 P个报文;基于分发到流队列中的所述 P个报文对应的报文描述信息中包含的所述 P个报文所属业务流的流标识,获取 所述 P个报文所属业务流的流上下文;基于获取到的所述 P个报文所属业务流的 流上下文, 处理获取到的所述 P个报文并发送所述处理后的 P个报文;
其中, 所述报文 m对应的报文描述信息还包括所述报文 m所属业务流的流 标识; 所述 Sj个网络业务处理单元具体用于, 基于分发到流队列中的所述 Q个 报文对应的报文描述信息中包含的所述 Q个报文的报文标识获取所述 Q个报 文; 基于分发到流队列中的所述 Q个报文对应的报文描述信息中包含的所述 Q 个报文所属业务流的流标识, 获取所述 Q个报文所属业务流的流上下文; 基于 获取到的所述 Q个报文所属业务流的流上下文, 处理获取到的所述 Q个报文并 发送处理后的所述 Q个报文。
19、 根据权利要求 14至 18任一项所述的网络设备, 其特征在于, 在所述向确定出的所述 P个报文对应的流队列标识所标识的流队列分发所 述 P个报文对应的报文描述信息的方面,所述分发器 X具体用于, 当监测到所述 分发器 X的编号与轮候令牌的当前的第一取值匹配时,向确定出的所述 P个报文 对应的流队列标识所标识的流队列分发所述 P个报文对应的报文描述信息; 所述分发器 X还用于, 按照预设策略将所述轮候令牌的当前的第一取值更 新为第二取值;
其中, 在所述向确定出的所述 P个报文对应的流队列标识对应的流队列分 发所述 P个报文对应的报文描述信息之后, 所述分发器 y向确定出的所述 Q个报 文对应的流队列标识所对应的流队列分发所述 Q个报文对应的报文描述信息 的方面, 所述分发器 y具体用于,在监测所述分发器 y的编号与所述轮候令牌的 当前的第二取值匹配时, 向确定出的所述 Q个才艮文对应的流队列标识所标识的 流队列分发所述 Q个报文对应的报文描述信息;
其中, 所述分发器 y还用于, 按照所述预设策略对所述轮候令牌的当前的 第二取值进行更新; 其中, 所述第二取值大于所述第一取值, 或者所述第二取 值小于所述第一取值。
20、 根据权利要求 14至 19任一项所述的网络设备, 其特征在于, 所述 P个报文还包括报文 j, 所述报文 j对应的报文描述信息被所述分发器 X 分发到了确定出的所述报文 j对应的流队列标识对应的流队列中, 所述报文 j对 应的报文描述信息包含所述报文 j的报文标识; 所述报文 j入队到所述网卡接收 队列中的队列区域 a的时间晚于所述报文 i入队到所述网卡接收队列中的队列 区域 a的时间; 所述报文 j对应的报文描述信息被所述分发器 X分发到确定出的 所述 文 j对应的流队列标识对应的流队列中的时间, 晚于所述 ^艮文 i对应的才艮 文描述信息被所述分发器 X分发到确定出的所述报文 j对应的流队列标识对应 的流队列中的时间; 所述 Si个网络业务处理单元基于分发到流队列中的所述报 文 j对应的报文描述信息处理所述报文 j的时间, 晚于所述 Si个网络业务处理单 元基于分发到流队列中的所述报文 i对应的报文描述信息处理所述报文 i的时 间;
所述 Q个报文还包括报文 n, 所述报文 n对应的报文描述信息被所述分发器 y分发到了确定出的所述报文 n对应的流队列标识对应的流队列中, 所述报文 n 对应的报文描述信息包含所述报文 n的报文标识;所述报文 n入队到所述网卡接 列区域 b的时间; 所述报文 n对应的报文描述信息被所述分发器 y分发到确定出 的所述 ^艮文 n对应的流队列标识对应的流队列中的时间, 晚于所述 ^艮文 m对应 的报文描述信息被所述分发器 y分发到确定出的所述报文 m对应的流队列标识 对应的流队列中的时间; 其中, 所述 Sj个网络业务处理单元基于分发到流队列 中的所述报文 n对应的报文描述信息处理所述报文 n的时间, 晚于所述 Sj个网络 业务处理单元基于分发到流队列中的所述报文 m对应的报文描述信息处理所 述报文 m的时间。
PCT/CN2014/082171 2014-07-14 2014-07-14 应用于网络设备的处理报文的方法和相关设备 WO2016008079A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
PCT/CN2014/082171 WO2016008079A1 (zh) 2014-07-14 2014-07-14 应用于网络设备的处理报文的方法和相关设备
CN201480079047.XA CN106464605B (zh) 2014-07-14 2014-07-14 应用于网络设备的处理报文的方法和相关设备
EP14897751.5A EP3163818B1 (en) 2014-07-14 2014-07-14 Packet processing method and related device for network device
TW104122748A TWI669932B (zh) 2014-07-14 2015-07-14 Message processing method applied to network device, device thereof and network device
US15/407,031 US10116773B2 (en) 2014-07-14 2017-01-16 Packet processing method and related device that are applied to network device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/082171 WO2016008079A1 (zh) 2014-07-14 2014-07-14 应用于网络设备的处理报文的方法和相关设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/407,031 Continuation US10116773B2 (en) 2014-07-14 2017-01-16 Packet processing method and related device that are applied to network device

Publications (1)

Publication Number Publication Date
WO2016008079A1 true WO2016008079A1 (zh) 2016-01-21

Family

ID=55077790

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/082171 WO2016008079A1 (zh) 2014-07-14 2014-07-14 应用于网络设备的处理报文的方法和相关设备

Country Status (5)

Country Link
US (1) US10116773B2 (zh)
EP (1) EP3163818B1 (zh)
CN (1) CN106464605B (zh)
TW (1) TWI669932B (zh)
WO (1) WO2016008079A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180234535A1 (en) * 2017-02-10 2018-08-16 Mediatek Inc. Method and apparatus for communication
CN109218395B (zh) * 2018-08-01 2020-05-12 阿里巴巴集团控股有限公司 缓存页面的分类、获取方法及装置和电子设备
CN113067741B (zh) * 2020-01-02 2022-11-29 中国移动通信有限公司研究院 一种信息处理方法、装置、终端及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996958A (zh) * 2006-12-30 2007-07-11 华为技术有限公司 保证报文顺序的方法和装置
CN101616083A (zh) * 2009-08-06 2009-12-30 杭州华三通信技术有限公司 一种报文转发方法和装置
US20110040706A1 (en) * 2009-08-11 2011-02-17 At&T Intellectual Property I, Lp Scalable traffic classifier and classifier training system
CN103491190A (zh) * 2013-09-30 2014-01-01 国家电网公司 一种面向大规模实时并发的充电机监控数据处理方法

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2279728A1 (en) * 1999-08-06 2001-02-06 Spacebridge Networks Corporation Soft, prioritized early packet discard (spepd) system
US6891834B1 (en) * 1999-09-09 2005-05-10 Avici Systems Apparatus and method for packet scheduling
JP3584859B2 (ja) * 2000-06-29 2004-11-04 日本電気株式会社 パケットスケジューリング装置
US6904057B2 (en) * 2001-05-04 2005-06-07 Slt Logic Llc Method and apparatus for providing multi-protocol, multi-stage, real-time frame classification
US7586909B1 (en) * 2002-03-06 2009-09-08 Agere Systems Inc. Striping algorithm for switching fabric
JP2003318964A (ja) * 2002-04-25 2003-11-07 Fujitsu Ltd パケット転送装置、スケジューラ、データ伝送装置、およびパケット転送方法
US6907453B2 (en) * 2002-09-18 2005-06-14 Broadcom Corporation Per CoS memory partitioning
GB0229647D0 (en) 2002-12-19 2003-01-22 Zarlink Semiconductor Ltd Packet classifer
US7848236B2 (en) * 2004-08-10 2010-12-07 Nokia Corporation Differentiation of quality classes to different PDUs with support for multiple terminals
TW200822633A (en) * 2006-11-03 2008-05-16 Hon Hai Prec Ind Co Ltd Network device and packet forwarding method thereof
US7813337B2 (en) * 2007-01-19 2010-10-12 Broadcom Corporation Network packet processing using multi-stage classification
JP4753909B2 (ja) * 2007-04-12 2011-08-24 アラクサラネットワークス株式会社 トラヒックシェーピング回路、端末装置及びネットワークノード
CN101286936B (zh) 2008-05-16 2010-10-27 成都市华为赛门铁克科技有限公司 数据报文的处理方法及装置
US7864764B1 (en) * 2008-09-16 2011-01-04 Juniper Networks, Inc. Accelerated packet processing in a network acceleration device
CN102023844B (zh) * 2009-09-18 2014-04-09 深圳中微电科技有限公司 并行处理器及其线程处理方法
TWI466500B (zh) * 2010-02-03 2014-12-21 Hon Hai Prec Ind Co Ltd 封包轉發設備及其平衡負載的方法
US9065773B2 (en) * 2010-06-22 2015-06-23 Juniper Networks, Inc. Methods and apparatus for virtual channel flow control associated with a switch fabric
JP4878397B2 (ja) * 2010-07-14 2012-02-15 株式会社野村総合研究所 情報処理システムおよび情報処理方法
JP5498889B2 (ja) * 2010-08-06 2014-05-21 アラクサラネットワークス株式会社 パケット中継装置および輻輳制御方法
CN102624611B (zh) 2011-12-31 2015-01-21 华为数字技术(成都)有限公司 报文分流方法、装置、处理器和网络设备
CN103685321B (zh) * 2013-12-31 2016-09-14 北京神州绿盟信息安全科技股份有限公司 数据包转发和安全防护检测系统、负载均衡方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996958A (zh) * 2006-12-30 2007-07-11 华为技术有限公司 保证报文顺序的方法和装置
CN101616083A (zh) * 2009-08-06 2009-12-30 杭州华三通信技术有限公司 一种报文转发方法和装置
US20110040706A1 (en) * 2009-08-11 2011-02-17 At&T Intellectual Property I, Lp Scalable traffic classifier and classifier training system
CN103491190A (zh) * 2013-09-30 2014-01-01 国家电网公司 一种面向大规模实时并发的充电机监控数据处理方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3163818A4 *

Also Published As

Publication number Publication date
EP3163818B1 (en) 2018-10-24
TW201607281A (zh) 2016-02-16
EP3163818A4 (en) 2017-07-26
TWI669932B (zh) 2019-08-21
CN106464605A (zh) 2017-02-22
CN106464605B (zh) 2019-11-29
US20170126855A1 (en) 2017-05-04
US10116773B2 (en) 2018-10-30
EP3163818A1 (en) 2017-05-03

Similar Documents

Publication Publication Date Title
US9203734B2 (en) Optimized bi-directional communication in an information centric network
US8954992B2 (en) Distributed and scaled-out network switch and packet processing
US8913613B2 (en) Method and system for classification and management of inter-blade network traffic in a blade server
US9602428B2 (en) Method and apparatus for locality sensitive hash-based load balancing
JP6523316B2 (ja) ミドルウェアおよびアプリケーションの実行のための設計されたシステムに対するサービス妨害(dos:denial of service)攻撃を防止するためのシステムおよび方法、ならびに、ミドルウェアおよびアプリケーションの実行のための設計されたシステムにおいてサブネットアドミニストレータ(sa:subnet administrator)アクセスに基づいて信頼性のある接続(rc:reliable connection)をサポートするためのシステムおよび方法
WO2015149624A1 (zh) 业务链路选择控制方法以及设备
WO2020043107A1 (zh) 报文处理的方法、装置及相关设备
US10484279B2 (en) Executing multiple virtual private network (VPN) endpoints associated with an endpoint pool address
WO2015180040A1 (zh) 流表管理方法及相关设备和系统
EP3278513A1 (en) Transforming a service packet from a first domain to a second domain
US20210399908A1 (en) Multicast routing
WO2018068588A1 (zh) 提供组播业务的方法和软件定义网络控制器
WO2016029345A1 (zh) 网络流的信息统计方法和装置
WO2013178099A1 (zh) 一种实现远程桌面的系统、方法、客户端和服务中心
JP6858328B2 (ja) パーソナルユーザデバイスおよびデータ分配デバイスを用いたストレージシステムの実現
WO2019047939A1 (zh) 一种负载均衡方法、装置及业务编排器
WO2016008079A1 (zh) 应用于网络设备的处理报文的方法和相关设备
Hyun et al. A VoLTE traffic classification method in LTE network
CN107249038A (zh) 业务数据转发方法及系统
CN110391919A (zh) 组播流量转发方法、装置、电子设备
CN102355358B (zh) 一种组播实现的方法和设备
US9258254B2 (en) Virtual router and switch
WO2015180113A1 (zh) 一种网络地址转换方法及装置
CN109756412A (zh) 一种数据报文转发方法以及设备
WO2017157127A1 (zh) 访问记录回传方法、设备和系统

Legal Events

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

Ref document number: 14897751

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2014897751

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014897751

Country of ref document: EP