CN116264550A - Resource slice processing method and device, storage medium and electronic device - Google Patents

Resource slice processing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN116264550A
CN116264550A CN202111538993.4A CN202111538993A CN116264550A CN 116264550 A CN116264550 A CN 116264550A CN 202111538993 A CN202111538993 A CN 202111538993A CN 116264550 A CN116264550 A CN 116264550A
Authority
CN
China
Prior art keywords
resource
target
resources
programmable
type
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202111538993.4A
Other languages
Chinese (zh)
Inventor
涂晓平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN202111538993.4A priority Critical patent/CN116264550A/en
Publication of CN116264550A publication Critical patent/CN116264550A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses a resource slice processing method and device, a storage medium and an electronic device, wherein the method comprises the following steps: receiving a slicing request, wherein the slicing request is used for requesting slicing processing of a target programmable resource of a target programmable chip; and slicing the target programmable resource according to the resource type and the resource quantity of the programmable resource requested by the slicing request to obtain the programmable resource of the target slice, wherein the non-reusable programmable resources in the programmable resources of different slices of the target programmable chip are different from each other. According to the method and the device, the problem that the response capability of the slicing network to the demands is low because different slicing networks cannot be completely independent in the network slicing mode in the related technology is solved.

Description

Resource slice processing method and device, storage medium and electronic device
Technical Field
The embodiment of the application relates to the field of communication, in particular to a method and a device for processing slices of resources, a storage medium and an electronic device.
Background
With the advent of novel network technologies such as SDN (Software Defined Network, software defined networking) and network virtualization, and application scenarios of 5G (5 th Generation Mobile Communication Technology, fifth generation mobile communication technology), conventional network devices cannot quickly adapt to new demands continuously emerging by users.
In the 5G age, operators can realize the needs of a logical private network through network slicing. However, in the network slicing mode of the target, the service of each slice cannot be programmed independently, and different slicing networks cannot be completely independent, so that the problem of low response capability of the slicing network to the requirement is caused.
Disclosure of Invention
The embodiment of the application provides a resource slicing processing method and device, a storage medium and an electronic device, which at least solve the problem that the response capability of a slicing network to demands is low because different slicing networks cannot realize complete independence in a network slicing mode in the related technology.
According to an embodiment of the present application, there is provided a slice processing method of a resource, including: receiving a slicing request, wherein the slicing request is used for requesting slicing processing of a target programmable resource of a target programmable chip; and slicing the target programmable resource according to the resource type and the resource quantity of the programmable resource requested by the slicing request to obtain the programmable resource of the target slice, wherein the non-reusable programmable resources in the programmable resources of different slices of the target programmable chip are different from each other.
According to another embodiment of the present application, there is also provided a slice processing apparatus of a resource, including: the first receiving unit is used for receiving a slicing request, wherein the slicing request is used for requesting slicing processing of target programmable resources of a target programmable chip; and the processing unit is used for slicing the target programmable resources according to the resource type and the resource quantity of the programmable resources requested by the slicing request to obtain the programmable resources of the target slices, wherein the non-reusable programmable resources in the programmable resources of different slices of the target programmable chip are different from each other.
According to a further embodiment of the present application, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the present application, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In the embodiment of the application, a method for slicing the programmable resources of the programmable function chip is adopted, and a slicing request is received, wherein the slicing request is used for requesting slicing treatment on the target programmable resources of the target programmable chip; the method comprises the steps of slicing a target programmable resource according to the resource type and the resource quantity of the programmable resource requested by a slicing request to obtain the programmable resource of the target slice, wherein the non-reusable programmable resources in the programmable resources of different slices of the target programmable chip are different from each other, and the non-reusable slice resource is used in an exclusive mode due to the slicing of the programmable resource of the programmable function chip, so that the purpose of completely independent service forwarding logic among slices can be realized, the technical effect of improving the response capability of a slice network to requirements is achieved, and the problem of low response capability of the slice network to the requirements caused by the fact that the network slicing mode in the related art cannot realize complete independence is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of an alternative resource slice processing method according to an embodiment of the present application;
FIG. 2 is a flow diagram of an alternative resource slicing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative programmable chip according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative newly added virtual device in accordance with an embodiment of the present application;
FIG. 5 is a schematic illustration of an alternative resource slice processing method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an alternative delete virtual device according to an embodiment of the present application;
FIG. 7 is a block diagram of an alternative resource slice processing apparatus according to an embodiment of the present application;
fig. 8 is a block diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiments of the present application, a method for processing a slice of a resource is provided. Alternatively, in the present embodiment, the slice processing method of the above-described resource may be applied to a hardware environment constituted by the terminal 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal 102 through a network, and may be used to provide services (such as application services, etc.) to the terminal or to clients installed on the terminal, and a database may be provided on the server or independent of the server, for providing data storage services to the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal 102 may not be limited to a PC, a mobile phone, a tablet computer, etc.
The slice processing method of the resource in the embodiment of the present application may be executed by the server 104, may be executed by the terminal 102, or may be executed by both the server 104 and the terminal 102. The slice processing method of the terminal 102 for executing the resource in the embodiment of the present application may also be executed by the client installed thereon.
Taking the example of the method for processing a slice of a resource in the present embodiment by the server 104 as an example, fig. 2 is a schematic flow chart of an alternative method for processing a slice of a resource according to an embodiment of the present application, as shown in fig. 2, the flow of the method may include the following steps:
step S202, a slice request is received, wherein the slice request is used for requesting slice processing on the target programmable resource of the target programmable chip.
The resource slicing method in this embodiment may be applied to a scenario of slicing (i.e. virtualizing) a programmable chip of a communication device, and may be applied to network slices in the 5G communication field, or may be applied to network slices in other fields. The communication device may be a network switching device (also referred to as a network device or a switching device), or may be another device configured with a programmable chip, where the programmable chip is a chip that allows programming. In contrast to the difficult to alter and non-programmable nature of chip processing logic on conventional switching devices, programmable chips allow for the addition of packet functionality thereto.
The architecture on which the programmable chip is based may be a protocol independent PDP (Programmable Data Plane ) architecture, for example, a programmable chip based on a Match-Action (matching Action table) architecture, or may be other programmable chips. Taking a programmable chip based on a Match-Action architecture as an example, the programmable chip can be based on a matching Action Table (Match-Action Table), and a protocol-independent data packet processing pipeline is constructed through programmable control logic, so that a novel data packet function is quickly added into the chip, the dilemma that the processing logic of the traditional switching equipment is difficult to change and is not programmable is changed, and a 5G-age bearing network can quickly respond to new demands of users.
For example, as shown in fig. 3, fig. 3 shows a programmable ASIC (Application Specific Integrated Circuit ) switching chip based on the Match-Action architecture, where the chip includes a parser (parameter), a pipeline, an inverse parser (deparse), and each stage of pipeline (Match-Action Unit, i.e., match-Action Unit) further includes table matching and actions, and logic operations, etc., and by using these programmable logic resources, a protocol independent programmable data plane can be formed.
The slice network comprising network slices has the characteristics of a similar physical network, i.e. the virtual network formed by the slices is similar to the physical network, including a logically independent management plane, control plane and forwarding plane. To implement a slice network, virtualization of network device resources is required. In the related art, network slicing is mainly performed for network topology resources such as network nodes, links, ports and the like, wherein slicing (virtualization) of network equipment is mainly performed for external interface (for example, equipment ports, port bandwidths and the like) resources of network equipment, services of each slice cannot be programmed independently, service forwarding logic among the slices cannot be completely independent, different slice networks cannot be completely independent, requirements of users cannot be customized quickly, and quick response capability of the slice networks to new requirements is poor.
In order to solve the above-mentioned problem, in this embodiment, by performing slicing processing (virtualization) on internal resources (chip resources, i.e., programmable resources) of a programmable chip (e.g., a programmable ASIC switch chip of a Match-Action architecture) of a switch device, and using non-reusable slicing resources in an exclusive manner, one network switch device may be sliced into multiple programmable virtual devices (i.e., virtualized network devices), so that the service logic of the sliced service network is programmable, and the service forwarding logic of different slice networks may be completely independent, so that the capability of the slice network to quickly respond to new demands of users may be improved.
A target programmable chip may be disposed in a network device (physical device) in a 5G network (but may also be another network), where the target programmable chip may include programmable resources, that is, target programmable resources, and the programmable resources may be resources for performing programming. The resource types of the target programmable resource may include, but are not limited to, at least one of: non-reusable types (corresponding to non-reusable programmable resources, i.e., non-reusable resources), reusable types (corresponding to reusable programmable resources, i.e., reusable resources). The non-multiplexing resource can be a resource which is mutually exclusive when in use, the multiplexing resource can be a resource which supports multiplexing when in use, the multiplexing can be time-sharing multiplexing, the time-sharing multiplexing resource refers to a resource which uses time as a dividing parameter and uses different services in different time, and other multiplexing modes can also be adopted.
The management of the chip resources on the network device may be a gateway device or other devices. Taking the gateway device as an example, a program module for performing chip resource management, that is, a chip resource management module, may be configured on the gateway device, and the module may have a slice processing function. When the network slicing is required, the slicing processing function of the chip resource management module can be called to carry out slicing processing on programmable resources in the chip. The slice requirement can be based on the requirement of new business of the user on the slice, or can be based on the requirement of slice planning on the slice. This is not limited in this embodiment.
Taking slicing based on new traffic of the user as an example, the chip resource management module may receive a slicing request corresponding to a target slice for requesting slicing processing of the target programmable resource. The resource type and amount of the requested programmable resource may be included in the slice request. The resource type of the requested programmable resource may be one or more and may include, but is not limited to, at least one of the following: resources are reusable and resources are not reusable.
Step S204, slicing the target programmable resource according to the resource type and the resource amount of the programmable resource requested by the slicing request to obtain the programmable resource of the target slice, wherein the non-reusable programmable resources in the programmable resources of different slices of the target programmable chip are different from each other.
In response to the received slicing request, the chip resource management module can determine whether the residual resource condition of the target programmable chip meets the requirement according to the resource type and the resource quantity of the programmable resource requested by the slicing request, and if so, the target programmable resource can be sliced to obtain the programmable resource of the target slice, and the programmable resource of the target slice meets the resource requirement of the slicing request.
In the case where the programmable resources requested by the slice request include a plurality of types, the chip resource management module may determine that the resource amount of each of the programmable resources remaining in the target programmable chip satisfies the resource amount of each of the programmable resources requested by the slice request, and if satisfied, may determine each of the programmable resources of the corresponding resource amount as the programmable resource allocated to the target slice, thereby obtaining the programmable resource of the target slice, that is, the target slice resource.
The target programmable chip may be sliced into at least one slice, and the non-reusable programmable resources are different from each other among the programmable resources of different slices. Correspondingly, if the target slice resources contain non-reusable resources, i.e., non-reusable programmable resources, the non-reusable resources in the target slice resources may be marked as occupied, thereby avoiding the non-reusable resources in the target slice resources being repeatedly allocated to other slices. If the target slice resource contains a reusable resource, it may not be marked, but rather is prevented from being occupied by other slices at the same time by marking the occupation when the reusable resource is used.
Optionally, if the remaining programmable resource status of the target programmable chip does not meet the requirement of the slicing request, the indication information of slicing failure may be returned to indicate slicing failure, and the indication information of slicing failure may include description information of the reason of slicing failure.
Alternatively, the slice request may be generated based on the requirements of the newly added virtual device. There may also be a functional module on the gateway device for handling virtual devices, i.e. a virtual device functional module, which may be used for handling newly added virtual devices. When a user needs to add a virtual device, the virtual device function module can receive a new adding request of the virtual device, wherein the request is used for requesting to add the virtual device; in response to the request, a virtual device Identification (ID) is assigned to the newly added target virtual device, along with the resource type and the resource amount of the programmable resource required by the target virtual device. And generating the slicing request based on the resource type and the resource quantity of the programmable resource required by the target virtual equipment, and sending the slicing request to a chip resource management module.
For example, as shown in fig. 4, when a new virtual device is needed, the virtual device function module may allocate an ID to the new virtual device, which is 01, estimate the programmable resource needed by the virtual device, and call the chip resource management module with the programmable resource requirement and the device ID (i.e., 01) as call parameters, which may be to apply the programmable resource to the chip resource management module through a new virtual device resource allocation application (an example of the slice request).
The chip resource management module can allocate programmable resources of the chip for the virtual device according to user requirements, planning and residual resource conditions, if the related requirements can be met, mark the occupied state of the related resources, mark the occupied device as the virtual device ID (i.e. 01), and return success to the virtual device function module, otherwise, return failure.
Receiving a slice request through the steps S202 to S204, where the slice request is used to request slice processing on the target programmable resource of the target programmable chip; and slicing the target programmable resource according to the resource type and the resource quantity of the programmable resource requested by the slicing request to obtain the programmable resource of the target slice, wherein the non-reusable programmable resources in the programmable resources of different slices of the target programmable chip are different from each other, so that the problem that the response capability of the slicing network to the requirement is low due to the fact that different slicing networks cannot realize complete independence in the network slicing mode in the related art is solved, and the response capability of the slicing network to the requirement is improved.
As an alternative embodiment, before receiving the slice request, the method further comprises:
S11, carrying out quantization processing on first type resources contained in the target programmable resources, and determining the number of the first type resources, wherein the types of the first type resources are mutually exclusive and have fixed segmentation granularity during use;
s12, carrying out quantization processing on second class resources contained in the target programmable resources, and determining the number of the second class resources and the resource capacity of each second class resource, wherein the resource types of the second class resources are mutually exclusive and are not fixed in segmentation granularity during use;
s13, carrying out quantization processing on third-class resources contained in the target programmable resources, and determining the resource quantity of the third-class resources, wherein the resource type of the third-class resources is a reusable type;
wherein the non-reusable programmable resources include a first type of resource and a second type of resource.
The programmable resources on the target programmable chip may be quantized prior to use of the programmable resources on the target programmable chip, and the gateway device may be allocated the programmable resources after quantization. The quantization operation of the programmable resources of the programmable chip may be performed by a gateway device (or other devices), for example, by a program module on the gateway device for classifying and quantizing the programmable resources, which may be called a chip resource management module or a chip slicing (virtualization) module.
In the case of execution by the chip slicing module, the chip slicing module can classify and mark the programmable resources of the chip, and the marking mode can adopt a general method. To complete slicing (virtualization), the slice may be divided into multiple types of programmable resources according to the characteristics of a programmable chip (e.g., the characteristics of a programmable chip based on a Match-Action architecture), and each type of programmable resource may be marked by using an existing general-purpose technology.
The plurality of types of programmable resources may include non-reusable resources and reusable resources, and the chip slicing module may perform quantization processing on the non-reusable resources included in the programmable resources, determine a resource amount of the non-reusable resources, and perform quantization processing on the reusable resources included in the programmable resources, determine a resource amount of the reusable resources. The non-reusable resources may include a first type of resources whose resource types are mutually exclusive and whose segmentation granularity is fixed when in use, and a second type of resources whose mutually exclusive and segmentation granularity is not fixed when in use, and the reusable resources may be a third type of resources.
The chip slicing module may perform quantization processing (quantization processing is performed by taking the number as a unit) on the first type of resources included in the target programmable resource, so as to determine the number of resources of the first type of resources. In the slicing process, the first type of resources may be allocated in units of number. The first type of resource may comprise one or more, which may include, but is not limited to, at least one of: an arithmetic unit, a logic judgment unit, a counter, etc.
The chip slicing module may perform quantization processing (quantization processing is performed by taking the number and the capacity as units) on the second type of resources included in the target programmable resource, and determine the number of resources of the second type of resources and the resource capacity of each second type of resources. In performing the slicing process, the second sub-class resources may be allocated in units of number and capacity. The second sub-class resources may contain one or more, which may include, but are not limited to, various table resources, such as hash (hash) tables, LPM (Longest Prefix Match ) tables, each physical table being divisible into several virtual tables of arbitrary size.
The chip slicing module can also perform quantization processing on the third type of resources contained in the target programmable resources, and determine the resource quantity of the third type of resources. The resource amount of the third class of resources may be quantized by the number, or may be quantized by the number and the capacity. When slicing is performed, all third-class resources can be allocated to the slices applying for using the third-class resources, one or more third-class resources can be allocated to the slices applying for using the third-class resources, and part of capacity of a certain third-class resource can be allocated to the slices applying for using the third-class resources, so that the allocated third-class resources do not need to be marked as occupied after allocation.
The allocation of programmable resources for a slice may be based on a resource identification of the programmable resources. After the first type of resources, the second type of resources and the third type of resources are quantized, the chip slicing module can also respectively mark the first type of resources, the second type of resources and the third type of resources to obtain the resource identifier of each first type of resources, the resource identifier of each second type of resources and the resource identifier of each third type of resources. When the resource is marked, the different types of resources can be marked by adopting a mode of resource class identification and sequence number, or the resources can be marked by adopting other modes, and the method is not limited in the embodiment.
According to the embodiment, the convenience and rationality of resource slicing can be improved by respectively quantifying different programmable resources according to the resource types.
As an alternative embodiment, the target programmable chip may include a first number of levels of first pipelines, and correspondingly, the target programmable resource may include programmable resources of the first number of levels of first pipelines, where the programmable resources of the first pipeline may belong to the first class of resources. For example, for a programmable chip based on the Match-Action architecture, it may contain a multi-stage pipeline, each of which may contain one or more programmable resources whose resource types are of non-reusable type. For a target programmable chip, its programmable resources may include the programmable resources of a first pipeline of a first order (e.g., a 28-order pipeline), the first type of resources being the programmable resources of the first pipeline. Each stage of the first pipeline can comprise first type resources and second type resources, and the first type resources and the second type resources of each stage of the first pipeline can be respectively quantized.
Correspondingly, performing quantization processing on the first type of resources contained in the target programmable resource, and determining the number of resources of the first type of resources may include:
s21, carrying out quantization processing on the first type resources contained in the first pipeline of each stage to obtain the resource quantity of the first type resources contained in the first pipeline of each stage.
For each first pipeline, the first type resources contained in the first pipeline can be quantized to obtain the number of the first type resources contained in each first pipeline, namely, the quantization is performed in units of number. The first type of resource may comprise one or more, which may include, but is not limited to, at least one of: an operation unit, a logic judging unit, a counter, the number of stages of a pipeline and the like.
Similarly, the quantifying the second type of resources included in the target programmable resource, and determining the number of resources of the second type of resources and the resource capacity of each second type of resources may include:
s22, carrying out quantization processing on the second type of resources contained in each level of first pipeline to obtain the number of the resources of the second type of resources contained in each level of first pipeline and the resource capacity of each second type of resources.
And for each first pipeline, the second type of resources contained in the first pipeline can be quantized to obtain the number of the resources of the second type of resources contained in each first pipeline and the resource capacity of each second type of resources, namely, the quantization is performed by taking the number and the capacity as units. The second type of resource may comprise one or more, which may include, but is not limited to, various table resources, such as hash tables, LPM tables, each physical table being divisible into several virtual tables of arbitrary size.
For example, a programmable chip based on the Match-Action architecture is generally composed of n stages of pipelines, each stage of pipeline further includes an operation unit, a logic judging unit, a follower register, a table resource and the like, and some chips also have some specific resources such as a counter and the like. According to the characteristics of a programmable chip based on a Match-Action architecture, programmable resources can be divided into three types, and each type of resources can be marked by adopting the prior general technology:
the first kind of resources are mutually exclusive and have fixed segmentation granularity when in use, such as the number of operation units, the number of logic judgment units, the number of counters, the number of stages of a pipeline and the like;
the second type of resource, which is mutually exclusive when in use but has unfixed splitting granularity, for example, various table resources (such as a hash table and an LPM table), wherein each physical table can be split into a plurality of virtual tables with arbitrary sizes;
a third type of resource, uses a register that supports time-sharing multiplexing, e.g., a pallet register.
Assume that a programmable chip based on a Match-Action architecture is provided, and the programmable resources comprise: 28 stage pipelines, each pipeline containing resources: the number of the calculation units is 64, the number of the logic judgment units is 64, the number of the hash tables of 32K is 2, and the number of the LPM tables of 64K is 1. The size of the chip's pallet register is 3K.
And calling the chip resource management module to quantitatively process the programmable resources in the chip. The above procedure may be to quantitatively model the chip programmable resources shown in fig. 3 (but is not limited to the resources shown in fig. 3), e.g. how many stages of pipelines the chip has, each stage of pipelines has a calculation unit, a logic determination unit, register resources, how many physical table resources the chip has, types of table resources, some chip specific resource counters, etc., and which resources are segmentable, e.g. various types of physical tables. Classifying and marking the programmable resources of the programmable chip, wherein:
the first type of resources are: pipeline 28 stages are respectively marked as st 01-st 28, 64 computing units in each stage of pipeline are respectively marked as cal 01-cal 64, and 64 logic judging units are respectively marked as qf 01-qf 64.
The second type of resources are: each pipeline: 2 32K hash tables, labeled hs01 and hs02, respectively, 1 LPM table of 64K, labeled LPM01.
The third type of resources are: the follower register 3K is marked mf.
According to the embodiment, the non-reusable resources of different types in each pipeline are quantized respectively, so that slicing can be conveniently performed by taking the pipeline as a unit, and the rationality of resource slicing is improved.
As an alternative embodiment, the target programmable resource may include a target class resource, where the resource type of the target class resource is a type that is mutually exclusive and has a non-fixed segmentation granularity when used, which may be the second class resource in the foregoing embodiment. Correspondingly, slicing the target programmable resource according to the resource type and the resource amount of the programmable resource requested by the slicing request, and obtaining the programmable resource of the target slice may include:
s31, determining a first target resource from target class resources contained in the target programmable resource under the condition that the programmable resource requested by the slicing request contains the target class resource and the resource capacity of the requested target class resource is the target capacity, wherein the residual capacity of the first target resource is larger than or equal to the target capacity;
s32, slicing the first target resource to obtain a first sliced resource, wherein the resource capacity of the first sliced resource is the target capacity, and the programmable resource of the target slice comprises the first sliced resource.
If the programmable resource requested by the slice request contains a target class resource, the capacity of the requested target class resource is the target capacity (i.e., the slice request is for a slice process using the target class resource of the target capacity), the number of target class resources currently available in the target programmable resource may be one or more. When the slicing process is performed, a first target resource may be determined from currently available target class resources based on a resource capacity and a target capacity of the currently available target class resources, where the first target resource may include one or more target class resources, and a remaining capacity of the first target resource is greater than or equal to the target capacity.
And for the first target resource, slicing the target class resource with the target capacity to obtain a first slice resource of the target slice. If the first target resource comprises a target class resource, slicing can be performed on the resources with target capacity in the target class resource. If the first target resource includes a plurality of target class resources, the slicing processing can be performed on the resources with target capacity in the plurality of target class resources, and the resources subjected to the slicing processing belong to the plurality of target class resources.
According to the embodiment, when slicing is carried out, the resources which are mutually exclusive and have unfixed slicing granularity during use are sliced according to the required resource capacity, so that the rationality of resource utilization can be improved.
As an optional embodiment, after slicing the first target resource to obtain a first sliced resource, the method further includes:
s41, writing the target slice identification of the target slice into the slice identification field of the first slice resource.
When the slice processing is performed, the target slice identifier of the target slice may be written in the cut first slice resource, for example, the target slice identifier (slice ID, for example, 01) may be written in the slice identifier field of the first slice resource, or the correspondence between the target slice and the first slice resource may be recorded in other manners. In addition, the resource capacity of the target slice may also be recorded, i.e. which part of the resource belongs to the target slice, e.g. the target capacity may be written in the resource capacity field following the slice identification field.
For example, for a first type of resource, the resource ID of each resource may be pre-tagged. When slicing, the resource ID of the first type of resource used by each slice and the number of resources may be recorded. When the second type of resource is sliced, for each physical table, the sliced table may contain a slice ID field and the slice capacity may be recorded. For a third type of resource that is time-division multiplexed, e.g., a pallet register, it is not necessary to split it, and each slice can use the resource time-division.
By writing the slice identifier into the slice identifier field of the first slice resource, the embodiment can be convenient for determining the corresponding relation between the slice and the resource, improves the accuracy of service processing, and avoids the interference between service data.
As an alternative embodiment, for a programmable chip based on the Match-Action architecture as described above, the target programmable resource may include a programmable resource of a first pipeline (for example, a 28-stage pipeline) of a first stage, where a resource type of the programmable resource in the first pipeline of each stage is a non-reusable type, and a resource type and a resource amount of the programmable resource included in the first pipeline of each stage may be the same or different. The slice request is for requesting slice processing using programmable resources for a second pipeline of a second stage (e.g., a 25-stage pipeline). The type of resources and the amount of resources of the programmable resources required for each stage of the pipeline of the application may be the same or different.
Correspondingly, slicing the target programmable resource according to the resource type and the resource amount of the programmable resource requested by the slicing request, and obtaining the programmable resource of the target slice may include:
s51, respectively determining a third pipeline corresponding to the second pipeline of each stage from the first pipelines of the first stage to obtain a third pipeline of the second stage, wherein the resource type and the resource quantity of the programmable resources remained in the third pipeline of each stage meet the resource type and the resource quantity of the programmable resources required by the corresponding second pipeline;
s52, determining a second target resource in a third pipeline of each stage according to the resource type and the resource quantity of the programmable resource required by the second pipeline of each stage;
s53, slicing the second target resource in the third pipeline of each stage to obtain the second slice resource of the second pipeline of each stage, wherein the programmable resource of the target slice comprises the second slice resource of the second pipeline of each stage.
For each second pipeline, the first pipeline corresponding to the second pipeline, that is, the third pipeline, may be sequentially determined from the first pipelines of the first stage number according to the resource sequence number or other manners, so as to obtain the third pipeline of the second stage number. Here, the resource type and the resource amount of the programmable resource remaining in the third pipeline of each stage satisfy the resource type and the resource amount of the programmable resource required for the corresponding second pipeline. If the number of the resource types of the programmable resources required by each stage of the second pipeline is multiple, the residual resource quantity of the programmable function resources of each resource type in the corresponding third pipeline meets the resource quantity requirement of each stage of the second pipeline for the programmable resources of each resource type.
For each stage of the second pipeline, the second target resources to be sliced can be determined from the corresponding third pipeline according to the resource types and the resource amounts of the programmable resources required by each stage of the second pipeline, so as to obtain second target resources of the second stage, and the resource types and the resource amounts of the programmable resources required by each stage of the second pipeline are consistent with the resource types and the resource amounts of the programmable resources contained in the corresponding second target resources.
After determining the second target resource of the second level, slicing the second target resource of the second level to obtain a second slice resource, where the second slice resource belongs to a non-reusable resource. Here, the second sub-slice resource may be the same programmable resource as the first sub-slice resource, or may be a different programmable resource. This is not limited in this embodiment.
According to the embodiment, based on the resource type and the resource quantity of the programmable resource required by each stage of pipeline of the application, the matched pipelines are respectively determined from the pipelines in the programmable chip, so that the rationality of resource slicing can be improved, and the interference between service data caused by slicing errors can be avoided.
As an alternative embodiment, the programmable resources of each stage of pipeline may include a first type of resource and a second type of resource, similar to the foregoing embodiment, where the first type of resource is a type that is mutually exclusive and has a fixed segmentation granularity when in use, and the second type of resource is a type that is mutually exclusive and has an unfixed segmentation granularity when in use. The current pipeline to be processed in the second pipeline of the second series is the current pipeline, and the pipeline corresponding to the current pipeline in the third pipeline of the second series is the target pipeline. When determining the second target resource from the third pipeline of each stage according to the resource type and the resource amount of the programmable resource required by the second pipeline of each stage, for the current pipeline, determining the second target resource corresponding to the current pipeline from the target pipelines by executing the following steps:
s61, determining a first sub-target resource from the first type of resources in the target pipeline according to the number of the first type of resources required by the current pipeline, wherein the type of the first type of resources is mutually exclusive and has fixed segmentation granularity during use;
s62, determining a second sub-target resource from the second type of resources in the target pipeline according to the number of the resources of the second type of resources required by the current pipeline and the resource capacity of each second type of resources required, wherein the resource types of the second type of resources are mutually exclusive and have unfixed segmentation granularity during use;
Wherein the second target resource in the target pipeline comprises a first sub-target resource and a second sub-target resource.
The chip resource management module may determine a first sub-target resource from the first type of resources in the target pipeline according to a first amount of the first type of resources required by the current pipeline, where the first sub-target resource includes a first amount of the first type of resources.
The chip resource management module may further determine a second sub-target resource from the second class resources in the target pipeline according to the second number of the second class resources and the resource capacity of each second class resource required by the current pipeline, where the second sub-target resource includes a second number of resources of the second class, and the resource capacity of each second class resource required by the current pipeline is consistent with the resource capacity of the corresponding second class resource in the second sub-target resource.
The first sub-target resource and the second sub-target resource are second target resources corresponding to the current pipeline. The current pipeline is any one of the second pipelines of the second series, and the corresponding second target resource is determined by adopting the mode for each second pipeline, so that the second target resource of the second series can be obtained.
According to the embodiment, the mutually exclusive resources with fixed segmentation granularity during use corresponding to each stage of pipeline are determined according to the number of resources, and the mutually exclusive resources with unfixed segmentation granularity during use corresponding to each stage of pipeline are determined according to the number of resources and the resource capacity, so that the rationality of resource segmentation can be improved, and the waste of chip resources is avoided.
As an alternative embodiment, the target programmable resource may comprise a third type of resource, i.e. a reusable resource, which may be a pallet register, the resource type of the pallet register being a type supporting time-division multiplexing, the slicing request being further used to request a slicing process according to the pallet register (i.e. slicing using the maximum value of the pallet register), e.g. slicing process according to the maximum value of the pallet register.
Correspondingly, slicing the target programmable resource according to the resource type and the resource amount of the programmable resource requested by the slicing request, and obtaining the programmable resource of the target slice may further include:
s71, slicing the random register according to the maximum value of the random register to obtain a third slice resource of the target slice, wherein the programmable resource of the target slice comprises the third slice resource.
If a slice request is used to request slice processing from a pallet register that is time division multiplexed supported, it is not necessary to slice it, or in other words, it is not necessary to slice it in an exclusive manner. The chip resource management module may directly allocate the pallet to the target slice to obtain a third slice resource, where the target slice resource may include the third slice resource.
By this embodiment, the reusability of the pallet registers can be directly allocated to the slices of the application, thereby improving the rationality of resource utilization.
The method of slicing the resource in the embodiment of the present application is explained below with reference to an alternative example. In this alternative example, the programmable chip is a Match-Action architecture based programmable chip that may contain the aforementioned 28 stage pipeline and the pallet register 3K mf.
The resource slicing processing method in the alternative example is a programmable chip slicing scheme based on a Match-Action architecture, slicing of the programmable resources in the chip is completed by classifying and slicing the programmable resources in the chip, and the programmable physical chip of the switching equipment can be conveniently sliced into a plurality of programmable logic chips, so that the problem that the current slicing network service cannot be independently programmed is solved.
After all programmable resources of the programmable chip are quantitatively modeled, a user can apply for using the quantized resources through the virtual device function module. Assume that there is a slice requirement: a 25 stage pipeline, each stage pipeline requiring: the computing unit 16, the logic judging unit 24, 1 8K hash table, one 8K LPM table and the following register use the chip maximum value. The slice ID value is 1 and the slice ID width is 4 bits.
When slicing is performed, the unused resource serial numbers can be allocated in order from small to large, and then the resources used by the 25-stage pipeline are the follower registers of the pipeline 25 stages st 01-st 25 and 3K. The three types of resources can be sliced in different slicing modes:
(1) For the stages st01 to st25 of the pipeline 25, the first type of resources used by each stage of pipeline are 16 computing units and 24 logic judging units. The number of calculation units used in each stage of pipeline is 16, cal01 to cal16 respectively, and the number of logic judgment units used is 24, qf01 to qf24 respectively.
(2) For the pipeline 25 stages st 01-st 25, the labels of the second type of resource used by each stage of pipeline are: hs01 8k, lpm01 8k, the two tables may contain a 4bit slice ID field, with the slice ID field value fixed to 1 in each table entry.
(3) For the third class of resources, the slice has a 3K pallet register.
After slicing, the slicing resources can be used normally. For example, in order to perform service logic encoding, in 25 stages of pipeline, 8K table hs01 and 8K table lpm01 of each stage of pipeline need to include a slice ID field of 4 bits and fix the value to 1. For a compiler, a logic chip can be constructed from the slice resources described above: pipeline 25 stages st 01-st 25, in each stage of pipeline, the computing units mark 16: cal01 to cal16, 24 logical judgment units: qf01 to qf24,8K table hs01,8K table lpm01, and the follower register is 3K.
The remaining resources of the programmable chip after slicing are as follows, which can be used for the subsequent slicing:
pipelines st01 to st25, each stage of pipeline comprising: the number of calculation units is 48: cal17 to cal64, 40 logical judgment units: qf25 to qf64, 24K of table hs01, 32K of table hs02, 56K of table lpm01;
pipelines st26 to st28, each stage of pipeline comprising: the number of the calculation units is 64: cal01 to cal64, the number of logical judgment units 64: qf01 to qf64, 32K of table hs01, 32K of table hs02, 64K of table lpm01; and a follower register 3K mf.
By the alternative example, the programmable resources are divided into three types, different slicing modes are adopted for each type of resources, one physical programmable chip can be sliced into a plurality of programmable logic chips, the service logic of the slicing network formed by the slicing network equipment is independently programmable, the service forwarding logic of different slicing networks is completely independent, and the quick response capability of the slicing network to new demands of users can be remarkably improved. Meanwhile, the slicing processing is based on a general Match-Action programmable architecture chip, special processing is not needed by the chip, and the chip does not need to sense resource slicing, so that the provided slicing scheme has higher universality.
As an alternative embodiment, after slicing the target programmable resource according to the resource type and the resource amount of the programmable resource requested by the slicing request to obtain the programmable resource of the target slice, the method further includes:
s81, constructing a target logic chip by using the programmable resource of the target slice, wherein the target logic chip is a virtual programmable chip;
s82, compiling service function codes based on the target logic chip, and outputting target codes corresponding to the target logic chip, wherein the service function codes are codes corresponding to target service functions;
s83, loading the target code into the programmable resource of the target slice to deploy the target business function to the target logic chip.
After the slicing process, slice resources (programmable resources allocated for slices) may be used normally, e.g., business logic encoded. The gateway device (or other device) may include a chip compiler thereon, through which the service code may be compiled and deployed using the target slice resources of the target slice. The target slice may be a slice corresponding to a target virtual device, and the target virtual device may be newly added by the virtual device function module based on the received new addition request of the virtual device.
For example, referring to fig. 4 and fig. 5, after receiving a new request of a virtual device, the virtual device function module may assign a unique tag, that is, a virtual device ID, to the newly added virtual device, estimate a programmable chip resource required by the virtual device, and then call the chip resource management module to apply for the required chip programmable resource, and if the application is successful, execute a subsequent operation, or terminate the process.
The user may write business function code for the target virtual device, for example, using the P4 language (a programming language) to write complete business function code for the virtual device. The virtual equipment function module can acquire service function codes written by users, and send the virtual equipment identifiers, the applied and allocated chip programmable resources and the corresponding service function codes to the chip compiler.
The chip compiler may be a compiler that supports compilation of logic chips. The chip compiler can receive the virtual equipment identification, the corresponding allocated chip programmable resources and the corresponding service function codes, and constructs a programmable virtual chip (namely, a logic virtual programmable chip) by using the received chip programmable resources; based on the constructed programmable virtual chip, compiling the received service function codes of the virtual equipment, outputting the chip object codes corresponding to the virtual equipment, and loading the output object codes to the constructed programmable virtual chip to complete the function deployment of the virtual equipment.
For a target virtual device, the chip compiler may receive: the virtual device identification of the target virtual device, the target slice resource, and the service function code, which is a code corresponding to the target service function. The chip compiler may construct a programmable virtual chip (or virtual programmable chip) using the target slice resources, i.e., the target logic chip. Based on the target logic chip, the chip compiler can compile the business function codes and output target codes corresponding to the target virtual devices.
After the target code is obtained, the chip compiler loads the target code into the target slice resource to deploy the target service function to a target logic chip corresponding to the target slice resource or to a target virtual device corresponding to the target slice resource. The gateway device may further include a program module for performing virtual device management, that is, a device management module, and the chip compiler may call the device management module to perform a new virtual device processing. The device management module may have a virtual device management function, for example, a new virtual device function, a delete virtual device function, and the like. For the function of the newly added virtual device, the device management module can be responsible for processing the newly added virtual device, and can receive the target code issued by the chip compiler module and load the target code into the target virtual device so as to complete the deployment of the function of the virtual device.
For example, after chip slicing is completed, slicing resources may be used, e.g., when a slicing service code is written, each logical table may contain a slice ID field for the design of the matching table in the code, and the slice ID value is fixed to the field value. The compiler can build a compiling environment of a virtual logic chip (programmable virtual chip) by using the sliced programmable resource, and compile and process the sliced business codes.
For a programmable chip based on a Match-Action architecture, the internal logic processing resource can be virtualized, and one physical network device is sliced into a plurality of programmable logic network devices.
By the embodiment, the programmable logic chip is constructed by the applied chip programmable resource, service code compiling is carried out based on the programmable logic chip, and the compiled code is loaded into the programmable logic chip (namely, the corresponding programmable resource), so that the independent programming of service logic can be realized, and the quick response capability of the slicing network to new demands of users is improved.
As an alternative embodiment, after loading the object code into the programmable resource of the target slice, the method further comprises:
S91, compiling the updated business function codes based on the target logic chip, and outputting incremental codes corresponding to the target codes;
s92, the increment codes are loaded into programmable resources of the target slice to update the target business functions deployed on the target logic chip.
If the target programmable chip does not support the dynamic loading of the target code, the target code loaded in the target slice resource needs to be updated as a whole when the business function code is updated. If the target programmable chip supports dynamic loading of target codes, when the business function codes are updated, the target codes loaded in the target slice resources can be updated in an incremental updating mode.
When the business function code is updated, the chip compiler may compile the updated business function code and output an increment code corresponding to the object code, that is, a code corresponding to an updated part of the business function code. The chip compiler may load delta code into the target slice resource to update the target business functions deployed on the target logical chip (or target virtual device).
Optionally, when the incremental code is updated, the chip compiler may send an update message to the device management module, and the device management module may receive the incremental code corresponding to the target code sent by the compiler module (i.e., the chip compiler), dynamically load the incremental code onto the target logic chip, and complete dynamic deployment of the virtual device function.
Alternatively, the chip compiler may also issue the updated object code to the device management module, where the device management module determines the incremental code and dynamically loads the incremental code onto the target virtual device, which is not limited in this embodiment.
For example, for a programmable network chip based on the Match-Action architecture, the chip supports dynamic loading of object code, the chip has a corresponding P4 compiler (a kind of chip compiler), and supports the logic chip to perform P4 code compilation.
In connection with fig. 4 and 5, the flow of adding a virtual device may involve interactions of a virtual device function module, a chip resource management module, a P4 compiler, and a device management module, which may include, but is not limited to, operations of at least one of the following.
The virtual device function module may allocate a virtual device ID of 01 to the newly added virtual device, and estimate programming resources required by the virtual device, including: the aforementioned 25-stage pipeline and the pallet register use a chip maximum. The virtual device function module can call the chip resource management module by taking the programmable resource requirement and the virtual device ID (01) as call parameters.
The chip resource management module receives the resource application of the virtual equipment sent by the virtual equipment functional module, allocates quantized chip programmable resources to the virtual equipment according to the user demand and the planning, occupies related resource marks, occupies the virtual equipment ID to be 01, and returns an application success identification to the virtual equipment functional module. The virtual device function module may receive a return value of successful processing.
The user can write the service function code for the virtual device by using the P4 language, and obtain the P4 service code with the virtual device ID of 01. The virtual device function module may obtain a P4 service code with a virtual device ID of 01, and send the service code and the applied programmable resource to the P4 compiler.
The P4 compiler receives the P4 service code with the virtual device ID of 01, and constructs a virtual logic chip (i.e., a programmable logic chip) according to the programmable chip resource corresponding to the virtual device ID value of 01. The P4 compiler compiles the P4 service function code with the virtual device ID of 01 based on the logic chip resources, outputs the target code and sends the target code to the device management module.
And the device management module receives the object code with the virtual device ID of 01, dynamically loads the increment to the virtual device, and completes the deployment of the virtual device function.
The remaining resources of the chip may be the same as or different from those in the foregoing embodiments. These remaining resources may be used for subsequent newly added virtual devices. By slicing one physical network device into programmable logic network devices, corresponding to programmable logic chips. Because a physical chip can be regarded as a logic chip containing all the resources of the physical chip, the configuration of the logic chip can improve the compatibility and consistency of the P4 compiler.
By the alternative example, the code quantity required to be updated for one time of service code updating can be reduced by dynamically updating the service code, and the service code updating speed is improved.
As an alternative embodiment, after loading the object code into the programmable resource of the target slice, the method further comprises:
s101, receiving a deletion request, wherein the deletion request is used for requesting to delete a target slice;
s102, deleting target codes in programmable resources of the target slice in response to the deleting request to delete the target slice, wherein non-reusable programmable resources in the programmable resources of the target slice are allowed to be used by other slices except the target slice.
The target traffic function may request deletion of the target slice by a delete request when it is no longer needed. The deletion request may be a slice deletion request or a device deletion request, that is, a deletion request for requesting to delete the target virtual device. Taking the device deletion request as an example, the aforementioned virtual device function module may receive the device deletion request, and may control to delete the target code in the target slice resource in response to the device deletion request, so as to delete the target slice. Further, if the target slice resources include non-reusable resources, the virtual device function module may control marking the non-reusable resources as unoccupied.
Optionally, with reference to fig. 6, the virtual device function module may call the chip resource management module to perform deletion processing with a device identifier (virtual device ID) of the target virtual device to be deleted as a parameter, and call the device management module to perform deletion processing with the device identifier of the target virtual device to be deleted as a parameter.
The device management module may be provided with a delete virtual device function. After receiving the application for deleting the virtual device, the device management module can dynamically delete the object code and the function of the corresponding virtual device. The chip resource management module may also have a function of deleting the virtual device. After receiving the application for deleting the virtual device, the chip resource management module can find the corresponding chip programmable resource according to the received virtual device ID, release the related resource and mark the related resource as an unoccupied state.
For example, the virtual device function module may call the chip resource management module to perform the deletion process with the virtual device ID value 01 as a parameter, and call the device management module to perform the deletion process with the virtual device ID value 01 as a parameter.
The device management module may dynamically delete the object code and function of the corresponding virtual device when receiving a delete call with a virtual device ID of 01, for example, delete by deploying a new virtual device. When receiving a delete call with a virtual device ID of 01, the chip resource management module may find a chip programmable resource corresponding to the virtual device ID of 01, for example, a 20-stage pipeline, where each stage pipeline includes: 2 8K hash tables, 18 computing units, 16 logic judging units and 1K registers, and the programming resources are released and marked as unoccupied states.
According to the embodiment, when the slice is not needed, the slice can be deleted through dynamic deployment, and related resources are released.
It should be noted that, the chip resource management module, the virtual device function module, the chip compiler, and the device management module may be located in the same device or may be disposed on different devices. The various steps of the above examples may be combined with one another to form one or more embodiments without conflict or may be substituted by simple steps to form one or more embodiments.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM (Read-Only Memory)/RAM (Random Access Memory ), magnetic disk, optical disc), including instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present application.
According to another aspect of the embodiments of the present application, there is also provided a slice processing apparatus for implementing the slice processing method for resources described above. Fig. 7 is a block diagram of an alternative resource slice processing apparatus according to an embodiment of the present application, as shown in fig. 7, the apparatus may include:
a first receiving unit 702, configured to receive a slice request, where the slice request is used to request slice processing on a target programmable resource of a target programmable chip;
And the processing unit 704 is connected to the first receiving unit 702, and is configured to slice the target programmable resource according to the resource type and the resource amount of the programmable resource requested by the slice request, so as to obtain the programmable resource of the target slice, where the non-reusable programmable resources in the programmable resources of different slices of the target programmable chip are different from each other.
It should be noted that, the first receiving unit 702 in this embodiment may be used to perform the step S202 described above, and the processing unit 704 in this embodiment may be used to perform the step S204 described above.
Receiving a slicing request through the module, wherein the slicing request is used for requesting slicing processing on target programmable resources of a target programmable chip; and slicing the target programmable resource according to the resource type and the resource quantity of the programmable resource requested by the slicing request to obtain the programmable resource of the target slice, wherein the non-reusable programmable resources in the programmable resources of different slices of the target programmable chip are different from each other, so that the problem that the response capability of the slicing network to the requirement is low due to the fact that the slicing service cannot be programmed independently in the network slicing mode in the related technology is solved, and the response capability of the slicing network to the requirement is improved.
As an alternative embodiment, the above device further comprises:
the first quantization unit is used for carrying out quantization processing on first type resources contained in the target programmable resources before receiving the slicing request, and determining the number of the first type resources, wherein the types of the first type resources are mutually exclusive and have fixed slicing granularity during use;
the second quantization unit is used for carrying out quantization processing on second type resources contained in the target programmable resources, and determining the number of the resources of the second type resources and the resource capacity of each second type resource, wherein the resource types of the second type resources are mutually exclusive and the segmentation granularity is not fixed during use;
the third quantization unit is used for performing quantization processing on third type resources contained in the target programmable resources and determining the resource quantity of the third type resources, wherein the resource type of the third type resources is a reusable type;
wherein the non-reusable programmable resources include a first type of resource and a second type of resource.
As an alternative embodiment, the target programmable resource comprises a programmable resource of a first pipeline of a first number of stages;
a first quantization unit comprising: the first quantization module is used for carrying out quantization processing on the first type of resources contained in the first pipeline of each stage to obtain the number of the resources of the first type of resources contained in the first pipeline of each stage;
A second quantization unit comprising: and the second quantization module is used for carrying out quantization processing on the second type of resources contained in the first pipeline of each stage to obtain the number of the resources of the second type of resources contained in the first pipeline of each stage and the resource capacity of each second type of resources.
As an alternative embodiment, the target programmable resource includes a target class resource, where the resource type of the target class resource is a type that is mutually exclusive when in use and has a non-fixed segmentation granularity. The processing unit includes:
the first determining module is used for determining a first target resource from target class resources contained in the target programmable resource under the condition that the programmable resource requested by the slicing request contains the target class resource and the resource capacity of the requested target class resource is the target capacity, wherein the residual capacity of the first target resource is larger than or equal to the target capacity;
the first processing module is used for carrying out slicing processing on the first target resource to obtain a first sliced resource, wherein the resource capacity of the first sliced resource is the target capacity, and the programmable resource of the target slice comprises the first sliced resource.
As an alternative embodiment, the above device further comprises:
And the writing unit is used for writing the target slice identifier of the target slice into the slice identifier field of the first slice resource after the first target resource is subjected to slice processing to obtain the first slice resource.
As an alternative embodiment, the target programmable resource includes a programmable resource of a first pipeline of a first stage, the programmable resource in the first pipeline of each stage being of a non-reusable type, and the slicing request is for requesting slicing of the programmable resource of a second pipeline of a second stage. The processing unit includes:
the second determining module is used for respectively determining third pipelines corresponding to the second pipelines of each stage from the first pipelines of the first stage to obtain third pipelines of the second stage, wherein the resource types and the resource amounts of the remaining programmable resources of the third pipelines of each stage meet the resource types and the resource amounts of the programmable resources required by the corresponding second pipelines;
the third determining module is used for determining a second target resource in the third pipeline of each stage according to the resource type and the resource quantity of the programmable resource required by the second pipeline of each stage;
and the second processing module is used for carrying out slice processing on the second target resources in the third pipeline of each stage to obtain second slice resources of the second pipeline of each stage, wherein the programmable resources of the target slices comprise the second slice resources of the second pipeline of each stage.
As an alternative embodiment, the third determining module includes:
and the execution sub-module is used for determining a second target resource in a target pipeline for the current pipeline in the second pipelines of the second series by executing the following steps, wherein the target pipeline is a third pipeline corresponding to the current pipeline:
determining a first sub-target resource from the first type of resources in the target pipeline according to the number of the first type of resources required by the current pipeline, wherein the type of the first type of resources is mutually exclusive and has fixed segmentation granularity when in use;
determining a second sub-target resource from the second type of resources in the target pipeline according to the number of the resources of the second type of resources required by the current pipeline and the required resource capacity of each second type of resources, wherein the resource types of the second type of resources are mutually exclusive and have unfixed segmentation granularity during use;
wherein the second target resource in the target pipeline comprises a first sub-target resource and a second sub-target resource.
As an alternative embodiment, the target programmable resource includes a pallet register, the resource type of the pallet register is a type supporting time-sharing multiplexing, and the slicing request is further used for requesting slicing according to the maximum value of the pallet register. The processing unit further includes:
And the third processing module is used for slicing the following register according to the maximum value of the following register to obtain a third slice resource of the target slice, wherein the programmable resource of the target slice comprises the third slice resource.
As an alternative embodiment, the above device further comprises:
the construction unit is used for carrying out slicing treatment on the target programmable resource according to the resource type and the resource quantity of the programmable resource requested by the slicing request to obtain the programmable resource of the target slice, and then constructing a target logic chip by using the programmable resource of the target slice, wherein the target logic chip is a virtual programmable chip;
the first compiling unit is used for compiling the service function codes based on the target logic chip and outputting the target codes corresponding to the target logic chip, wherein the service function codes are codes corresponding to the target service functions;
and the first loading unit is used for loading the target code into the programmable resource of the target slice so as to deploy the target business function on the target logic chip.
As an alternative embodiment, the above device further comprises:
the second compiling unit is used for compiling the updated business function codes based on the target logic chip after loading the target codes into the programmable resources of the target slice and outputting the increment codes corresponding to the target codes;
And the second loading unit is used for loading the increment codes into the programmable resources of the target slice so as to update the target business functions deployed on the target logic chip.
As an alternative embodiment, the above device further comprises:
a second receiving unit, configured to receive a deletion request after loading the object code into the programmable resource of the target slice, where the deletion request is used to request deletion of the target slice;
and a deleting unit configured to delete the target code in the programmable resource of the target slice in response to the deletion request, so as to delete the target slice, where the non-reusable programmable resource in the programmable resource of the target slice is allowed to be used by other slices than the target slice.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments. It should be noted that the above modules may be implemented in software or in hardware as part of the apparatus shown in fig. 1, where the hardware environment includes a network environment.
According to yet another aspect of embodiments of the present application, there is also provided a storage medium. Alternatively, in the present embodiment, the storage medium may be used to execute the program code of the slice processing method of any of the resources described above in the embodiments of the present application.
Alternatively, in this embodiment, the storage medium may be located on at least one network device of the plurality of network devices in the network shown in the above embodiment.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of:
s1, receiving a slicing request, wherein the slicing request is used for requesting slicing processing of target programmable resources of a target programmable chip;
s2, slicing the target programmable resources according to the resource type and the resource quantity of the programmable resources requested by the slicing request to obtain the programmable resources of the target slices, wherein the non-reusable programmable resources in the programmable resources of different slices of the target programmable chips are different from each other.
Alternatively, specific examples in the present embodiment may refer to examples described in the above embodiments, which are not described in detail in the present embodiment.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, ROM, RAM, a mobile hard disk, a magnetic disk or an optical disk.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device for implementing the slice processing method of the above-mentioned resource, where the electronic device may be a server, a terminal, or a combination thereof.
Fig. 8 is a block diagram of an alternative electronic device, according to an embodiment of the present application, including a processor 802, a communication interface 804, a memory 806, and a communication bus 808, as shown in fig. 8, wherein the processor 802, the communication interface 804, and the memory 806 communicate with each other via the communication bus 808, wherein,
a memory 806 for storing a computer program;
the processor 802, when executing the computer program stored on the memory 806, performs the following steps:
s1, receiving a slicing request, wherein the slicing request is used for requesting slicing processing of target programmable resources of a target programmable chip;
s2, slicing the target programmable resources according to the resource type and the resource quantity of the programmable resources requested by the slicing request to obtain the programmable resources of the target slices, wherein the non-reusable programmable resources in the programmable resources of different slices of the target programmable chips are different from each other.
Alternatively, the communication bus may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 8, but not only one bus or one type of bus. The communication interface is used for communication between the electronic device and other equipment.
The memory may include RAM or may include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
As an example, the memory 806 may include, but is not limited to, a first receiving unit 702 in a slice processing apparatus including the resources described above, and a processing unit 704. In addition, other module units in the slice processing apparatus of the above resources may be included, but are not limited to, and are not described in detail in this example.
The processor may be a general purpose processor and may include, but is not limited to: CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but also DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
It will be understood by those skilled in the art that the structure shown in fig. 8 is only schematic, and the device implementing the slice processing method of the resource may be a terminal device, and the terminal device may be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palm computer, a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 8 is not limited to the structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 8, or have a different configuration than shown in FIG. 8.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, etc.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in the present embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or at least two units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (14)

