WO2017041509A1 - Procédé et dispositif d'échantillonnage de paquet basés sur de multiples unités de traitement - Google Patents

Procédé et dispositif d'échantillonnage de paquet basés sur de multiples unités de traitement Download PDF

Info

Publication number
WO2017041509A1
WO2017041509A1 PCT/CN2016/082356 CN2016082356W WO2017041509A1 WO 2017041509 A1 WO2017041509 A1 WO 2017041509A1 CN 2016082356 W CN2016082356 W CN 2016082356W WO 2017041509 A1 WO2017041509 A1 WO 2017041509A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
processing unit
processing
sampling
sampled
Prior art date
Application number
PCT/CN2016/082356
Other languages
English (en)
Chinese (zh)
Inventor
赵佳博
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017041509A1 publication Critical patent/WO2017041509A1/fr

Links

Images

Definitions

  • This document relates to, but is not limited to, the field of communications, and relates to a message sampling method and apparatus based on multiple processing units.
  • IP Internet Protocol layer packet sampling
  • IPFLOW IP (Internet Protocol) layer packet sampling
  • the processing unit is developed from a single to multiple processing units, and the processing units form a shared processing relationship.
  • the current practice is to use a single sharing algorithm to share the processed traffic to each processing unit, but the IPFLOW-related collection is divided into key segments and non-key segments, which will make the same processor perform the key.
  • the collection of fields will collect non-key fields, and the corresponding aggregation stream will also be formed for non-keywords, which will increase the processing capacity of the processing unit, reduce the processing efficiency of the processing unit, and result in the processing efficiency loss of the processing unit. .
  • the embodiment of the invention provides a packet sampling method and device based on multiple processing units, which solves the problem of processing efficiency loss in the multi-processing unit sharing processing.
  • An embodiment of the present invention provides a packet sampling method based on multiple processing units, including:
  • the to-be-sampled message is allocated to the key processing unit for packet sampling processing.
  • the key field includes at least one of a source address, a destination address, a source port number, a destination port number, a protocol type, a service type, and an incoming logical interface identifier.
  • the allocating the to-be-sampling message to the key processing unit for packet sampling processing includes:
  • All the packets to be sampled with the same key segment to be extracted are allocated to the same key processing unit for packet sampling processing;
  • the packets to be sampled that have the key segment to be extracted are equally distributed to each key processing unit for packet sampling processing.
  • the allocating the to-be-sampled message with the same key segment to be extracted to the same key processing unit for performing the packet sampling process includes: when the number of the key segments is less than or equal to the number of the key processing units A key processing unit is selected for each key field, and the to-be-sampling message corresponding to each key field is allocated to the key processing unit corresponding to the key field to perform packet sampling processing.
  • the allocating the to-be-sampling message with the same key segment to be extracted to the same key processing unit for the packet sampling process includes: when the number of the key segment is greater than the number of the key processing unit, The packets to be sampled corresponding to the multiple key fields are allocated to the same key processing unit for packet sampling processing.
  • the key processing unit includes a multi-core; the allocating the to-be-sampled message corresponding to the multiple key segments to the same key processing unit for packet sampling processing includes:
  • All the packets to be sampled with the same key segment to be extracted are allocated to the same kernel for packet sampling processing;
  • the packets to be sampled that have the key segment to be extracted are equally distributed to each core for packet sampling processing.
  • the method further includes: selecting at least one processing unit from the plurality of processing units as the non-critical processing unit; when it is determined that there is no at least one key segment to be extracted in the to-be-sampled message, there is no need
  • the to-be-sampled message of the extracted key segment is allocated to the non-critical processing list
  • the element performs packet sampling processing.
  • the embodiment of the invention further provides a message sampling device based on a multi-processing unit, comprising a selection module, a determination module and a sampling module:
  • the selection module is configured to select at least one processing unit from the plurality of processing units as a key processing unit;
  • the determining module is configured to determine whether there is at least one key segment that needs to be extracted in the to-be-sampling message
  • the sampling module is configured to allocate the to-be-sampling message to the key processing unit for packet sampling processing if there is at least one key segment that needs to be extracted in the to-be-sampled message.
  • the sampling module is configured to: allocate the to-be-sampled message to the key processing unit to perform packet sampling processing:
  • All the packets to be sampled with the same key segment to be extracted are allocated to the same key processing unit for packet sampling processing;
  • the packets to be sampled that have the key segment to be extracted are equally distributed to each key processing unit for packet sampling processing.
  • the sampling module is configured to allocate the to-be-sampled message with the same key segment to be extracted to the same key processing unit for packet sampling processing: when the number of keywords is less than or equal to the key processing For the number of cells, a key processing unit is selected for each key segment, and the packet to be sampled corresponding to each key segment is allocated to the key processing unit corresponding to the key segment for packet sampling processing.
  • the sampling module is configured to allocate the to-be-sampled message with the same key segment to be extracted to the same key processing unit for packet sampling processing: when the number of keywords is greater than the key processing unit The number of samples to be sampled of the same key segment is allocated to the same key processing unit for packet sampling processing.
  • the key processing unit includes a multi-core; the sampling module is configured to allocate a plurality of packets of the same key segment to be sampled to the same key processing unit for message collection.
  • All the packets to be sampled with the same key segment to be extracted are allocated to the same kernel for packet sampling processing;
  • the packets to be sampled that have the key segment to be extracted are equally distributed to each core for packet sampling processing.
  • the selecting module is further configured to select at least one processing unit from the plurality of processing units as the non-critical processing unit;
  • the sampling module is further configured to: when determining that there is no at least one key that needs to be extracted in the to-be-sampled message In the case of the field, the to-be-sampled message of the key segment that does not need to be extracted is allocated to the non-critical processing unit for packet sampling.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer executable instructions, and when the computer executable instructions are executed, implements a multi-processing unit based message sampling method.
  • the multi-processing unit-based message sampling method and apparatus provided by the embodiment of the present invention firstly select at least one processing unit from a plurality of processing units as a key processing unit; and then determine whether at least one of the to-be-sampled messages needs to be extracted. Key segment; Finally, if present, the message to be sampled is assigned to the key processing unit for packet sampling processing. Compared with the related art, before the packet sampling, the sampled message is judged. If there is a key field, the designated key processing unit performs sampling processing, so that the key processing unit can only target the keyword. The segment is sampled, and the non-key segment can be sampled, which can improve the processing efficiency of the key segment and avoid the problem of processing the non-key segment causing loss of processing efficiency of the key processing unit.
  • FIG. 1 is a flowchart of a packet sampling method based on multiple processing units according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart of a packet sampling method based on multiple processing units according to Embodiment 2 of the present invention
  • FIG. 3 is a schematic structural diagram of a message sampling apparatus based on multiple processing units according to Embodiment 3 of the present invention; intention.
  • the multi-processing unit-based packet sampling method of the embodiment of the present application is as shown in FIG. 1 , and the method includes:
  • Step S101 selecting at least one processing unit from a plurality of processing units as a key processing unit;
  • the message sampling process of the key segment is mainly performed in order to select a processing unit from a plurality of processing units. For example, if there are three processing units, then one of them can be selected as the key processing unit, or two of them can be selected as the key processing unit.
  • Step S102 determining whether there is at least one key segment to be extracted in the to-be-sampling message
  • a preliminary identification process is performed on each packet to be sampled to see whether there is a key segment to be extracted, where the key field refers to a field that requires special attention, and optionally, some identification fields. And may include at least one of a source address, a destination address, a source port number, a destination port number, a protocol type, a service type, and an incoming logical interface identifier. For example, 1000 packets are sampled, and the target address A and/or the source address B are used as key fields to determine whether there are target addresses A and/or source addresses B among the 1000 messages.
  • Step S103 If there is at least one key segment to be extracted in the to-be-sampling message, the to-be-sampled message is allocated to the key processing unit for packet sampling processing.
  • a message having at least one key field to be extracted is allocated to the above-mentioned designated key processing unit for processing.
  • the key segments in the 4 to-be-sampling messages are the destination addresses A and 6.
  • the key segment existing in the to-be-sampling message is the source address B, and then the 10 samples to be sampled are allocated to the key processing unit for packet sampling processing.
  • the process of the message to be sampled to the key processing unit for the message sampling process includes: allocating the to-be-sampled message with the same key segment to be extracted to the same key processing unit for packet sampling processing; or The packets to be sampled that have the key segment to be extracted are equally distributed to each key processing unit for packet sampling processing.
  • processing unit 1 there are three processing units, such as the processing unit 1, the processing unit 2, and the processing unit 3; two of the processing units are designated as key processing units, for example, the processing unit 1 and the processing unit 2 are defined as Key processing unit.
  • the 10 samples to be sampled that need to be extracted are allocated to the two processing units for packet sampling processing.
  • the processing unit 1 and the processing unit respectively process 5 to-be-sampled messages, or the processing unit 1 processes 4 packets, that is, the key that needs to be extracted is processed.
  • the field is the to-be-sampling message of the target address A, and the processing unit 2 processes the six packets, that is, the message to be sampled with the key segment to be extracted as the source address B; or only one of the key processing units
  • the packet sampling process is performed, that is, the processing unit 1 performs packet sampling processing on the 10 to-be-sampling messages, or the processing unit 2 performs packet sampling processing on the 10 to-be-sampled messages.
  • the allocation method is not limited to the above, and other allocation methods can also be used.
  • the above technical solution allows each of the key processing units to specifically process the packet sampling of a key segment, so that a single aggregated stream can be formed well without superimposing the subsequent aggregated streams.
  • allocating the to-be-sampled message with the same key segment to be extracted to the same key processing unit for packet sampling processing includes: when the number of key segments is less than or equal to the number of key processing units, A key processing unit is selected for each key field, and the to-be-sampling message corresponding to each key field is allocated to the key processing unit corresponding to the key field to perform packet sampling processing. That is to say, when the number of key processing units is greater than or equal to the number of key fields, in order to improve the processing efficiency, and to eliminate the subsequent aggregation of the aggregation streams, each key processing unit performs a keyword separately. The processing of the stream of segments.
  • the number of key processing units is two, and the number of key fields is two, that is, the number of key fields is equal to the number of key processing units.
  • the processing unit 1 processes the to-be-sampled message with the key segment as the target address A, that is, the processing unit 1 processes the four to-be-sampling messages; the processing unit 2 processes the to-be-sampled message whose source segment is the source address B, that is, processes 6 Packet to be sampled.
  • the processing unit 1 can separately form the target address A aggregation stream, and the processing unit 2 can be separately The source address B aggregation stream is formed, so that the superposition of the target address A aggregation stream and the superposition of the source address B aggregation stream can be avoided.
  • allocating the to-be-sampled message with the same key segment to be extracted to the same key processing unit for packet sampling processing includes: when the number of key segments is greater than the number of key processing units, multiple The packets to be sampled in the key segment are allocated to the same key processing unit for packet sampling processing. That is to say, when the number of key processing units is less than the number of key fields, the key processing unit must bear the packet sampling processing corresponding to multiple key fields.
  • the processing unit 1 can process the to-be-sampled message corresponding to the target address A and the to-be-sampled message corresponding to the target address C, that is, process 8 to-be-sampled messages; and the processing unit 2 processes the key segment as the source.
  • the packet to be sampled at address B that is, the six packets to be sampled.
  • the processing unit 1 processes four messages, that is, processes the message whose key field is the target address A, and the processing unit 2 processes 10 messages, that is, the message with the key segment being the source address B and the target address C.
  • the allocation method can be flexibly allocated according to specific situations.
  • the key processing unit includes a multi-core; and the plurality of the same key segment to be sampled to be allocated to the same key processing unit for packet sampling processing includes: there are keywords that need to be extracted
  • the packets to be sampled in the same segment are allocated to the same core for packet sampling processing; or the packets to be sampled in the key segment that need to be extracted are evenly distributed to each core for packet sampling processing. That is, the packet sampling processing of each key segment is allocated to the lowest processing object, so that it is possible to quickly know who is doing what processing, so that it is possible to quickly and accurately know where the specific aggregation stream is in the later use.
  • the processing unit 1 is a dual core. It is worth noting that the processing unit herein may be a processor. If the processing unit 1 processes 8 packets, that is, the processing target segment is the to-be-sampled message corresponding to the target address A and the to-be-sampled message corresponding to the target address C, then one of the cores can process the target address A corresponding to the sample to be sampled. In the message, another core processes the packet to be sampled corresponding to the destination address C. It should be noted that the allocation may be determined according to the specific situation.
  • the multi-processing unit-based packet sampling method in this embodiment further includes: selecting at least one processing unit from the plurality of processing units as the non-critical processing unit; and determining that there is no extraction required in the to-be-sampled message.
  • the to-be-sampled message of the key segment that does not need to be extracted is allocated to the non-critical processing unit for packet sampling processing. That is, the non-critical processing unit specified therein is exclusively used for the processing of the non-key field, and optionally, a processing unit can be specified to perform the processing of the non-key field, so that more processing units can perform keywords.
  • the adoption of the segment improves the sampling efficiency of the processing unit.
  • An embodiment of the present application provides a packet sampling method based on multiple processing units. As shown in FIG. 2, the method includes:
  • Step S201 The user sets the IPFLOW related configuration through the network management or OAM (Operation Administration and Maintenance) interface in the network deployment.
  • OAM Operaation Administration and Maintenance
  • the configuration includes a key segment that requires special attention in the packets in the sampling template, for example, a match item is configured.
  • the configuration includes non-key fields that need attention but are not important in the packets in the sampling template, for example, configuring collect. Item; configure the output items in the sampling, that is, configure the output address, output the template parameters; configure the management items in the sampling, that is, the collection template, the output item; configure the sampling rate in the sampling, for example, the default is 1000:1, that is, 1000 reports Collect one in the text; configure the interface binding in the sampling, that is, bind the corresponding interface for traffic collection.
  • Step S202 The traffic is distributed to each processing unit according to the key field in the template.
  • the key fields in the template are obtained, and it is determined whether the processing unit is multiple, if not multiple, only sent to a single processing unit; if there are multiple, the foregoing multi-processing unit based message sampling
  • the method is processed. Determine whether the number of sharing stages is single. If it is a single, directly process the key values by key fields. Otherwise, divide the number according to the number of stages, and divide the key values into several levels to process the key values for processing.
  • the microcode query key values are shared. Processing, the microcode query here performs preliminary identification of the key segment for the sampled message, and then searches for the corresponding processing unit.
  • the key value composed of the key fields herein refers to the correspondence between the key fields and the specific processing unit, that is, which processing unit is processed, and if the processing unit is a multi-core processing unit, the key value is The correspondence between the key field and the corresponding kernel.
  • Step S203 The processing unit performs packet sampling.
  • the processing unit extracts a required field for the message to form a required CFLOW message to be sent.
  • the embodiment provides a message sampling device 30 based on multiple processing units.
  • the method includes a selection module 301, a determination module 302, and a sampling module 303.
  • the selection module 301 is configured to select at least one of the plurality of processing units.
  • the processing unit is configured as a key processing unit;
  • the determining module 302 is configured to determine whether there is at least one key field to be extracted in the to-be-sampled message;
  • the sampling module 303 is configured to: if there is at least one keyword that needs to be extracted in the to-be-sampled message In the segment, the message to be sampled is allocated to the key processing unit for packet sampling processing.
  • the sampling module 303 allocates the to-be-sampled message to the key processing unit to perform packet sampling processing: allocating the to-be-sampled message with the same key segment to be extracted to the same key processing.
  • the unit performs packet sampling processing; or evenly distributes the to-be-sampled messages that have the key segments to be extracted to each key processing unit for packet sampling processing.
  • the sampling module 303 further implements, by using the following manner, that the to-be-sampled message with the same key segment to be extracted is allocated to the same key processing unit for packet sampling processing: when the number of keywords is less than or equal to the key processing For the number of cells, a key processing unit is selected for each key segment, and the packet to be sampled corresponding to each key segment is allocated to the key processing unit corresponding to the key segment for packet sampling processing.
  • the sampling module 303 is configured to allocate the to-be-sampled message with the same key segment to be extracted to the same key processing unit for packet sampling processing: when the number of keywords is greater than that of the key processing unit The number of samples to be sampled in the same key segment is allocated to the same key processing unit for packet sampling processing.
  • the key processing unit includes a multi-core: the sampling module allocates multiple to-be-sampling messages of the same key segment to the same key processing unit for packet sampling processing in the following manner: there is a key segment that needs to be extracted.
  • the same sample to be sampled is allocated to the same core for packet sampling processing; or the to-be-sampled message with the key segment to be extracted is evenly distributed to each core for packet sampling processing.
  • the selecting module 301 is further configured to select at least one processing unit from the plurality of processing units as the non-critical processing unit; the sampling module 303 is further configured to: when determining that there is no at least one key segment to be extracted in the to-be-sampled message When the message to be sampled that does not need to be extracted is allocated to the non-critical processing unit for packet sampling processing.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer executable instructions, and when the computer executable instructions are executed, implements a multi-processing unit based message sampling method.
  • each module/unit in the above embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program stored in the memory by a processor. / instruction to achieve its corresponding function.
  • This application is not limited to any specific combination of hardware and software.
  • the foregoing technical solution can improve the processing efficiency of the key field, and avoid the problem of processing efficiency loss of the key processing unit caused by processing the non-key field.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

L'invention concerne un procédé d'échantillonnage de paquet basé sur de multiples unités de traitement qui comprend les étapes consistant à : sélectionner au moins une unité de traitement parmi de multiples unités de traitement en tant qu'unité de traitement clé ; déterminer si un paquet à échantillonner contient au moins un champ clé qui doit être extrait ; et si tel est le cas, alors répartir le paquet à échantillonner vers l'unité de traitement clé pour un traitement d'échantillonnage de paquet. Par rapport à l'état de l'art antérieur, le fait qu'un paquet à échantillonner contient un champ clé est déterminé avant d'effectuer un échantillonnage de paquet, et un paquet contenant le champ clé est échantillonné par l'intermédiaire d'une unité de traitement clé spécifiée dans la présente invention. De cette manière, la solution technique ci-dessus peut améliorer l'efficacité du traitement du champ clé par un échantillonnage ciblé uniquement sur le champ clé en utilisant l'unité de traitement clé, ce qui empêche ainsi une dégradation de l'efficacité de traitement de l'unité de traitement clé en raison d'un traitement de champs non-clés.
PCT/CN2016/082356 2015-09-07 2016-05-17 Procédé et dispositif d'échantillonnage de paquet basés sur de multiples unités de traitement WO2017041509A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510566123.6 2015-09-07
CN201510566123.6A CN106506351A (zh) 2015-09-07 2015-09-07 一种基于多处理单元的报文采样方法和装置

Publications (1)

Publication Number Publication Date
WO2017041509A1 true WO2017041509A1 (fr) 2017-03-16

Family

ID=58239119

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/082356 WO2017041509A1 (fr) 2015-09-07 2016-05-17 Procédé et dispositif d'échantillonnage de paquet basés sur de multiples unités de traitement

Country Status (2)

Country Link
CN (1) CN106506351A (fr)
WO (1) WO2017041509A1 (fr)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327445B (zh) * 2018-12-17 2023-09-12 中兴通讯股份有限公司 报文采样方法及解封装方法、节点、系统及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1964322A (zh) * 2006-11-24 2007-05-16 南京大学 一种基于np和bs的千兆nids并行处理的方法
CN101610209A (zh) * 2008-11-28 2009-12-23 北京网康科技有限公司 一种多核并行的网络业务流处理方法及设备
US20110078249A1 (en) * 2009-09-28 2011-03-31 International Business Machines Corporation Shared address collectives using counter mechanisms
CN102497297A (zh) * 2011-12-13 2012-06-13 曙光信息产业(北京)有限公司 基于多核多线程的深度报文检测技术的实现系统和方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141390A (zh) * 2007-07-17 2008-03-12 武汉烽火网络有限责任公司 一种新型自定义以太网带外数据包过滤的方法及装置
CN103957157B (zh) * 2014-03-25 2017-03-22 中国人民解放军国防科学技术大学 一种网络接口可定义转发规则的路由方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1964322A (zh) * 2006-11-24 2007-05-16 南京大学 一种基于np和bs的千兆nids并行处理的方法
CN101610209A (zh) * 2008-11-28 2009-12-23 北京网康科技有限公司 一种多核并行的网络业务流处理方法及设备
US20110078249A1 (en) * 2009-09-28 2011-03-31 International Business Machines Corporation Shared address collectives using counter mechanisms
CN102497297A (zh) * 2011-12-13 2012-06-13 曙光信息产业(北京)有限公司 基于多核多线程的深度报文检测技术的实现系统和方法

Also Published As

Publication number Publication date
CN106506351A (zh) 2017-03-15

Similar Documents

Publication Publication Date Title
US10652155B2 (en) Universal cloud classification [UCC]as a service
TWI430102B (zh) 網路卡資源配置方法、儲存媒體、及電腦
US10110671B2 (en) Method, system, and device for managing server hardware resources in a cloud scheduling environment
CN107079060B (zh) 用于运营商级nat优化的系统和方法
JP7085565B2 (ja) 分離されたネットワークスタックにわたるインテリジェントなスレッド管理
EP3079313B1 (fr) Procédé de séparation de données, et séparateur
WO2019042110A1 (fr) Procédé de publication d'abonnement, et serveur
US20190306231A1 (en) Container cluster management
US9910687B2 (en) Data flow affinity for heterogenous virtual machines
US11848981B2 (en) Secure multi-directional data pipeline for data distribution systems
JP2017194979A (ja) 仮想クラウドインフラストラクチャへの仮想セキュリティ装置アーキテクチャの提供
US20190196875A1 (en) Method, system and computer program product for processing computing task
US9009782B2 (en) Steering traffic among multiple network services using a centralized dispatcher
US10212083B2 (en) Openflow data channel and control channel separation
US11108687B1 (en) Scalable network function virtualization service
US20220210005A1 (en) Synchronizing communication channel state information for high flow availability
US20230370421A1 (en) Scaling ip addresses in overlay networks
US10423433B2 (en) Scoped network address pool management
WO2017041509A1 (fr) Procédé et dispositif d'échantillonnage de paquet basés sur de multiples unités de traitement
US10791088B1 (en) Methods for disaggregating subscribers via DHCP address translation and devices thereof
CN112714903A (zh) 使用客户端提供的决策元数据的基于可缩放小区的包处理服务
US10855612B2 (en) Suppressing broadcasts in cloud environments
US9762661B1 (en) Managing networks in a virtualization system
US11916741B1 (en) Discovery of application relationships in clusters
JP6923510B2 (ja) サーバオンチップにおけるフロー・ピンニング

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16843447

Country of ref document: EP

Kind code of ref document: A1