1. A method for processing a slice of a resource, comprising:
receiving a slicing request, wherein the slicing request is used for requesting slicing processing of a target programmable resource of a target programmable chip;
and slicing the target programmable resource according to the resource type and the resource quantity of the programmable resource requested by the slicing request to obtain the programmable resource of the target slice, wherein the non-reusable programmable resources in the programmable resources of different slices of the target programmable chip are different from each other.
2. The method of claim 1, wherein prior to the receiving a slice request, the method further comprises:
performing quantization processing on first type resources contained in the target programmable resources, and determining the number of the first type resources, wherein the types of the first type resources are mutually exclusive and have fixed segmentation granularity during use;
performing quantization processing on second class resources contained in the target programmable resources, and determining the number of the second class resources and the resource capacity of each second class resource, wherein the resource types of the second class resources are mutually exclusive and are not fixed in segmentation granularity during use;
performing quantization processing on third class resources contained in the target programmable resources, and determining the resource quantity of the third class resources, wherein the resource type of the third class resources is a reusable type;
wherein the non-reusable programmable resources include the first type of resources and the second type of resources.
3. The method of claim 2, wherein the target programmable resource comprises a programmable resource of a first pipeline of a first number of stages;
The quantifying the first type of resources contained in the target programmable resource, and determining the number of the first type of resources includes: performing quantization processing on the first type of resources contained in the first pipeline of each stage to obtain the number of resources of the first type of resources contained in the first pipeline of each stage;
the quantifying the second type of resources contained in the target programmable resource, and determining the number of resources of the second type of resources and the resource capacity of each second type of resources, including: and carrying out quantization processing on the second type of resources contained in the first pipeline of each stage to obtain the number of the resources of the second type of resources contained in the first pipeline of each stage and the resource capacity of each second type of resources.
4. The method of claim 1, wherein the target programmable resource comprises a target class resource, wherein the resource type of the target class resource is a type that is mutually exclusive in use and has a non-fixed segmentation granularity;
the slicing processing is performed on the target programmable resource according to the resource type and the resource quantity of the programmable resource requested by the slicing request to obtain the programmable resource of the target slice, which comprises the following steps:
Determining a first target resource from the target class resources contained in the target programmable resource under the condition that the programmable resource requested by the slicing request contains the target class resources and the resource capacity of the requested target class resources is the target capacity, wherein the residual capacity of the first target resource is larger than or equal to the target capacity;
and slicing the first target resource to obtain a first sliced resource, wherein the resource capacity of the first sliced resource is the target capacity, and the programmable resource of the target slice comprises the first sliced resource.
5. The method of claim 4, wherein after slicing the first target resource to obtain a first sliced resource, the method further comprises:
and writing the target slice identification of the target slice into a slice identification field of the first slice resource.
6. The method of claim 1, wherein the target programmable resources comprise programmable resources of a first pipeline of a first stage, the type of resources of the programmable resources in the first pipeline of each stage being of a non-reusable type, the slice request being for requesting slice processing of the programmable resources of a second pipeline of a second stage;
The slicing processing is performed on the target programmable resource according to the resource type and the resource quantity of the programmable resource requested by the slicing request to obtain the programmable resource of the target slice, which comprises the following steps:
determining a third pipeline corresponding to the second pipeline of each stage from the first pipelines of the first stage respectively to obtain the third pipelines of the second stage, wherein the resource type and the resource quantity of the remaining programmable resources of the third pipeline of each stage meet the resource type and the resource quantity of the programmable resources required by the corresponding second pipeline;
determining a second target resource in the third pipeline of each stage according to the resource type and the resource quantity of the programmable resource required by the second pipeline of each stage;
and performing slice processing on the second target resources in the third pipeline of each stage to obtain second slice resources of the second pipeline of each stage, wherein the programmable resources of the target slices comprise the second slice resources of the second pipeline of each stage.
7. The method of claim 6, wherein determining the second target resource from the third pipeline for each stage according to the resource type and the resource amount of the programmable resource required by the second pipeline for each stage comprises:
For a current pipeline in the second pipelines of a second stage, determining the second target resource in a target pipeline by performing the steps of:
determining a first sub-target resource from the first type of resources in the target pipeline according to the number of the first type of resources required by the current pipeline, wherein the type of the first type of resources is mutually exclusive and has fixed segmentation granularity when in use;
determining a second sub-target resource from the second type of resources in the target pipeline according to the number of the second type of resources required by the current pipeline and the required resource capacity of each second type of resources, wherein the resource types of the second type of resources are mutually exclusive and have unfixed segmentation granularity during use;
wherein the second target resource in the target pipeline includes the first sub-target resource and the second sub-target resource.
8. The method of claim 6, wherein the target programmable resource comprises a pallet register, the pallet register having a resource type that supports time-division multiplexing, the slicing request further configured to request slicing according to a maximum value of the pallet register;
And slicing the target programmable resource according to the resource type and the resource quantity of the programmable resource requested by the slicing request to obtain the programmable resource of the target slice, and further comprising:
and slicing the following register according to the maximum value of the following register to obtain a third slice resource of the target slice, wherein the programmable resource of the target slice comprises the third slice resource.
9. The method according to any one of claims 1 to 8, wherein after slicing the target programmable resource according to the resource type and the resource amount of the programmable resource requested by the slicing request, the method further comprises:
constructing a target logic chip by using the programmable resource of the target slice, wherein the target logic chip is a virtual programmable chip;
compiling service function codes based on the target logic chip, and outputting target codes corresponding to the target logic chip, wherein the service function codes are codes corresponding to target service functions;
and loading the target code into a programmable resource of the target slice to deploy the target business function onto the target logic chip.
10. The method of claim 9, wherein after the loading the object code into the programmable resource of the target slice, the method further comprises:
compiling the updated business function codes based on the target logic chip, and outputting incremental codes corresponding to the target codes;
and loading the increment codes into programmable resources of the target slice to update the target business functions deployed on the target logic chip.
11. The method of claim 9, wherein after the loading the object code into the programmable resource of the target slice, the method further comprises:
receiving a deletion request, wherein the deletion request is used for requesting deletion of the target slice;
and deleting the target code in the programmable resources of the target slice in response to the deletion request to delete the target slice, wherein non-reusable programmable resources in the programmable resources of the target slice are allowed to be used by other slices except the target slice.
12. A slice processing apparatus for a resource, comprising:
The first receiving unit is used for receiving a slicing request, wherein the slicing request is used for requesting slicing processing of target programmable resources of a target programmable chip;
and the processing unit is used for slicing the target programmable resources according to the resource type and the resource quantity of the programmable resources requested by the slicing request to obtain the programmable resources of the target slices, wherein the non-reusable programmable resources in the programmable resources of different slices of the target programmable chip are different from each other.
13. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, wherein the computer program, when being executed by a processor, implements the steps of the method according to any of the claims 1 to 11.
14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 11 when the computer program is executed.
CN202111538993.4A 2021-12-15 2021-12-15 Resource slice processing method and device, storage medium and electronic device Pending CN116264550A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111538993.4A CN116264550A (en) 2021-12-15 2021-12-15 Resource slice processing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111538993.4A CN116264550A (en) 2021-12-15 2021-12-15 Resource slice processing method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN116264550A true CN116264550A (en) 2023-06-16

Family

ID=86723601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111538993.4A Pending CN116264550A (en) 2021-12-15 2021-12-15 Resource slice processing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN116264550A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117408220A (en) * 2023-12-15 2024-01-16 湖北工业大学 Programmable switching architecture chip resource arrangement method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117408220A (en) * 2023-12-15 2024-01-16 湖北工业大学 Programmable switching architecture chip resource arrangement method and device
CN117408220B (en) * 2023-12-15 2024-02-23 湖北工业大学 Programmable switching architecture chip resource arrangement method and device

Similar Documents

Publication Publication Date Title
CN115328663B (en) Method, device, equipment and storage medium for scheduling resources based on PaaS platform
CN112153700B (en) Network slice resource management method and equipment
CN113243005A (en) Performance-based hardware emulation in on-demand network code execution systems
WO2018002991A1 (en) Control device, vnf deployment destination selection method, and program
CN107844274B (en) Hardware resource management method, device and terminal based on super-fusion storage system
CN115516840A (en) Information processing method, device, system, medium, chip and program
CN112882792B (en) Information loading method, computer device and storage medium
JP5315128B2 (en) Process request destination management apparatus, process request destination management program, and process request destination management method
CN115086166B (en) Computing system, container network configuration method, and storage medium
CN112788112A (en) Automatic publishing method, device and platform for equipment health management micro-service
CN116264550A (en) Resource slice processing method and device, storage medium and electronic device
CN110795202B (en) Resource allocation method and device of virtualized cluster resource management system
CN113467931B (en) Processing method, device and system of calculation task
US11349729B2 (en) Network service requests
CN106933560A (en) A kind of automatic coding and device
CN111143033B (en) Operation execution method and device based on scalable operation system
CN111162947B (en) PCRE hot switching method, network device and storage medium
CN110120978B (en) Safety protection method for elastic user cloud computing resources
CN113282541B (en) File calling method and device and electronic equipment
CN115826845A (en) Storage resource allocation method and device, storage medium and electronic device
CN113032156B (en) Memory allocation method and device, electronic equipment and storage medium
CN112748981B (en) Processing method and device for software mirror image of virtual network function
CN113568708B (en) Platform creation method, device and equipment
CN112015515B (en) Instantiation method and device of virtual network function
US20230281054A1 (en) Computer System Execution Environment Builder Tool

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication