WO2015143599A1 - 确定表的存储位置的方法、转发设备及控制器 - Google Patents

确定表的存储位置的方法、转发设备及控制器 Download PDF

Info

Publication number
WO2015143599A1
WO2015143599A1 PCT/CN2014/073940 CN2014073940W WO2015143599A1 WO 2015143599 A1 WO2015143599 A1 WO 2015143599A1 CN 2014073940 W CN2014073940 W CN 2014073940W WO 2015143599 A1 WO2015143599 A1 WO 2015143599A1
Authority
WO
WIPO (PCT)
Prior art keywords
tables
forwarding
memory
forwarding device
matrix
Prior art date
Application number
PCT/CN2014/073940
Other languages
English (en)
French (fr)
Inventor
王小忠
龚钧
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201480000155.3A priority Critical patent/CN105379214B/zh
Priority to PCT/CN2014/073940 priority patent/WO2015143599A1/zh
Priority to EP14886808.6A priority patent/EP3110092B1/en
Publication of WO2015143599A1 publication Critical patent/WO2015143599A1/zh
Priority to US15/274,943 priority patent/US10158503B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/036Updating the topology between route computation elements, e.g. between OpenFlow controllers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery

Definitions

  • Embodiments of the present invention relate to the field of communications, and more particularly, to a method, a forwarding device, and a controller for determining a storage location of a table. Background technique
  • the forwarding device In the communication field, existing forwarding devices can simultaneously run multiple forwarding services. To implement a forwarding service, the forwarding device needs to find at least one table.
  • the forwarding device can be a router.
  • the at least one table may include a forwarding information base (English: forward information base, referred to as FIB).
  • FIB forward information base
  • Each of the plurality of forwarding services corresponds to a predetermined performance.
  • the predetermined performance may be one-half or one-quarter of the line speed.
  • the predetermined performance may be a maximum value of the actual performance that the forwarding device allows the corresponding forwarding service to reach.
  • each of the multiple forwarding services corresponds to an actual performance.
  • the actual performance of each forwarding service is less than or equal to the corresponding predetermined performance. In the prior art, the actual performance of the forwarding service is far from the predetermined performance of the forwarding service. Summary of the invention
  • Embodiments of the present invention provide a method for determining a storage location of a table, which helps to make the actual performance of the forwarding service reach a predetermined performance as much as possible.
  • a method of determining a storage location of a table including:
  • the forwarding device receives M description information sent by the controller, where the M description information is corresponding to the M forwarding services, where each description information of the M description information includes a predetermined performance and execution of the corresponding forwarding service.
  • the corresponding forwarding service needs to identify the identifier of the table, and the M forwarding services need to find N tables, and the set of predetermined performance components of the M forwarding services includes Q elements, where the Q elements are respectively Is a first element to a Qth element, each of the Q elements representing a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of C r x line rate , M, N, Q and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ 1;
  • the forwarding device generates Q simultaneous access information according to the M description information, where
  • the rth simultaneous access information in the Q simultaneous access information indicates that each of the N tables is Whether it is required to be scheduled to access the same forwarding service with a performance of 0 ⁇ line rate;
  • the forwarding device stores the one of the tables in the at least one memory.
  • the Q simultaneous access information is a matrix of Q ⁇ X ,, and an element of each matrix of the Q ⁇ X ⁇ matrix Is 1 or 0,
  • the jth table in the table needs to be accessed by at least one forwarding service whose performance is Cr x line rate predetermined in the M forwarding services.
  • the i-th table and the N-N of the N tables are represented
  • the jth table in the table does not need to be accessed by any one of the M forwarding services with a predetermined performance of C r x line rate.
  • i and j are positive integers, and i and j are both less than or equal to
  • the determining that the N tables are to be stored in the at least one memory of the forwarding device includes Determining that each of the N tables is to be stored in at least one memory of the forwarding device,
  • the forwarding device determines that the mth of the N tables is to be stored in the at least one memory of the forwarding device, and specifically includes:
  • the i-th column element of the lxN matrix is used to indicate whether the i-th table of the N tables has been stored in the first
  • the ith column element of the matrix of 1 ⁇ ⁇ is 1, it indicates that the first memory has stored the ith table in the N tables, if the ith column of the matrix of the lx N The element is 0, indicating that the first memory does not store the ith table of the N tables;
  • the forwarding device performs an operation on an element of the mth row of the matrix of each of the NXNs of the Q NXNs and a corresponding element of the matrix of the 1 ⁇ ,, and determines a number of 1s, where The number of 1s in the result of the operation of the mth row of the matrix of the r ⁇ ⁇ N of the Q ⁇ ⁇ N matrix and the corresponding element of the 1 XN matrix is P r ;
  • the forwarding device determines that the mth table in the N tables is to be stored based on maxdPi+l) X d XA, ..., (P Q +1) C Q x A) ⁇ B In the first memory,
  • m is a positive integer less than or equal to N
  • & is a non-negative integer
  • & ⁇ N A and B are positive numbers
  • A represents the bandwidth required for the forwarding service whose actual performance is the line rate
  • B represents the first The maximum bandwidth that the memory can provide.
  • the method further includes:
  • the forwarding device When the forwarding device determines that the a-th table of the N tables cannot be stored in the at least one memory according to the Q simultaneous access information, the forwarding device generates a first message, where the a message for announcing that the forwarding device determines that the a-th table of the N tables cannot be stored in the at least one memory;
  • the forwarding device sends the first message to the controller
  • a is a positive integer and a is less than or equal to N.
  • the method further includes:
  • the forwarding device receives a second message sent by the controller, where the second message is used to indicate that the forwarding device tries to store the a-th table in the N tables;
  • the forwarding device operates in a best effort mode according to the second message and determines that the a-th table of the N tables is to be stored in the second memory of the at least one memory;
  • the forwarding device generates a third message, where the third message is used to notify the forwarding device that when the a-th table in the N tables is to be stored in the second memory, the N tables are The actual performance of the forwarding service supported by the a-th table;
  • the forwarding device transmits the third message to the controller.
  • a method of determining a storage location of a table including:
  • the controller generates M pieces of description information, where the M pieces of description information correspond to M forwarding services, and each of the M pieces of description information includes a predetermined nature of the corresponding forwarding service. And performing the mapping of the table that the corresponding forwarding service needs to be searched for, and performing the M forwarding services to search for N tables, where the predetermined performance component set of the M forwarding services includes Q elements, where the Q The elements are the first element to the Qth element, respectively, and each of the Q elements represents a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of C r x line speed, M, N, Q and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ 1;
  • the controller sends the M description information to the forwarding device.
  • the M pieces of description information are used to enable the forwarding device to determine that the N tables are to be stored in at least one memory in the forwarding device, where The method also includes:
  • j is a positive integer and j is less than or equal to N.
  • the method further includes:
  • the controller generates a second message, where the second message is used to indicate that the forwarding device tries to store the jth table in the N tables;
  • the controller sends the second message to the forwarding device to cause the forwarding device to operate in a best effort mode and determine that a jth table of the N tables is to be stored in the at least one The second memory of the memory;
  • a method for determining a storage location of a table including:
  • the forwarding device receives the Q simultaneous access information sent by the controller, where the rth simultaneous access information in the Q simultaneous access information indicates whether each of the N tables needs to be scheduled to have a performance of 0. ⁇
  • the same forwarding service access is performed at the line rate. To perform one forwarding service, you need to find the one table.
  • the forwarding device stores the N tables in the at least one memory.
  • the Q simultaneous access information is a matrix of Q N X N, and an element of each N X N matrix of the Q N X N matrix is 1 or 0,
  • the element of the i-th row and the j-th column of the matrix of the r-th NXN in the matrix of the Q NXNs is 1, indicating the i-th table of the N tables and the number of the N tables
  • the j tables need to be accessed by at least one forwarding service whose performance in the M forwarding services is a predetermined rate of C r x line rate.
  • the element of the i-th row and the j-th column of the matrix of the r-th NXN in the matrix of the Q NXNs is 0, indicating the i-th table in the N tables and the number of the N tables
  • the j tables need not be simultaneously accessed by any one of the M forwarding services whose performance is C r x line rate.
  • i and j are positive integers, and i and j are both less than or equal to
  • the determining that the N tables are to be stored in the at least one memory of the forwarding device includes Determining that each of the N tables is to be stored in at least one memory of the forwarding device,
  • the forwarding device determines that the mth of the N tables is to be stored in the at least one memory of the forwarding device, and specifically includes:
  • the i-th column element of the lxN matrix is used to indicate whether the i-th table of the N tables has been stored in the first
  • the i-th column element of the matrix of 1 ⁇ ⁇ is 1, it indicates that the first memory has stored the i-th table in the N tables, if the i-th column of the 1 XN matrix The element is 0, indicating that the first memory does not store the ith table of the N tables;
  • the forwarding device performs an operation on an element of the mth row of the matrix of each of the NXNs of the Q NXNs and a corresponding element of the matrix of the 1 ⁇ ,, and determines a number of 1s, where Elements and rows of the mth row of the matrix of the rth ⁇ ⁇ N in the matrix of Q ⁇ ⁇ N
  • the number of 1s in the result of the AND operation of the corresponding element of the 1 x N matrix is P r ;
  • the forwarding device determines that the mth table in the N tables is to be stored based on maxdPi+l) X d XA, ..., (P Q +1) C Q x A) ⁇ B In the first memory;
  • m is a positive integer less than or equal to N
  • & is a non-negative integer
  • & ⁇ N A and B are positive numbers
  • A represents the bandwidth required for the forwarding service whose actual performance is the line rate
  • B represents the first The maximum bandwidth that the memory can provide.
  • the method further includes:
  • the forwarding device When the forwarding device determines that the a-th table of the N tables cannot be stored in the at least one memory according to the Q simultaneous access information, the forwarding device generates a first message, where the a message for announcing that the forwarding device determines that the a-th table of the N tables cannot be stored in the at least one memory;
  • the forwarding device sends the first message to the controller
  • a is a positive integer and a is less than or equal to N.
  • the method further includes:
  • the forwarding device receives a second message sent by the controller, where the second message is used to indicate that the forwarding device tries to store the a-th table in the N tables;
  • the forwarding device operates in a best effort mode according to the second message and determines that the a-th table of the N tables is to be stored in the second memory of the at least one memory;
  • the forwarding device generates a third message, where the third message is used to notify the forwarding device that when the a-th table in the N tables is to be stored in the second memory, the N tables are The actual performance of the forwarding service supported by the a-th table;
  • the forwarding device transmits the third message to the controller.
  • a method for determining a storage location of a table including:
  • the controller generates M pieces of description information, and the M pieces of description information are in one-to-one correspondence with the M forwarding services, and each of the M pieces of description information includes a predetermined performance of the corresponding forwarding service and performs the corresponding
  • the identifier of the table to be searched for by the forwarding service the N forwarding tables are required to be searched, and the set of predetermined performance components of the M forwarding services includes Q elements, and the Q elements are respectively the first one.
  • Each element represents a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of C r x line rate, and M, N, Q, and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ 1;
  • the controller generates Q simultaneous access information according to the M pieces of description information, where the rth simultaneous access information of the Q simultaneous access information indicates whether each of the N tables needs The same forwarding service access is scheduled to be 0 ⁇ ⁇ line rate;
  • the controller sends the Q simultaneous access information to the forwarding device.
  • the Q simultaneous access information is a matrix of Q ⁇ X ,, and an element of each matrix of the Q ⁇ X ⁇ matrix Is 1 or 0,
  • the jth table in the table needs to be accessed by at least one forwarding service whose predetermined performance in the M forwarding services is 0 ⁇ line rate.
  • the i-th table and the N-N of the N tables are represented
  • the jth table in the table does not need to be accessed by any one of the M forwarding services with a predetermined performance of C r x line rate.
  • i and j are positive integers, and i and j are both less than or equal to
  • the M description information is used to enable the forwarding device to determine the N
  • the method is further stored in at least one of the forwarding devices, the method further comprising:
  • a is a positive integer and a is less than or equal to N.
  • the method further includes:
  • the controller generates a second message, where the second message is used to indicate that the forwarding device tries to store the a-th table in the N tables;
  • the controller sends the second message to the forwarding device to cause the forwarding device to operate in a best effort mode and determine that the a-th table of the N tables is to be stored in the at least one The second memory of the memory;
  • a forwarding device including:
  • a receiving unit configured to receive M pieces of description information sent by the controller, where the M pieces of description information correspond to M forwarding services, where each description information of the M pieces of description information includes a predetermined forwarding service
  • the elements are the first element to the Qth element, respectively, and each of the Q elements represents a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of 0 ⁇ ⁇ line speed, M, N, Q and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ 1;
  • a generating unit configured to generate Q simultaneous access information according to the M description information received by the receiving unit, where the rth simultaneous access information in the Q simultaneous access information represents the N Whether each two tables need to be accessed by the same forwarding service with a predetermined performance of 0 ⁇ line rate; the one table will be stored in at least one memory of the forwarding device; the memory. '' ⁇
  • the Q simultaneous access information is a matrix of Q NXNs, and an element of each N ⁇ N matrix of the Q NXN matrix is 1 or 0. ,
  • the jth table in the table needs to be accessed by at least one forwarding service whose predetermined performance in the M forwarding services is 0 ⁇ line rate.
  • the r ⁇ X ⁇ of the matrix of the Q ⁇ X ⁇ is in the i-th row and the j-th column of the matrix If the element is 0, it means that the i-th table in the N tables and the j-th table in the N tables do not need to be simultaneously determined by the M forwarding services to be C r x line rate. Any one of the forwarding service access,
  • i and j are positive integers, and i and j are both less than or equal to
  • the determining unit is specifically configured to determine that each of the N tables is to be stored in In at least one memory of the forwarding device,
  • the determining unit specifically includes a determining subunit for determining that the mth table of the N tables is to be stored in at least one memory of the forwarding device, where the determining subunit includes:
  • a first determining subunit configured to determine whether each of the N tables is already stored in a first memory of the at least one memory, and a matrix of 1 XN is used to represent each of the N tables Whether the table is already stored in the first memory, specifically, the first column element to the Nth column element of the matrix of the lx N are respectively used to represent the first table of the N tables to the N Whether the Nth table in the table is already stored in the first memory, wherein the i-th column element of the matrix of the lx N is used to indicate whether the i-th table in the N tables is already stored in In the first memory, if the ith column element of the matrix of 1 ⁇ ⁇ is 1, it indicates that the first memory has stored the ith table in the N tables, if the matrix of 1 XN If the ith column element is 0, it means that the first memory does not store the ith table of the N tables;
  • a second determining subunit configured to use an element of the mth row of each matrix of the ⁇ N of the matrix of the Q NXNs generated by the generating unit and the 1x determined by the first determining subunit
  • the corresponding elements of the matrix of N are ANDed, and the result is a number of 1, wherein the elements of the mth row of the matrix of the rth NN in the matrix of the Q ⁇ ⁇ ⁇ and the 1 x N
  • the number of 1s in the result of the operation of the corresponding elements of the matrix is &;
  • A) ⁇ B determining that the mth table in the N tables is to be stored in the first memory; wherein m is a positive integer less than or equal to N, & is a non-negative integer, & ⁇ N, A and B are positive numbers, A represents the bandwidth that the actual performance needs to occupy for the line rate forwarding service, and B represents the maximum bandwidth that the first memory can provide.
  • the forwarding device Also includes a sending unit;
  • the generating unit is further configured to: when the determining unit determines that the a-th table of the N tables cannot be stored in the at least one memory, generate a first message, where the first message is used for advertising Determining, by the forwarding device, that the a-th table of the N tables cannot be stored in the at least one memory;
  • the sending unit is configured to send the first message generated by the generating unit to the controller
  • a is a positive integer and a is less than or equal to N.
  • the receiving unit is further configured to receive a second message sent by the controller, where the second message is used to indicate that the forwarding device tries to store the a-th table in the N tables;
  • the determining unit is further configured to work according to the best effort mode according to the second message received by the receiving unit, and determine that the a-th table in the N tables is to be stored in the at least one memory In the second memory;
  • the generating unit is further configured to generate a third message, where the third message is used to notify the determining unit that when the a-th table in the N tables is to be stored in the second memory, The actual performance of the forwarding service supported by the a-th table in the N tables;
  • the sending unit is further configured to send the third message generated by the generating unit to the controller.
  • a controller including:
  • a generating unit configured to generate M pieces of description information, where the M pieces of description information correspond to the M forwarding services, where each of the M pieces of description information includes a predetermined performance of the corresponding forwarding service and an execution center
  • the corresponding forwarding service needs to find the identifier of the table, and the M forwarding services need to be searched for N tables
  • the predetermined performance component set of the M forwarding services includes Q elements, where the Q elements are respectively a first element to a Qth element, each of the Q elements representing a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of C r x line rate, M, N, Q and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ 1;
  • a sending unit configured to send the M description information generated by the generating unit to the forwarding device.
  • the M pieces of description information are used to enable the forwarding device to determine that the N tables are to be stored in at least one of the forwarding devices, where
  • the controller also includes:
  • a receiving unit configured to receive a first message sent by the forwarding device, where the first message is used to notify the forwarding device that the j-th table in the N tables cannot be stored in the forwarding device
  • the first message is used to notify the forwarding device that the j-th table in the N tables cannot be stored in the forwarding device
  • j is a positive integer and j is less than or equal to N.
  • the generating unit is further configured to generate a second message, where the second message is used to indicate that the forwarding device tries to store the jth table in the N tables;
  • the sending unit is further configured to send the second message generated by the generating unit to the forwarding device, so that the forwarding device works in a best effort mode and determines the jth in the N tables
  • the tables will be stored in the second memory of the at least one memory;
  • the receiving unit is further configured to receive a third message sent by the forwarding device, where the third message is used to notify the forwarding device that the jth table in the N tables is to be stored in the In the second memory, the actual performance of the forwarding service supported by the jth table in the N tables.
  • a forwarding device including:
  • a receiving unit configured to receive Q simultaneous access information sent by the controller, where the rth simultaneous access information of the Q simultaneous access information indicates whether each of the N tables needs to be scheduled The same forwarding service access with a performance of 0 ⁇ line rate needs to find the above table when performing one forwarding service;
  • a determining unit configured to determine, according to the Q simultaneous access information received by the receiving unit, that the one table is to be stored in at least one memory of the forwarding device; a memory.
  • the Q simultaneous access information is a Q N X N matrix, and an element of each N X N matrix in the Q N X N matrix is 1 or 0,
  • the element of the i-th row and the j-th column of the matrix of the r-th NXN in the matrix of the Q NXNs is 1, indicating the i-th table of the N tables and the number of the N tables j tables need At the same time, it is accessed by at least one forwarding service whose predetermined performance in the M forwarding services is C r x line rate.
  • the element of the i-th row and the j-th column of the matrix of the r-th NXN in the matrix of the Q NXNs is 0, indicating the i-th table in the N tables and the number of the N tables
  • the j tables need not be simultaneously accessed by any one of the M forwarding services whose performance is C r x line rate.
  • i and j are positive integers, and i and j are both less than or equal to
  • the determining unit is configured to determine that each of the N tables is to be stored in In at least one memory of the forwarding device,
  • the determining unit includes a determining subunit for determining that the mth of the N tables is to be stored in the at least one memory of the forwarding device, where the determining subunit specifically includes:
  • a first determining subunit configured to determine whether each of the N tables is already stored in a first memory of the at least one memory, and a matrix of lx N is used to represent each of the N tables Whether the table is already stored in the first memory of the forwarding device, specifically, the first column element to the Nth column element of the 1 XN matrix are respectively used to represent the first table of the N tables to Whether the Nth table of the N tables has been stored in the first memory, wherein the ith column element of the matrix of 1 ⁇ ⁇ is used to represent the ith table of the N tables Whether it has been stored in the first memory, if the i-th column element of the 1 XN matrix is 1, it indicates that the first memory has stored the i-th table in the N tables, if the 1 The ith column element of the XN matrix is 0, indicating that the first memory does not store the ith table of the N tables;
  • a second determining subunit configured to: use an element of the mth row of the matrix of each NXN of the matrix of the Q NXNs and a corresponding element of the matrix of the 1 ⁇ ⁇ determined by the first determining subunit And an operation, the number of which is determined to be 1, wherein the elements of the mth row of the matrix of the rth NXN in the matrix of the Q ⁇ ⁇ N are ANDed with the corresponding elements of the matrix of the 1 XN The number of 1 in the result is &;
  • m is a positive integer less than or equal to N
  • & is a non-negative integer
  • & ⁇ N A and B are positive numbers
  • A represents the actual performance of the line rate forwarding service needs to occupy bandwidth
  • B represents the number The maximum bandwidth a memory can provide.
  • the forwarding device further includes generating Unit and sending unit,
  • the generating unit is further configured to: when the determining unit determines that the a-th table of the N tables cannot be stored in the at least one memory, generate a first message, where the first message is used for advertising Determining, by the forwarding device, that the a-th table of the N tables cannot be stored in the at least one memory;
  • the sending unit is configured to send the first message generated by the generating unit to the controller
  • a is a positive integer and a is less than or equal to N.
  • the receiving unit is further configured to receive a second message sent by the controller, where the second message is used to indicate that the forwarding device tries to store the a-th table in the N tables;
  • the determining unit is further configured to work according to the best effort mode according to the second message received by the receiving unit, and determine that the a-th table in the N tables is to be stored in the at least one memory In the second memory;
  • the generating unit is further configured to generate a third message, where the third message is used to notify the forwarding device that when the a-th table in the N tables is to be stored in the second memory, The actual performance of the forwarding service supported by the a-th table in the N tables;
  • the sending unit is further configured to send the third message generated by the generating unit to the controller.
  • a controller including:
  • a generating unit configured to generate M pieces of description information, where the M pieces of description information correspond to the M forwarding services, where each of the M pieces of description information includes a predetermined performance of the corresponding forwarding service and an execution center
  • the corresponding forwarding service needs to find the identifier of the table, and the M forwarding services need to be searched for N tables
  • the predetermined performance component set of the M forwarding services includes Q elements, where the Q elements are respectively a first element to a Qth element, each of the Q elements representing a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of C r x line rate, M, N, Q and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ 1;
  • the generating unit is further configured to generate Q simultaneous access information according to the M description information, where the rth simultaneous access information in the Q simultaneous access information represents each of the N tables Whether it is required to be the same forwarding service access with a predetermined performance of 0 ⁇ line rate;
  • the Q simultaneous access information is a matrix of Q ⁇ X ,, and an element of each matrix of the Q ⁇ X ⁇ matrix Is 1 or 0,
  • the jth table in the table needs to be accessed by at least one forwarding service whose performance is Cr x line rate predetermined in the M forwarding services.
  • the element of the i-th row and the j-th column of the matrix of the r-th NXN in the matrix of the Q NXNs is 0, indicating the i-th table in the N tables and the number of the N tables
  • the j tables need not be simultaneously accessed by any one of the M forwarding services whose performance is C r x line rate.
  • i and j are positive integers, and i and j are both less than or equal to
  • the M description information is used to enable the forwarding device to determine the N
  • the controller is further configured to receive the first message sent by the forwarding device, where the first message is used to notify the forwarding device to determine
  • the a-th table of the N tables cannot be stored in at least one memory of the forwarding device
  • a is a positive integer and a is less than or equal to N.
  • the generating unit is further configured to generate a second message, where the second message is used to indicate that the forwarding device tries to store the a-th table in the N tables;
  • the sending unit is further configured to send the second message generated by the generating unit to the forwarding device, so that the forwarding device works in a best effort mode and determines the first of the N tables.
  • a table will be stored in the second memory of the at least one memory;
  • the receiving unit is further configured to receive a third message sent by the forwarding device, where the third message is used to notify the forwarding device that the a-th table in the N tables is to be stored in the first In the second memory, the actual performance of the forwarding service supported by the a-th table in the N tables.
  • the embodiment of the present invention generates the simultaneous access information of the table that needs to be searched for by the forwarding service by forwarding the description information of the service.
  • the simultaneous access information of the table it is determined that the table that needs to be searched for performing the forwarding service will be stored in the storage location in the forwarding device.
  • Performing a forwarding service requires searching the table.
  • Performing a lookup on the table consumes the hardware resources of the forwarding device. For example, the bandwidth of the memory of the forwarding device is occupied.
  • the actual performance of the forwarding service is constrained by the available hardware resources of the forwarding device. For example, it is subject to the available bandwidth of the memory of the forwarding device.
  • each table occupies the available hardware resources of the forwarding device, which affects the actual performance of the forwarding service.
  • the storage location of the table determined by the above technical solution helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • FIG. 1 is a flow chart of a method of determining a storage location of a table in accordance with one embodiment of the present invention.
  • FIG. 2 is a flow chart of a method of determining a storage location of a table in accordance with another embodiment of the present invention.
  • 3 is a flow chart of a method of determining a storage location of a table in accordance with another embodiment of the present invention.
  • 4 is a flow chart of a method of determining a storage location of a table in accordance with another embodiment of the present invention.
  • Figure 5 is a flow diagram of a method of determining a storage location of a table in accordance with another embodiment of the present invention.
  • 6 is a directed graph of a multi-branch formed by a forwarding service according to another embodiment of the present invention.
  • Fig. 7 is a diagram showing three forwarding services of which the predetermined performance shown in Fig. 6 is a line speed.
  • Figure 8 is a diagram showing the two forwarding services of the predetermined performance shown in Figure 6 at half speed.
  • Figure 9 is a matrix of the line speed simultaneous access information of the six tables of Figure 6.
  • Figure 10 is a matrix of half-speed simultaneous access information for the 16 tables of Figure 6.
  • 11 is a diagram showing an example of a first table storage bitmap of a first memory of a forwarding device according to another embodiment of the present invention.
  • Figure 12 is a diagram showing an example of a second table storage bitmap after the first memory update of the forwarding device in accordance with another embodiment of the present invention.
  • Figure 13 is a flow chart of a method of determining a storage location of a table in accordance with another embodiment of the present invention.
  • Figure 14 is a block diagram of a forwarding device in accordance with one embodiment of the present invention.
  • FIG. 15 is a block diagram of a controller in accordance with one embodiment of the present invention.
  • Figure 16 is a block diagram of a forwarding device in accordance with another embodiment of the present invention.
  • FIG 17 is a block diagram of a controller in accordance with another embodiment of the present invention.
  • Figure 18 is a block diagram of a forwarding device in accordance with another embodiment of the present invention.
  • Figure 19 is a block diagram of a controller in accordance with another embodiment of the present invention.
  • Figure 20 is a block diagram of a forwarding device in accordance with another embodiment of the present invention.
  • FIG. 21 is a block diagram of a controller in accordance with another embodiment of the present invention. detailed description
  • the forwarding device and the controller are involved in the following embodiments.
  • the forwarding device can be a router, a network switch, a firewall, a load balancer, or a data center.
  • the forwarding device and the controller may be located in a software-defined networking (English: software-defined networking, SDN for short).
  • the forwarding device may be an SDN switch.
  • the controller can be an SDN controller.
  • the SDN switch may be an OpenFlow Switch (English: OpenFlow Switch).
  • the SDN controller may be an OpenFlow controller (English: OpenFlow Conroller).
  • the OpenFlow switch and the OpenFlow controller can communicate through the control channel.
  • OpenFlow Switches, OpenFlow Controllers, and Control Channels refer to the OpenFlow Switch Specification Version 1.4.0 (English: OpenFlow Switch Specification version 1.4.0).
  • the performance referred to in the following embodiments may be bandwidth.
  • the performance is the maximum bandwidth that the forwarding device can achieve.
  • the forwarding service involved in the following embodiments may be a Layer 2 forwarding service, a Layer 3 forwarding service, a Layer 4 forwarding service, a Multiprotocol Label Switching (MPLS: MPLS) forwarding service, or a virtual private network. : virtual private network, referred to as: VPN) forwarding service.
  • the Layer 2 forwarding service may be a media access control (English: Media Access Control, MAC for short) protocol forwarding service.
  • the Layer 3 forwarding service may be an Internet protocol (English: internet protocol, referred to as IP) forwarding service.
  • the Layer 4 forwarding service may be a Transmission Control Protocol (English: Transmission Control Protocol, TCP for short) forwarding service or a User Datagram Protocol (UDP) forwarding service.
  • the VPN forwarding service may be a Layer 2 virtual private network (L2VPN) forwarding service or a Layer 3 virtual private network (L3VPN) forwarding service.
  • the forwarding service may process a packet of a certain protocol.
  • the MAC protocol forwarding service can process the MAC protocol packet.
  • the IP forwarding service can process IP packets.
  • the TCP forwarding service can process TCP packets.
  • the UDP forwarding service can process UDP packets.
  • the tables involved in the following embodiments may be a routing table, a MAC protocol table, or an inbound label map (ILM) table.
  • the table referred to in the following embodiments may also be a sub-table included in a routing table, a MAC protocol table, or an ILM table.
  • the routing table may include a mapping relationship between a destination IP address and a next hop.
  • the routing table can include a first sub-table and a second sub-table.
  • the first sub-table may include a mapping relationship between a destination IP address and an index of a next hop.
  • the second sub-table may be a mapping relationship between an index including the next hop and the next hop.
  • the embodiment of the present invention does not limit the format of the table and the contents of the table.
  • FIG. 1 is a flow chart of a method of determining a storage location of a table in accordance with one embodiment of the present invention. The method shown in Figure 1 includes:
  • the forwarding device receives M description information sent by the controller, where the M description information is corresponding to the M forwarding services, where each description information of the M description information includes a predetermined performance and execution of the corresponding forwarding service.
  • the corresponding forwarding service needs to identify the identifier of the table, and the M forwarding services need to find N tables, and the predetermined performance component set of the M forwarding services includes Q elements, and the Q elements are the first element respectively.
  • the element Q each element represents a predetermined performance, wherein the Q element in the r th element represents a predetermined line-rate performance for C r x, M, N, Q, and r Is a positive integer, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ l. 102.
  • the forwarding device generates Q simultaneous access information according to the M description information, and the rth simultaneous access information in the Q simultaneous access information indicates whether each of the two tables needs to be scheduled to have a performance of 0. ⁇ Line rate of the same forwarding service access.
  • the forwarding device determines, according to the Q simultaneous access information, that the table is to be stored in at least one memory of the forwarding device.
  • the forwarding device stores the one table in the at least one memory.
  • the embodiment of the present invention forwards the description information of the service, where the description information includes the predetermined performance of the forwarding service, and generates the simultaneous access information of the table that needs to be searched for performing the forwarding service. Based on the simultaneous access information of the table, it is determined that the table that needs to be searched for performing the forwarding service is to be stored in at least one of the memories in the forwarding device. It helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • each description information in the description information includes a predetermined performance of the forwarding service corresponding to the each description information and an identifier of all the tables that need to be searched for the corresponding forwarding service.
  • the predetermined performance of the corresponding forwarding service may be a line speed, or may be a line rate multiplied by a coefficient. This coefficient is a value between 0 and 1.
  • the identifier of the table may be the serial number of the table, or may be other identifiers of the table, which is not limited by the embodiment of the present invention.
  • the forwarding service may include one or more forwarding services in a Layer 2 forwarding service, a Layer 3 forwarding service, a Layer 4 forwarding service, an MPLS forwarding service, and a VPN forwarding service.
  • the Layer 2 forwarding service may be a MAC protocol forwarding service.
  • the Layer 3 forwarding service may be an IP forwarding service.
  • the four-layer forwarding service may be a TCP forwarding service.
  • the VPN forwarding service may be an L2VPN forwarding service or an L3VPN forwarding service.
  • the M forwarding services can process the packets of the M protocols separately.
  • the packet of the M protocol may be at least one of a MAC protocol packet, an IP packet, a TCP packet, and a UDP packet.
  • the N tables may include at least two tables in a routing table, a MAC protocol table, and an ILM table.
  • the forwarding device may receive, by using a control channel, M pieces of description information sent by the controller.
  • the forwarding device may receive M description information from the controller in other manners. The invention is not limited thereto.
  • the forwarding device may receive a control message sent by the controller, where the control message includes M pieces of description information.
  • the invention is not limited thereto.
  • the embodiment of the present invention does not limit the type of the predetermined performance of the forwarding service, that is, the value of Q. Specifically,
  • the M forwarding services can be divided into three groups, and the predetermined performances of the forwarding services in each group of forwarding services are the same as each other.
  • the Q simultaneous access information may be represented as a matrix of Q N ⁇ ⁇ .
  • the elements of the matrix of each of the Q ⁇ ⁇ N ⁇ N are 1 or 0.
  • the element of the i-th row and the j-th column of the matrix of the r-th NXN in the matrix of the Q NXNs is 1, it indicates that the i-th table in the N tables and the j-th table in the N tables are required
  • it is accessed by at least one forwarding service whose predetermined performance in the M forwarding services is C r x line rate.
  • the i-th table in the N tables and the number in the N tables are 0, the i-th table in the N tables and the number in the N tables are The j tables need not be simultaneously accessed by any one of the forwarding services of the M forwarding services with a predetermined performance of 0 ⁇ line rate.
  • i and j are positive integers, and both i and j are less than or equal to N.
  • the Q simultaneous access information includes a matrix of 1 NXN.
  • the matrix of the 1 NXN The elements of the i-th row and the j-th column indicate whether the i-th table in the N tables and the j-th table in the N tables need to be accessed by at least one service at the same time.
  • the Q simultaneous access information includes three NXN matrices, and the first ⁇ ⁇ N matrix of the three NXN matrices, the i th row and the jth column The element indicates whether the i-th table in the N tables and the j-th table in the N tables need to be accessed by at least one forwarding service with a predetermined performance for the line rate.
  • the second NXN of the matrix of the three NXNs The elements of the i-th row and the j-th column of the matrix represent whether the i-th table in the N tables and the j-th table in the N tables need to be accessed by at least one forwarding service at the same time with a predetermined performance of half speed.
  • the elements of the i-th row and the j-th column of the third NXN matrix of the NXN matrix represent whether the i-th table in the N tables and the j-th table in the N tables need to be simultaneously scheduled to have a slow performance At least one forwarding service access.
  • Q simultaneous access information may also be represented in other forms.
  • it can be in the form of an array, or it can be in the form of a bitmap.
  • the forwarding device first determines an identifier of a table that has been stored in a memory of the forwarding device, and determines, between the table that has been stored in the memory and the table that needs to be stored, according to the Q simultaneous access information.
  • the access relationship further determines whether the table currently needed to be stored can be stored in the memory.
  • the simultaneous access relationship refers to whether two tables need to be accessed by the same forwarding service.
  • the predetermined performance of all the forwarding services corresponding to the table stored in the memory can still be satisfied, and the storage location of the table to be stored can be determined as This memory. If the table to be stored is stored in the memory, the predetermined performance of any of the forwarding services associated with the table stored by the memory cannot be satisfied, and it is determined at this time that the table to be stored cannot be stored in the memory. In this case, it can be assumed that the table to be stored is stored in another memory of the forwarding device, and a judgment similar to the memory is made.
  • determining that N tables are to be stored in at least one memory of the forwarding device includes determining that each of the N tables is to be stored in at least one memory of the forwarding device.
  • the at least one memory of the forwarding device may be one memory or a plurality of memories.
  • the first memory is included in the at least one memory.
  • determining whether the table to be stored is storable in the first memory of the at least one memory comprises: according to the simultaneous access relationship between the table to be stored and other tables, the table already stored in the first memory and the The maximum bandwidth that the first memory can provide to determine whether the stored table can be stored in the first memory.
  • the method specifically includes: the forwarding device determining each of the N tables Whether it has been stored in the first memory.
  • a matrix of 1 XN is used to indicate whether each of the N tables is already stored in the first memory of the forwarding device.
  • the first column element to the Nth column element of the 1 XN matrix are respectively used to indicate whether the first table of the N tables to the Nth table of the N tables are already stored in the first memory.
  • the i-th column element of the matrix of lx N is used to indicate whether the i-th table in the N tables has been stored in the first memory.
  • the forwarding device determines whether the first memory of the forwarding device has stored the i-th table in the N tables, and if the i-th column of the 1 XN matrix is 0, the forwarding is performed.
  • the first memory of the device does not store the ith table of the N tables. Specifically, when any of the N tables is not stored in the first memory of the forwarding device, the elements of each column of the 1 ⁇ N matrix are 0.
  • the forwarding device performs an operation on the element of the mth row of the matrix of each NXN in the matrix of the Q NXNs determined in 102, and the corresponding element of the matrix of lxN, and determines the number of the result to be 1.
  • the number of elements of the mth row of the matrix of the rth ⁇ N of the Q ⁇ N matrix and the corresponding element of the matrix of the lx ⁇ are 1 and the number is 1.
  • the elements of the mth row of the rth ⁇ ⁇ matrix in the Q ⁇ matrix correspond to the N elements in the matrix of the lx N.
  • the N elements of the mth row and the N elements of the 1 XN matrix have the same element as the corresponding relationship.
  • the two numbers of the AND operations are respectively located in the mth row of the matrix of the rth NXN in the matrix of Q NXNs, and the matrix of lx N. And the number of columns in which these two numbers are located is the same.
  • the forwarding device is based on maxdPi+l) X d XA, ..., (P Q +1) C Q x A) ⁇ B, the forwarding device determines that the mth table in the N tables will be stored in In the first memory. That is to say, for Q positive integers whose r values are 1 to Q, respectively, the values of the corresponding Q (&+l)x C r x ⁇ can be obtained.
  • the maximum value of the values of the Q (P r +l)x C x A is less than or equal to B, it may be determined that the position where the mth table of the N tables is to be stored is the first memory. It can also be understood that the position of the mth table of the N tables to be stored in the forwarding device is the first memory.
  • m is a positive integer less than or equal to N
  • & is a non-negative integer
  • & ⁇ N A and B are positive numbers
  • A represents the bandwidth required for the forwarding service whose actual performance is the line rate
  • B represents the first memory. The maximum bandwidth that can be provided.
  • the forwarding device first determines the table already stored in the first memory, and represents the matrix of lx N, where the m of the matrix of the lx N The element of the column is 0.
  • the N column elements of the l x N matrix are all 0.
  • the already stored table has an element of 1 at a corresponding position of the 1 X N matrix.
  • the forwarding device stores the mth table in the N tables after the first memory, and updates the mth column element of the matrix of 1 ⁇ from 0 to 1.
  • the forwarding device determines that the mth table in the N tables will be stored in the first memory.
  • the predetermined performance of the M forwarding services is line speed or half speed or slow speed.
  • l) x A, (P 2 + l) x 0.5 x A) ⁇ B the forwarding device determines that the mth table of the N tables will be stored in the first memory.
  • the forwarding device can determine, one by one, the location at which each of the N tables will be stored.
  • the forwarding device when the forwarding device determines that the a-th table of the N tables cannot be stored in the at least one memory according to the Q simultaneous access information, the first message may be generated.
  • the first message is used to announce that the forwarding device determines that the a-th table in the N tables cannot be stored in the at least one memory. Further the forwarding device can send the first message to the controller.
  • a is a positive integer and a is less than or equal to N.
  • the forwarding device determines that the a-th table of the N tables cannot be stored in at least one memory of the forwarding device.
  • the forwarding device may receive a second message sent by the controller, where the second message is used to indicate that the forwarding device tries to store the a-th table in the N tables.
  • the forwarding device can operate in a best effort mode based on the second message and determine that the a-th table in the N tables is to be stored in the second memory of the at least one memory.
  • the forwarding device generates a third message, where the third message is used to notify the forwarding device that the a-th table in the N tables is to be stored in the second memory, the a-th table in the N tables The actual performance of the supported forwarding services.
  • the forwarding device can then send the third message to the controller.
  • the third message should include multiple actual performances corresponding to the multiple forwarding services.
  • the second memory herein may be the first memory or another memory of the at least one memory that is different from the first memory.
  • the invention is not limited thereto.
  • the location where the a-th table of the N tables is to be stored may be randomly determined. That is, the second memory can be any one of the at least one memory.
  • the location in the table in which the predetermined high performance forwarding service is to be stored may be preferentially determined. It can be understood that the forwarding device preferentially guarantees the actual performance of the larger forwarding service.
  • the forwarding device determines the first a The location where the tables will be stored is the second memory, and the bandwidth of the second memory is B'.
  • the elements of the a-th row in the first NXN matrix are ANDed with the corresponding elements in the table storage bitmap of the second memory, and the number of the result is 1 is the a-th row in the second ⁇ ⁇ ⁇ matrix
  • the element is ANDed with the corresponding element in the table storage bitmap of the second memory, and the number of the determined result is 1 is P 2 ; the element of the a row in the third NXN matrix and the table storage bit of the second memory
  • the corresponding elements in the figure are ORed, and the number of 1s is determined to be P 3 .
  • P 2 and P 3 are non-negative integers smaller than N.
  • the above third message can be used to announce that the a-th table will be stored
  • the actual performance of the forwarding service that can be supported in the second memory is: need to find the predetermined performance of the a-th table, the line rate of the forwarding service can actually reach 1 / (1 + ) times the line speed, need to find
  • the predetermined performance of the a-th table is that the half-speed forwarding service can actually reach a half speed of 2/(1+ ⁇ 2 ) times.
  • the memory that can guarantee the actual performance of the forwarding service with the predetermined performance as the line rate is preferentially stored.
  • the embodiment of the present invention forwards the description information of the service, where the description information includes the predetermined performance of the forwarding service, generates the simultaneous access information of the table that needs to be searched for the forwarding service, and determines that the forwarding service needs to be searched according to the simultaneous access information of the table.
  • the table will be stored in at least one memory in the forwarding device. The location of the table determined by the above technical solution to be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • FIG. 2 is a flow chart of a method of determining a storage location of a table in accordance with another embodiment of the present invention.
  • the corresponding embodiment of Fig. 2 is a further illustration of the embodiment corresponding to Fig. 1.
  • the method shown in Figure 2 includes:
  • the controller generates M pieces of description information, where the M pieces of description information are in one-to-one correspondence with the M forwarding services, and each of the M pieces of description information includes a predetermined performance of the corresponding forwarding service and performs the corresponding forwarding.
  • Each of the Q elements represents a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of C r x line rate, and M, N, Q, and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ l.
  • the controller sends the M description information to the forwarding device.
  • the 202 may specifically include: the controller sends the M description information to the forwarding device, so that the forwarding device determines that the N tables that the M forwarding service needs to search are stored in the forwarding device. At least one memory in preparation.
  • the embodiment of the present invention forwards the description information of the service, where the description information includes the predetermined performance of the forwarding service, and generates the simultaneous access information of the table that needs to be searched for performing the forwarding service. Based on the simultaneous access information of the table, it is determined that the table that needs to be searched for performing the forwarding service is to be stored in at least one of the memories in the forwarding device.
  • Performing a forwarding service requires searching the table.
  • Performing a lookup on a table consumes the hardware resources of the forwarding device. For example, the bandwidth of the memory of the forwarding device is occupied.
  • the actual performance of the forwarding service is constrained by the available hardware resources of the forwarding device. For example, it is subject to the available bandwidth of the memory of the forwarding device.
  • both tables with simultaneous access relationships are looked up.
  • each table occupies the available hardware resources of the forwarding device, which affects the actual performance of the forwarding service.
  • the M description information sent by the controller to the forwarding device includes the simultaneous access information of the table. Therefore, when the forwarding device determines that the N tables are in the storage location of the forwarding device, it may consider whether the N tables have a simultaneous access relationship. Therefore, the above technical solution helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • each description information includes a predetermined performance of the forwarding service corresponding to each of the description information and an identifier of all the tables that need to be searched for by performing the corresponding forwarding service.
  • the predetermined performance of the corresponding forwarding service may be a line speed, or may be a line rate multiplied by a coefficient, and the coefficient is any value between 0 and 1.
  • the identifier of the table may be the serial number of the table, or may be other identifiers of the table, which is not limited by the present invention.
  • the embodiment of the present invention does not limit the type of predetermined performance of the forwarding service, that is, the value of Q. specifically,
  • the M description information may be a user of the controller, for example, the operator is pre-stored in the controller, or the M description information may also be obtained by the controller from other devices or devices.
  • the invention is not limited thereto.
  • the controller may send M descriptions through the control channel. Describe the information to the forwarding device. Alternatively, the controller may also send M description information to the forwarding device in other manners. The invention is not limited thereto.
  • the controller may send a control message to the forwarding device, where the control message includes M pieces of description information.
  • the control message includes M pieces of description information.
  • the invention is not limited thereto.
  • the controller may receive a first message sent by the forwarding device, where the first message is used to notify the forwarding device that the j-th table in the N tables cannot be stored in the forwarding device.
  • the first message is used to notify the forwarding device that the j-th table in the N tables cannot be stored in the forwarding device.
  • j is a positive integer less than or equal to N.
  • the controller may receive no further processing after receiving the first message.
  • the controller may generate a second message, where the second message is used to indicate that the forwarding device tries to store the first j tables. Further, the controller can send the second message to the forwarding device such that the forwarding device operates in a best effort mode and determines that it is to be stored in the second memory of the at least one memory of the forwarding device. And, the controller may receive a third message sent by the forwarding device, where the third message is used to notify that when the forwarding device determines that the jth table is to be stored in the second memory, the jth table supports The actual performance of the forwarding service.
  • the description information of the forwarding service in the embodiment of the present invention may be defined by a user of the controller, such as an operator.
  • the operator stores the description information of the forwarding service in the controller.
  • the controller may send the added forwarding service or the modified forwarding service description information to the forwarding device in real time. Further, the forwarding device may re-determine the location where the forwarding service needs to find the table to be stored according to the added forwarding service or the modified forwarding service description information.
  • the operator when the operator adds a new forwarding service, the operator defines the description information of the new forwarding service. Then, the controller sends the description information of the new forwarding service to the forwarding device. For example, the operator may add the M+1th forwarding service, where the description information of the M+1th forwarding service may include one or more of the foregoing N tables, or may include at least N tables. A new table. At the same time, the operator may define that the predetermined performance of the M+1th forwarding service is one of the Q elements, or the predetermined performance of the M+1th forwarding service is C Q+1 line rate.
  • the operator when the operator modifies the description information of the forwarding service, the operator may modify the table that the forwarding service needs to look up, or modify the predetermined performance of the forwarding service. Then, the controller sends the modified description information of the forwarding service to the forwarding device. For example, the operator can modify M descriptions
  • the i-th description information corresponding to the i-th forwarding service in the information, the table in which the i-th forwarding service needs to be searched is unchanged, but the predetermined performance of the i-th forwarding service changes.
  • the operator may modify the i-th description information corresponding to the i-th forwarding service in the M description information, where the predetermined performance of the i-th forwarding service is unchanged, but the i-th forwarding service needs to look up the table. The number is increased or decreased.
  • the operator may modify the i-th description information corresponding to the i-th forwarding service in the M description information, and the predetermined performance of the i-th forwarding service and the table that the i-th forwarding service needs to search may change.
  • the invention is not limited thereto.
  • FIG. 3 is a flow chart of a method of determining a storage location of a table in accordance with another embodiment of the present invention. Regarding the technical terms involved in the embodiment corresponding to FIG. 3, reference may be made to the corresponding embodiment of FIG. 1. Referring to Figure 3, the method shown in Figure 3 includes:
  • the forwarding device receives the Q simultaneous access information sent by the controller, where the rth simultaneous access information in the Q simultaneous access information indicates whether each of the N tables needs to be scheduled to have a performance of 0. ⁇
  • the same forwarding service access is required for the line rate. To perform one forwarding service, you need to find the two tables.
  • the forwarding device determines, according to the Q simultaneous access information, that the table is to be stored in at least one memory of the forwarding device.
  • the forwarding device stores the one table in the at least one memory.
  • the forwarding device determines that the access table according to the table is to be stored in at least one memory of the forwarding device.
  • the simultaneous access information of the table may be determined by the controller by using the description information of the forwarding service, and further sending the simultaneous access information of the table to the forwarding device. Therefore, the above technical solution helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • the Q simultaneous access information may be represented as a Q ⁇ matrix.
  • the elements of the matrix of each ⁇ X ⁇ in the Q ⁇ X ⁇ matrix are 1 or 0.
  • the ith table in the N tables and the number of the N tables The j tables need to be accessed by at least one forwarding service whose predetermined performance in the M forwarding services is C r x line rate.
  • the i-th table in the N tables and the number in the N tables are The j tables need not be simultaneously accessed by any one of the forwarding services of the M forwarding services with a predetermined performance of 0 ⁇ line rate.
  • i and j are positive integers, and both i and j are less than or equal to N.
  • the Q simultaneous access information may include one matrix of N x N.
  • the elements of the i-th row and the j-th column of the matrix of ⁇ ⁇ represent whether the i-th table in the N tables and the j-th table in the N tables need to be accessed by at least one service at the same time.
  • the Q simultaneous access information may include three ⁇ ⁇ N matrices, and the first ⁇ ⁇ N matrix of the first ⁇ ⁇ N matrix
  • the element of the jth column of the i row indicates whether the i th table in the N tables and the j th table in the N tables need to be accessed by at least one forwarding service whose predetermined performance is the line rate at the same time.
  • the matrix of the 3 NXNs The element of the i-th row and the j-th column of the second NXN matrix indicates whether the i-th table in the N tables and the j-th table in the N tables need to be forwarded at least one half of the performance at the same time.
  • the elements of the i-th row and the j-th column represent the i-th table in the N tables and the j-th table in the N tables At least one forwarding service access that needs to be scheduled at the same time is required to be slow.
  • Q simultaneous access information may also be represented in other forms.
  • it may be in the form of an array, or may be in the form of a bitmap, or may be in other forms, which is not limited by the present invention.
  • 302 can be referred to as 103 in FIG. 1. To avoid repetition, details are not described herein.
  • the forwarding device when the forwarding device determines that the a-th table of the N tables cannot be stored in the at least one memory according to the Q simultaneous access information, the first message may be generated.
  • the first message is used to announce that the forwarding device determines that the a-th table in the N tables cannot be stored in the at least one memory. Further the forwarding device can send the first message to the controller.
  • a is a positive integer and a is less than or equal to N.
  • the forwarding device determines that the a-th table of the N tables cannot be stored in at least one memory of the forwarding device.
  • the forwarding device may receive a second message sent by the controller, where the second message is used to indicate that the forwarding device tries to store the a-th table in the N tables.
  • the forwarding device may work in a best effort mode according to the second message and determine that the a-th table in the N tables is to be stored In a second memory of at least one memory.
  • the forwarding device generates a third message, where the third message is used to notify the forwarding device that the a-th table in the N tables is to be stored in the second memory, the a-th table in the N tables The actual performance of the supported forwarding services.
  • the forwarding device can then send the third message to the controller.
  • the third message should include multiple actual performances corresponding to the multiple forwarding services.
  • the second memory herein may be the first memory or another memory of the at least one memory that is different from the first memory.
  • the invention is not limited thereto.
  • the location where the a-th table of the N tables is to be stored may be randomly determined. That is, the second memory can be any one of the at least one memory.
  • the location in the table in which the predetermined high performance forwarding service is to be stored may be preferentially determined. It can be understood that the forwarding device preferentially guarantees the actual performance of the larger forwarding service.
  • the forwarding device determines that the location where the a-th table is to be stored is the second memory, and the bandwidth of the second memory is B'. It is assumed that the elements of the a-th row in the first NXN matrix and the table storage bits of the second memory The corresponding elements in the figure are ANDed. The number of the determination result is 1. The elements of the a-th row in the second ⁇ ⁇ matrix are compared with the corresponding elements in the table storage bitmap of the second memory, and the result is determined.
  • the number of 1 is P 2 ; the element of the a row in the third NXN matrix is ANDed with the corresponding element in the table storage bitmap of the second memory, and the number of 1 is determined to be P 3 .
  • P 2 and P 3 are non-negative integers smaller than N.
  • the third message can be used to announce that the actual performance of the forwarding service that the a-th table will be stored in the second memory is: a reservation for the a-th table to be looked up Line speed actually forwarding traffic can reach 1 / (1+) times the line rate, the need to find a first predetermined performance table is a half-speed traffic forwarding can actually reach 2 / (1 + ⁇ 2) times the Half speed.
  • the memory that can guarantee the actual performance of the forwarding service with the predetermined performance as the line rate is preferentially stored.
  • the embodiment of the present invention forwards the description information of the service, where the description information includes the predetermined performance of the forwarding service, and generates the simultaneous access information of the table that needs to be searched for performing the forwarding service, and according to the table At the same time accessing the information and the table in which the memory of the forwarding device has been stored, it is determined that the table that needs to be searched for performing the forwarding service will be stored in the storage location in the forwarding device.
  • the storage location of the table determined by the above technical solution helps to make the actual performance of the forwarding service reach the predetermined performance as much as possible.
  • FIG. 4 is a flow chart of a method of determining a storage location of a table in accordance with another embodiment of the present invention.
  • the corresponding embodiment of Figure 4 is a further illustration of the embodiment corresponding to Figure 3.
  • the method shown in Figure 4 includes:
  • the controller generates M description information, where the M description information is in one-to-one correspondence with the M forwarding services, and each description information in the M description information includes a predetermined performance of the corresponding forwarding service and performing the corresponding forwarding service.
  • the identifier of the table to be searched for, the M forwarding services need to find N tables, and the predetermined performance component set of the M forwarding services includes Q elements, and the Q elements are the first element to the Qth element, respectively.
  • Each of the Q elements represents a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of 0 ⁇ ⁇ line rate, and M, N, Q, and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ l.
  • the controller generates Q simultaneous access information according to the M description information, where the rth simultaneous access information of the Q simultaneous access information indicates whether each of the two tables needs to be scheduled to have a performance of 0 ⁇ ⁇ line rate of the same forwarding service access.
  • the controller sends the Q simultaneous access information to the forwarding device.
  • the controller determines the simultaneous access information of the table that the forwarding service needs to look up by forwarding the description information of the service.
  • the simultaneous access information of the table is further sent to the forwarding device.
  • the forwarding device can be made to determine that the table will be stored in at least one memory of the forwarding device based on the simultaneous access information of the table.
  • the location of the table thus determined to be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • 401 can be referred to as 201 in FIG. 2. To avoid repetition, details are not described herein.
  • the Q simultaneous access information may be represented as a Q ⁇ matrix.
  • the elements of the matrix of each ⁇ X ⁇ in the Q ⁇ X ⁇ matrix are 1 or 0.
  • the ith table in the N tables and the number of the N tables The j tables need to be accessed by at least one forwarding service whose predetermined performance in the M forwarding services is 0 ⁇ line rate.
  • i-th table in the N tables and the j-th table in the N tables need not be simultaneously accessed by any one of the forwarding services of the M forwarding services whose performance is C r x line rate.
  • i and j are positive integers, and both i and j are less than or equal to N.
  • the Q simultaneous access information includes a matrix of 1 NXN.
  • the matrix of the 1 NXN The elements of the i-th row and the j-th column indicate whether the i-th table in the N tables and the j-th table in the N tables need to be accessed by at least one service at the same time.
  • the Q simultaneous access information includes three NXN matrices, and the first ⁇ ⁇ N matrix of the three NXN matrices, the i th row and the jth column The element indicates whether the i-th table in the N tables and the j-th table in the N tables need to be accessed by at least one forwarding service with a predetermined performance for the line rate.
  • the second NXN of the matrix of the three NXNs The elements of the i-th row and the j-th column of the matrix represent whether the i-th table in the N tables and the j-th table in the N tables need to be accessed by at least one forwarding service at the same time with a predetermined performance of half speed.
  • the ⁇ ⁇ ⁇ N matrix of the third ⁇ ⁇ N of the matrix of the i-th row of the j-th column element represents the i-th table in the N tables and the j-th table in the N tables need to be simultaneously scheduled
  • the performance is slow for at least one forwarding service access.
  • Q simultaneous access information may also be represented in other forms.
  • it may be in the form of an array, or may be in the form of a bitmap, or may be in other forms, which is not limited by the present invention.
  • the controller may send Q simultaneous access information to the forwarding device through the control channel.
  • the controller can send Q simultaneous access information to the forwarding device by other means.
  • the invention is not limited thereto.
  • the controller may send a control message to the forwarding device, where the control message includes Q simultaneous access information.
  • the control message includes Q simultaneous access information.
  • the invention is not limited thereto.
  • the controller may receive the first message sent by the forwarding device, where the first message is used to notify the forwarding device that the at least one of the N tables cannot be stored in the forwarding device.
  • a is a positive integer less than or equal to N.
  • the controller may receive no further processing after receiving the first message.
  • the controller can generate a second message, which is used to instruct the forwarding device to try to store the a-th table. Further, the controller can send the second message to the forwarding device such that the forwarding device operates in a best effort mode and determines that it is to be stored in the second memory of the at least one memory of the forwarding device. And the third message sent by the forwarding device is used to notify that the forwarding device determines that the a The actual performance of the forwarding service.
  • the description information of the forwarding service in the embodiment of the present invention may be defined by the operator and stored in the controller.
  • the controller sends the description information of the added forwarding service or the modified forwarding service to the forwarding device in real time. Further, the forwarding device may re-determine the location where the forwarding service needs to be searched for the table to be stored according to the added forwarding service or the modified forwarding service description information.
  • the operator when the operator adds a new forwarding service, the operator defines the description information of the new forwarding service. If the table to be searched for the new forwarding service belongs to the foregoing N tables, the controller re-determines and updates in real time the simultaneous access information of the table that the new forwarding service needs to look up according to the description information of the new forwarding service. The simultaneous access information of the table that the new forwarding service needs to look up after being updated is further sent to the forwarding device. If the new forwarding service needs to find a table other than the foregoing N tables, the controller needs to re-determine and update the real-time according to the new forwarding service and the predetermined performance of the new forwarding service. The new forwarding service needs to find the simultaneous access information for all the tables.
  • the simultaneous access information of all the tables that need to be searched for by the new forwarding service after the update is further sent to the forwarding device.
  • the operator may add the M+1th forwarding service, where the M+1th forwarding service may include multiple tables in the foregoing N tables, or may include at least one new table other than the N tables.
  • the operator may define that the predetermined performance of the M+1th forwarding service is one of the Q elements, or the predetermined performance of the M+1th forwarding service is C Q+1 X line rate.
  • the controller may re-determine and update the simultaneous access information of the table related to the M+1th forwarding service according to the description information of the M+1th forwarding service, and perform the M+1 forwarding service with the M+1 forwarding service.
  • the simultaneous access information of the related table is sent to the forwarding device.
  • the operator may modify the table that the forwarding service needs to look up, or modify the predetermined performance of the forwarding service. Then, the controller re-determines and updates the simultaneous access information of the table that the modified forwarding service needs to look up according to the modified description information of the forwarding service. And further transmitting the simultaneous access relationship of the modified forwarding service that needs to be searched to the forwarding device after the update. For example, the operator can modify M description letters The i-th description information corresponding to the i-th forwarding service in the information, the table in which the i-th forwarding service needs to be searched is unchanged, but the predetermined performance of the i-th forwarding service changes.
  • the operator may modify the i-th description information corresponding to the i-th forwarding service in the M description information, where the predetermined performance of the i-th forwarding service does not change, but the table in which the i-th forwarding service needs to be searched occurs. Variety.
  • the operator may modify the i-th description information corresponding to the i-th forwarding service in the M description information, and the predetermined performance of the i-th forwarding service and the table that the i-th forwarding service needs to search may change.
  • the invention is not limited thereto.
  • the controller may re-determine and update the simultaneous access information of the table that needs to be searched by the modified i-th forwarding service according to the modified i-th description information, and need to search for the i-th forwarding service with the modification.
  • the simultaneous access information of the table is sent to the forwarding device.
  • the controller determines the simultaneous access information of the table that needs to be searched according to the description information of the forwarding service, and implements network-wide control, thereby saving computational consumption of the forwarding device.
  • the forwarding device determines the storage location of the table in the forwarding device according to the simultaneous access information of the table, and implements controllable and programmable forwarding service to avoid the problem that the forwarding performance cannot meet the service requirement due to improper storage location of the table.
  • the operator can reasonably configure or program the performance of the forwarding service according to the needs of the actual application and the capability of the device, and store the information in the controller, so that less resources of the service provider can guarantee the performance of the service.
  • Figure 5 is a flow diagram of a method of determining a storage location of a table in accordance with another embodiment of the present invention.
  • the corresponding embodiment of Figure 5 can be used to perform the method illustrated in Figure 1.
  • the embodiment of Figure 5 can also be used to perform the method illustrated in Figure 2.
  • the method shown in FIG. 5 includes:
  • the controller 510 generates M pieces of description information, where the M pieces of description information correspond to the M forwarding services, where each of the M pieces of description information includes a predetermined performance of the corresponding forwarding service and performs the corresponding The forwarding service needs to find the identifier of the table. To perform M forwarding services, it is necessary to search N tables.
  • the predetermined performance component set of the M forwarding services includes Q elements, and the Q elements are the first element to the Qth, respectively.
  • each of the Q elements represents a predetermined performance
  • the rth element of the Q elements represents a predetermined performance of C r x line rate
  • M, N, Q, and r are positive integers , 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ l.
  • 501 can be referred to as 201 in FIG. 2. To avoid repetition, details are not described herein again.
  • lx line speed is the line speed
  • the 0.5 X line speed is also called half speed
  • the 0 line speed is also called slow speed.
  • Fig. 7 the three forwarding services whose predetermined performance is the line rate among the 38 forwarding services are shown in Fig. 8.
  • Fig. 8 shows two forwarding services whose predetermined performance is half speed in 38 forwarding services. In the 38 forwarding services shown in FIG. 6, the three forwarding services shown in FIG. 7 and the two forwarding services shown in FIG. 8 are removed, and the predetermined performance of the remaining 33 forwarding services is slow. Listed again.
  • the description information of the forwarding service in the embodiment of the present invention may be defined by the operator and stored in the controller 510.
  • the controller 510 sends the M description information to the forwarding device 520.
  • 502 can be referred to as 202 in FIG. 2. To avoid repetition, details are not described herein.
  • the controller 510 can send a control message to the forwarding device through the control channel, where the control message includes M pieces of description information.
  • the forwarding device 520 receives the M description information sent by the controller 510, where the M description information is corresponding to the M forwarding services, where each description information of the M description information includes a corresponding forwarding service subscription.
  • the M forwarding services need to find N tables, and the predetermined performance component set of the M forwarding services includes Q elements, and the Q elements are respectively 1 element to Qth element, each of the Q elements represents a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of C r x line rate, M, N , Q and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ l.
  • 503 can be referred to as 101 in FIG. 1. To avoid repetition, details are not described herein.
  • the forwarding device 520 generates Q simultaneous access information according to the M description information, and the rth simultaneous access information in the Q simultaneous access information indicates whether each of the two tables needs to be scheduled to have a performance of 0. ⁇ Line rate of the same forwarding service access.
  • 504 can be referred to as 102 in FIG. 1. To avoid repetition, details are not described herein again.
  • the three forwarding services of the line rate according to the predetermined performance in FIG. 7 the two forwarding services with the predetermined performance of the half speed in FIG. 8, and the predetermined performance may be Slow 33 forwarding services, generating Q simultaneous access information.
  • Q simultaneous access information includes three 16 X 16 matrices.
  • the first 16 ⁇ 16 matrix is used to represent the line rate simultaneous access information of 16 tables, as shown in FIG. 9, wherein the elements of the i-th row and the j-th column of the first 16 ⁇ 16 matrix represent 16 elements. Whether the i-th table and the j-th table in the table need to be simultaneously accessed by one forwarding service whose line-speed is scheduled to be simultaneously shown in FIG.
  • the fourth row in the matrix shown in Figure 9 represents the wire speed simultaneous access information of Table 4 and other tables.
  • the fourth row and the fifth column are 1, indicating that Tables 4 and 5 need to be accessed by the same forwarding service with the predetermined performance as the line rate, as shown in Figure 7 for the first forwarding service.
  • the fourth column and the eighth column are 0, which means that Table 4 and Table 8 do not need to be accessed by any one of the forwarding services whose predetermined performance is the line speed, which is embodied in the following: Contains Tables 4 and 8.
  • the second 16 ⁇ 16 matrix is used to represent the half-speed simultaneous access information of the 16 tables, as shown in FIG. 10, wherein the elements of the i-th row and the j-th column of the second 16 ⁇ 16 matrix represent 16 elements. Whether the i-th table and the j-th table in the table need to be simultaneously accessed by one forwarding service whose half-speed is predetermined by the predetermined performance shown in FIG.
  • the fourth row in the matrix shown in Figure 10 represents the half-speed simultaneous access information of Table 4 and other tables.
  • the fourth row and the fifth column are 1, indicating that Table 4 and Table 5 need to be subscribed to the same forwarding service with a half-speed performance, such as the first forwarding service shown in FIG.
  • the fourth column and the eighth column are 0, indicating that Table 4 and Table 8 do not need to be accessed by any one of the forwarding services with a predetermined performance of half speed, which is embodied in the following: Contains Tables 4 and 8.
  • the third 16 ⁇ 16 matrix is used to represent the slow simultaneous access information of the 16 tables, wherein the elements of the ith row and the jth column of the third 16 ⁇ 16 matrix represent the ith of the 16 tables. Whether the table and the jth table need to be simultaneously accessed by a forwarding service with a predetermined performance at a slow rate. The matrix form of slow access to information at the same time is no longer listed here.
  • the forwarding device 520 determines, according to the Q simultaneous access information, that N tables are to be stored in at least one memory of the forwarding device 520.
  • 505 can be referred to as 103 in FIG. 1, and in order to avoid repetition, no longer here. Said.
  • forwarding device 520 determines that each of the N tables will be stored in at least one memory of the forwarding device.
  • At least one memory of forwarding device 520 includes a first memory.
  • determining that the mth table in the N tables is to be stored in the first memory of the at least one memory, in the memory, and represented as a matrix of lx N may also be referred to as the first table storage of the first memory bitmap. If the i-th column element of the lx N matrix is 1, it indicates that the first memory has stored the i-th table in the N tables, and if the i-th column element of the 1 XN matrix is 0, the forwarding device is The first memory does not store the ith table of the N tables.
  • the information of the table in which the first memory of the forwarding device has been stored is represented as a matrix of 1 ⁇ 16.
  • the first column and the fifth column of the 1 ⁇ 16 matrix are 1, indicating that Table 1 and Table 5 are already stored in the first memory.
  • the table 4 can be stored on the first memory. That is, it is determined that the storage location where Table 4 is to be stored is the first memory. Further, the forwarding device 520 stores the table 4 in the first memory and updates the fourth column in the information of the table in which the table of the first memory has been stored to 1. That is, the first table storage bitmap of the first memory is updated to the second table storage bitmap of the first memory as shown in FIG.
  • the forwarding device 520 can determine the storage locations of the other tables except Table 4 on the basis of the second table storage bitmap shown in FIG.
  • the specific method of determining is similar to the method of determining the storage location of Table 4. To avoid repetition, details are not described herein.
  • the forwarding device 520 when the forwarding device 520 is still unable to determine the location where the a-th table is to be stored after attempting all of the memory in at least one of the memories, the forwarding device 520 generates a first message and sends the first message to Controller 510.
  • the first message is used to notify the forwarding device 520 that the a-th table cannot be stored in the at least one memory. Where a is less than or equal to N Natural number.
  • the controller 510 if the controller 510 does not allow the forwarding service to be slowed down related to the a-th table, the controller 510 receives the first message without further processing.
  • the controller 510 may generate a second message, where the second message is used to instruct the forwarding device 520 to try to store the The first table. Further, the controller 510 can send the second message to the forwarding device 520 to cause the forwarding device 520 to operate in a best effort mode and determine that the a-th table is to be stored in the second memory of the at least one memory.
  • the controller 510 can receive a third message sent by the forwarding device 520, where the third message is used to notify that when the forwarding device 520 determines that the a-th table is to be stored in the second memory, the a-th table supports The actual performance of the forwarding service.
  • the forwarding device 520 stores N tables in at least one memory of the forwarding device 520.
  • the embodiment of the present invention forwards the description information of the service, where the description information includes the predetermined performance of the forwarding service, generates the simultaneous access information of the table that needs to be searched for the forwarding service, and determines that the forwarding service needs to be searched according to the simultaneous access information of the table.
  • the table will be stored in at least one memory in the forwarding device. The location of the table determined by the above technical solution to be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • Figure 13 is a flow chart of a method of determining a storage location of a table in accordance with another embodiment of the present invention.
  • the embodiment of Figure 13 can be used to perform the method illustrated in Figure 3.
  • the embodiment of Figure 5 can also be used to perform the method illustrated in Figure 4.
  • the method shown in Figure 13 includes:
  • the controller 510 generates M description information, where the M description information corresponds to the M forwarding services, where each description information of the M description information includes a predetermined performance of the corresponding forwarding service and performs the corresponding forwarding.
  • Each of the Q elements represents a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of 0 ⁇ X line rate, and M, N, Q, and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ l.
  • 1301 can be referred to as 201 in FIG. 2, or 401 in FIG. 4, or 501 in FIG. 5. To avoid repetition, details are not described herein again.
  • the controller 510 generates Q simultaneous access information according to the M description information, where The rth simultaneous access information in the Q simultaneous access information indicates whether each of the two tables in the N tables needs to be subscribed to the same forwarding service with a predetermined performance of 0 ⁇ line rate.
  • 1302 can be referred to as 402 in FIG. 4. To avoid repetition, details are not described herein.
  • the controller 510 sends the Q simultaneous access information to the forwarding device 520.
  • reference numeral 1303 can be referred to as 403 in FIG. 4. To avoid repetition, details are not described herein.
  • the forwarding device 520 receives the Q simultaneous access information sent by the controller 510, where the rth simultaneous access information of the Q simultaneous access information indicates whether each of the N tables needs to be scheduled. For the same forwarding service access with 0 ⁇ ⁇ line rate, it is necessary to find the one table for performing one forwarding service.
  • step 1304 can be referred to step 301 in FIG. 3. To avoid repetition, details are not described herein again.
  • the forwarding device 520 determines, according to the Q simultaneous access information, that the table is to be stored in at least one memory of the forwarding device 520.
  • reference numeral 1305 can be referred to as 103 in FIG. 1, or 302 in FIG. 3, or 505 in FIG. 5. To avoid repetition, details are not described herein again.
  • the forwarding device 520 stores the plurality of tables in the at least one memory.
  • the controller may determine the simultaneous access information of the table that the forwarding service needs to look up by forwarding the description information of the service. Further, the controller can send the simultaneous access information of the table to the forwarding device.
  • the forwarding device determines that the table will be stored in at least one memory of the forwarding device based on the simultaneous access information of the table. The location of the table thus determined to be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • FIG 14 is a block diagram of a forwarding device in accordance with one embodiment of the present invention.
  • the forwarding device can be used to perform the method illustrated in Figure 1.
  • the forwarding device 1400 shown in Fig. 14 includes a receiving unit 1401, a generating unit 1402, a determining unit 1403, and a storage unit 1404.
  • the receiving unit 1401 is configured to receive, by the controller, one description information, where the one description information is corresponding to the one forwarding service, where each description information in the one description information includes a corresponding forwarding service.
  • the Q elements are the first element Through Q elements, each element of the element Q represents a predetermined performance, wherein the elements r th element Q represents a predetermined line-rate performance for C r x, M, N, Q and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ l.
  • the generating unit 1402 is configured to generate Q simultaneous access information according to the M description information received by the receiving unit 1401, where the rth simultaneous access information in the Q simultaneous access information represents the N Whether each two tables need to be subscribed to the same forwarding service with a predetermined performance of 0 ⁇ line rate. It is determined that the one of the tables will be stored in at least one memory of the forwarding device.
  • the storage unit 1404 is configured to store the one table in the at least one memory determined by the determining unit 1403.
  • the embodiment of the present invention forwards the description information of the service, where the description information includes the predetermined performance of the forwarding service, generates the simultaneous access information of the table that needs to be searched for the forwarding service, and determines that the forwarding service needs to be searched according to the simultaneous access information of the table.
  • the table will be stored in at least one memory in the forwarding device. The location of the table determined by the above technical solution to be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • the Q simultaneous access information is a matrix of Q ⁇ ⁇ , and the matrix of each ⁇ X ⁇ of the Q ⁇ X ⁇ matrix is 1 or 0. If the element of the i-th row and the j-th column of the matrix of the rth ⁇ X ⁇ in the matrix of the Q ⁇ X ⁇ is 1, indicating the i-th table and the N of the N tables
  • the jth table in the table needs to be accessed by at least one forwarding service whose predetermined performance in the M forwarding services is 0 ⁇ line rate, if the rth in the matrix of the Q ⁇ ⁇ ⁇ If the element of the i-th row and the j-th column of the matrix of ⁇ is 0, it means that the i-th table in the N tables and the j-th table in the N tables do not need to be simultaneously referred to by the M forwarding services.
  • the predetermined performance is any one of the C r x line rate forwarding service accesses, where
  • the determining unit 1403 is specifically configured to determine that each of the N tables is to be stored in at least one memory of the forwarding device. Where the unit is determined
  • the 1403 specifically includes a determining subunit for determining that the mth of the N tables is to be stored in at least one memory of the forwarding device, where the determining subunit specifically includes a first determining subunit, and a second The subunit and the third determined subunit are determined.
  • a first determining subunit configured to determine whether each of the N tables is already stored in the In a first memory of the at least one memory, a matrix of 1 XN is used to indicate whether each of the N tables is already stored in a first memory of the forwarding device, specifically, the matrix of the 1 ⁇ N
  • the first column element to the Nth column element are respectively used to indicate whether the first one of the N tables to the Nth table of the N tables are already stored in the first memory, wherein
  • the i-th column element of the matrix of 1 ⁇ ⁇ is used to indicate whether the i-th table of the N tables is already stored in the first memory, if the i-th column element of the matrix of the 1 ⁇ ⁇ is 1 means that the first memory has stored the ith table of the N tables, and if the ith column element of the 1 XN matrix is 0, it indicates that the first memory does not store the N tables.
  • the i-th table in .
  • a second determining subunit configured to generate, by the generating unit 1402, an element of the mth row of each matrix of the N N N of the matrix of the ⁇ ⁇ N and the first determined by the first determining subunit
  • the corresponding elements of the matrix of the XN are ANDed, and the number of the result is 1, wherein the elements of the i-th row of the matrix of the rth ⁇ ⁇ N of the Q N ⁇ ⁇ matrix and the first Determining, by the subunit, the corresponding element of the 1 XN matrix and the number of 1 in the result of the operation is
  • a third determining subunit configured to determine the mth of the N tables based on maxdPi+l) X d XA, ..., (P Q + l) x C Q x A) ⁇ B
  • the table will be stored in the first memory.
  • m is a positive integer less than or equal to N
  • & is a non-negative integer
  • & ⁇ N A and B are positive numbers
  • A represents the bandwidth required for the forwarding service whose actual performance is the line rate
  • B represents the first The maximum bandwidth that the memory can provide.
  • the sending unit 1405 is further included.
  • the generating unit 1402 is further configured to: when the determining unit 1403 determines that the a-th table of the N tables cannot be stored in the at least one memory, generate a first message, where the first message is used to notify the determining unit 1403 determines that the a-th table of the N tables cannot be stored in the at least one memory.
  • the sending unit 1405 is configured to send the first message generated by the generating unit 1402 to the controller, where a is a positive integer, and a is less than or equal to N.
  • the receiving unit 1401 is further configured to receive a second message sent by the controller, where the second message is used to indicate that the forwarding device tries to store the first of the N tables. a table. a determining unit 1403, configured to work in a best effort mode according to the second message received by the receiving unit 1401, and determine that the a-th table in the N tables is to be stored in the second memory of the at least one memory in.
  • the generating unit 1402 is further configured to generate a third message, where the third message is used by the notification determining unit 1403 to determine that the a-th table in the N tables is to be stored in the second memory, the N The actual performance of the forwarding service supported by the a-table in the table.
  • the sending unit 1405 is further configured to send the third message generated by the generating unit 1402 to the controller.
  • the forwarding device 1400 can implement the various processes implemented by the forwarding device in the embodiments of FIG. 1 and FIG. 5. To avoid repetition, details are not described herein again.
  • FIG. 15 is a block diagram of a controller in accordance with one embodiment of the present invention.
  • the controller can be used to perform the method shown in FIG.
  • the controller 1500 shown in Fig. 15 includes a generating unit 1501 and a transmitting unit 1502.
  • the generating unit 1501 is configured to generate M pieces of description information, where the M pieces of description information correspond to the M forwarding services, where each of the M pieces of description information includes a predetermined performance and execution of the corresponding forwarding service.
  • the corresponding forwarding service needs to identify the identifier of the table, and the M forwarding services need to find N tables, and the set of predetermined performance components of the M forwarding services includes Q elements, where the Q elements are respectively Is a first element to a Qth element, each of the Q elements representing a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of C r x line rate , M, N, Q, and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ l.
  • the sending unit 1502 is configured to send the M pieces of description information generated by the generating unit 1501 to the forwarding device.
  • the embodiment of the present invention forwards the description information of the service, where the description information includes the predetermined performance of the forwarding service, generates the simultaneous access information of the table that needs to be searched for the forwarding service, and determines that the forwarding service needs to be searched according to the simultaneous access information of the table.
  • the table will be stored in at least one memory in the forwarding device. The location of the table determined by the above technical solution to be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • the M pieces of description information are used to enable the forwarding device to determine that the N tables are to be stored in at least one of the forwarding devices
  • the controller 1500 further includes The receiving unit 1503.
  • the receiving unit 1503 is configured to receive a first message sent by the forwarding device, where the first message is used to notify the forwarding device that the j-th table in the N tables cannot be stored in the forwarding device.
  • j is a positive integer and j is less than or equal to N.
  • the generating unit 1501 is further configured to generate a second message, where the second message is used to indicate that the forwarding device tries to store the jth table in the N tables.
  • the sending unit 1502 is further configured to send the second message generated by the generating unit 1501 to the forwarding device. Preparing the forwarding device to operate in a best effort mode and determining that the jth table of the N tables is to be stored in the second memory of the at least one memory.
  • the receiving unit 1503 is further configured to receive a third message sent by the forwarding device, where the third message is used to notify the forwarding device that the jth table in the N tables is to be stored in the second The actual performance of the forwarding service supported by the jth table of the N tables in the memory.
  • the controller 1500 can implement the various processes implemented by the controller in the embodiments of FIG. 2 and FIG. 5. To avoid repetition, details are not described herein again.
  • FIG 16 is a block diagram of a forwarding device in accordance with another embodiment of the present invention.
  • the forwarding device can be used to perform the method illustrated in Figure 3.
  • the forwarding device 1600 shown in Fig. 16 includes a receiving unit 1601, a determining unit 1602, and a storage unit 1603.
  • the receiving unit 1601 is configured to receive Q simultaneous access information sent by the controller, where the rth simultaneous access information of the Q simultaneous access information indicates whether each of the N tables needs to be scheduled
  • the performance of the same forwarding service is 0 ⁇ ⁇ line rate, and the execution of one forwarding service needs to find the one table.
  • the determining unit 1602 is configured to determine, according to the Q simultaneous access information received by the receiving unit 1601, that the one table is to be stored in at least one memory of the forwarding device. One less memory.
  • the forwarding device determines that the access table according to the table is to be stored in at least one memory of the forwarding device.
  • the simultaneous access information of the table is determined by the controller by forwarding the description information of the service, and further sends the simultaneous access information of the table to the forwarding device.
  • the location in which the determined table will be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • the Q simultaneous access information is a matrix of Q ⁇ ⁇ , and the matrix of each of the Q ⁇ ⁇ ⁇ matrix is 1 or 0, If the element of the i-th row and the j-th column of the matrix of the r-th NXN in the matrix of the Q NXNs is 1, indicating the i-th table of the N tables and the number of the N tables j tables need to be accessed by at least one forwarding service whose predetermined performance in the M forwarding services is C r x line rate, if the matrix of the rth ⁇ ⁇ ⁇ in the matrix of the Q ⁇ ⁇ If the element of the i-th row and the j-th column is 0, it means that the i-th table in the N tables and the j-th table in the N tables do not need to be simultaneously scheduled by the M forwarding services. Forwarding service access for any of the C r x line rates, where i and j is a positive integer, and both i and j
  • the determining unit 1602 is specifically configured to determine that each of the N tables is to be stored in at least one memory of the forwarding device.
  • the determining unit 1602 includes a determining subunit for determining that the mth table of the N tables is to be stored in at least one memory of the forwarding device, where the determining subunit specifically includes the first determining subunit And a second determining subunit and a third determining subunit.
  • a first determining subunit configured to determine whether each of the N tables is already stored in a first memory of the at least one memory, and a matrix of 1 XN is used to represent each of the N tables Whether the table is already stored in the first memory of the forwarding device, specifically, the first column element to the Nth column element in the 1 XN matrix are respectively used to represent the first table of the N tables Whether the Nth table of the N tables is already stored in the first memory, wherein the ith column element of the 1 XN matrix is used to represent the ith table of the N tables Whether it has been stored in the first memory, if the i-th column element of the matrix of lx N is 1, it indicates that the first memory has stored the i-th table in the N tables, if the lx The ith column element of the matrix of N is 0, indicating that the first memory does not store the ith table of the N tables.
  • a second determining subunit configured to: use an element of the mth row of the matrix of each NXN of the matrix of the Q NXNs and a corresponding element of the matrix of the 1 ⁇ ⁇ determined by the first determining subunit And an operation, the number of which is determined to be 1, wherein an element of the i-th row of the matrix of the r-th N x N in the matrix of the Q ⁇ ⁇ N and the 1 ⁇ determined by the first determining sub-unit The number of 1s in the result of the AND operation of the corresponding element of the matrix of ⁇ is &.
  • m is a positive integer less than or equal to N
  • & is a non-negative integer
  • & ⁇ N A and B are positive numbers
  • A represents the bandwidth required for the forwarding service whose actual performance is the line rate
  • B represents the first The maximum bandwidth that the memory can provide.
  • a generating unit 1604 and a sending unit 1605 are further included.
  • the generating unit 1604 is further configured to: when the determining unit 1602 determines that the a-th table of the N tables cannot be stored in the at least one memory, generate a first message, where the first message is used to notify the The forwarding device determines that the a-th table of the N tables cannot be stored in the at least one memory.
  • the sending unit 1605 is configured to send the first message generated by the generating unit 1604 to the Controller, where a is a positive integer and a is less than or equal to N.
  • the receiving unit 1601 is further configured to receive a second message sent by the controller, where the second message is used to indicate that the forwarding device tries to store the first of the N tables. a table.
  • the determining unit 1602 is further configured to, according to the second message received by the receiving unit 1601, work in a best effort mode and determine that the a-th table in the N tables is to be stored in the second of the at least one memory In memory.
  • the generating unit 1604 is further configured to generate a third message, where the third message is used to notify the forwarding device that when the a-th table in the N tables is to be stored in the second memory, The actual performance of the forwarding service supported by the a-th table in the N tables.
  • the sending unit 1605 is further configured to send the third message generated by the generating unit 1604 to the controller.
  • the forwarding device 1600 can implement the various processes implemented by the forwarding device in the embodiments of FIG. 3 and FIG. 13 . To avoid repetition, details are not described herein again.
  • FIG 17 is a block diagram of a controller in accordance with another embodiment of the present invention.
  • the controller can be used to perform the method shown in Figure 4.
  • the controller 1700 shown in Fig. 17 includes a generating unit 1701 and a transmitting unit 1702.
  • the generating unit 1701 is configured to generate M pieces of description information, where the M pieces of description information correspond to the M forwarding services, where each of the M pieces of description information includes a predetermined performance and execution of the corresponding forwarding service.
  • the corresponding forwarding service needs to identify the identifier of the table, and the M forwarding services need to find N tables, and the set of predetermined performance components of the M forwarding services includes Q elements, where the Q elements are respectively Is a first element to a Qth element, each of the Q elements representing a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of C r x line rate , M, N, Q, and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ l.
  • the generating unit 1701 is further configured to generate, according to the M pieces of description information, Q simultaneous access information, where the rth simultaneous access information of the Q simultaneous access information indicates whether each of the N tables is The same forwarding service access that needs to be scheduled for C r x line rate.
  • the sending unit 1702 is configured to send the Q simultaneous access information generated by the generating unit to the forwarding device.
  • the controller determines the simultaneous access information of the table that the forwarding service needs to look up by forwarding the description information of the service.
  • the simultaneous access information of the table is further sent to the forwarding device.
  • the forwarding device may be caused to determine that the table is to be stored in at least one of the forwarding devices according to the simultaneous access information of the table In memory. The location of the table thus determined to be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • the Q simultaneous access information is a matrix of Q ⁇ ⁇ , and an element of each matrix of the Q ⁇ ⁇ N is 1 or 0. If the element of the i-th row and the j-th column of the matrix of the r-th NXN in the matrix of the Q NXNs is 1, indicating the i-th table of the N tables and the number of the N tables
  • the j tables need to be accessed by at least one forwarding service whose predetermined performance in the M forwarding services is C r x line rate, if the matrix of the r ⁇ ⁇ N in the matrix of the Q ⁇ ⁇ N If the element of the i-th row and the j-th column is 0, it means that the i-th table in the N tables and the j-th table in the N tables do not need to be simultaneously scheduled by the M forwarding services. Any one of the 0. ⁇ line rate forwarding service accesses, where i and j are positive integers, and both i and j are less
  • the M pieces of description information are used to enable the forwarding device to determine that the N tables are to be stored in at least one of the forwarding devices
  • the controller 1700 further includes The receiving unit 1703 is configured to receive a first message sent by the forwarding device, where the first message is used to notify the forwarding device that the a-th table in the N tables cannot be stored in the forwarding device.
  • a is a positive integer and a is less than or equal to N.
  • the generating unit 1701 is further configured to generate a second message, where the second message is used to indicate that the forwarding device tries to store the a-th table in the N tables.
  • the sending unit 1702 is further configured to send the second message generated by the generating unit 1701 to the forwarding device, so that the forwarding device works in a best effort mode and determines the a-th table in the N tables. Will be stored in the second memory of the at least one memory.
  • the receiving unit 1703 is further configured to receive a third message sent by the forwarding device, where the third message is used to notify the forwarding device that the a-th table in the N tables is to be stored in the second The actual performance of the forwarding service supported by the a-th table in the N tables in the memory.
  • the controller 1700 can implement the various processes implemented by the controller in the embodiments of FIG. 4 and FIG. 13 . To avoid repetition, details are not described herein again.
  • FIG. 18 is a block diagram of a forwarding device in accordance with another embodiment of the present invention.
  • the forwarding device can be used to perform the method shown in FIG.
  • the forwarding device shown in FIG. 18 can be used to implement the forwarding device shown in FIG.
  • the forwarding device 1800 shown in FIG. 18 includes a processor 1801, a receiving circuit 1802, a transmitting circuit 1803, and at least one memory 1804.
  • the receiving circuit 1802 is configured to receive M description information sent by the controller, where the M description information is associated with M forwarding services, where each description information of the M description information includes a subscription of a corresponding forwarding service.
  • the Q elements are the 1st element to the Qth element, respectively, and each of the Q elements represents a predetermined performance, wherein the rth element of the Q elements represents a predetermined performance of C r x line speed, M, N, Q and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ l.
  • the processor 1801 is configured to generate, according to the M pieces of description information received by the receiving circuit 1802, Q simultaneous access information, where the rth simultaneous access information of the Q simultaneous access information represents the N Whether each two tables need to be subscribed to the same forwarding service with a predetermined performance of 0 ⁇ line rate.
  • the processor 1801 is further configured to determine, according to the Q simultaneous access information, that the one of the tables is to be stored in the at least one memory 1804 of the forwarding device 1800. And further storing the one of the tables in the at least one memory 1804.
  • the embodiment of the present invention forwards the description information of the service, where the description information includes the predetermined performance of the forwarding service, generates the simultaneous access information of the table that needs to be searched for the forwarding service, and determines that the forwarding service needs to be searched according to the simultaneous access information of the table.
  • the table will be stored in at least one memory in the forwarding device. The location of the table determined by the above technical solution to be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • bus system 1805 which in addition to the data bus includes a power bus, a control bus, and a status signal bus.
  • bus system 1805 various buses are labeled as bus system 1805 in FIG.
  • the Q simultaneous access information is a matrix of Q ⁇ ⁇ , and the matrix of each ⁇ X ⁇ of the Q ⁇ X ⁇ matrix is 1 or 0. If the element of the i-th row and the j-th column of the matrix of the rth ⁇ X ⁇ in the matrix of the Q ⁇ X ⁇ is 1, indicating the i-th table and the N of the N tables
  • the jth table in the table needs to be accessed by at least one forwarding service whose performance is Cr x line rate predetermined in the M forwarding services, if the rth in the matrix of the Q ⁇ ⁇ N If the element of the i-th row and the j-th column of the matrix of N is 0, it means that the i-th table in the N tables and the j-th table in the N tables do not need to be simultaneously referred to by the M forwarding services.
  • the predetermined performance is 0. ⁇ line rate of any forwarding service access, where i and j are positive integers, and both i and j are less than or equal to N.
  • the processor 1801 is specifically configured to determine that each of the N tables is to be stored in the at least one memory 1804 of the forwarding device.
  • a matrix of lx N is used to indicate whether each of the N tables is already stored in a first memory of the forwarding device, specifically, the matrix of the lxN
  • the first column element to the Nth column element are respectively used to indicate whether the first one of the N tables to the Nth table of the N tables are already stored in the first memory, where
  • the i-th column element of the matrix of lx N is used to indicate whether the i-th table in the N tables is already stored in the first memory, if the i-th column element of the matrix of the 1 ⁇ ⁇ is 1 means that the first memory has stored the ith table of the N tables, and if the ith column element of the 1 XN matrix is 0, it indicates that the first memory does not store the N tables.
  • the i-th table in . And an element of the mth row of each of the matrix of the ⁇ ⁇ N of the generated matrix of the ⁇ ⁇ N is associated with the determined corresponding element of the matrix of the 1 ⁇ , and the result is determined to be 1 a number, wherein an element of the i-th row of the matrix of the rth ⁇ ⁇ ⁇ in the matrix of the Q ⁇ X ⁇ is the result of the AND operation of the corresponding element of the determined matrix of 1 ⁇ N
  • the number is P r .
  • the processor 1801 is further configured to: when determining, according to the Q simultaneous access information, that the a-th table of the N tables cannot be stored in the at least one memory 1804 And generating a first message, the first message is used to announce that the a-th table of the N tables cannot be stored in the at least one memory 1804.
  • the sending circuit 1803 is configured to send the generated first message to the controller, where a is a positive integer, and a is less than or equal to N.
  • the receiving circuit 1802 is further configured to receive a second message sent by the controller, where the second message is used to indicate that the forwarding device 1800 tries to store the N tables.
  • the processor 1801 is further configured to operate in a best effort mode according to the second message received by the receiving circuit 1802 and determine that a a-th table of the N tables is to be stored in the at least one memory 1804 In the second memory. And generating a third message, the third cancellation
  • the information notification indicates that the forwarding device 1800 determines that the a-th table in the N tables is to be stored in the second memory, and the actual forwarding service supported by the a-th table in the N tables performance.
  • the sending circuit 1803 is further configured to send the generated third message to the controller.
  • the method disclosed in the foregoing embodiment of the present invention may be applied to the processor 1801 or implemented by the processor 1801.
  • the processor 1801 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 1801 or an instruction in the form of software.
  • the processor 1801 may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or the like. Programmable logic device, discrete gate or transistor logic device, logic block diagram.
  • the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in the embodiment of the present invention may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a random access memory (RAM), a flash memory, a read-only memory (ROM), a programmable read-only memory or an electrically erasable programmable memory, a register, and the like. in.
  • the storage medium is located in at least one memory 1804, and the processor 1801 reads the information in the at least one memory 1804, in conjunction with its hardware, to perform the steps of the above method.
  • the forwarding device 1800 can implement the various processes implemented by the forwarding device in the embodiments of FIG. 1 and FIG. 5. To avoid repetition, details are not described herein again.
  • Figure 19 is a block diagram of a controller in accordance with another embodiment of the present invention.
  • the controller can be used to perform the method shown in Figure 2.
  • the controller shown in Fig. 19 can be used to implement the controller shown in Fig. 15.
  • the controller 1900 shown in Fig. 19 includes a processor 1901, a receiving circuit 1902, a transmitting circuit 1903, and a memory 1904.
  • the processor 1901 is configured to generate M pieces of description information, where the M pieces of description information correspond to the M forwarding services, where each of the M pieces of description information includes a predetermined performance of the corresponding forwarding service and an execution location.
  • the corresponding forwarding service needs to find the identifier of the table, and the M forwarding services need to be searched for N tables, and the predetermined performance component set of the M forwarding services includes Q elements, where the Q elements are respectively a first element to a Qth element, each of the Q elements representing a predetermined performance, wherein the rth of the Q elements
  • the element indicates that the predetermined performance is C r x line speed, and M, N, Q, and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ C r ⁇ l.
  • the transmitting circuit 1903 is configured to send the M pieces of description information generated by the processor 1901 to the forwarding device.
  • the embodiment of the present invention forwards the description information of the service, where the description information includes the predetermined performance of the forwarding service, generates the simultaneous access information of the table that needs to be searched for the forwarding service, and determines that the forwarding service needs to be searched according to the simultaneous access information of the table.
  • the table will be stored in at least one memory in the forwarding device. The location of the table determined by the above technical solution to be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • bus system 1905 which in addition to the data bus includes a power bus, a control bus, and a status signal bus.
  • bus system 1905 various buses are labeled as bus system 1905 in FIG.
  • the M pieces of description information are used to enable the forwarding device to determine that the N tables are to be stored in at least one memory in the forwarding device
  • the receiving circuit 1902 is configured to receive the a first message sent by the forwarding device, where the first message is used to notify the forwarding device that the j-th table of the N tables cannot be stored in at least one memory of the forwarding device, where j Is a positive integer, and j is less than or equal to N.
  • the processor 1901 is further configured to generate a second message, where the second message is used to indicate that the forwarding device tries to store the jth table in the N tables.
  • the sending circuit 1903 is further configured to send the second message to the forwarding device, to enable the forwarding device to work in a best effort mode and determine that a jth table of the N tables is to be stored in the At least one memory in the second memory.
  • the receiving circuit 1902 is further configured to receive a third message sent by the forwarding device, where the third message is used to notify the forwarding device that the jth table in the N tables is to be stored in the second memory. In the middle, the actual performance of the forwarding service supported by the jth table in the N tables.
  • the method disclosed in the foregoing embodiment of the present invention may be applied to the processor 1901 or implemented by the processor 1901.
  • the processor 1901 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 1901 or an instruction in a form of software.
  • the processor 1901 described above may be a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a discrete gate or a transistor logic device, Logical block diagram.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented as a hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software modules can be located in RAM, flash memory, ROM, programmable read only memory, or electrically erasable programmable memory, registers, and the like, which are well established in the art.
  • the storage medium is located in the memory 1904, and the processor 1901 reads the information in the memory 1904 and performs the steps of the above method in combination with the hardware thereof.
  • the controller 1900 can implement the various processes implemented by the controller in the embodiments of FIG. 2 and FIG. 5. To avoid repetition, details are not described herein again.
  • Figure 20 is a block diagram of a forwarding device in accordance with another embodiment of the present invention.
  • the forwarding device can be used to perform the method illustrated in Figure 3.
  • the forwarding device shown in FIG. 20 can be used to implement the forwarding device shown in FIG.
  • the forwarding device 2000 shown in Fig. 20 includes a processor 2001, a receiving circuit 2002, a transmitting circuit 2003, and at least one memory 2004.
  • the receiving circuit 2002 is configured to receive the Q simultaneous access information sent by the controller, where the rth simultaneous access information of the Q simultaneous access information indicates whether each of the N tables needs to be scheduled.
  • the same forwarding service access with a performance of 0 ⁇ line rate needs to find the above table when performing one forwarding service.
  • the processor 2001 is configured to determine, according to the Q simultaneous access information received by the receiving circuit 2002, that the one table is to be stored in at least one memory 2004 of the forwarding device.
  • the plurality of tables are further stored in the at least one memory 2004.
  • the forwarding device determines that the access table according to the table is to be stored in at least one memory of the forwarding device.
  • the simultaneous access information of the table is determined by the controller by forwarding the description information of the service, and further sends the simultaneous access information of the table to the forwarding device.
  • the location in which the determined table will be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • bus system 2005 which in addition to the data bus includes a power bus, a control bus, and a status signal bus.
  • various buses are labeled as the bus system 2005 in FIG.
  • the Q simultaneous access information is a matrix of Q ⁇ ⁇ , and the matrix of each of the Q ⁇ ⁇ ⁇ matrix is 1 or 0, If the element of the i-th row and the j-th column of the matrix of the r-th NXN in the matrix of the Q NXNs is 1, indicating the i-th table of the N tables and the number of the N tables j tables need to be described at the same time
  • the predetermined performance in the M forwarding services is at least one forwarding service access of the C r x line rate, if the elements of the i th row j column of the rth N x N matrix in the Q N x N matrix If it is 0, it means that the i-th table in the N tables and the j-th table in the N tables do not need to be simultaneously selected by the M forwarding services to be 0 ⁇ ⁇ line rate.
  • the processor 2001 is specifically configured to determine that each of the N tables is to be stored in the at least one memory 2004 of the forwarding device.
  • the determining that the mth of the N tables is to be stored in the at least one memory 2004 of the forwarding device specifically, determining whether each of the N tables is already stored in the at least one
  • a matrix of lx N is used to indicate whether each of the N tables is already stored in a first memory of the forwarding device, specifically, the matrix of the lxN
  • the first column element to the Nth column element are respectively used to indicate whether the first one of the N tables to the Nth table of the N tables are already stored in the first memory, where
  • the i-th column element of the matrix of lx N is used to indicate whether the i-th table in the N tables is already stored in the first memory, if the i-th column element of the matrix of the 1 ⁇ ⁇ is 1 means that the first memory has stored the ith table of the N tables, and
  • the i-th table in . And an element of the mth row of the matrix of each of the NXNs of the Q NNs is associated with the determined corresponding element of the matrix of the 1 ⁇ N, and the number of the result is determined to be 1, wherein the The number of 1's in the result of the AND operation of the element of the i-th row of the matrix of the nth ⁇ ⁇ N of the Q N x N matrix and the corresponding element of the matrix of the 1 ⁇ ⁇ is p r . Determining that the mth table of the N tables is to be stored in the first memory based on maxi Pi+ l) X d XA, ..., (P Q +1) C Q A) ⁇ B in.
  • m is a positive integer less than or equal to N
  • & is a non-negative integer
  • & ⁇ N A and B are positive numbers
  • A represents the bandwidth required for the forwarding service whose actual performance is the line rate
  • B represents the first The maximum bandwidth that the memory can provide.
  • the processor 2001 is further configured to: when determining, according to the Q simultaneous access information, that the a-th table of the N tables cannot be stored in the at least one memory 2004 Generating a first message, the first message being used to advertise that the forwarding device determines that the a-th table of the N tables cannot be stored in the at least one memory 2004.
  • the transmitting circuit 2003 is further configured to send the generated first message to the controller, where a is a positive integer, and a is less than or equal to N.
  • the receiving circuit 2002 is further configured to receive a second message sent by the controller, where the second message is used to indicate that the forwarding device tries to store the first one of the N tables. Tables.
  • the processor 2001 is further configured to operate in a best effort mode according to the second message received by the receiving circuit 2002 and determine that the a-th table in the N tables is to be stored in the at least one memory 2004 In the second memory. And generating a third message, where the third message is used to notify the forwarding device that when the a-th table in the N tables is to be stored in the second memory, the first of the N tables The actual performance of the forwarding service supported by a table.
  • the transmitting circuit 2003 is further configured to send the third message to the controller.
  • the method disclosed in the above embodiments of the present invention may be applied to the processor 2001 or implemented by the processor 2001.
  • the processor 2001 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 2001 or an instruction in the form of software.
  • the processor 2001 described above may be a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a discrete gate or transistor logic device, or a logic block diagram.
  • the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in the embodiment of the present invention may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium such as RAM, flash memory, ROM, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in at least one memory 2004, and the processor 2001 reads the information in at least one of the memories 2004 and combines the hardware to perform the steps of the above method.
  • the forwarding device 2000 can implement the various processes implemented by the forwarding device in the embodiments of FIG. 3 and FIG. 13 . To avoid repetition, details are not described herein again.
  • Figure 21 is a block diagram of a controller in accordance with another embodiment of the present invention.
  • the controller can be used to perform the method shown in Figure 4.
  • the controller shown in Fig. 21 can be used to implement the controller shown in Fig. 17.
  • the controller 2100 shown in Fig. 21 includes a processor 2101, a receiving circuit 2102, a transmitting circuit 2103, and a memory 2104.
  • the processor 2101 is configured to generate M pieces of description information, where the M pieces of description information correspond to M forwarding services, where each description information of the M pieces of description information includes a predetermined performance and a execution location of the corresponding forwarding service.
  • the elements indicate that the predetermined performance is C r x line speed, and M, N, Q, and r are positive integers, 2 ⁇ N, Q ⁇ M, r ⁇ Q, 0 ⁇ ⁇ ⁇ 1.
  • the controller determines the simultaneous access information of the table that the forwarding service needs to look up by forwarding the description information of the service.
  • the simultaneous access information of the table is further sent to the forwarding device.
  • the forwarding device may be caused to determine that the table will be stored in at least one memory of the forwarding device based on the simultaneous access information of the table. The location of the table thus determined to be stored in the forwarding device helps to make the actual performance of the forwarding service as close as possible to the predetermined performance.
  • controller 2100 The various components in controller 2100 are coupled together by a bus system 2105, which in addition to the data bus includes a power bus, a control bus, and a status signal bus.
  • bus system 2105 which in addition to the data bus includes a power bus, a control bus, and a status signal bus.
  • various buses are labeled as the bus system 2105 in FIG.
  • the Q simultaneous access information is a matrix of Q ⁇ ⁇ , and the matrix of each of the Q ⁇ ⁇ ⁇ matrix is 1 or 0, If the element of the i-th row and the j-th column of the matrix of the r-th NXN in the matrix of the Q NXNs is 1, indicating the i-th table of the N tables and the number of the N tables j tables need to be simultaneously accessed by at least one forwarding service whose predetermined performance in the M forwarding services is C r x line rate, if the matrix of the rth N x ⁇ in the Q N x ⁇ matrix If the element of the i-th row and the j-th column is 0, it means that the i-th table in the N tables and the j-th table in the N tables do not need to be simultaneously scheduled by the M forwarding services. Forwarding service access for any of the C r x line rates, where i and j are positive integers, and both i and j are less
  • the M pieces of description information are used to enable the forwarding device to determine that the N tables are to be stored in at least one memory in the forwarding device
  • the receiving circuit 2102 is configured to receive the Determining, by the forwarding device, a first message, where the first message is used to notify the forwarding device that the a-th table in the N tables cannot be stored in at least one memory of the forwarding device, where Is a positive integer, and a is less than or equal to N.
  • the processor 2101 is further configured to generate a second message, where The second message is used to indicate that the forwarding device tries to store the a-th table in the N tables.
  • the sending circuit 2103 is further configured to send the generated second message to the forwarding device, to enable the forwarding device to work in a best effort mode and determine that the a-th table in the N tables is to be stored In a second memory of the at least one memory.
  • the receiving circuit 2102 is further configured to receive a third message sent by the forwarding device, where the third message is used to notify the forwarding device that the a-th table in the N tables is to be stored in the second memory. In the middle, the actual performance of the forwarding service supported by the a-th table in the N tables.
  • the method disclosed in the above embodiments of the present invention may be applied to the processor 2101 or implemented by the processor 2101.
  • the processor 2101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 2101 or an instruction in the form of software.
  • the processor 2101 described above may be a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a discrete gate or transistor logic device, or a logic block diagram.
  • the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in the embodiment of the present invention may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium such as RAM, flash memory, ROM, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory 2104, and the processor 2101 reads the information in the memory 2104 and combines the hardware to perform the steps of the above method.
  • the controller 2100 can implement the various processes implemented by the controller in the embodiments of FIG. 4 and FIG. 13, and to avoid repetition, details are not described herein again.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative
  • the division of the unit is only a logical function division, and the actual implementation may have another division manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be Ignore, or not execute.
  • the mutual coupling or direct connection or communication connection shown or discussed may be an indirect engagement or communication connection through some interface, device or unit, and may be in electrical, mechanical or other form.
  • the components displayed for the unit may or may not be physical units, ie may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a medium such as a USB flash drive, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明实施例提出了一种确定表的存储位置的方法,包括:转发设备接收控制器发送与M个转发业务一一对应的M个描述信息,其中每个描述信息包括对应的转发业务的预定的性能以及需要查找的表的标识,M个转发业务的预定的性能组成的集合包含Q个元素;根据M个描述信息生成Q个同时访问信息;根据Q个同时访问信息,确定N个表将被存储在转发设备的至少一个存储器中。此外还提供了其他方法和设备。通过转发业务的描述信息,生成执行转发业务需要查找的表的同时访问信息,并进一步确定表将被存储在转发设备中的至少一个存储器中。有助于使得转发业务的实际性能尽可能达到预定的性能。

Description

确定表的存储位置的方法、 转发设备及控制器 技术领域
本发明实施例涉及通信领域, 并且更具体地, 涉及一种确定表的存储位 置的方法、 转发设备及控制器。 背景技术
通信领域中, 现有的转发设备可以同时运行多个转发业务。 实现一个转 发业务, 所述转发设备需要查找至少一个表。 所述转发设备可以路由器。 所 述至少一个表可以包括转发信息库(英文: forward information base, 简称: FIB )。 所述多个转发业务中每个转发业务对应一个预定的性能。 所述预定的 性能可以是线速的二分之一或者四分之一。 所述预定的性能可以是所述转发 设备允许对应的转发业务能够达到的实际性能的最大值。 所述转发设备同时 运行所述多个转发业务时, 所述多个转发业务中每个转发业务对应一个实际 性能。 每个转发业务的实际性能小于或者等于对应的预定的性能。 现有技术 中, 转发业务的实际性能与该转发业务的预定的性能的差距较大。 发明内容
本发明实施例提供了一种确定表的存储位置的方法,有助于使得转发业 务的实际性能尽可能达到预定的性能。
一方面, 提供了一种确定表的存储位置的方法, 包括:
转发设备接收控制器发送的 M个描述信息,所述 M个描述信息与 M个 转发业务——对应, 所述 M个描述信息中的每个描述信息包括对应的转发 业务的预定的性能以及执行所述对应的转发业务需要查找的表的标识,执行 所述 M个转发业务需要查找 N个表, 所述 M个转发业务的预定的性能组成 的集合包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所 述 Q个元素中的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的 第 r个元素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2≤ N, Q < M, r < Q, 0 < Cr < 1 ;
所述转发设备根据所述 M个描述信息, 生成 Q个同时访问信息, 所述
Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每两个表是 否需要被预定的性能为 0· χ线速的同一个转发业务访问;
所述转发设备根据所述 Q个同时访问信息, 确定所述 Ν个表将被存储 在所述转发设备中的至少一个存储器中;
所述转发设备将所述 Ν个表存储在所述至少一个存储器中。
在第一方面的第一种可能的实现方式中, 所述 Q个同时访问信息为 Q 个 Ν X Ν的矩阵, 所述 Q个 Ν X Ν的矩阵中的每个 Ν X Ν的矩阵的元素为 1 或者 0,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访 问,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
根据第一方面的第一种可能的实现方式,在第一方面的第二种可能的实 现方式中,所述确定所述 N个表将被存储在所述转发设备的至少一个存储器 中,包括确定所述 N个表中的每个表将被存储在所述转发设备的至少一个存 储器中,
其中, 所述转发设备确定所述 N个表中的第 m个表将被存储在所述转 发设备的至少一个存储器中, 具体包括:
所述转发设备确定所述 N个表中的每个表是否已经存储在所述至少一 个存储器的第一存储器中, 1 X N的矩阵用于表示所述 N个表中的每个表是 否已经存储在所述第一存储器中, 具体地, 所述 1 X N的矩阵的第 1列元素 至第 N列元素分别用于表示所述 N个表中的第 1个表至所述 N个表中的第 N个表是否已经存储在所述第一存储器中, 其中, 所述 l x N的矩阵的第 i 列元素用于表示所述 N个表中的第 i个表是否已经存储在所述第一存储器 中, 如果所述 1 χ Ν的矩阵的第 i列元素为 1则表示所述第一存储器已经存 储所述 N个表中的第 i个表, 如果所述 l x N的矩阵的第 i列元素为 0则表 示所述第一存储器没有存储所述 N个表中的第 i个表; 所述转发设备将所述 Q个 N X N的矩阵中的每个 N X N的矩阵的第 m 行的元素与所述 1 χ Ν的矩阵的对应元素作与运算, 确定结果为 1的个数, 其中,所述 Q个 Ν χ N的矩阵中的第 r个 Ν χ N的矩阵的第 m行的元素与所 述 1 X N的矩阵的对应元素作与运算的结果中 1的个数为 Pr
所述转发设备基于 maxdPi+l) X d X A, ... ..., (PQ+1) CQ x A) < B, 确 定所述 N个表中的第 m个表将被存储在所述第一存储器中,
其中, m为小于或者等于 N的正整数, &为非负整数, & < N, A和 B 为正数, A表示实际性能为线速的转发业务需要占用的带宽, B表示所述第 一存储器能够提供的最大带宽。
根据第一方面、第一方面的第一种可能的实现方式或者第一方面的第二 种可能的实现方式, 在第一方面的第三种可能的实现方式中, 所述方法还包 括:
当所述转发设备根据所述 Q个同时访问信息, 确定不能将所述 N个表 中的第 a个表存储在所述至少一个存储器中时,所述转发设备生成第一消息, 所述第一消息用于通告所述转发设备确定不能将所述 N个表中的第 a个表存 储在所述至少一个存储器中;
所述转发设备将所述第一消息发送至所述控制器,
其中, a为正整数, 且 a小于或者等于 N。
根据第一方面的第三种可能的实现方式,在第一方面的第四种可能的实 现方式中, 所述方法还包括:
所述转发设备接收所述控制器发送的第二消息, 所述第二消息用于指示 所述转发设备尽力存储所述 N个表中的第 a个表;
所述转发设备根据所述第二消息,工作于尽力而为模式并确定所述 N个 表中的第 a个表将被存储在所述至少一个存储器的第二存储器中;
所述转发设备生成第三消息, 所述第三消息用于通告所述转发设备确定 所述 N个表中的第 a个表将被存储在所述第二存储器中时, 所述 N个表中 的第 a个表所支持的转发业务的实际性能;
所述转发设备将所述第三消息发送至所述控制器。
第二方面, 提供了一种确定表的存储位置的方法, 包括:
控制器生成 M个描述信息,所述 M个描述信息与 M个转发业务——对 应, 所述 M个描述信息中的每个描述信息包括对应的转发业务的预定的性 能以及执行所述对应的转发业务需要查找的表的标识, 执行所述 M个转发 业务需要查找 N个表, 所述 M个转发业务的预定的性能组成的集合包含 Q 个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所述 Q个元素中 的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的第 r个元素表示 预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0 < Cr < 1;
所述控制器将所述 M个描述信息发送至转发设备。
在第二方面的第一种可能的实现方式中, 所述 M个描述信息用于使得 所述转发设备确定所述 N个表将被存储在所述转发设备中的至少一个存储 器中, 所述方法还包括:
所述控制器接收所述转发设备发送的第一消息, 所述第一消息用于通告 所述转发设备确定不能将所述 N个表中的第 j个表存储在所述转发设备的至 少一个存储器中,
其中, j为正整数, 且 j小于或者等于 N。
根据第二方面的第一种可能的实现方式,在第二方面的第二种可能的实 现方式中, 所述方法还包括:
所述控制器生成第二消息, 所述第二消息用于指示所述转发设备尽力存 储所述 N个表中的第 j个表;
所述控制器将所述第二消息发送至所述转发设备, 以使所述转发设备工 作于尽力而为模式并确定所述 N个表中的第 j个表将被存储在所述至少一个 存储器的第二存储器中;
所述控制器接收所述转发设备发送的第三消息, 所述第三消息用于通告 所述转发设备确定所述 N个表中的第 j 个表将被存储在所述第二存储器中 时, 所述 N个表中的第 j个表所支持的转发业务的实际性能。
第三方面, 提供了一种确定表的存储位置的方法, 包括:
转发设备接收控制器发送的 Q个同时访问信息, 其中, 所述 Q个同时 访问信息中的第 r个同时访问信息表示所述 N个表中的每两个表是否需要被 预定的性能为 0· χ线速的同一个转发业务访问, 执行 Μ个转发业务需要查 找所述 Ν个表;
所述转发设备根据所述 Q个同时访问信息, 确定所述 Ν个表将被存储 在所述转发设备的至少一个存储器中; 所述转发设备将所述 N个表存储在所述至少一个存储器中。
在第三方面的第一种可能的实现方式中, 所述 Q个同时访问信息为 Q 个 N X N的矩阵, 所述 Q个 N X N的矩阵中的每个 N X N的矩阵的元素为 1 或者 0,
如果所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访 问,
如果所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
根据第三方面的第一种可能的实现方式,在第三方面的第二种可能的实 现方式中,所述确定所述 N个表将被存储在所述转发设备的至少一个存储器 中,包括确定所述 N个表中的每个表将被存储在所述转发设备的至少一个存 储器中,
其中, 所述转发设备确定所述 N个表中的第 m个表将被存储在所述转 发设备的至少一个存储器中, 具体包括:
所述转发设备确定所述 N个表中的每个表是否已经存储在所述至少一 个存储器的第一存储器中, 1 X N的矩阵用于表示所述 N个表中的每个表是 否已经存储在所述第一存储器中, 具体地, 所述 l x N的矩阵的第 1列元素 至第 N列元素分别用于表示所述 N个表中的第 1个表至所述 N个表中的第 N个表是否已经存储在所述第一存储器中, 其中, 所述 l x N的矩阵的第 i 列元素用于表示所述 N个表中的第 i个表是否已经存储在所述第一存储器 中, 如果所述 1 χ Ν的矩阵的第 i列元素为 1则表示所述第一存储器已经存 储所述 N个表中的第 i个表, 如果所述 1 X N的矩阵的第 i列元素为 0则表 示所述第一存储器没有存储所述 N个表中的第 i个表;
所述转发设备将所述 Q个 N X N的矩阵中的每个 N X N的矩阵的第 m 行的元素与所述 1 χ Ν的矩阵的对应元素作与运算, 确定结果为 1的个数, 其中,所述 Q个 Ν χ N的矩阵中的第 r个 Ν χ N的矩阵的第 m行的元素与所 述 1 x N的矩阵的对应元素作与运算的结果中 1的个数为 Pr
所述转发设备基于 maxdPi+l) X d X A, ... ..., (PQ+1) CQ x A) < B, 确 定所述 N个表中的第 m个表将被存储在所述第一存储器中;
其中, m为小于或者等于 N的正整数, &为非负整数, & < N, A和 B 为正数, A表示实际性能为线速的转发业务需要占用的带宽, B表示所述第 一存储器能够提供的最大带宽。
根据第三方面、第三方面的第一种可能的实现方式或者第三方面的第二 种可能的实现方式, 在第三方面的第三种可能的实现方式中, 所述方法还包 括:
当所述转发设备根据所述 Q个同时访问信息, 确定不能将所述 N个表 中的第 a个表存储在所述至少一个存储器中时,所述转发设备生成第一消息, 所述第一消息用于通告所述转发设备确定不能将所述 N个表中的第 a个表存 储在所述至少一个存储器中;
所述转发设备将所述第一消息发送至所述控制器,
其中, a为正整数, 且 a小于或者等于 N。
根据第三方面的第三种可能的实现方式,在第三方面的第四种可能的实 现方式中, 所述方法还包括:
所述转发设备接收所述控制器发送的第二消息, 所述第二消息用于指示 所述转发设备尽力存储所述 N个表中的第 a个表;
所述转发设备根据所述第二消息,工作于尽力而为模式并确定所述 N个 表中的第 a个表将被存储在所述至少一个存储器的第二存储器中;
所述转发设备生成第三消息, 所述第三消息用于通告所述转发设备确定 所述 N个表中的第 a个表将被存储在所述第二存储器中时, 所述 N个表中 的第 a个表所支持的转发业务的实际性能;
所述转发设备将所述第三消息发送至所述控制器。
第四方面, 提供了一种确定表的存储位置的方法, 包括:
控制器生成 M个描述信息,所述 M个描述信息与 M个转发业务一一对 应, 所述 M个描述信息中的每个描述信息包括对应的转发业务的预定的性 能以及执行所述对应的转发业务需要查找的表的标识, 执行所述 M个转发 业务需要查找 N个表, 所述 M个转发业务的预定的性能组成的集合包含 Q 个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所述 Q个元素中 的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的第 r个元素表示 预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0 < Cr < 1;
所述控制器根据所述 M个描述信息, 生成 Q个同时访问信息, 其中, 所述 Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每两个 表是否需要被预定的性能为 0· χ线速的同一个转发业务访问;
所述控制器将所述 Q个同时访问信息发送至转发设备。
在第四方面的第一种可能的实现方式中, 所述 Q个同时访问信息为 Q 个 Ν X Ν的矩阵, 所述 Q个 Ν X Ν的矩阵中的每个 Ν X Ν的矩阵的元素为 1 或者 0,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 0· χ线速的至少一个转发业务访 问,
如果所述 Q个 Ν χ Ν的矩阵中的第 r个 Ν χ N的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
根据第四方面或者第四方面的第一种可能的实现方式,在第四方面的第 二种可能的实现方式中, 所述 M个描述信息用于使得所述转发设备确定所 述 N个表将被存储在所述转发设备中的至少一个存储器中, 所述方法还包 括:
所述控制器接收所述转发设备发送的第一消息, 所述第一消息用于通告 所述转发设备确定不能将所述 N个表中的第 a个表存储在所述转发设备的至 少一个存储器中,
其中, a为正整数, 且 a小于或者等于 N。
根据第四方面的第二种可能的实现方式,在第四方面的第三种可能的实 现方式中, 所述方法还包括:
所述控制器生成第二消息, 所述第二消息用于指示所述转发设备尽力存 储所述 N个表中的第 a个表; 所述控制器将所述第二消息发送至所述转发设备, 以使所述转发设备工 作于尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述至少一个 存储器的第二存储器中;
所述控制器接收所述转发设备发送的第三消息, 所述第三消息用于通告 所述转发设备确定所述 N个表中的第 a个表将被存储在所述第二存储器中 时, 所述 N个表中的第 a个表所支持的转发业务的实际性能。
第五方面, 提供了一种转发设备, 包括:
接收单元, 用于接收控制器发送的 M个描述信息, 所述 M个描述信息 与 M个转发业务——对应, 所述 M个描述信息中的每个描述信息包括对应 的转发业务的预定的性能以及执行所述对应的转发业务需要查找的表的标 识, 执行所述 M个转发业务需要查找 N个表, 所述 M个转发业务的预定的 性能组成的集合包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个 元素, 所述 Q个元素中的每个元素表示一个预定的性能, 其中, 所述 Q个 元素中的第 r个元素表示预定的性能为 0· χ线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0 < Cr < 1;
生成单元,用于根据所述接收单元接收到的所述 M个描述信息,生成 Q 个同时访问信息,所述 Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每两个表是否需要被预定的性能为 0· χ线速的同一个转发业务 访问; 所述 Ν个表将被存储在所述转发设备的至少一个存储器中; 存储器 。' ' Ϊ
在第五方面的第一种可能的实现方式中, 所述 Q个同时访问信息为 Q 个 N X N的矩阵, 所述 Q个 N X N的矩阵中的每个 N χ N的矩阵的元素为 1 或者 0,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 0· χ线速的至少一个转发业务访 问,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
根据第五方面的第一种可能的实现方式,在第五方面的第二种可能的实 现方式中, 所述确定单元,具体用于确定所述 N个表中的每个表将被存储在 所述转发设备的至少一个存储器中,
其中, 所述确定单元具体包括用于确定所述 N个表中的第 m个表将被 存储在所述转发设备的至少一个存储器中的确定子单元, 所述确定子单元具 体包括:
第一确定子单元,用于确定所述 N个表中的每个表是否已经存储在所述 至少一个存储器的第一存储器中, 1 X N的矩阵用于表示所述 N个表中的每 个表是否已经存储在所述第一存储器中, 具体地, 所述 l x N的矩阵的第 1 列元素至第 N列元素分别用于表示所述 N个表中的第 1个表至所述 N个表 中的第 N个表是否已经存储在所述第一存储器中, 其中, 所述 l x N的矩阵 的第 i列元素用于表示所述 N个表中的第 i个表是否已经存储在所述第一存 储器中, 如果所述 1 χ Ν的矩阵的第 i列元素为 1则表示所述第一存储器已 经存储所述 N个表中的第 i个表, 如果所述 1 X N的矩阵的第 i列元素为 0 则表示所述第一存储器没有存储所述 N个表中的第 i个表;
第二确定子单元,用于将所述生成单元生成的所述 Q个 N X N的矩阵中 每个 Ν χ N的矩阵的第 m行的元素与所述第一确定子单元确定的所述 1 x N 的矩阵的对应元素作与运算, 确定结果为 1的个数, 其中, 所述 Q个 Ν χ Ν 的矩阵中的第 r个 N N的矩阵的第 m行的元素与所述 1 x N的矩阵的对应 元素作与运算的结果中 1的个数为 &;
第三确定子单元, 用于基于 maxdPi+l) X d X A, ... ..., (PQ+l) x CQ x
A)≤B, 确定所述 N个表中的第 m个表将被存储在所述第一存储器中; 其中, m为小于或者等于 N的正整数, &为非负整数, & < N, A和 B 为正数, A表示实际性能为线速的转发业务需要占用的带宽, B表示所述第 一存储器能够提供的最大带宽。
根据第五方面、第五方面的第一种可能的实现方式或者第五方面的第二 种可能的实现方式, 在第五方面的第三种可能的实现方式中, 所述转发设备 还包括发送单元;
所述生成单元, 还用于当所述确定单元确定不能将所述 N个表中的第 a 个表存储在所述至少一个存储器中时, 生成第一消息, 所述第一消息用于通 告所述转发设备确定不能将所述 N个表中的第 a个表存储在所述至少一个存 储器中;
所述发送单元,用于将所述生成单元生成的所述第一消息发送至所述控 制器,
其中, a为正整数, 且 a小于或者等于 N。
根据第五方面的第三种可能的实现方式,在第五方面的第四种可能的实 现方式中,
所述接收单元, 还用于接收所述控制器发送的第二消息, 所述第二消息 用于指示所述转发设备尽力存储所述 N个表中的第 a个表;
所述确定单元, 还用于根据所述接收单元接收的所述第二消息, 工作于 尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述至少一个存储 器的第二存储器中;
所述生成单元, 还用于生成第三消息, 所述第三消息用于通告所述确定 单元确定所述 N个表中的第 a个表将被存储在所述第二存储器中时,所述 N 个表中的第 a个表所支持的转发业务的实际性能;
所述发送单元,还用于将所述生成单元生成的所述第三消息发送至所述 控制器。
第六方面, 提供了一种控制器, 包括:
生成单元, 用于生成 M个描述信息, 所述 M个描述信息与 M个转发业 务——对应, 所述 M个描述信息中的每个描述信息包括对应的转发业务的 预定的性能以及执行所述对应的转发业务需要查找的表的标识,执行所述 M 个转发业务需要查找 N个表, 所述 M个转发业务的预定的性能组成的集合 包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所述 Q个 元素中的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的第 r个元 素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2≤N, Q < M, r < Q, 0 < Cr < 1;
发送单元, 用于将所述生成单元生成的所述 M个描述信息发送至转发 设备。 在第六方面的第一种可能的实现方式中, 所述 M个描述信息用于使得 所述转发设备确定所述 N个表将被存储在所述转发设备中的至少一个存储 器中, 所述控制器还包括:
接收单元, 用于接收所述转发设备发送的第一消息, 所述第一消息用于 通告所述转发设备确定不能将所述 N个表中的第 j个表存储在所述转发设备 的至少一个存储器中,
其中, j为正整数, 且 j小于或者等于 N。
根据第六方面的第一种可能的实现方式,在第六方面的第二种可能的实 现方式中,
所述生成单元, 还用于生成第二消息, 所述第二消息用于指示所述转发 设备尽力存储所述 N个表中的第 j个表;
所述发送单元,还用于将所述生成单元生成的所述第二消息发送至所述 转发设备,以使所述转发设备工作于尽力而为模式并确定所述 N个表中的第 j个表将被存储在所述至少一个存储器的第二存储器中;
所述接收单元, 还用于接收所述转发设备发送的第三消息, 所述第三消 息用于通告所述转发设备确定所述 N个表中的第 j个表将被存储在所述第二 存储器中时, 所述 N个表中的第 j个表所支持的转发业务的实际性能。
第七方面, 提供了一种转发设备, 包括:
接收单元, 用于接收控制器发送的 Q个同时访问信息, 其中, 所述 Q 个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每两个表是否 需要被预定的性能为 0· χ线速的同一个转发业务访问, 执行 Μ个转发业务 时需要查找所述 Ν个表;
确定单元,用于根据所述接收单元接收的所述 Q个同时访问信息,确定 所述 Ν个表将被存储在所述转发设备的至少一个存储器中; 存储器 。' ' Ϊ
在第七方面的第一种可能的实现方式中, 所述 Q个同时访问信息为 Q 个 N X N的矩阵, 所述 Q个 N X N的矩阵中的每个 N X N的矩阵的元素为 1 或者 0,
如果所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访 问,
如果所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
根据第七方面的第一种可能的实现方式,在第七方面的第二种可能的实 现方式中, 所述确定单元,具体用于确定所述 N个表中的每个表将被存储在 所述转发设备的至少一个存储器中,
其中, 所述确定单元包括用于确定所述 N个表中的第 m个表将被存储 在所述转发设备的至少一个存储器中的确定子单元, 所述确定子单元具体包 括:
第一确定子单元,用于确定所述 N个表中的每个表是否已经存储在所述 至少一个存储器的第一存储器中, l x N的矩阵用于表示所述 N个表中的每 个表是否已经存储在所述转发设备的第一存储器中, 具体地, 所述 1 X N的 矩阵的第 1列元素至第 N列元素分别用于表示所述 N个表中的第 1个表至 所述 N个表中的第 N个表是否已经存储在所述第一存储器中,其中, 所述 1 χ Ν的矩阵的第 i列元素用于表示所述 N个表中的第 i个表是否已经存储在 所述第一存储器中, 如果所述 1 X N的矩阵的第 i列元素为 1则表示所述第 一存储器已经存储所述 N个表中的第 i个表, 如果所述 1 X N的矩阵的第 i 列元素为 0则表示所述第一存储器没有存储所述 N个表中的第 i个表;
第二确定子单元,用于将所述 Q个 N X N的矩阵中的每个 N X N的矩阵 的第 m行的元素与所述第一确定子单元确定的所述 1 χ Ν的矩阵的对应元素 作与运算, 确定结果为 1的个数, 其中, 所述 Q个 Ν χ N的矩阵中的第 r个 N X N的矩阵的第 m行的元素与所述 1 X N的矩阵的对应元素作与运算的结 果中 1的个数为 &;
第三确定子单元, 用于基于 maxdPi+l) X d X A, ... ..., (PQ+l) x CQ x
A)≤B, 确定所述 N个表中的第 m个表将被存储在所述第一存储器中;
其中, m为小于或者等于 N的正整数, &为非负整数, & < N, A和 B 为正数, A表示的实际性能为线速的转发业务需要占用带宽, B表示所述第 一存储器能够提供的最大带宽。
根据第七方面、第七方面的第一种可能的实现方式或者第七方面的第二 种可能的实现方式, 在第七方面的第三种可能的实现方式中, 所述转发设备 还包括生成单元和发送单元,
所述生成单元, 还用于当所述确定单元确定不能将所述 N个表中的第 a 个表存储在所述至少一个存储器中时, 生成第一消息, 所述第一消息用于通 告所述转发设备确定不能将所述 N个表中的第 a个表存储在所述至少一个存 储器中;
所述发送单元,用于将所述生成单元生成的所述第一消息发送至所述控 制器,
其中, a为正整数, 且 a小于或者等于 N。
根据第七方面的第三种可能的实现方式,在第七方面的第四种可能的实 现方式中,
所述接收单元, 还用于接收所述控制器发送的第二消息, 所述第二消息 用于指示所述转发设备尽力存储所述 N个表中的第 a个表;
所述确定单元, 还用于根据所述接收单元接收的所述第二消息, 工作于 尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述至少一个存储 器的第二存储器中;
所述生成单元, 还用于生成第三消息, 所述第三消息用于通告所述转发 设备确定所述 N个表中的第 a个表将被存储在所述第二存储器中时,所述 N 个表中的第 a个表所支持的转发业务的实际性能;
所述发送单元,还用于将所述生成单元生成的所述第三消息发送至所述 控制器。
第八方面, 提供了一种控制器, 包括:
生成单元, 用于生成 M个描述信息, 所述 M个描述信息与 M个转发业 务——对应, 所述 M个描述信息中的每个描述信息包括对应的转发业务的 预定的性能以及执行所述对应的转发业务需要查找的表的标识,执行所述 M 个转发业务需要查找 N个表, 所述 M个转发业务的预定的性能组成的集合 包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所述 Q个 元素中的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的第 r个元 素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2≤N, Q < M, r < Q, 0 < Cr < 1;
所述生成单元, 还用于根据所述 M个描述信息, 生成 Q个同时访问信 息,所述 Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每 两个表是否需要被预定的性能为 0· χ线速的同一个转发业务访问; 发设备。
在第八方面的第一种可能的实现方式中, 所述 Q个同时访问信息为 Q 个 Ν X Ν的矩阵, 所述 Q个 Ν X Ν的矩阵中的每个 Ν X Ν的矩阵的元素为 1 或者 0,
如果所述 Q个 Ν χ Ν的矩阵中的第 r个 Ν χ N的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访 问,
如果所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
根据第八方面或者第八方面的第一种可能的实现方式,在第八方面的第 二种可能的实现方式中, 所述 M个描述信息用于使得所述转发设备确定所 述 N个表将被存储在所述转发设备中的至少一个存储器中,所述控制器还包 括接收单元, 用于接收所述转发设备发送的第一消息, 所述第一消息用于通 告所述转发设备确定不能将所述 N个表中的第 a个表存储在所述转发设备的 至少一个存储器中,
其中, a为正整数, 且 a小于或者等于 N。
根据第八方面的第二种可能的实现方式,在第八方面的第三种可能的实 现方式中,
所述生成单元, 还用于生成第二消息, 所述第二消息用于指示所述转发 设备尽力存储所述 N个表中的第 a个表;
所述发送单元,还用于将所述生成单元生成的所述第二消息发送至所述 转发设备,以使所述转发设备工作于尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述至少一个存储器的第二存储器中;
所述接收单元, 还用于接收所述转发设备发送的第三消息, 所述第三消 息用于通告所述转发设备确定所述 N个表中的第 a个表将被存储在所述第二 存储器中时, 所述 N个表中的第 a个表所支持的转发业务的实际性能。
本发明实施例通过转发业务的描述信息, 生成执行转发业务需要查找的 表的同时访问信息。 根据表的同时访问信息, 确定执行转发业务需要查找的 表将被存储在转发设备中的存储位置。 执行转发业务需要对表进行查找。 对 表执行查找操作则会占用转发设备的硬件资源。 例如, 占用转发设备的存储 器的带宽。 转发业务的实际性能受到转发设备的可用的硬件资源的约束。 例 如, 受到了转发设备的存储器的可用带宽的约束。 执行转发业务时, 具有同 时访问关系的两个表都会被查找。 对两个表执行查找操作时, 每个表都会占 用转发设备的可用的硬件资源, 从而对转发业务的实际性能造成影响。 上述 技术方案中,确定所述 N个表在所述转发设备的存储位置时,考虑了所述 N 个表是否具有同时访问关系这一因素。 因此, 通过上述技术方案确定的表的 存储位置有助于使得转发业务的实际性能尽可能达到预定的性能。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例或现有技 术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图 仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造 性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明一个实施例的确定表的存储位置的方法的流程图。
图 2是本发明另一个实施例的确定表的存储位置的方法的流程图。 图 3是本发明另一个实施例的确定表的存储位置的方法的流程图。 图 4是本发明另一个实施例的确定表的存储位置的方法的流程图。 图 5是本发明另一个实施例的确定表的存储位置的方法的流程图。 图 6是本发明另一个实施例的转发业务所形成的多分枝的有向图。 图 7是图 6所示的预定的性能为线速的 3个转发业务。
图 8是图 6所示的预定的性能为半速的 2个转发业务。
图 9是图 6中的 16个表的线速同时访问信息的矩阵。
图 10是图 6中的 16个表的半速同时访问信息的矩阵。 图 11是本发明另一个实施例的转发设备的第一存储器的第一表存储位 图的一例。
图 12是本发明另一个实施例的转发设备的第一存储器更新之后的第二 表存储位图的一例。
图 13是本发明另一个实施例的确定表的存储位置的方法的流程图。 图 14是本发明一个实施例的转发设备的框图。
图 15是本发明一个实施例的控制器的框图。
图 16是本发明另一个实施例的转发设备的框图。
图 17是本发明另一个实施例的控制器的框图。
图 18是本发明另一个实施例的转发设备的框图。
图 19是本发明另一个实施例的控制器的框图。
图 20是本发明另一个实施例的转发设备的框图。
图 21是本发明另一个实施例的控制器的框图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创 造性劳动的前提下所获得的所有其他实施例, 都属于本发明保护的范围。
下述实施例中涉及到转发设备以及控制器。 其中, 转发设备可以是路由 器、 网络交换机、 防火墙、 负载均衡器或者数据中心。 举例来说, 所述转发 设备和控制器可以位于软件定义的网络(英文: software-defined networking, 简称: SDN )。 具体来说, 所述转发设备可以是 SDN交换机。 所述控制器可 以是 SDN控制器。 例如, 所述 SDN交换机可以是开放流交换机(英文: OpenFlow Switch )。所述 SDN控制器可以是开放流控制器(英文: OpenFlow Conroller )。 所述开放流交换机和开放流控制器可以通过控制通道进行通信。 关于开放流交换机、 开放流控制器以及控制通道, 可以参考开放流交换机说 明书第 1.4.0版(英文: OpenFlow Switch Specification version 1.4.0 )。
下述实施例中涉及到的性能可以是带宽。所述性能是所述转发设备能够 实现的最大带宽。 本领域的技术人员可以理解, 如果所述转发设备只运行一 个转发业务, 则所述转发业务的实际性能的最大值可以是线速。 下述实施例中涉及到的转发业务可以是二层转发业务、 三层转发业务、 四层转发业务、 多协议标签交换(英文: Multiprotocol Label Switching, 简 称: MPLS )转发业务或者虚拟专用网 (英文: virtual private network, 简称: VPN )转发业务。所述二层转发业务可以是媒体接入控制(英文: Media Access Control, 简称: MAC )协议转发业务。 所述三层转发业务可以是网际协议 (英文: internet protocol, 简称: IP )转发业务。 所述四层转发业务可以是 传输控制协议(英文: Transmission Control Protocol, 简称: TCP )转发业务 或者用户数据报协议( User Datagram Protocol, UDP )转发业务。 所述 VPN 转发业务可以是二层虚拟专用网 (英文: Layer 2 virtual private network, 简 称: L2VPN )转发业务或者三层虚拟专用网 (英文: Layer 3 virtual private network, 简称: L3VPN )转发业务。 所述转发业务可以对某种协议的报文 进行处理。 例如 MAC协议转发业务可以对 MAC协议报文进行处理。 IP转 发业务可以对 IP报文进行处理。 TCP转发业务可以对 TCP报文进行处理。 UDP转发业务可以对 UDP报文进行处理。
下述实施例中涉及到的表可以路由表、 MAC协议表或者入标签映射(英 文: incoming label map, 简称: ILM )表。 下述实施例中涉及到的表也可以 是对路由表、 MAC协议表或者 ILM表中包含的子表。 例如, 所述路由表可 以包括目的 IP地址与下一跳的映射关系。 所述路由表可以包含第一子表和 第二子表。 所述第一子表可以包括目的 IP地址与下一跳的索引的映射关系。 所述第二子表可以是包括所述下一跳的索引与所述下一跳的映射关系。本发 明实施例不对表的格式以及表的内容进行限定。
图 1是本发明一个实施例的确定表的存储位置的方法的流程图。 图 1所 示的方法包括:
101 , 转发设备接收控制器发送的 M个描述信息, 该 M个描述信息与 M个转发业务——对应, 该 M个描述信息中的每个描述信息包括对应的转 发业务的预定的性能以及执行该对应的转发业务需要查找的表的标识,执行 M个转发业务需要查找 N个表, M个转发业务的预定的性能组成的集合包 含 Q个元素, 该 Q个元素分别是第 1个元素至第 Q个元素, 该 Q个元素中 的每个元素表示一个预定的性能, 其中, 该 Q个元素中的第 r个元素表示预 定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0 < Cr≤l。 102, 该转发设备根据 M个描述信息, 生成 Q个同时访问信息, Q个同 时访问信息中的第 r个同时访问信息表示 N个表中的每两个表是否需要被预 定的性能为 0· χ线速的同一个转发业务访问。
103, 该转发设备根据 Q个同时访问信息, 确定 Ν个表将被存储在该转 发设备的至少一个存储器中。
104, 该转发设备将该 Ν个表存储在该至少一个存储器中。
本发明实施例通过转发业务的描述信息,其中描述信息包括转发业务的 预定的性能, 生成执行转发业务需要查找的表的同时访问信息。 根据表的同 时访问信息,确定执行转发业务需要查找的表将被存储在转发设备中的至少 一个存储器中。 有助于使得转发业务的实际性能尽可能达到预定的性能。
本发明实施例中, Μ个描述信息中的每个描述信息包括与该每个描述信 息对应的转发业务的预定的性能以及执行该对应的转发业务需要查找的所 有的表的标识。 其中, 对应的转发业务的预定的性能可以是线速, 或者也可 以是线速乘以一个系数。 该系数为 0到 1之间的值。 其中, 表的标识可以是 表的序号, 或者也可以是表的其他标识, 本发明实施例对此不作限定。
举例来说, 所述 Μ个转发业务可以包括二层转发业务、 三层转发业务、 四层转发业务、 MPLS转发业务以及 VPN转发业务中的一个或者多个转发 业务。 所述二层转发业务可以是 MAC协议转发业务。 所述三层转发业务可 以是 IP转发业务。所述四层转发业务可以是 TCP转发业务。 所述 VPN转发 业务可以是 L2VPN转发业务或者 L3VPN转发业务。
举例来说, 所述 M个转发业务可以分别对 M个协议的报文进行处理。 所述 M个协议的报文可以是 MAC协议报文、 IP报文、 TCP报文以及 UDP 报文中的至少一个协议报文。
举例来说, 所述 N个表可以包括路由表、 MAC协议表以及 ILM表中的 至少两个表。
应注意, M个转发业务中的两个不同的转发业务可以查找同一个表。 可选地, 作为一个实施例, 101中, 转发设备可通过控制通道接收控制 器发送的 M个描述信息。 或者, 转发设备也可通过其他的方式从控制器接 收 M个描述信息。 本发明对此不作限定。
可选地, 作为另一个实施例, 101中, 转发设备可接收控制器发送的控 制消息, 该控制消息包括 M个描述信息。 本发明对此不作限定。 本发明实施例对转发业务的预定的性能的种类, 即 Q的值不作限定。 具体来说,
Q=l, 表示 M个转发业务的预定的性能都相同, 例如, 该预定的性能为 线速, 即(^=1。
Q=3,表示 M个转发业务可分为三组,每一组转发业务中的转发业务的 预定的性能彼此相同。 例如, 这 3种预定的性能可以为线速、 半速和慢速, 即(^=1, C2=0.5, C3=0。
可选地, 作为一个实施例, 102中, Q个同时访问信息可表示为 Q个 N χ Ν的矩阵。该 Q个 Ν χ N的矩阵中的每个 Ν χ N的矩阵的元素为 1或者 0。 其中, 如果 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的元 素为 1,则表示 N个表中的第 i个表和 N个表中的第 j个表需要同时被 M个 转发业务中预定的性能为 Cr x线速的至少一个转发业务访问。 其中, 如果 Q 个 Ν χ N的矩阵中的第 r个 Ν χ N的矩阵的第 i行第 j列的元素为 0,则表示 N个表中的第 i个表和 N个表中的第 j个表不需要同时被 M个转发业务中预 定的性能为 0· χ线速的任意一个转发业务同时访问。 其中, i和 j为正整数, 且 i和 j均小于或者等于N。
例如, Q=l, 且(^=1时, 即表示 M个转发业务的预定的性能都为线速。 此时, Q个同时访问信息包括 1个 N X N的矩阵。 并且该 1个 N X N的矩阵 的第 i行第 j列的元素表示 N个表中的第 i个表和 N个表中的第 j个表是否 需要同时被至少一个业务访问。
再例如, Q=3, 且(^=1, C2=0.5, C3=0时, 即表示 M个转发业务中的 每一个转发业务的预定的性能为线速或半速或慢速。其中, 0.5 X线速也称为 半速。 此时, Q个同时访问信息包括 3个 N X N的矩阵。 并且该 3个 N X N 的矩阵的第 1个 Ν χ N的矩阵的第 i行第 j列的元素表示 N个表中的第 i个 表和 N个表中的第 j个表是否需要同时被预定的性能为线速的至少一个转发 业务访问。 该 3个 N X N的矩阵的第 2个 N X N的矩阵的第 i行第 j列的元 素表示 N个表中的第 i个表和 N个表中的第 j个表是否需要同时被预定的性 能为半速的至少一个转发业务访问。 该 3个 N X N的矩阵的第 3个 N X N的 矩阵的第 i行第 j列的元素表示 N个表中的第 i个表和 N个表中的第 j个表 是否需要同时被预定的性能为慢速的至少一个转发业务访问。
应注意, 本发明实施例中, 也可用其他的形式表示 Q个同时访问信息。 例如,可以是数组的形式,或者也可以是位图的形式。本发明对此不作限定。 本发明实施例中, 在 103中, 转发设备首先确定转发设备的存储器中已 经存储的表的标识,根据 Q个同时访问信息确定该存储器中已经存储的表与 当前需要存储的表之间的同时访问关系, 进一步确定是否可将当前需要存储 的表存储在该存储器中。 其中, 同时访问关系是指两个表是否需要被同一个 转发业务访问。
具体地, 如果将待存储的表存储在该存储器中时, 仍然能够满足与该存 储器所存储的表对应的所有转发业务的预定的性能,此时可确定该待存储的 表的存储位置即为该存储器。 如果将待存储的表存储在该存储器中时, 不能 满足与该存储器所存储的表相关的任一个转发业务的预定的性能, 此时确定 不能将该待存储的表存储在该存储器中。 这种情况下, 可以假设将该待存储 的表存储在转发设备的其他存储器中, 进行与该存储器类似的判断。
具体地, 103中,确定 N个表将被存储在转发设备的至少一个存储器中, 包括确定 N个表中的每个表将被存储在转发设备的至少一个存储器中。
转发设备的至少一个存储器可以是一个存储器, 也可以是多个存储器。
4叚设该至少一个存储器中包括第一存储器。
其中, 确定将被存储的表是否可存储在至少一个存储器的第一存储器 中, 包括: 根据该将被存储的表与其他的表的同时访问关系, 该第一存储器 中已经存储的表以及该第一存储器能够提供的最大带宽来判断是否可将该 被存储的表存储在该第一存储器中。
可选地, 作为一个实施例, 其中确定 N个表中的第 m个表将被存储在 至少一个存储器的第一存储器中, 具体包括: 该转发设备确定所述 N个表中 的每个表是否已经存储在该第一存储器中。 1 X N的矩阵用于表示 N个表中 的每个表是否已经存储在该转发设备的第一存储器中。 该 1 X N的矩阵的第 1列元素至第 N列元素分别用于表示该 N个表中的第 1个表至该 N个表中 的第 N个表是否已经存储在第一存储器中。 其中, l x N的矩阵的第 i列元 素用于表示 N个表中的第 i个表是否已经存储在第一存储器中。 如果该 I X N的矩阵的第 i列元素为 1则表示该转发设备的第一存储器已经存储了 N个 表中的第 i个表,如果该 1 X N的矩阵的第 i列为 0则表示该转发设备的第一 存储器没有存储 N个表中的第 i个表。 具体地, 当该转发设备的第一存储器 中没有存储 N个表中的任一表时, 该 1 X N的矩阵的每一列的元素均为 0。 转发设备将 102中所确定的 Q个 N X N的矩阵中每个 N X N的矩阵的第 m行的元素与 l x N的矩阵的对应元素作与运算, 确定结果为 1的个数。 其 中, Q个 Νχ N的矩阵中的的第 r个 Νχ N的矩阵的第 m行的元素与该 l x Ν的矩阵的对应元素作与运算的结果为 1的个数为&。 其中, Q个 ΝχΝ的 矩阵中的的第 r个 Νχ Ν的矩阵的第 m行的 Ν个元素, 与该 l x N的矩阵中 的 N个元素——对应。 具体地, 所述第 m行的 N个元素与所述 1 X N的矩 阵中的 N个元素中, 所在的列相同的元素具有——对应关系。 应理解, 作与 运算的两个数分别位于 Q个 N X N的矩阵中的的第 r个 N X N的矩阵的第 m 行, 和 l x N的矩阵。 并且这两个数所在的列数是一样的。
所述转发设备基于 maxdPi+l) X d X A, ......, (PQ+1) CQ x A) < B, 转 发设备确定 N个表中的第 m个表将被存储在该第一存储器中。 也就是说, 对于 r取值分别为 1至 Q的 Q个正整数, 能够得到对应的 Q个 (&+l)x Crx Α的值。 当这 Q个 (Pr+l)x C x A的值中的最大值小于或者等于 B时, 可确 定 N个表中的第 m个表将被存储的位置为该第一存储器。 也可理解, 该 N 个表中的第 m个表将被存储在转发设备中的位置为该第一存储器。
其中, m为小于或者等于 N的正整数, &为非负整数, & <N, A和 B 为正数, A表示实际性能为线速的转发业务需要占用的带宽, B表示该第一 存储器能够提供的最大带宽。
可理解, 假设待存储的表为 N个表中的第 m个表, 转发设备首先确定 第一存储器中已经存储的表, 并以 l x N的矩阵来表示, 其中该 l x N的矩 阵的第 m列的元素为 0。 当该第一存储器中没有存储任何表时, 该 l x N的 矩阵的 N列元素均为 0。 当该第一存储器中已经存储有表时, 该已经存储的 表在该 1 X N的矩阵的对应位置的元素为 1。
进一步地, 转发设备将该 N个表中的第 m个表存储在该第一存储器之 后, 将该 1 χΝ的矩阵的第 m列元素由 0更新为 1。
例如, Q=l, 且(^=1时, 即表示 M个转发业务的预定的性能都为线速。 此时, 若待存储的表为 N个表中的第 m个表, 当满足 maxd +l) x A) < B 时, 转发设备确定 N个表中的第 m个表将被存储在该第一存储器。
再例如, Q=3, 且(^=1, C2=0.5, C3=0时, 即表示 M个转发业务的预 定的性能为线速或半速或慢速。 此时, 若待存储的表为 N个表中的第 m个 表, 当满足 max((Pi+l) A, (P2+l) x 0.5 A, (P3+l) 0 x A) = max((Pi+l) x A, (P2+l) x 0.5 x A)≤ B时, 转发设备确定 N个表中的第 m个表将被存储 在该第一存储器。
这样, 转发设备可逐一地确定 N个表中的每个表将被存储的位置。
可选地, 作为一个实施例, 当转发设备根据 Q个同时访问信息, 确定不 能将 N个表中的第 a个表的存储在该至少一个存储器中时,可生成第一消息。 该第一消息用于通告该转发设备确定不能将 N个表中的第 a个表存储在该至 少一个存储器中。进一步地该转发设备可将该第一消息发送至控制器。其中, a为正整数, 且 a小于或者等于 N。
可理解, 若待存储的表为 N个表中的第 a个表, 当转发设备遍历该转发 设备上的所有的存储器,釆用前述的方法,均无法确定其将被存储的位置时, 可确定该转发设备确定不能将 N个表中的第 a个表的存储在该转发设备的至 少一个存储器中。
可选地, 作为另一个实施例, 转发设备可接收控制器发送的第二消息, 该第二消息用于指示该转发设备尽力存储 N个表中的第 a个表。该转发设备 可根据第二消息,工作于尽力而为模式并确定 N个表中的第 a个表将被存储 在至少一个存储器的第二存储器中。 进一步地, 转发设备生成第三消息, 该 第三消息用于通告该转发设备确定 N个表中的第 a个表将被存储在该第二存 储器中时, N个表中的第 a个表所支持的转发业务的实际性能。 随后, 转发 设备可将该第三消息发送至该控制器。
应注意, 若 N个表中的第 a个表需要被多个转发业务查找, 那么该第三 消息应包括与该多个转发业务——对应的多个实际性能。
应注意, 这里的第二存储器可以是第一存储器, 也可以是至少一个存储 器中的与第一存储器不同的另一存储器。 本发明对此不作限定。
具体地,该转发设备工作于尽力而为模式时,可以是随机确定该 N个表 中的第 a个表将被存储的位置。 也就是说, 第二存储器可以是至少一个存储 器中的任一存储器。
或者, 具体地, 该转发设备工作于尽力而为模式时, 可优先确定预定的 性能高的转发业务中的表将被存储的位置。 可以理解为, 转发设备优先保障 0·较大的转发业务的实际性能。
例如, Q=3, 且(^=1, C2=0.5, C3=0时, 即表示 M个转发业务中的每 一个转发业务的预定的性能为线速或半速或慢速。 若该转发设备确定该第 a 个表将被存储的位置为第二存储器,该第二存储器的带宽为 B'。假设将第一 N X N矩阵中的第 a行的元素与第二存储器的表存储位图中的对应元素作与 运算, 确定结果为 1的个数为 将第二 Ν χ Ν矩阵中的第 a行的元素与第 二存储器的表存储位图中的对应元素作与运算, 确定结果为 1的个数为 P2; 将第三 N X N矩阵中的第 a行的元素与第二存储器的表存储位图中的对应元 素作与运算, 确定结果为 1的个数为 P3。 其中, P2和 P3为小于 N的非 负整数。 且 maxi Pi+l) X A, (P2+l) x 0.5 x A, (P3+l) x 0 x A)〉 B,, 那么上 述第三消息可用于通告该第 a个表将被存储在该第二存储器中所能支持的转 发业务的实际性能为: 需要查找该第 a个表的预定的性能为线速的转发业务 实际能达到 1/(1+ )倍的线速, 需要查找该第 a个表的预定的性能为半速的 转发业务实际能达到 2/(1+Ρ2)倍的半速。 具体地, 转发设备工作于尽力而为 模式时,优先选择能够保障预定的性能为线速的转发业务的实际性能的存储 器进行存储。
本发明实施例通过转发业务的描述信息,其中描述信息包括转发业务的 预定的性能, 生成执行转发业务需要查找的表的同时访问信息, 并根据表的 同时访问信息,确定执行转发业务需要查找的表将被存储在转发设备中的至 少一个存储器中。通过上述技术方案确定的表将被存储在转发设备中的位置 有助于使得转发业务的实际性能尽可能达到预定的性能。
图 2是本发明另一个实施例的确定表的存储位置的方法的流程图。 图 2 对应的实施例是对图 1对应的实施例的进一步说明。关于图 2对应的实施例, 具体可以参考图 1对应的实施例。 参见图 2, 图 2所示的方法包括:
201 , 控制器生成 M个描述信息, 该 M个描述信息与 M个转发业务一 一对应, 该 M个描述信息中的每个描述信息包括对应的转发业务的预定的 性能以及执行该对应的转发业务需要查找的表的标识, 执行 M个转发业务 需要查找 N个表, M个转发业务的预定的性能组成的集合包含 Q个元素, 该 Q个元素分别是第 1个元素至第 Q个元素, 该 Q个元素中的每个元素表 示一个预定的性能, 其中, 该 Q个元素中的第 r个元素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0≤Cr≤l。
202, 控制器将 M个描述信息发送至转发设备。
举例来是, 202具体可以包括:控制器将 M个描述信息发送至转发设备, 以使得该转发设备确定 M个转发业务需要查找的 N个表将被存储在转发设 备的至少一个存储器中。
本发明实施例通过转发业务的描述信息,其中描述信息包括转发业务的 预定的性能, 生成执行转发业务需要查找的表的同时访问信息。 根据表的同 时访问信息,确定执行转发业务需要查找的表将被存储在转发设备中的至少 一个存储器中。 执行转发业务需要对表进行查找。 对表执行查找操作则会占 用转发设备的硬件资源。 例如, 占用转发设备的存储器的带宽。 转发业务的 实际性能受到转发设备的可用的硬件资源的约束。 例如, 受到了转发设备的 存储器的可用带宽的约束。 执行转发业务时, 具有同时访问关系的两个表都 会被查找。 对两个表执行查找操作时, 每个表都会占用转发设备的可用的硬 件资源, 从而对转发业务的实际性能造成影响。 上述技术方案中, 控制器向 转发设备发送的 M个描述信息中包含了表的同时访问信息。 因此, 所述转 发设备确定所述 N个表在所述转发设备的存储位置时, 可以考虑所述 N个 表是否具有同时访问关系这一因素。 因此, 通过上述技术方案有助于使得转 发业务的实际性能尽可能达到预定的性能。
本发明实施例中,每个描述信息包括与该每个描述信息对应的转发业务 的预定的性能以及执行该对应的转发业务需要查找的所有的表的标识。 其 中, 对应的转发业务的预定的性能可以是线速, 或者也可以是线速乘以一个 系数, 且该系数为 0到 1之间的任意值。 其中, 表的标识可以是表的序号, 或者也可以是表的其他标识, 本发明对此不作限定。
应注意, M个转发业务中的两个不同的转发业务可以查找同一个表。 本发明实施例对转发业务的预定的性能的种类, 即 Q的值不作限定。 具体地,
Q=l, 表示 M个转发业务的预定的性能都相同, 例如, 该预定的性能为 线速, 即(^=1。
Q=3,表示 M个转发业务可分为三组,每一组中的转发业务的预定的性 能相同。例如,这 3种预定的性能可以为线速、半速和慢速,即 d=l, C2=0.5, c3=o。
本发明实施例中, M个描述信息可以是所述控制器的用户, 例如运营商 预先存储在该控制器中的, 或者, M个描述信息也可以是控制器从其他的设 备或装置所获取的, 本发明对此不作限定。
可选地, 作为一个实施例, 202中, 控制器可通过控制通道发送 M个描 述信息至转发设备。 或者, 控制器也可通过其他的方式发送 M个描述信息 至转发设备。 本发明对此不作限定。
可选地, 作为另一个实施例, 202中, 控制器可发送控制消息至转发设 备, 该控制消息包括 M个描述信息。 本发明对此不作限定。
可选地, 作为一个实施例, 控制器可接收转发设备发送的第一消息, 该 第一消息用于通告该转发设备确定不能将 N个表中的第 j个表存储在该转发 设备的至少一个存储器中。 其中, j为小于或者等于 N的正整数。
可选地, 作为一个实施例, 若该控制器不允许需要查找第 j个表的转发 业务降速, 那么该控制器接收到第一消息后可不作进一步处理。
可选地, 作为另一个实施例, 若该控制器允许需要查找第 j个表的转发 业务降速, 那么该控制器可生成第二消息, 该第二消息用于指示转发设备尽 力存储该第 j个表。 进一步, 该控制器可将该第二消息发送至转发设备, 以 使得该转发设备工作于尽力而为模式并确定将被存储在转发设备的至少一 个存储器的第二存储器中。并且,该控制器可接收转发设备发送的第三消息, 该第三消息用于通告在该转发设备确定第 j个表将被存储在该第二存储器中 时, 该第 j个表所支持的转发业务的实际性能。
应注意,本发明实施例中的转发业务的描述信息可以是由所述控制器的 用户, 例如运营商定义的。 所述运营商将转发业务的描述信息存储在控制器 中。 当运营商增加转发业务或者修改转发业务的描述信息时, 该控制器可以 实时地将增加的转发业务或者修改的转发业务的描述信息发送至转发设备。 进一步地, 可由转发设备根据增加的转发业务或修改的转发业务的描述信 息, 重新确定转发业务需要查找的表将被存储的位置。
具体地, 当运营商增加一个新的转发业务时, 同时运营商定义了该新的 转发业务的描述信息。 则控制器将该新的转发业务的描述信息发送至转发设 备。 例如, 运营商可增加第 M+1个转发业务, 该第 M+1个转发业务的描述 信息可包含前述 N个表中的 1个或多个表, 也可包含 N个表之外的至少一 个新的表。 同时运营商可定义该第 M+1个转发业务的预定的性能为 Q个元 素中的一个, 或者该第 M+1个转发业务的预定的性能为 CQ+1 线速。
具体地, 当运营商修改了一个转发业务的描述信息时, 可以是修改该转 发业务需要查找的表, 也可以是修改该转发业务的预定的性能。 则控制器将 修改的转发业务的描述信息发送至转发设备。 例如, 运营商可修改 M个描 述信息中与第 i个转发业务对应的第 i个描述信息, 该第 i个转发业务需要 查找的表不变, 但是该第 i个转发业务的预定的性能发生变化。 或者, 运营 商可修改 M个描述信息中与第 i个转发业务对应的第 i个描述信息, 该第 i 个转发业务的预定的性能不变, 但是该第 i个转发业务需要查找的表的个数 增加或减少。 或者,运营商可修改 M个描述信息中与第 i个转发业务对应的 第 i个描述信息, 该第 i个转发业务的预定的性能和该第 i个转发业务需要 查找的表均发生变化。 本发明对此不作限定。
图 3是本发明另一个实施例的确定表的存储位置的方法的流程图。 关于 图 3对应的实施例中涉及的技术术语, 可以参考图 1对应的实施例。 参见图 3, 图 3所示的方法包括:
301 , 转发设备接收控制器发送的 Q个同时访问信息, 其中, 该 Q个同 时访问信息中的第 r个同时访问信息表示该 N个表中的每两个表是否需要被 预定的性能为 0· χ线速的同一个转发业务访问, 执行 Μ个转发业务需要查 找该 Ν个表。
302, 转发设备根据 Q个同时访问信息, 确定 Ν个表将被存储在该转发 设备的至少一个存储器中。
303, 转发设备将 Ν个表存储在该至少一个存储器中。
本发明实施例中,转发设备根据表的同时访问信息确定表将被存储在转 发设备的至少一个存储器中。 其中, 表的同时访问信息可以是控制器通过转 发业务的描述信息所确定, 并进一步将表的同时访问信息发送至转发设备 的。 因此, 上述技术方案有助于使得转发业务的实际性能尽可能达到预定的 性能。
可选地, 作为一个实施例, 301中, Q个同时访问信息可表示为 Q个 Ν Ν的矩阵。 Q个 Ν X Ν的矩阵中的每个 Ν X Ν的矩阵的元素为 1或者 0。 其中, 如果 Q个 Ν χ Ν的矩阵中的第 r个 Ν χ Ν的矩阵的第 i行第 j列的元 素为 1,则表示 N个表中的第 i个表和 N个表中的第 j个表需要同时被 M个 转发业务中预定的性能为 Cr x线速的至少一个转发业务访问。 其中, 如果 Q 个 Ν χ N的矩阵中的第 r个 Ν χ N的矩阵的第 i行第 j列的元素为 0,则表示 N个表中的第 i个表和 N个表中的第 j个表不需要同时被 M个转发业务中预 定的性能为 0· χ线速的任意一个转发业务同时访问。 其中, i和 j为正整数, 且 i和 j均小于或者等于N。 例如, Q=l, 且(^=1时, 即表示 M个转发业务的预定的性能都为线速。 此时, Q个同时访问信息可包括 1个 N x N的矩阵。 并且该 1个 Ν χ N的矩 阵的第 i行第 j列的元素表示 N个表中的第 i个表和 N个表中的第 j个表是 否需要同时被至少一个业务访问。
再例如, Q=3, 且(^=1, C2=0.5, C3=0时, 即表示 M个转发业务中的 每一个转发业务的预定的性能为线速或半速或慢速。其中, 0.5 X线速也称为 半速。 此时, Q个同时访问信息可包括 3个 Ν χ N的矩阵。 并且该 3个 Ν χ N的矩阵的第 1个 Ν χ N的矩阵的第 i行第 j列的元素表示 N个表中的第 i 个表和 N个表中的第 j个表是否需要同时被预定的性能为线速的至少一个转 发业务访问。 该 3个 N X N的矩阵的第 2个 N X N的矩阵的第 i行第 j列的 元素表示 N个表中的第 i个表和 N个表中的第 j个表是否需要同时被预定的 性能为半速的至少一个转发业务访问。 该 3个 Ν χ N的矩阵的第 3个 Ν χ Ν 的矩阵的第 i行第 j列的元素表示 N个表中的第 i个表和 N个表中的第 j个 表是否需要同时被预定的性能为慢速的至少一个转发业务访问。
应注意, 本发明实施例中, 也可用其他的形式表示 Q个同时访问信息。 例如, 可以是数组的形式, 或者也可以是位图的形式, 或者也可以是其他的 形式, 本发明对此不作限定。
本发明实施例中, 302可参见图 1中的 103, 为避免重复, 这里不再赘 述。
可选地, 作为一个实施例, 当转发设备根据 Q个同时访问信息, 确定不 能将 N个表中的第 a个表的存储在该至少一个存储器中时,可生成第一消息。 该第一消息用于通告该转发设备确定不能将 N个表中的第 a个表存储在该至 少一个存储器中。进一步地该转发设备可将该第一消息发送至控制器。其中, a为正整数, 且 a小于或者等于 N。
可理解, 若待存储的表为 N个表中的第 a个表, 当转发设备遍历该转发 设备上的所有的存储器,釆用前述的方法,均无法确定其将被存储的位置时, 可确定该转发设备确定不能将 N个表中的第 a个表的存储在该转发设备的至 少一个存储器中。
可选地, 作为另一个实施例, 转发设备可接收控制器发送的第二消息, 该第二消息用于指示该转发设备尽力存储 N个表中的第 a个表。该转发设备 可根据第二消息,工作于尽力而为模式并确定 N个表中的第 a个表将被存储 在至少一个存储器的第二存储器中。 进一步地, 转发设备生成第三消息, 该 第三消息用于通告该转发设备确定 N个表中的第 a个表将被存储在该第二存 储器中时, N个表中的第 a个表所支持的转发业务的实际性能。 随后, 转发 设备可将该第三消息发送至该控制器。
应注意, 若 N个表中的第 a个表需要被多个转发业务查找, 那么该第三 消息应包括与该多个转发业务——对应的多个实际性能。
应注意, 这里的第二存储器可以是第一存储器, 也可以是至少一个存储 器中的与第一存储器不同的另一存储器。 本发明对此不作限定。
具体地,该转发设备工作于尽力而为模式时,可以是随机确定该 N个表 中的第 a个表将被存储的位置。 也就是说, 第二存储器可以是至少一个存储 器中的任一存储器。
或者, 具体地, 该转发设备工作于尽力而为模式时, 可优先确定预定的 性能高的转发业务中的表将被存储的位置。 可以理解为, 转发设备优先保障 0·较大的转发业务的实际性能。
例如, Q=3, 且(^=1, C2=0.5, C3=0时, 即表示 M个转发业务中的每 一个转发业务的预定的性能为线速或半速或慢速。 若该转发设备确定该第 a 个表将被存储的位置为第二存储器,该第二存储器的带宽为 B'。假设将第一 N X N矩阵中的第 a行的元素与第二存储器的表存储位图中的对应元素作与 运算, 确定结果为 1的个数为 将第二 Ν χ Ν矩阵中的第 a行的元素与第 二存储器的表存储位图中的对应元素作与运算, 确定结果为 1的个数为 P2; 将第三 N X N矩阵中的第 a行的元素与第二存储器的表存储位图中的对应元 素作与运算, 确定结果为 1的个数为 P3。 其中, P2和 P3为小于 N的非 负整数。 且 maxi Pi+l) X A, (P2+l) x 0.5 x A, (P3+l) x 0 x A)〉 B,, 那么上 述第三消息可用于通告该第 a个表将被存储在该第二存储器中所能支持的转 发业务的实际性能为: 需要查找该第 a个表的预定的性能为线速的转发业务 实际能达到 1/(1+ )倍的线速, 需要查找该第 a个表的预定的性能为半速的 转发业务实际能达到 2/(1+Ρ2)倍的半速。 具体地, 转发设备工作于尽力而为 模式时,优先选择能够保障预定的性能为线速的转发业务的实际性能的存储 器进行存储。
本发明实施例通过转发业务的描述信息, 其中描述信息包括转发业务的 预定的性能, 生成执行转发业务需要查找的表的同时访问信息, 并根据表的 同时访问信息以及转发设备的存储器已经存储的表,确定执行转发业务需要 查找的表将被存储在转发设备中的存储位置。通过上述技术方案确定的表的 存储位置有助于使得转发业务的实际性能尽可能达到预定的性能。
图 4是本发明另一个实施例的确定表的存储位置的方法的流程图。 图 4 对应的实施例是图 3对应的实施例的进一步说明。 另外, 关于图 4对应的实 施例中涉及的技术术语, 具体可以参考图 1对应的实施例。 参见图 4, 图 4 所示的方法包括:
401 , 控制器生成 M个描述信息, 该 M个描述信息与 M个转发业务一 一对应, M个描述信息中的每个描述信息包括对应的转发业务的预定的性能 以及执行该对应的转发业务需要查找的表的标识, 执行 M个转发业务需要 查找 N个表, M个转发业务的预定的性能组成的集合包含 Q个元素, Q个 元素分别是第 1个元素至第 Q个元素, 该 Q个元素中的每个元素表示一个 预定的性能,其中,该 Q个元素中的第 r个元素表示预定的性能为 0· χ线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0≤Cr≤l。
402, 控制器根据 M个描述信息, 生成 Q个同时访问信息, 其中, 该 Q 个同时访问信息中的第 r个同时访问信息表示 N个表中的每两个表是否需要 被预定的性能为 0· χ线速的同一个转发业务访问。
403, 控制器将 Q个同时访问信息发送至转发设备。
本发明实施例中,控制器通过转发业务的描述信息确定转发业务需要查 找的表的同时访问信息。 进一步将表的同时访问信息发送至转发设备。 可使 得转发设备根据表的同时访问信息确定表将被存储在转发设备的至少一个 存储器中。这样确定的表将被存储在转发设备中的位置有助于使得转发业务 的实际性能尽可能达到预定的性能。
本发明实施例中, 401可参见图 2中的 201, 为避免重复, 这里不再赘 述。
可选地, 作为一个实施例, 402中, Q个同时访问信息可表示为 Q个 Ν Ν的矩阵。 Q个 Ν X Ν的矩阵中的每个 Ν X Ν的矩阵的元素为 1或者 0。 其中, 如果 Q个 Ν χ Ν的矩阵中的第 r个 N x N的矩阵的第 i行第 j列的元 素为 1,则表示 N个表中的第 i个表和 N个表中的第 j个表需要同时被 M个 转发业务中预定的性能为 0· χ线速的至少一个转发业务访问。 其中, 如果 Q 个 Ν χ Ν的矩阵中的第 r个 Ν χ Ν的矩阵的第 i行第 j列的元素为 0,则表示 N个表中的第 i个表和 N个表中的第 j个表不需要同时被 M个转发业务中预 定的性能为 Cr x线速的任意一个转发业务同时访问。 其中, i和 j为正整数, 且 i和 j均小于或者等于N。
例如, Q=l, 且(^=1时, 即表示 M个转发业务的预定的性能都为线速。 此时, Q个同时访问信息包括 1个 N X N的矩阵。 并且该 1个 N X N的矩阵 的第 i行第 j列的元素表示 N个表中的第 i个表和 N个表中的第 j个表是否 需要同时被至少一个业务访问。
再例如, Q=3, 且(^=1, C2=0.5, C3=0时, 即表示 M个转发业务中的 每一个转发业务的预定的性能为线速或半速或慢速。其中, 0.5 X线速也称为 半速。 此时, Q个同时访问信息包括 3个 N X N的矩阵。 并且该 3个 N X N 的矩阵的第 1个 Ν χ N的矩阵的第 i行第 j列的元素表示 N个表中的第 i个 表和 N个表中的第 j个表是否需要同时被预定的性能为线速的至少一个转发 业务访问。 该 3个 N X N的矩阵的第 2个 N X N的矩阵的第 i行第 j列的元 素表示 N个表中的第 i个表和 N个表中的第 j个表是否需要同时被预定的性 能为半速的至少一个转发业务访问。 该 3个 Ν χ N的矩阵的第 3个 Ν χ N的 矩阵的第 i行第 j列的元素表示 N个表中的第 i个表和 N个表中的第 j个表 是否需要同时被预定的性能为慢速的至少一个转发业务访问。
应注意, 本发明实施例中, 也可用其他的形式表示 Q个同时访问信息。 例如, 可以是数组的形式, 或者也可以是位图的形式, 或者也可以是其他的 形式, 本发明对此不作限定。
可选地, 作为一个实施例, 403中, 控制器可通过控制通道发送 Q个同 时访问信息至转发设备。或者,控制器也可通过其他的方式发送 Q个同时访 问信息至转发设备。 本发明对此不作限定。
可选地, 作为另一个实施例, 403中, 控制器可发送控制消息至转发设 备, 该控制消息包括 Q个同时访问信息。 本发明对此不作限定。
可选地, 作为一个实施例, 控制器可接收转发设备发送的第一消息, 该 第一消息用于通告该转发设备确定不能将 N个表中的第 a个表存储在该转发 设备的至少一个存储器中。 其中, a为小于或者等于 N的正整数。
可选地, 作为一个实施例, 若该控制器不允许需要查找第 a个表的转发 业务降速, 那么该控制器接收到第一消息后可不作进一步处理。
可选地, 作为另一个实施例, 若该控制器允许需要查找第 a个表的转发 业务降速, 那么该控制器可生成第二消息, 该第二消息用于指示转发设备尽 力存储该第 a个表。 进一步, 该控制器可将该第二消息发送至转发设备, 以 使得该转发设备工作于尽力而为模式并确定将被存储在转发设备的至少一 个存储器的第二存储器中。并且,该控制器可接收转发设备发送的第三消息, 该第三消息用于通告在该转发设备确定第 a个表将被存储在该第二存储器中 时, 该第 a个表所支持的转发业务的实际性能。
应注意,本发明实施例中的转发业务的描述信息可以是由运营商定义并 存储在控制器中的。 当运营商增加转发业务或者修改转发业务的描述信息 时, 该控制器会实时地将增加的转发业务或者修改的转发业务的描述信息发 送至转发设备。 进一步地, 可由转发设备根据增加的转发业务或修改的转发 业务的描述信息, 重新确定转发业务需要查找的表将被存储的位置。
具体地, 当运营商增加一个新的转发业务时, 同时运营商定义了该新的 转发业务的描述信息。 若该新的转发业务需要查找的表属于前述的 N个表, 则控制器根据该新的转发业务的描述信息, 重新确定并实时更新该新的转发 业务需要查找的表的同时访问信息。进一步将更新以后的该新的转发业务需 要查找的表的同时访问信息发送至转发设备。若该新的转发业务需要查找的 表中有前述的 N个表之外的表,此时控制器要根据该新的转发业务以及该新 的转发业务的预定的性能, 重新确定并实时更新该新的转发业务需要查找的 所有表的同时访问信息。进一步将更新以后的该新的转发业务需要查找的所 有表的同时访问信息发送至转发设备。 例如, 运营商可增加第 M+1 个转发 业务, 该第 M+1个转发业务可包含前述 N个表中的多个表, 也可包含 N个 表之外的至少一个新的表。 同时运营商可定义该第 M+1 个转发业务的预定 的性能为 Q个元素中的一个,或者该第 M+1个转发业务的预定的性能为 CQ+1 X线速。 进一步地, 控制器可根据该第 M+1个转发业务的描述信息重新确 定并更新与该第 M+1个转发业务相关的表的同时访问信息,并将与该第 M+1 个转发业务相关的表的同时访问信息发送至转发设备。
具体地, 当运营商修改一个转发业务的描述信息时, 可以是修改该转发 业务需要查找的表, 也可以是修改该转发业务的预定的性能。 则控制器根据 该修改的转发业务的描述信息重新确定并实时更新该修改的转发业务需要 查找的表的同时访问信息。并进一步将更新以后的该修改的转发业务需要查 找的表的同时访问关系发送至转发设备。 例如, 运营商可修改 M个描述信 息中与第 i个转发业务对应的第 i个描述信息, 该第 i个转发业务需要查找 的表的不变, 但是该第 i个转发业务的预定的性能发生变化。 或者, 运营商 可修改 M个描述信息中与第 i个转发业务对应的第 i个描述信息, 该第 i个 转发业务的预定的性能不变,但是该第 i个转发业务需要查找的表发生变化。 或者, 运营商可修改 M个描述信息中与第 i个转发业务对应的第 i个描述信 息, 该第 i个转发业务的预定的性能和该第 i个转发业务需要查找的表均发 生变化。 本发明对此不作限定。 进一步地, 控制器可根据该修改的第 i个描 述信息重新确定并更新与该修改的第 i个转发业务需要查找的表的同时访问 信息, 并将与该修改的第 i个转发业务需要查找的表的同时访问信息发送至 转发设备。
这样, 本发明实施例中, 控制器根据转发业务的描述信息确定转发业务 需要查找的表的同时访问信息,可实现全网控制,节省转发设备的计算消耗。 进一步由转发设备根据表的同时访问信息确定表在转发设备中的存储位置, 实现了对转发业务的可控可编程,避免由于表的存储位置不当导致的转发性 能不能满足业务要求的问题。
本发明实施例中, 运营商可根据实际应用的需要和设备的能力, 对转发 业务的性能进行合理的配置或编程并存储在控制器中, 能够使运营商用较少 的资源保证业务的性能。
图 5是本发明另一个实施例的确定表的存储位置的方法的流程图。 图 5 对应的实施例可以用于执行图 1所示的方法。 图 5对应的实施例也可以用于 执行图 2所示的方法。 图 5对应的实施例中涉及的技术术语, 可以参考图 1 对应的实施例。 具体地, 图 5所示的方法包括:
501 , 控制器 510生成 M个描述信息, 该 M个描述信息与 M个转发业 务——对应, 该 M个描述信息中的每个描述信息包括对应的转发业务的预 定的性能以及执行该对应的转发业务需要查找的表的标识, 执行 M个转发 业务需要查找 N个表, M个转发业务的预定的性能组成的集合包含 Q个元 素, 该 Q个元素分别是第 1个元素至第 Q个元素, 该 Q个元素中的每个元 素表示一个预定的性能, 其中, 该 Q个元素中的第 r个元素表示预定的性能 为 Cr x线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0≤Cr≤ l。
本发明实施例中, 501可参见图 2中的 201, 为避免重复, 这里不再赘 述。 例如, 本发明实施例以 M=38, N=16为例进行描述。 其中, 每一个转发 业务需要查找的表如图 6所示为该 M=38个转发业务需要查找的表所形成的 多分枝的有向图。 其中包含 16个表, 分别用表 1至表 16来表示。
另外,假设该 M=38个转发业务的预定的性能组成的集合包含 Q=3个元 素, 且(^=1, C2=0.5, C3=0。 其中, l x线速即为线速, 0.5 X线速也称为半 速, 0 χ线速也称为慢速。 也就是说, M=38个转发业务中的每一个转发业务 的预定的性能为线速或半速或慢速。 如图 7所示为 38个转发业务中的预定 的性能为线速的 3个转发业务。 图 8所示为 38个转发业务中的预定的性能 为半速的 2个转发业务。 相应地, 在图 6所示的 38个转发业务中, 除去图 7 所示的 3种转发业务和图 8所示的 2个转发业务, 剩余的 33个转发业务的 预定的性能均为慢速, 这里不再罗列。
应注意,本发明实施例中转发业务的描述信息可以是由运营商定义并存 储在控制器 510中的。
502, 控制器 510将 M个描述信息发送至转发设备 520。
本发明实施例中, 502可参见图 2中的 202, 为避免重复, 这里不再赘 述。
具体地, 控制器 510可通过控制通道向转发设备发送控制消息, 该控制 消息包括 M个描述信息。
503, 转发设备 520接收控制器 510发送的发送的 M个描述信息, 该 M 个描述信息与 M个转发业务——对应, 该 M个描述信息中的每个描述信息 包括对应的转发业务的预定的性能以及执行该对应的转发业务需要查找的 表的标识, 执行 M个转发业务需要查找 N个表, M个转发业务的预定的性 能组成的集合包含 Q个元素,该 Q个元素分别是第 1个元素至第 Q个元素, 该 Q个元素中的每个元素表示一个预定的性能, 其中, 该 Q个元素中的第 r 个元素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0≤Cr≤l。
本发明实施例中, 503可参见图 1中的 101, 为避免重复, 这里不再赘 述。
504, 转发设备 520根据 M个描述信息, 生成 Q个同时访问信息, Q个 同时访问信息中的第 r个同时访问信息表示 N个表中的每两个表是否需要被 预定的性能为 0· χ线速的同一个转发业务访问。 本发明实施例中, 504可参见图 1中的 102, 为避免重复, 这里不再赘 述。
例如, 对于图 6所示的转发业务, 可根据图 7中的预定的性能为线速的 3个转发业务、 图 8中的预定的性能为半速的 2个转发业务、 以及预定的性 能为慢速的 33个转发业务, 生成 Q个同时访问信息。 且 Q个同时访问信息 包括 3个 16 X 16的矩阵。
其中, 第 1个 16 X 16的矩阵用于表示 16个表的线速同时访问信息, 如 图 9所示, 其中第 1个 16 X 16的矩阵的第 i行第 j列的元素表示 16个表中 的第 i个表和第 j个表是否需要同时被图 7所示的预定的性能为线速的一个 转发业务同时访问。
例如, 图 9所示的矩阵中的第 4行表示表 4与其他表的线速同时访问信 息。 其中第 4行第 5列为 1, 表示表 4和表 5需要被预定的性能为线速的同 一个转发业务访问, 如图 7中所示的第一个转发业务。 其中第 4行第 8列为 0, 表示表 4和表 8不需要被预定的性能为线速的任意一个转发业务同时访 问, 具体体现在: 图 7所示的任一个转发业务中均不同时包含表 4和表 8。
其中, 第 2个 16 X 16的矩阵用于表示 16个表的半速同时访问信息, 如 图 10所示,其中第 2个 16 X 16的矩阵的第 i行第 j列的元素表示 16个表中 的第 i个表和第 j个表是否需要同时被图 8所示的预定的性能为半速的一个 转发业务同时访问。
例如, 图 10所示的矩阵中的第 4行表示表 4与其他表的半速同时访问 信息。 其中第 4行第 5列为 1, 表示表 4和表 5需要被预定的性能为半速的 同一个转发业务访问, 如图 8中所示的第一个转发业务。 其中第 4行第 8列 为 0, 表示表 4和表 8不需要被预定的性能为半速的任意一个转发业务同时 访问,具体体现在: 图 8所示的任一个转发业务中均不同时包含表 4和表 8。
其中, 第 3个 16 X 16的矩阵用于表示 16个表的慢速同时访问信息, 其 中第 3个 16 X 16的矩阵的第 i行第 j列的元素表示 16个表中的第 i个表和 第 j个表是否需要同时被预定的性能为慢速的一个转发业务同时访问。 这里 不再罗列慢速同时访问信息的矩阵形式。
505, 转发设备 520根据 Q个同时访问信息, 确定 N个表将被存储在该 转发设备 520的至少一个存储器中。
本发明实施例中, 505可参见图 1中的 103, 为避免重复, 这里不再赘 述。
具体地,转发设备 520确定 N个表中的每个表将被存储在转发设备的至 少一个存储器中。
可选地, 假设转发设备 520的至少一个存储器包括第一存储器。 其中, 确定 N个表中的第 m个表将被存储在至少一个存储器的第一存储器中, 具 储器中, 并表示为 l x N的矩阵, 也可称为第一存储器的第一表存储位图。 如果该 l x N的矩阵的第 i列元素为 1则表示该第一存储器已经存储了 N个 表中的第 i个表,如果该 1 X N的矩阵的第 i列元素为 0则表示该转发设备的 第一存储器没有存储 N个表中的第 i个表。
对于图 6所示的转发业务, 如图 11所示为该转发设备的第一存储器已 经存储的表的信息, 表示为 1 X 16的矩阵。 其中, 该 1 X 16的矩阵的第 1列 和第 5列为 1, 表示该第一存储器中已经存储有表 1和表 5。
例如, 假设当前待存储的表为表 4。 即在确定表 4的存储位置时, 将图 9中的第 4行与图 11中的 1 X 16的矩阵对应元素作与运算,结果为 1的个数 是?=2个。 将图 10的第 4行与图 11中的 1 X 16的矩阵对应作与运算, 结 果为 1的个数是 P2=2个。 由于 C3=0, 这里不再确定与预定的性能为慢速对 应的 P3的值。 H没预定的性能为线速的转发业务所占用的带宽为 A=1/4B, 其中 B为第一存储器能够提供的最大带宽。 由于 maxi Pi+ l ) X A, (P2+l ) x 0.5 χ A)=1/2B, 满足 maxi P^ x A, (P2+ l) x 0.5 x A , (P3+ l) 0 x A) < B, 那么该表 4可存储在该第一存储器上。 即确定了表 4将被存储的存储位置为 该第一存储器。 进一步地, 转发设备 520将该表 4存储在该第一存储器中并 将第一存储器的表已经存储的表的信息中的第 4列更新为 1。 即, 该第一存 储器的第一表存储位图更新为如图 12所示的第一存储器的第二表存储位图。
之后, 转发设备 520可在图 12所示的第二表存储位图的基础上, 确定 表 4之外的其他的表的存储位置。具体的确定的方法与确定表 4的存储位置 的方法类似, 为避免重复, 这里不再赘述。
应注意, 当转发设备 520在尝试了至少一个存储器中的所有的存储器之 后,仍然无法确定第 a个表将被存储的位置时,转发设备 520生成第一消息, 并将该第一消息发送至控制器 510。其中,该第一消息用于通告转发设备 520 确定不能将第 a个表存储在至少一个存储器中。 其中, a为小于或者等于 N 的自然数。
可选地, 作为一个实施例, 若控制器 510不允许与第 a个表相关的转发 业务降速, 那么控制器 510接收到第一消息后不作进一步处理。
可选地, 作为另一个实施例, 若控制器 510允许与该第 a个表相关的转 发业务降速,控制器 510可生成第二消息,该第二消息用于指示转发设备 520 尽力存储该第 a个表。 进一步, 控制器 510可将该第二消息发送至转发设备 520, 以使得转发设备 520工作于尽力而为模式并确定该第 a个表将被存储 在至少一个存储器的第二存储器中。 并且, 控制器 510可接收转发设备 520 发送的第三消息, 该第三消息用于通告在转发设备 520确定第 a个表将被存 储在第二存储器中时, 该第 a个表所支持的转发业务的实际性能。
506, 该转发设备 520将 N个表存储在该转发设备 520的至少一个存储 器中。
本发明实施例通过转发业务的描述信息,其中描述信息包括转发业务的 预定的性能, 生成执行转发业务需要查找的表的同时访问信息, 并根据表的 同时访问信息,确定执行转发业务需要查找的表将被存储在转发设备中的至 少一个存储器中。通过上述技术方案确定的表将被存储在转发设备中的位置 有助于使得转发业务的实际性能尽可能达到预定的性能。
图 13是本发明另一个实施例的确定表的存储位置的方法的流程图。 图 13对应的实施例可以用于执行图 3所示的方法。图 5对应的实施例也可以用 于执行图 4所示的方法。 图 13对应的实施例中涉及的技术术语, 可以参考 图 1对应的实施例。 参见图 13, 图 13所示的方法包括:
1301 ,控制器 510生成 M个描述信息, 该 M个描述信息与 M个转发业 务——对应, M个描述信息中的每个描述信息包括对应的转发业务的预定的 性能以及执行该对应的转发业务需要查找的表的标识, 执行 M个转发业务 需要查找 N个表, M个转发业务的预定的性能组成的集合包含 Q个元素, Q个元素分别是第 1个元素至第 Q个元素, 该 Q个元素中的每个元素表示 一个预定的性能, 其中, 该 Q个元素中的第 r个元素表示预定的性能为 0· X线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0≤Cr≤ l。
本发明实施例中, 1301可参见图 2中的 201, 或者图 4中的 401, 或者 图 5中的 501, 为避免重复, 这里不再赘述。
1302, 控制器 510才艮据 M个描述信息, 生成 Q个同时访问信息, 其中, 该 Q个同时访问信息中的第 r个同时访问信息表示 N个表中的每两个表是否 需要被预定的性能为 0· χ线速的同一个转发业务访问。
本发明实施例中, 1302可参见图 4中的 402, 为避免重复, 这里不再赘 述。
1303, 控制器 510将 Q个同时访问信息发送至转发设备 520。
本发明实施例中, 1303可参见图 4中的 403, 为避免重复, 这里不再赘 述。
1304, 转发设备 520接收控制器 510发送的 Q个同时访问信息, 其中, 该 Q个同时访问信息中的第 r个同时访问信息表示该 N个表中的每两个表是 否需要被预定的性能为 0· χ线速的同一个转发业务访问, 执行 Μ个转发业 务需要查找该 Ν个表。
本发明实施例中, 步骤 1304可参见图 3中的步骤 301, 为避免重复, 这 里不再赘述。
1305, 转发设备 520根据 Q个同时访问信息, 确定 Ν个表将被存储在 该转发设备 520的至少一个存储器中。
本发明实施例中, 1305可参见图 1中的 103, 或者图 3中的 302, 或者 图 5中的 505, 为避免重复, 这里不再赘述。
1306, 转发设备 520将 Ν个表存储在该至少一个存储器中。
这样, 本发明实施例中, 控制器可以通过转发业务的描述信息确定转发 业务需要查找的表的同时访问信息。进一步控制器可以将表的同时访问信息 发送至转发设备。转发设备根据表的同时访问信息确定表将被存储在转发设 备的至少一个存储器中。这样确定的表将被存储在转发设备中的位置有助于 使得转发业务的实际性能尽可能达到预定的性能。
图 14是本发明一个实施例的转发设备的框图。 所述转发设备可以用于 执行图 1所示的方法。 图 14所示的转发设备 1400包括接收单元 1401、生成 单元 1402、 确定单元 1403和存储单元 1404。
接收单元 1401, 用于接收控制器发送的 Μ个描述信息, 所述 Μ个描述 信息与所述 Μ个转发业务——对应, 所述 Μ个描述信息中的每个描述信息 包括对应的转发业务的预定的性能以及执行所述对应的转发业务需要查找 的表的标识, 执行所述 Μ个转发业务需要查找 Ν个表, 所述 Μ个转发业务 的预定的性能组成的集合包含 Q个元素, 所述 Q个元素分别是第 1个元素 至第 Q个元素, 所述 Q个元素中的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的第 r个元素表示预定的性能为 Cr x线速, M、 N、 Q和 r 为正整数, 2 < N, Q < M, r < Q, 0≤Cr≤ l。
生成单元 1402, 用于根据接收单元 1401接收到的所述 M个描述信息, 生成 Q个同时访问信息,所述 Q个同时访问信息中的第 r个同时访问信息表 示所述 N个表中的每两个表是否需要被预定的性能为 0· χ线速的同一个转 发业务访问。 确定所述 Ν个表将被存储在所述转发设备的至少一个存储器中。
存储单元 1404, 用于将所述 Ν个表存储在确定单元 1403确定的所述至 少一个存储器中。
本发明实施例通过转发业务的描述信息,其中描述信息包括转发业务的 预定的性能, 生成执行转发业务需要查找的表的同时访问信息, 并根据表的 同时访问信息,确定执行转发业务需要查找的表将被存储在转发设备中的至 少一个存储器中。通过上述技术方案确定的表将被存储在转发设备中的位置 有助于使得转发业务的实际性能尽可能达到预定的性能。
可选地, 作为一个实施例, 所述 Q个同时访问信息为 Q个 Ν χ Ν的矩 阵, 该 Q个 Ν X Ν的矩阵中的每个 Ν X Ν的矩阵的元素为 1或者 0。 如果所 述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的元素为 1,则 表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要同时被所述 M 个转发业务中预定的性能为 0· χ线速的至少一个转发业务访问,如果所述 Q 个 Ν χ Ν的矩阵中的第 r个 Ν χ Ν的矩阵的第 i行第 j列的元素为 0,则表示 所述 N个表中的第 i个表和所述 N个表中的第 j个表不需要同时被所述 M 个转发业务中预定的性能为 Cr x线速的任意一个转发业务访问, 其中, i和 j为正整数, 且 i和 j均小于或者等于N。
可选地, 作为一个实施例, 确定单元 1403, 具体用于确定所述 N个表 中的每个表将被存储在所述转发设备的至少一个存储器中。 其中, 确定单元
1403具体包括用于确定所述 N个表中的第 m个表将被存储在所述转发设备 的至少一个存储器中的确定子单元, 所述确定子单元具体包括第一确定子单 元、 第二确定子单元和第三确定子单元。
第一确定子单元,用于确定所述 N个表中的每个表是否已经存储在所述 至少一个存储器的第一存储器中, 1 X N的矩阵用于表示所述 N个表中的每 个表是否已经存储在所述转发设备的第一存储器中, 具体地, 所述 1 X N的 矩阵的第 1列元素至第 N列元素分别用于表示所述 N个表中的第 1个表至 所述 N个表中的第 N个表是否已经存储在所述第一存储器中,其中, 所述 1 χ Ν的矩阵的第 i列元素用于表示所述 N个表中的第 i个表是否已经存储在 所述第一存储器中, 如果所述 1 χ Ν的矩阵的第 i列元素为 1则表示所述第 一存储器已经存储所述 N个表中的第 i个表, 如果所述 1 X N的矩阵的第 i 列元素为 0则表示所述第一存储器没有存储所述 N个表中的第 i个表。
第二确定子单元, 用于将生成单元 1402生成的所述 Q个 Ν χ N的矩阵 中每个 N x N的矩阵的第 m行的元素与所述第一确定子单元确定的所述 1 X N的矩阵的对应元素作与运算, 确定结果为 1的个数, 其中, 所述 Q个 N χ Ν的矩阵中的第 r个 Ν χ N的矩阵的第 i行的元素与所述第一确定子单元 确定的所述 1 X N的矩阵的对应元素作与运算的结果中 1的个数为
第三确定子单元, 用于基于 maxdPi+l) X d X A, ... ..., (PQ+l) x CQ x A)≤B, 确定所述 N个表中的第 m个表将被存储在所述第一存储器中。
其中, m为小于或者等于 N的正整数, &为非负整数, & < N, A和 B 为正数, A表示实际性能为线速的转发业务需要占用的带宽, B表示所述第 一存储器能够提供的最大带宽。
可选地, 作为另一个实施例, 还包括发送单元 1405。 生成单元 1402, 还用于当确定单元 1403确定不能将所述 N个表中的第 a个表存储在所述至 少一个存储器中时, 生成第一消息, 所述第一消息用于通告确定单元 1403 确定不能讲所述 N个表中的第 a个表存储在所述至少一个存储器中。发送单 元 1405, 用于将生成单元 1402生成的所述第一消息发送至所述控制器, 其 中, a为正整数, 且 a小于或者等于 N。
可选地, 作为另一个实施例, 接收单元 1401, 还用于接收所述控制器发 送的第二消息,所述第二消息用于指示所述转发设备尽力存储所述 N个表中 的第 a个表。确定单元 1403, 用于根据接收单元 1401接收的所述第二消息, 工作于尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述至少一 个存储器的第二存储器中。 生成单元 1402, 还用于生成第三消息, 所述第三 消息用于通告确定单元 1403确定所述 N个表中的第 a个表将被存储在所述 第二存储器中时, 所述 N个表中的第 a个表所支持的转发业务的实际性能。 发送单元 1405, 还用于将生成单元 1402生成的所述第三消息发送至所述控 制器。
转发设备 1400能够实现图 1和图 5的实施例中由转发设备实现的各个 过程, 为避免重复, 这里不再赘述。
图 15是本发明一个实施例的控制器的框图。 所述控制器可以用于执行 图 2所示的方法。 图 15所示的控制器 1500包括生成单元 1501和发送单元 1502。
生成单元 1501, 用于生成 M个描述信息, 所述 M个描述信息与 M个 转发业务——对应, 所述 M个描述信息中的每个描述信息包括对应的转发 业务的预定的性能以及执行所述对应的转发业务需要查找的表的标识,执行 所述 M个转发业务需要查找 N个表, 所述 M个转发业务的预定的性能组成 的集合包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所 述 Q个元素中的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的 第 r个元素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2≤ N, Q < M, r < Q, 0≤Cr≤l。
发送单元 1502,用于将生成单元 1501生成的所述 M个描述信息发送至 转发设备。
本发明实施例通过转发业务的描述信息,其中描述信息包括转发业务的 预定的性能, 生成执行转发业务需要查找的表的同时访问信息, 并根据表的 同时访问信息,确定执行转发业务需要查找的表将被存储在转发设备中的至 少一个存储器中。通过上述技术方案确定的表将被存储在转发设备中的位置 有助于使得转发业务的实际性能尽可能达到预定的性能。
可选地, 作为一个实施例, 所述 M个描述信息用于使得所述转发设备 确定所述 N个表将被存储在所述转发设备中的至少一个存储器中,所述控制 器 1500还包括接收单元 1503。 接收单元 1503, 用于接收所述转发设备发送 的第一消息,所述第一消息用于通告所述转发设备确定不能将所述 N个表中 的第 j个表存储在所述转发设备的至少一个存储器中, 其中, j 为正整数, 且 j小于或者等于 N。
可选地, 作为另一个实施例, 生成单元 1501, 还用于生成第二消息, 所 述第二消息用于指示所述转发设备尽力存储所述 N个表中的第 j个表。发送 单元 1502, 还用于将生成单元 1501生成的所述第二消息发送至所述转发设 备, 以使所述转发设备工作于尽力而为模式并确定所述 N个表中的第 j个表 将被存储在所述至少一个存储器的第二存储器中。接收单元 1503,还用于接 收所述转发设备发送的第三消息, 所述第三消息用于通告所述转发设备确定 所述 N个表中的第 j个表将被存储在所述第二存储器中时,所述 N个表中的 第 j个表所支持的转发业务的实际性能。
控制器 1500能够实现图 2和图 5的实施例中由控制器实现的各个过程, 为避免重复, 这里不再赘述。
图 16是本发明另一个实施例的转发设备的框图。 所述转发设备可以用 于执行图 3所示的方法。 图 16所示的转发设备 1600包括接收单元 1601、确 定单元 1602和存储单元 1603。
接收单元 1601, 用于接收控制器发送的 Q个同时访问信息, 其中, 所 述 Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每两个表 是否需要被预定的性能为 0· χ线速的同一个转发业务访问, 执行 Μ个转发 业务需要查找所述 Ν个表。
确定单元 1602,用于根据接收单元 1601接收的所述 Q个同时访问信息, 确定所述 Ν个表将被存储在所述转发设备的至少一个存储器中。 少一个存储器中。
本发明实施例中,转发设备根据表的同时访问信息确定表将被存储在转 发设备的至少一个存储器中。 其中, 表的同时访问信息是控制器通过转发业 务的描述信息所确定, 并进一步将表的同时访问信息发送至转发设备的。 这 样确定的表将被存储在转发设备中的位置有助于使得转发业务的实际性能 尽可能达到预定的性能。
可选地, 作为一个实施例, 所述 Q个同时访问信息为 Q个 Ν χ Ν的矩 阵, 所述 Q个 Ν χ Ν的矩阵中的每个 Ν χ Ν的矩阵的元素为 1或者 0, 如果 所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访问,如果所述 Q个 Ν χ Ν的矩阵中的第 r个 Ν χ Ν的矩阵的第 i行第 j列的元素为 0, 则表 示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需要同时被所述 M 个转发业务中预定的性能为 Cr x线速的任意一个转发业务访问, 其中, i和 j为正整数, 且 i和 j均小于或者等于N。
可选地, 作为一个实施例, 确定单元 1602具体用于确定所述 N个表中 的每个表将被存储在所述转发设备的至少一个存储器中。 其中, 确定单元 1602包括用于确定所述 N个表中的第 m个表将被存储在所述转发设备的至 少一个存储器中的确定子单元, 所述确定子单元具体包括第一确定子单元、 第二确定子单元和第三确定子单元。
第一确定子单元,用于确定所述 N个表中的每个表是否已经存储在所述 至少一个存储器的第一存储器中, 1 X N的矩阵用于表示所述 N个表中的每 个表是否已经存储在所述转发设备的第一存储器中, 具体地, 所述 1 X N的 矩阵中的第 1列元素至第 N列元素分别用于表示所述 N个表中的第 1个表 至所述 N个表中的第 N个表是否已经存储在所述第一存储器中, 其中, 所 述 1 X N的矩阵的第 i列元素用于表示所述 N个表中的第 i个表是否已经存 储在所述第一存储器中, 如果所述 l x N的矩阵的第 i列元素为 1则表示所 述第一存储器已经存储所述 N个表中的第 i个表, 如果所述 l x N的矩阵的 第 i列元素为 0则表示所述第一存储器没有存储所述 N个表中的第 i个表。
第二确定子单元,用于将所述 Q个 N X N的矩阵中的每个 N X N的矩阵 的第 m行的元素与所述第一确定子单元确定的所述 1 χ Ν的矩阵的对应元素 作与运算, 确定结果为 1的个数, 其中, 所述 Q个 Ν χ N的矩阵中的第 r个 N x N的矩阵的第 i行的元素与第一确定子单元确定的所述 1 χ Ν的矩阵的对 应元素作与运算的结果中 1的个数为 &。
第三确定子单元, 用于基于 maxdPi+l) X d X A, ... ..., (PQ+l) x CQ x
A)≤B, 确定所述 N个表中的第 m个表将被存储在所述第一存储器中。
其中, m为小于或者等于 N的正整数, &为非负整数, & < N, A和 B 为正数, A表示实际性能为线速的转发业务需要占用的带宽, B表示所述第 一存储器能够提供的最大带宽。
可选地, 作为另一个实施例, 还包括生成单元 1604和发送单元 1605。 生成单元 1604,还用于当确定单元 1602确定不能将所述 N个表中的第 a个表存储在所述至少一个存储器中时, 生成第一消息, 所述第一消息用于 通告所述转发设备确定不能将所述 N个表中的第 a个表存储在所述至少一个 存储器中。
发送单元 1605, 用于将生成单元 1604生成的所述第一消息发送至所述 控制器, 其中, a为正整数, 且 a小于或者等于 N。
可选地, 作为另一个实施例, 接收单元 1601, 还用于接收所述控制器发 送的第二消息,所述第二消息用于指示所述转发设备尽力存储所述 N个表中 的第 a个表。 确定单元 1602, 还用于根据接收单元 1601接收的所述第二消 息,工作于尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述至 少一个存储器的第二存储器中。 生成单元 1604, 还用于生成第三消息, 所述 第三消息用于通告所述转发设备确定所述 N个表中的第 a个表将被存储在所 述第二存储器中时,所述 N个表中的第 a个表所支持的转发业务的实际性能。 发送单元 1605, 还用于将所述生成单元 1604生成的所述第三消息发送至所 述控制器。
转发设备 1600能够实现图 3和图 13的实施例中由转发设备实现的各个 过程, 为避免重复, 这里不再赘述。
图 17是本发明另一个实施例的控制器的框图。 所述控制器可以用于执 行图 4所示的方法。 图 17所示的控制器 1700包括生成单元 1701和发送单 元 1702。
生成单元 1701, 用于生成 M个描述信息, 所述 M个描述信息与 M个 转发业务——对应, 所述 M个描述信息中的每个描述信息包括对应的转发 业务的预定的性能以及执行所述对应的转发业务需要查找的表的标识,执行 所述 M个转发业务需要查找 N个表, 所述 M个转发业务的预定的性能组成 的集合包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所 述 Q个元素中的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的 第 r个元素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2≤ N, Q < M, r < Q, 0≤Cr≤l。
生成单元 1701, 还用于根据所述 M个描述信息, 生成 Q个同时访问信 息,所述 Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每 两个表是否需要被预定的性能为 Cr x线速的同一个转发业务访问。
发送单元 1702, 用于将所述生成单元生成的所述 Q个同时访问信息发 送至转发设备。
本发明实施例中,控制器通过转发业务的描述信息确定转发业务需要查 找的表的同时访问信息。 进一步将表的同时访问信息发送至转发设备。 可使 得转发设备根据表的同时访问信息确定表将被存储在转发设备的至少一个 存储器中。这样确定的表将被存储在转发设备中的位置有助于使得转发业务 的实际性能尽可能达到预定的性能。
可选地, 作为一个实施例, 所述 Q个同时访问信息为 Q个 Ν χ Ν的矩 阵, 所述 Q个 Ν χ N的矩阵中的每个 Ν χ N的矩阵的元素为 1或者 0, 如果 所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访问,如果所述 Q个 Ν χ N的矩阵中的第 r个 Ν χ N的矩阵的第 i行第 j列的元素为 0, 则表 示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需要同时被所述 M 个转发业务中预定的性能为 0· χ线速的任意一个转发业务访问, 其中, i和 j为正整数, 且 i和 j均小于或者等于N。
可选地, 作为一个实施例, 所述 M个描述信息用于使得所述转发设备 确定所述 N个表将被存储在所述转发设备中的至少一个存储器中,所述控制 器 1700还包括接收单元 1703, 用于接收所述转发设备发送的第一消息, 所 述第一消息用于通告所述转发设备确定不能将所述 N个表中的第 a个表存储 在所述转发设备的至少一个存储器中, 其中, a为正整数, 且 a小于或者等 于 N。
可选地, 作为另一个实施例, 生成单元 1701, 还用于生成第二消息, 所 述第二消息用于指示所述转发设备尽力存储所述 N个表中的第 a个表。
发送单元 1702, 还用于将生成单元 1701生成的所述第二消息发送至所 述转发设备,以使所述转发设备工作于尽力而为模式并确定所述 N个表中的 第 a个表将被存储在所述至少一个存储器的第二存储器中。
接收单元 1703,还用于接收所述转发设备发送的第三消息, 所述第三消 息用于通告所述转发设备确定所述 N个表中的第 a个表将被存储在所述第二 存储器中时, 所述 N个表中的第 a个表所支持的转发业务的实际性能。
控制器 1700能够实现图 4和图 13的实施例中由控制器实现的各个过程, 为避免重复, 这里不再赘述。
图 18是本发明另一个实施例的转发设备的框图。 所述转发设备可以用 于执行图 1所示的方法。 另外, 图 18所示的转发设备可以用于实现图 14所 示的转发设备。图 18所示的转发设备 1800包括处理器 1801、接收电路 1802、 发送电路 1803和至少一个存储器 1804。 接收电路 1802, 用于接收控制器发送的 M个描述信息, 所述 M个描述 信息与 M个转发业务——对应, 所述 M个描述信息中的每个描述信息包括 对应的转发业务的预定的性能以及执行所述对应的转发业务需要查找的表 的标识, 执行所述 M个转发业务需要查找 N个表, 所述 M个转发业务的预 定的性能组成的集合包含 Q个元素,所述 Q个元素分别是第 1个元素至第 Q 个元素, 所述 Q个元素中的每个元素表示一个预定的性能, 其中, 所述 Q 个元素中的第 r个元素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整 数, 2 < N, Q < M, r < Q, 0≤Cr≤ l。
处理器 1801, 用于根据接收电路 1802接收到的所述 M个描述信息, 生 成 Q个同时访问信息,所述 Q个同时访问信息中的第 r个同时访问信息表示 所述 N个表中的每两个表是否需要被预定的性能为 0· χ线速的同一个转发 业务访问。 处理器 1801, 还用于根据所述 Q个同时访问信息, 确定所述 Ν 个表将被存储在所述转发设备 1800的至少一个存储器 1804中。 并进一步将 所述 Ν个表存储在所述至少一个存储器 1804中。
本发明实施例通过转发业务的描述信息,其中描述信息包括转发业务的 预定的性能, 生成执行转发业务需要查找的表的同时访问信息, 并根据表的 同时访问信息,确定执行转发业务需要查找的表将被存储在转发设备中的至 少一个存储器中。通过上述技术方案确定的表将被存储在转发设备中的位置 有助于使得转发业务的实际性能尽可能达到预定的性能。
转发设备 1800中的各个组件通过总线系统 1805耦合在一起, 其中总线 系统 1805除包括数据总线之外, 还包括电源总线、 控制总线和状态信号总 线。 但是为了清楚说明起见, 在图 18中将各种总线都标为总线系统 1805。
可选地, 作为一个实施例, 所述 Q个同时访问信息为 Q个 Ν χ Ν的矩 阵, 该 Q个 Ν X Ν的矩阵中的每个 Ν X Ν的矩阵的元素为 1或者 0。 如果所 述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的元素为 1,则 表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要同时被所述 M 个转发业务中预定的性能为 Cr x线速的至少一个转发业务访问,如果所述 Q 个 Ν χ N的矩阵中的第 r个 Ν χ N的矩阵的第 i行第 j列的元素为 0,则表示 所述 N个表中的第 i个表和所述 N个表中的第 j个表不需要同时被所述 M 个转发业务中预定的性能为 0· χ线速的任意一个转发业务访问, 其中, i和 j为正整数, 且 i和 j均小于或者等于N。 可选地, 作为一个实施例, 处理器 1801具体用于确定所述 N个表中的 每个表将被存储在所述转发设备的至少一个存储器 1804中。 其中, 确定所 述 N个表中的第 m个表将被存储在所述转发设备的至少一个存储器 1804中, 具体用于确定所述 N个表中的每个表是否已经存储在所述至少一个存储器 1804的第一存储器中, l x N的矩阵用于表示所述 N个表中的每个表是否已 经存储在所述转发设备的第一存储器中, 具体地, 所述 l x N的矩阵中的第 1列元素至第 N列元素分别用于表示所述 N个表中的第 1个表至所述 N个 表中的第 N个表是否已经存储在所述第一存储器中, 其中, 所述 l x N的矩 阵的第 i列元素用于表示所述 N个表中的第 i个表是否已经存储在所述第一 存储器中, 如果所述 1 χ Ν的矩阵的第 i列元素为 1则表示所述第一存储器 已经存储所述 N个表中的第 i个表,如果所述 1 X N的矩阵的第 i列元素为 0 则表示所述第一存储器没有存储所述 N个表中的第 i个表。将所生成的所述 Q个 Ν χ N的矩阵中每个 Ν χ N的矩阵的第 m行的元素与所确定的所述 1 Ν的矩阵的对应元素作与运算, 确定结果为 1的个数, 其中, 所述 Q个 Ν X Ν的矩阵中的第 r个 Ν χ Ν的矩阵的第 i行的元素与所确定的所述 1 χ N的 矩阵的对应元素作与运算的结果中 1 的个数为 Pr。 基于 maxi Pi+l) X d X A, ... ..., (PQ+1) CQ X A) < B, 确定所述 N个表中的第 m个表将被存储在 所述第一存储器中。 其中, m为小于或者等于 N的正整数, &为非负整数, Pr < N, A和 B为正数, A表示实际性能为线速的转发业务需要占用的带宽, B表示所述第一存储器能够提供的最大带宽。
可选地, 作为另一个实施例, 处理器 1801还用于当根据所述 Q个同时 访问信息,确定不能将所述 N个表中的第 a个表存储在所述至少一个存储器 1804中时, 生成第一消息, 所述第一消息用于通告确定不能将所述 N个表 中的第 a个表存储在所述至少一个存储器 1804中。 发送电路 1803, 用于将 所述生成的所述第一消息发送至所述控制器, 其中, a为正整数, 且 a小于 或者等于N。
可选地, 作为另一个实施例, 接收电路 1802, 还用于接收所述控制器发 送的第二消息, 所述第二消息用于指示所述转发设备 1800尽力存储所述 N 个表中的第 a个表。 处理器 1801还用于根据所述接收电路 1802接收的所述 第二消息,工作于尽力而为模式并确定所述 N个表中的第 a个表将被存储在 所述至少一个存储器 1804的第二存储器中。 并生成第三消息, 所述第三消 息通告指示所述转发设备 1800确定所述 N个表中的第 a个表将被存储在所 述第二存储器中时,所述 N个表中的第 a个表所支持的转发业务的实际性能。 发送电路 1803, 还用于将所生成的所述第三消息发送至所述控制器。
上述本发明实施例揭示的方法可以应用于处理器 1801 中, 或者由处理 器 1801实现。处理器 1801可能是一种集成电路芯片,具有信号的处理能力。 在实现过程中, 上述方法的各步骤可以通过处理器 1801 中的硬件的集成逻 辑电路或者软件形式的指令完成。 上述的处理器 1801可以是通用处理器、 数字信号处理器( Digital Signal Processor, DSP ),专用集成电路( Application Specific Integrated Circuit, ASIC )、 现成可编程门阵列 ( Field Programmable Gate Array, FPGA )或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、 逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处 理器等。 结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处 理器执行完成, 或者用译码处理器中的硬件及软件模块组合执行完成。 软件 模块可以位于随机存储器(Random Access Memory, RAM ), 闪存、 只读存 储器(Read-Only Memory, ROM ), 可编程只读存储器或者电可擦写可编程 存储器、 寄存器等本领域成熟的存储介质中。 该存储介质位于至少一个存储 器 1804,处理器 1801读取至少一个存储器 1804中的信息,结合其硬件完成 上述方法的步骤。
转发设备 1800能够实现图 1和图 5的实施例中由转发设备实现的各个 过程, 为避免重复, 这里不再赘述。
图 19是本发明另一个实施例的控制器的框图。 所述控制器可以用于执 行图 2所示的方法。 另外, 图 19所示的控制器可以用于实现图 15所示的控 制器。 图 19所示的控制器 1900包括处理器 1901、 接收电路 1902、 发送电 路 1903和存储器 1904。
处理器 1901用于生成 M个描述信息, 所述 M个描述信息与 M个转发 业务——对应, 所述 M个描述信息中的每个描述信息包括对应的转发业务 的预定的性能以及执行所述对应的转发业务需要查找的表的标识,执行所述 M个转发业务需要查找 N个表, 所述 M个转发业务的预定的性能组成的集 合包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所述 Q 个元素中的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的第 r个 元素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2≤N, Q < M, r < Q, 0≤Cr≤ l。
发送电路 1903用于将处理器 1901生成的所述 M个描述信息发送至转 发设备。
本发明实施例通过转发业务的描述信息,其中描述信息包括转发业务的 预定的性能, 生成执行转发业务需要查找的表的同时访问信息, 并根据表的 同时访问信息,确定执行转发业务需要查找的表将被存储在转发设备中的至 少一个存储器中。通过上述技术方案确定的表将被存储在转发设备中的位置 有助于使得转发业务的实际性能尽可能达到预定的性能。
控制器 1900中的各个组件通过总线系统 1905耦合在一起, 其中总线系 统 1905除包括数据总线之外, 还包括电源总线、 控制总线和状态信号总线。 但是为了清楚说明起见, 在图 19中将各种总线都标为总线系统 1905。
可选地, 作为一个实施例, 所述 M个描述信息用于使得所述转发设备 确定所述 N个表将被存储在所述转发设备中的至少一个存储器中,接收电路 1902用于接收所述转发设备发送的第一消息,所述第一消息用于通告所述转 发设备确定不能将所述 N个表中的第 j个表存储在所述转发设备的至少一个 存储器中, 其中, j为正整数, 且 j小于或者等于 N。
可选地, 作为另一个实施例, 处理器 1901还用于生成第二消息, 所述 第二消息用于指示所述转发设备尽力存储所述 N个表中的第 j个表。发送电 路 1903还用于将所述第二消息发送至所述转发设备, 以使所述转发设备工 作于尽力而为模式并确定所述 N个表中的第 j个表将被存储在所述至少一个 存储器的第二存储器中。 接收电路 1902还用于接收所述转发设备发送的第 三消息, 所述第三消息用于通告所述转发设备确定所述 N个表中的第 j个表 将被存储在所述第二存储器中时, 所述 N个表中的第 j个表所支持的转发业 务的实际性能。
上述本发明实施例揭示的方法可以应用于处理器 1901 中, 或者由处理 器 1901实现。处理器 1901可能是一种集成电路芯片,具有信号的处理能力。 在实现过程中, 上述方法的各步骤可以通过处理器 1901 中的硬件的集成逻 辑电路或者软件形式的指令完成。 上述的处理器 1901可以是通用处理器、 DSP、 ASIC, FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、 逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处 理器等。 结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处 理器执行完成, 或者用译码处理器中的硬件及软件模块组合执行完成。 软件 模块可以位于 RAM、 闪存、 ROM、 可编程只读存储器或者电可擦写可编程 存储器、 寄存器等本领域成熟的存储介质中。 该存储介质位于存储器 1904, 处理器 1901读取存储器 1904中的信息, 结合其硬件完成上述方法的步骤。
控制器 1900能够实现图 2和图 5的实施例中由控制器实现的各个过程, 为避免重复, 这里不再赘述。
图 20是本发明另一个实施例的转发设备的框图。 所述转发设备可以用 于执行图 3所示的方法。 另外, 图 20所示的转发设备可以用于实现图 16所 示的转发设备。图 20所示的转发设备 2000包括处理器 2001、接收电路 2002、 发送电路 2003和至少一个存储器 2004。
接收电路 2002用于接收控制器发送的 Q个同时访问信息, 其中, 所述 Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每两个表是 否需要被预定的性能为 0· χ线速的同一个转发业务访问, 执行 Μ个转发业 务需要查找所述 Ν个表。
处理器 2001用于根据接收电路 2002接收的所述 Q个同时访问信息,确 定所述 Ν个表将被存储在所述转发设备的至少一个存储器 2004中。 并进一 步将所述 Ν个表存储所述至少一个存储器 2004中。
本发明实施例中,转发设备根据表的同时访问信息确定表将被存储在转 发设备的至少一个存储器中。 其中, 表的同时访问信息是控制器通过转发业 务的描述信息所确定, 并进一步将表的同时访问信息发送至转发设备的。 这 样确定的表将被存储在转发设备中的位置有助于使得转发业务的实际性能 尽可能达到预定的性能。
转发设备 2000中的各个组件通过总线系统 2005耦合在一起, 其中总线 系统 2005除包括数据总线之外, 还包括电源总线、 控制总线和状态信号总 线。 但是为了清楚说明起见, 在图 20中将各种总线都标为总线系统 2005。
可选地, 作为一个实施例, 所述 Q个同时访问信息为 Q个 Ν χ Ν的矩 阵, 所述 Q个 Ν χ Ν的矩阵中的每个 Ν χ Ν的矩阵的元素为 1或者 0, 如果 所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访问,如果所述 Q个 N x N的矩阵中的第 r个 N x N的矩阵的第 i行第 j列的元素为 0, 则表 示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需要同时被所述 M 个转发业务中预定的性能为 0· χ线速的任意一个转发业务访问, 其中, i和 j为正整数, 且 i和 j均小于或者等于N。
可选地, 作为一个实施例, 处理器 2001具体用于确定所述 N个表中的 每个表将被存储在所述转发设备的至少一个存储器 2004中。 其中, 确定所 述 N个表中的第 m个表将被存储在所述转发设备的至少一个存储器 2004中, 具体用于确定所述 N个表中的每个表是否已经存储在所述至少一个存储器 2004的第一存储器中, l x N的矩阵用于表示所述 N个表中的每个表是否已 经存储在所述转发设备的第一存储器中, 具体地, 所述 l x N的矩阵中的第 1列元素至第 N列元素分别用于表示所述 N个表中的第 1个表至所述 N个 表中的第 N个表是否已经存储在所述第一存储器中, 其中, 所述 l x N的矩 阵的第 i列元素用于表示所述 N个表中的第 i个表是否已经存储在所述第一 存储器中, 如果所述 1 χ Ν的矩阵的第 i列元素为 1则表示所述第一存储器 已经存储所述 N个表中的第 i个表,如果所述 1 X N的矩阵的第 i列元素为 0 则表示所述第一存储器没有存储所述 N个表中的第 i个表。 将所述 Q个 N N的矩阵中的每个 N X N的矩阵的第 m行的元素与所确定的所述 1 X N的 矩阵的对应元素作与运算, 确定结果为 1的个数, 其中, 所述 Q个 N x N的 矩阵中的第 r个 Ν χ N的矩阵的第 i行的元素与所述 1 χ Ν的矩阵的对应元素 作与运算的结果中 1的个数为 pr。 基于 maxi Pi+ l) X d X A, ... ..., (PQ+1) CQ A) < B , 确定所述 N个表中的第 m个表将被存储在所述第一存储器 中。 其中, m为小于或者等于 N的正整数, &为非负整数, & < N, A和 B 为正数, A表示实际性能为线速的转发业务需要占用的带宽, B表示所述第 一存储器能够提供的最大带宽。
可选地, 作为另一个实施例, 处理器 2001还用于当根据所述 Q个同时 访问信息,确定不能将所述 N个表中的第 a个表存储在所述至少一个存储器 2004中时,生成第一消息,所述第一消息用于通告所述转发设备确定不能将 所述 N个表中的第 a个表存储在所述至少一个存储器 2004中。发送电路 2003 还用于将生成的所述第一消息发送至所述控制器, 其中, a为正整数, 且 a 小于或者等于 N。 可选地, 作为另一个实施例, 接收电路 2002还用于接收所述控制器发 送的第二消息,所述第二消息用于指示所述转发设备尽力存储所述 N个表中 的第 a个表。 处理器 2001还用于根据所述接收电路 2002接收的所述第二消 息,工作于尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述至 少一个存储器 2004的第二存储器中。 并生成第三消息, 所述第三消息用于 通告所述转发设备确定所述 N个表中的第 a个表将被存储在所述第二存储器 中时, 所述 N个表中的第 a个表所支持的转发业务的实际性能。 发送电路 2003还用于将所述第三消息发送至所述控制器。
上述本发明实施例揭示的方法可以应用于处理器 2001 中, 或者由处理 器 2001实现。处理器 2001可能是一种集成电路芯片,具有信号的处理能力。 在实现过程中, 上述方法的各步骤可以通过处理器 2001 中的硬件的集成逻 辑电路或者软件形式的指令完成。 上述的处理器 2001可以是通用处理器、 DSP、 ASIC, FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、 逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处 理器等。 结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处 理器执行完成, 或者用译码处理器中的硬件及软件模块组合执行完成。 软件 模块可以位于 RAM、 闪存、 ROM、 可编程只读存储器或者电可擦写可编程 存储器、 寄存器等本领域成熟的存储介质中。 该存储介质位于至少一个存储 器 2004,处理器 2001读取至少一个存储器 2004中的信息,结合其硬件完成 上述方法的步骤。
转发设备 2000能够实现图 3和图 13的实施例中由转发设备实现的各个 过程, 为避免重复, 这里不再赘述。
图 21是本发明另一个实施例的控制器的框图。 所述控制器可以用于执 行图 4所示的方法。 另外, 图 21所示的控制器可以用于实现图 17所示的控 制器。 图 21所示的控制器 2100包括处理器 2101、 接收电路 2102、 发送电 路 2103和存储器 2104。
处理器 2101用于生成 M个描述信息, 所述 M个描述信息与 M个转发 业务——对应, 所述 M个描述信息中的每个描述信息包括对应的转发业务 的预定的性能以及执行所述对应的转发业务需要查找的表的标识,执行所述 M个转发业务需要查找 N个表, 所述 M个转发业务的预定的性能组成的集 合包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所述 Q 个元素中的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的第 r个 元素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2≤N, Q < M, r < Q, 0≤Ο·≤1。 还用于根据所述 M个描述信息, 生成 Q个同时访问信息, 所述 Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每两个 表是否需要被预定的性能为 0· χ线速的同一个转发业务访问。 备。 , 、 、 、 5 、 。 , , 本发明实施例中,控制器通过转发业务的描述信息确定转发业务需要查 找的表的同时访问信息。 进一步将表的同时访问信息发送至转发设备。 可使 得转发设备根据表的同时访问信息确定表将被存储在转发设备的至少一个 存储器中。这样确定的表将被存储在转发设备中的位置有助于使得转发业务 的实际性能尽可能达到预定的性能。
控制器 2100中的各个组件通过总线系统 2105耦合在一起, 其中总线系 统 2105除包括数据总线之外, 还包括电源总线、 控制总线和状态信号总线。 但是为了清楚说明起见, 在图 21中将各种总线都标为总线系统 2105。
可选地, 作为一个实施例, 所述 Q个同时访问信息为 Q个 Ν χ Ν的矩 阵, 所述 Q个 Ν χ Ν的矩阵中的每个 Ν χ Ν的矩阵的元素为 1或者 0, 如果 所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访问,如果所述 Q个 N x Ν的矩阵中的第 r个 N x Ν的矩阵的第 i行第 j列的元素为 0, 则表 示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需要同时被所述 M 个转发业务中预定的性能为 Cr x线速的任意一个转发业务访问, 其中, i和 j为正整数, 且 i和 j均小于或者等于N。
可选地, 作为一个实施例, 所述 M个描述信息用于使得所述转发设备 确定所述 N个表将被存储在所述转发设备中的至少一个存储器中,接收电路 2102用于接收所述转发设备发送的第一消息,所述第一消息用于通告所述转 发设备确定不能将所述 N个表中的第 a个表存储在所述转发设备的至少一个 存储器中, 其中, a为正整数, 且 a小于或者等于 N。
可选地, 作为另一个实施例, 处理器 2101还用于生成第二消息, 所述 第二消息用于指示所述转发设备尽力存储所述 N个表中的第 a个表。发送电 路 2103还用于将所生成的所述第二消息发送至所述转发设备, 以使所述转 发设备工作于尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述 至少一个存储器的第二存储器中。 接收电路 2102还用于接收所述转发设备 发送的第三消息,所述第三消息用于通告所述转发设备确定所述 N个表中的 第 a个表将被存储在所述第二存储器中时,所述 N个表中的第 a个表所支持 的转发业务的实际性能。
上述本发明实施例揭示的方法可以应用于处理器 2101 中, 或者由处理 器 2101实现。处理器 2101可能是一种集成电路芯片,具有信号的处理能力。 在实现过程中, 上述方法的各步骤可以通过处理器 2101 中的硬件的集成逻 辑电路或者软件形式的指令完成。 上述的处理器 2101可以是通用处理器、 DSP、 ASIC, FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、 逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处 理器等。 结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处 理器执行完成, 或者用译码处理器中的硬件及软件模块组合执行完成。 软件 模块可以位于 RAM、 闪存、 ROM、 可编程只读存储器或者电可擦写可编程 存储器、 寄存器等本领域成熟的存储介质中。 该存储介质位于存储器 2104, 处理器 2101读取存储器 2104中的信息, 结合其硬件完成上述方法的步骤。
控制器 2100能够实现图 4和图 13的实施例中由控制器实现的各个过程, 为避免重复, 这里不再赘述。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结 合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特 定应用和设计约束条件。 专业技术人员可以对每个特定的应用来使用不同方 法来实现所描述的功能, 但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述描 述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应 过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间 的耦合或直接辆合或通信连接可以是通过一些接口, 装置或单元的间接辆合 或通信连接, 可以是电性, 机械或其它的形式。 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一 个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使 用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明 的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部 分可以以软件产品的形式体现出来, 该计算机软件产品存储在一个存储介质 中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。 而前 述的存储介质包括: U盘、 移动硬盘、 ROM、 RAM, 磁碟或者光盘等各种 可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应以权利要求的保护范围为准。

Claims

权利要求
1. 一种确定表的存储位置的方法, 其特征在于, 包括:
转发设备接收控制器发送的 M个描述信息,所述 M个描述信息与 M个 转发业务——对应, 所述 M个描述信息中的每个描述信息包括对应的转发 业务的预定的性能以及执行所述对应的转发业务需要查找的表的标识,执行 所述 M个转发业务需要查找 N个表, 所述 M个转发业务的预定的性能组成 的集合包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所 述 Q个元素中的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的 第 r个元素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2≤ N, Q < M, r < Q, 0 < Cr < 1;
所述转发设备根据所述 M个描述信息, 生成 Q个同时访问信息, 所述 Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每两个表是 否需要被预定的性能为 0· χ线速的同一个转发业务访问;
所述转发设备根据所述 Q个同时访问信息, 确定所述 Ν个表将被存储 在所述转发设备中的至少一个存储器中;
所述转发设备将所述 Ν个表存储在所述至少一个存储器中。
2. 根据权利要求 1所述的方法, 其特征在于, 所述 Q个同时访问信息 为 Q个 Ν X Ν的矩阵,所述 Q个 Ν X Ν的矩阵中的每个 Ν χ Ν的矩阵的元素 为 1或者 0,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访 问,
如果所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
3. 根据权利要求 2所述的方法, 其特征在于, 所述确定所述 N个表将 被存储在所述转发设备的至少一个存储器中,包括确定所述 N个表中的每个 表将被存储在所述转发设备的至少一个存储器中, 其中, 所述转发设备确定所述 N个表中的第 m个表将被存储在所述转 发设备的至少一个存储器中, 具体包括:
所述转发设备确定所述 N个表中的每个表是否已经存储在所述至少一 个存储器的第一存储器中, 1 X N的矩阵用于表示所述 N个表中的每个表是 否已经存储在所述第一存储器中, 具体地, 所述 1 X N的矩阵的第 1列元素 至第 N列元素分别用于表示所述 N个表中的第 1个表至所述 N个表中的第 N个表是否已经存储在所述第一存储器中, 其中, 所述 l x N的矩阵的第 i 列元素用于表示所述 N个表中的第 i个表是否已经存储在所述第一存储器 中, 如果所述 1 χ Ν的矩阵的第 i列元素为 1则表示所述第一存储器已经存 储所述 N个表中的第 i个表, 如果所述 l x N的矩阵的第 i列元素为 0则表 示所述第一存储器没有存储所述 N个表中的第 i个表;
所述转发设备将所述 Q个 N X N的矩阵中的每个 N X N的矩阵的第 m 行的元素与所述 1 χ Ν的矩阵的对应元素作与运算, 确定结果为 1的个数, 其中,所述 Q个 Ν χ N的矩阵中的第 r个 Ν χ N的矩阵的第 m行的元素与所 述 1 X N的矩阵的对应元素作与运算的结果中 1的个数为
所述转发设备基于 maxdPi+l) X d X A, ... ..., (PQ+1) CQ x A) < B, 确 定所述 N个表中的第 m个表将被存储在所述第一存储器中,
其中, m为小于或者等于 N的正整数, &为非负整数, & < N, A和 B 为正数, A表示实际性能为线速的转发业务需要占用的带宽, B表示所述第 一存储器能够提供的最大带宽。
4. 根据权利要求 1至 3任一项所述的方法, 其特征在于, 所述方法还 包括:
当所述转发设备根据所述 Q个同时访问信息, 确定不能将所述 N个表 中的第 a个表存储在所述至少一个存储器中时,所述转发设备生成第一消息, 所述第一消息用于通告所述转发设备确定不能将所述 N个表中的第 a个表存 储在所述至少一个存储器中;
所述转发设备将所述第一消息发送至所述控制器,
其中, a为正整数, 且 a小于或者等于 N。
5. 根据权利要求 4所述的方法, 其特征在于, 所述方法还包括: 所述转发设备接收所述控制器发送的第二消息, 所述第二消息用于指示 所述转发设备尽力存储所述 N个表中的第 a个表; 所述转发设备根据所述第二消息,工作于尽力而为模式并确定所述 N个 表中的第 a个表将被存储在所述至少一个存储器的第二存储器中;
所述转发设备生成第三消息, 所述第三消息用于通告所述转发设备确定 所述 N个表中的第 a个表将被存储在所述第二存储器中时, 所述 N个表中 的第 a个表所支持的转发业务的实际性能;
所述转发设备将所述第三消息发送至所述控制器。
6. 一种确定表的存储位置的方法, 其特征在于, 包括:
控制器生成 M个描述信息,所述 M个描述信息与 M个转发业务一一对 应, 所述 M个描述信息中的每个描述信息包括对应的转发业务的预定的性 能以及执行所述对应的转发业务需要查找的表的标识, 执行所述 M个转发 业务需要查找 N个表, 所述 M个转发业务的预定的性能组成的集合包含 Q 个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所述 Q个元素中 的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的第 r个元素表示 预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0 < Cr < 1;
所述控制器将所述 M个描述信息发送至转发设备。
7. 根据权利要求 6所述的方法, 其特征在于, 所述 M个描述信息用于 使得所述转发设备确定所述 N个表将被存储在所述转发设备中的至少一个 存储器中, 所述方法还包括:
所述控制器接收所述转发设备发送的第一消息, 所述第一消息用于通告 所述转发设备确定不能将所述 N个表中的第 j个表存储在所述转发设备的至 少一个存储器中,
其中, j为正整数, 且 j小于或者等于 N。
8. 根据权利要求 7所述的方法, 其特征在于, 所述方法还包括: 所述控制器生成第二消息, 所述第二消息用于指示所述转发设备尽力存 储所述 N个表中的第 j个表;
所述控制器将所述第二消息发送至所述转发设备, 以使所述转发设备工 作于尽力而为模式并确定所述 N个表中的第 j个表将被存储在所述至少一个 存储器的第二存储器中;
所述控制器接收所述转发设备发送的第三消息, 所述第三消息用于通告 所述转发设备确定所述 N个表中的第 j 个表将被存储在所述第二存储器中 时, 所述 N个表中的第 j个表所支持的转发业务的实际性能。
9. 一种确定表的存储位置的方法, 其特征在于, 包括:
转发设备接收控制器发送的 Q个同时访问信息, 其中, 所述 Q个同时 访问信息中的第 r个同时访问信息表示所述 N个表中的每两个表是否需要被 预定的性能为 0· χ线速的同一个转发业务访问, 执行 Μ个转发业务需要查 找所述 Ν个表;
所述转发设备根据所述 Q个同时访问信息, 确定所述 Ν个表将被存储 在所述转发设备的至少一个存储器中;
所述转发设备将所述 Ν个表存储在所述至少一个存储器中。
10. 根据权利要求 9所述的方法, 其特征在于, 所述 Q个同时访问信息 为 Q个 Ν X Ν的矩阵,所述 Q个 Ν X Ν的矩阵中的每个 Ν χ Ν的矩阵的元素 为 1或者 0,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访 问,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
11. 根据权利要求 10所述的方法, 其特征在于, 所述确定所述 N个表 将被存储在所述转发设备的至少一个存储器中,包括确定所述 N个表中的每 个表将被存储在所述转发设备的至少一个存储器中,
其中, 所述转发设备确定所述 N个表中的第 m个表将被存储在所述转 发设备的至少一个存储器中, 具体包括:
所述转发设备确定所述 N个表中的每个表是否已经存储在所述至少一 个存储器的第一存储器中, 1 X N的矩阵用于表示所述 N个表中的每个表是 否已经存储在所述第一存储器中, 具体地, 所述 l x N的矩阵的第 1列元素 至第 N列元素分别用于表示所述 N个表中的第 1个表至所述 N个表中的第 N个表是否已经存储在所述第一存储器中, 其中, 所述 l x N的矩阵的第 i 列元素用于表示所述 N个表中的第 i个表是否已经存储在所述第一存储器 中, 如果所述 1 χ Ν的矩阵的第 i列元素为 1则表示所述第一存储器已经存 储所述 N个表中的第 i个表, 如果所述 1 X N的矩阵的第 i列元素为 0则表 示所述第一存储器没有存储所述 N个表中的第 i个表;
所述转发设备将所述 Q个 N X N的矩阵中的每个 N X N的矩阵的第 m 行的元素与所述 1 χ Ν的矩阵的对应元素作与运算, 确定结果为 1的个数, 其中,所述 Q个 Ν χ N的矩阵中的第 r个 Ν χ N的矩阵的第 m行的元素与所 述 1 X N的矩阵的对应元素作与运算的结果中 1的个数为 Pr
所述转发设备基于 maxdPi+l) X d X A, ... ..., (PQ+1) CQ x A) < B, 确 定所述 N个表中的第 m个表将被存储在所述第一存储器中;
其中, m为小于或者等于 N的正整数, &为非负整数, & < N, A和 B 为正数, A表示实际性能为线速的转发业务需要占用的带宽, B表示所述第 一存储器能够提供的最大带宽。
12. 根据权利要求 9至 11任一项所述的方法, 其特征在于, 所述方法 还包括:
当所述转发设备根据所述 Q个同时访问信息, 确定不能将所述 N个表 中的第 a个表存储在所述至少一个存储器中时,所述转发设备生成第一消息, 所述第一消息用于通告所述转发设备确定不能将所述 N个表中的第 a个表存 储在所述至少一个存储器中;
所述转发设备将所述第一消息发送至所述控制器,
其中, a为正整数, 且 a小于或者等于 N。
13. 根据权利要求 12所述的方法, 其特征在于, 所述方法还包括: 所述转发设备接收所述控制器发送的第二消息, 所述第二消息用于指示 所述转发设备尽力存储所述 N个表中的第 a个表;
所述转发设备根据所述第二消息,工作于尽力而为模式并确定所述 N个 表中的第 a个表将被存储在所述至少一个存储器的第二存储器中;
所述转发设备生成第三消息, 所述第三消息用于通告所述转发设备确定 所述 N个表中的第 a个表将被存储在所述第二存储器中时, 所述 N个表中 的第 a个表所支持的转发业务的实际性能;
所述转发设备将所述第三消息发送至所述控制器。
14. 一种确定表的存储位置的方法, 其特征在于, 包括: 控制器生成 M个描述信息,所述 M个描述信息与 M个转发业务一一对 应, 所述 M个描述信息中的每个描述信息包括对应的转发业务的预定的性 能以及执行所述对应的转发业务需要查找的表的标识, 执行所述 M个转发 业务需要查找 N个表, 所述 M个转发业务的预定的性能组成的集合包含 Q 个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所述 Q个元素中 的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的第 r个元素表示 预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0 < Cr < 1;
所述控制器根据所述 M个描述信息, 生成 Q个同时访问信息, 其中, 所述 Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每两个 表是否需要被预定的性能为 0· χ线速的同一个转发业务访问;
所述控制器将所述 Q个同时访问信息发送至转发设备。
15. 根据权利要求 14所述的方法, 其特征在于, 所述 Q个同时访问信 息为 Q个 Ν X Ν的矩阵,所述 Q个 Ν X Ν的矩阵中的每个 Ν χ Ν的矩阵的元 素为 1或者 0,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访 问,
如果所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
16. 根据权利要求 14或 15所述的方法, 其特征在于, 所述 M个描述 信息用于使得所述转发设备确定所述 N个表将被存储在所述转发设备中的 至少一个存储器中, 所述方法还包括:
所述控制器接收所述转发设备发送的第一消息, 所述第一消息用于通告 所述转发设备确定不能将所述 N个表中的第 a个表存储在所述转发设备的至 少一个存储器中,
其中, a为正整数, 且 a小于或者等于 N。
17. 根据权利要求 16所述的方法, 其特征在于, 所述方法还包括: 所述控制器生成第二消息, 所述第二消息用于指示所述转发设备尽力存 储所述 N个表中的第 a个表;
所述控制器将所述第二消息发送至所述转发设备, 以使所述转发设备工 作于尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述至少一个 存储器的第二存储器中;
所述控制器接收所述转发设备发送的第三消息, 所述第三消息用于通告 所述转发设备确定所述 N个表中的第 a个表将被存储在所述第二存储器中 时, 所述 N个表中的第 a个表所支持的转发业务的实际性能。
18. 一种转发设备, 其特征在于, 包括:
接收单元, 用于接收控制器发送的 M个描述信息, 所述 M个描述信息 与 M个转发业务——对应, 所述 M个描述信息中的每个描述信息包括对应 的转发业务的预定的性能以及执行所述对应的转发业务需要查找的表的标 识, 执行所述 M个转发业务需要查找 N个表, 所述 M个转发业务的预定的 性能组成的集合包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个 元素, 所述 Q个元素中的每个元素表示一个预定的性能, 其中, 所述 Q个 元素中的第 r个元素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2 < N, Q < M, r < Q, 0 < Cr < 1;
生成单元,用于根据所述接收单元接收到的所述 M个描述信息,生成 Q 个同时访问信息,所述 Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每两个表是否需要被预定的性能为 0· χ线速的同一个转发业务 访问; 所述 Ν个表将被存储在所述转发设备的至少一个存储器中; 存储器 。' ' Ϊ
19. 根据权利要求 18所述的转发设备, 其特征在于, 所述 Q个同时访 问信息为 Q个 N X N的矩阵,所述 Q个 N X N的矩阵中的每个 N χ N的矩阵 的元素为 1或者 0,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访 问,
如果所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
20. 根据权利要求 19所述的转发设备, 其特征在于, 所述确定单元, 具体用于确定所述 N个表中的每个表将被存储在所述转发设备的至少一个 存储器中,
其中, 所述确定单元具体包括用于确定所述 N个表中的第 m个表将被 存储在所述转发设备的至少一个存储器中的确定子单元, 所述确定子单元具 体包括:
第一确定子单元,用于确定所述 N个表中的每个表是否已经存储在所述 至少一个存储器的第一存储器中, l x N的矩阵用于表示所述 N个表中的每 个表是否已经存储在所述第一存储器中, 具体地, 所述 l x N的矩阵的第 1 列元素至第 N列元素分别用于表示所述 N个表中的第 1个表至所述 N个表 中的第 N个表是否已经存储在所述第一存储器中, 其中, 所述 l x N的矩阵 的第 i列元素用于表示所述 N个表中的第 i个表是否已经存储在所述第一存 储器中, 如果所述 1 χ Ν的矩阵的第 i列元素为 1则表示所述第一存储器已 经存储所述 N个表中的第 i个表, 如果所述 1 X N的矩阵的第 i列元素为 0 则表示所述第一存储器没有存储所述 N个表中的第 i个表;
第二确定子单元,用于将所述生成单元生成的所述 Q个 N X N的矩阵中 每个 Ν χ N的矩阵的第 m行的元素与所述第一确定子单元确定的所述 1 χ Ν 的矩阵的对应元素作与运算, 确定结果为 1的个数, 其中, 所述 Q个 Ν χ Ν 的矩阵中的第 r个 N N的矩阵的第 m行的元素与所述 1 x N的矩阵的对应 元素作与运算的结果中 1的个数为 &;
第三确定子单元, 用于基于 maxdPi+l) X d X A, ... ..., (PQ+l) x CQ x
A)≤B, 确定所述 N个表中的第 m个表将被存储在所述第一存储器中; 其中, m为小于或者等于 N的正整数, &为非负整数, & < N, A和 B 为正数, A表示实际性能为线速的转发业务需要占用的带宽, B表示所述第 一存储器能够提供的最大带宽。
21. 根据权利要求 18至 20任一项所述的转发设备, 其特征在于, 所述 转发设备还包括发送单元;
所述生成单元, 还用于当所述确定单元确定不能将所述 N个表中的第 a 个表存储在所述至少一个存储器中时, 生成第一消息, 所述第一消息用于通 告所述转发设备确定不能将所述 N个表中的第 a个表存储在所述至少一个存 储器中;
所述发送单元,用于将所述生成单元生成的所述第一消息发送至所述控 制器,
其中, a为正整数, 且 a小于或者等于 N。
22. 根据权利要求 21所述的转发设备, 其特征在于,
所述接收单元, 还用于接收所述控制器发送的第二消息, 所述第二消息 用于指示所述转发设备尽力存储所述 N个表中的第 a个表;
所述确定单元, 还用于根据所述接收单元接收的所述第二消息, 工作于 尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述至少一个存储 器的第二存储器中;
所述生成单元, 还用于生成第三消息, 所述第三消息用于通告所述确定 单元确定所述 N个表中的第 a个表将被存储在所述第二存储器中时,所述 N 个表中的第 a个表所支持的转发业务的实际性能;
所述发送单元,还用于将所述生成单元生成的所述第三消息发送至所述 控制器。
23. 一种控制器, 其特征在于, 包括:
生成单元, 用于生成 M个描述信息, 所述 M个描述信息与 M个转发业 务——对应, 所述 M个描述信息中的每个描述信息包括对应的转发业务的 预定的性能以及执行所述对应的转发业务需要查找的表的标识,执行所述 M 个转发业务需要查找 N个表, 所述 M个转发业务的预定的性能组成的集合 包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所述 Q个 元素中的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的第 r个元 素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2≤N, Q < M, r < Q, 0 < Cr < 1;
发送单元, 用于将所述生成单元生成的所述 M个描述信息发送至转发 设备。
24. 根据权利要求 23所述的控制器, 其特征在于, 所述 M个描述信息 用于使得所述转发设备确定所述 N个表将被存储在所述转发设备中的至少 一个存储器中, 所述控制器还包括:
接收单元, 用于接收所述转发设备发送的第一消息, 所述第一消息用于 通告所述转发设备确定不能将所述 N个表中的第 j个表存储在所述转发设备 的至少一个存储器中,
其中, j为正整数, 且 j小于或者等于 N。
25. 根据权利要求 24所述的控制器, 其特征在于,
所述生成单元, 还用于生成第二消息, 所述第二消息用于指示所述转发 设备尽力存储所述 N个表中的第 j个表;
所述发送单元,还用于将所述生成单元生成的所述第二消息发送至所述 转发设备,以使所述转发设备工作于尽力而为模式并确定所述 N个表中的第 j个表将被存储在所述至少一个存储器的第二存储器中;
所述接收单元, 还用于接收所述转发设备发送的第三消息, 所述第三消 息用于通告所述转发设备确定所述 N个表中的第 j个表将被存储在所述第二 存储器中时, 所述 N个表中的第 j个表所支持的转发业务的实际性能。
26. 一种转发设备, 其特征在于, 包括:
接收单元, 用于接收控制器发送的 Q个同时访问信息, 其中, 所述 Q 个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每两个表是否 需要被预定的性能为 0· χ线速的同一个转发业务访问, 执行 Μ个转发业务 时需要查找所述 Ν个表;
确定单元,用于根据所述接收单元接收的所述 Q个同时访问信息,确定 所述 Ν个表将被存储在所述转发设备的至少一个存储器中; 存储器 。' ' Ϊ
27. 根据权利要求 26所述的转发设备, 其特征在于, 所述 Q个同时访 问信息为 Q个 N X N的矩阵,所述 Q个 N X N的矩阵中的每个 N χ N的矩阵 的元素为 1或者 0,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访 问,
如果所述 Q个 N X N的矩阵中的第 r个 N X N的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
28. 根据权利要求 27所述的转发设备, 其特征在于, 所述确定单元, 具体用于确定所述 N个表中的每个表将被存储在所述转发设备的至少一个 存储器中,
其中, 所述确定单元包括用于确定所述 N个表中的第 m个表将被存储 在所述转发设备的至少一个存储器中的确定子单元, 所述确定子单元具体包 括:
第一确定子单元,用于确定所述 N个表中的每个表是否已经存储在所述 至少一个存储器的第一存储器中, l x N的矩阵用于表示所述 N个表中的每 个表是否已经存储在所述转发设备的第一存储器中, 具体地, 所述 1 X N的 矩阵的第 1列元素至第 N列元素分别用于表示所述 N个表中的第 1个表至 所述 N个表中的第 N个表是否已经存储在所述第一存储器中, 其中, 所述 1 χ Ν的矩阵的第 i列元素用于表示所述 N个表中的第 i个表是否已经存储在 所述第一存储器中, 如果所述 1 X N的矩阵的第 i列元素为 1则表示所述第 一存储器已经存储所述 N个表中的第 i个表, 如果所述 1 X N的矩阵的第 i 列元素为 0则表示所述第一存储器没有存储所述 N个表中的第 i个表;
第二确定子单元,用于将所述 Q个 N X N的矩阵中的每个 N X N的矩阵 的第 m行的元素与所述第一确定子单元确定的所述 1 χ Ν的矩阵的对应元素 作与运算, 确定结果为 1的个数, 其中, 所述 Q个 Ν χ N的矩阵中的第 r个 N X N的矩阵的第 m行的元素与所述 1 X N的矩阵的对应元素作与运算的结 果中 1的个数为 &;
第三确定子单元, 用于基于 maxdPi+l) X d X A, ... ..., (PQ+l) x CQ x
A)≤B, 确定所述 N个表中的第 m个表将被存储在所述第一存储器中;
其中, m为小于或者等于 N的正整数, &为非负整数, & < N, A和 B 为正数, A表示的实际性能为线速的转发业务需要占用带宽, B表示所述第 一存储器能够提供的最大带宽。
29. 根据权利要求 26至 28任一项所述的转发设备, 其特征在于, 所述 转发设备还包括生成单元和发送单元,
所述生成单元, 还用于当所述确定单元确定不能将所述 N个表中的第 a 个表存储在所述至少一个存储器中时, 生成第一消息, 所述第一消息用于通 告所述转发设备确定不能将所述 N个表中的第 a个表存储在所述至少一个存 储器中;
所述发送单元,用于将所述生成单元生成的所述第一消息发送至所述控 制器,
其中, a为正整数, 且 a小于或者等于 N。
30. 根据权利要求 29所述的转发设备, 其特征在于,
所述接收单元, 还用于接收所述控制器发送的第二消息, 所述第二消息 用于指示所述转发设备尽力存储所述 N个表中的第 a个表;
所述确定单元, 还用于根据所述接收单元接收的所述第二消息, 工作于 尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述至少一个存储 器的第二存储器中;
所述生成单元, 还用于生成第三消息, 所述第三消息用于通告所述转发 设备确定所述 N个表中的第 a个表将被存储在所述第二存储器中时,所述 N 个表中的第 a个表所支持的转发业务的实际性能;
所述发送单元,还用于将所述生成单元生成的所述第三消息发送至所述 控制器。
31. 一种控制器, 其特征在于, 包括:
生成单元, 用于生成 M个描述信息, 所述 M个描述信息与 M个转发业 务——对应, 所述 M个描述信息中的每个描述信息包括对应的转发业务的 预定的性能以及执行所述对应的转发业务需要查找的表的标识,执行所述 M 个转发业务需要查找 N个表, 所述 M个转发业务的预定的性能组成的集合 包含 Q个元素, 所述 Q个元素分别是第 1个元素至第 Q个元素, 所述 Q个 元素中的每个元素表示一个预定的性能, 其中, 所述 Q个元素中的第 r个元 素表示预定的性能为 Cr x线速, M、 N、 Q和 r为正整数, 2≤N, Q < M, r < Q, 0 < Cr < 1;
所述生成单元, 还用于根据所述 M个描述信息, 生成 Q个同时访问信 息,所述 Q个同时访问信息中的第 r个同时访问信息表示所述 N个表中的每 两个表是否需要被预定的性能为 0· χ线速的同一个转发业务访问; 发设备。
32. 根据权利要求 30所述的控制器, 其特征在于, 所述 Q个同时访问 信息为 Q个 Ν X Ν的矩阵,所述 Q个 Ν X Ν的矩阵中的每个 Ν χ Ν的矩阵的 元素为 1或者 0,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 1, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表需要 同时被所述 M个转发业务中预定的性能为 Cr x线速的至少一个转发业务访 问,
如果所述 Q个 Ν X Ν的矩阵中的第 r个 Ν X Ν的矩阵的第 i行第 j列的 元素为 0, 则表示所述 N个表中的第 i个表和所述 N个表中的第 j个表不需 要同时被所述 M个转发业务中预定的性能为 Cr x线速的任意一个转发业务 访问,
其中, i和 j为正整数, 且 i和 j均小于或者等于
33. 根据权利要求 31或 32所述的控制器, 其特征在于, 所述 M个描 述信息用于使得所述转发设备确定所述 N个表将被存储在所述转发设备中 的至少一个存储器中, 所述控制器还包括接收单元, 用于接收所述转发设备 发送的第一消息,所述第一消息用于通告所述转发设备确定不能将所述 N个 表中的第 a个表存储在所述转发设备的至少一个存储器中,
其中, a为正整数, 且 a小于或者等于 N。
34. 根据权利要求 33所述的控制器, 其特征在于,
所述生成单元, 还用于生成第二消息, 所述第二消息用于指示所述转发 设备尽力存储所述 N个表中的第 a个表;
所述发送单元,还用于将所述生成单元生成的所述第二消息发送至所述 转发设备,以使所述转发设备工作于尽力而为模式并确定所述 N个表中的第 a个表将被存储在所述至少一个存储器的第二存储器中;
所述接收单元, 还用于接收所述转发设备发送的第三消息, 所述第三消 息用于通告所述转发设备确定所述 N个表中的第 a个表将被存储在所述第二 存储器中时, 所述 N个表中的第 a个表所支持的转发业务的实际性能。
PCT/CN2014/073940 2014-03-24 2014-03-24 确定表的存储位置的方法、转发设备及控制器 WO2015143599A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201480000155.3A CN105379214B (zh) 2014-03-24 2014-03-24 确定表的存储位置的方法、转发设备及控制器
PCT/CN2014/073940 WO2015143599A1 (zh) 2014-03-24 2014-03-24 确定表的存储位置的方法、转发设备及控制器
EP14886808.6A EP3110092B1 (en) 2014-03-24 2014-03-24 Method for determining storage location for tables, forwarding device, and controller
US15/274,943 US10158503B2 (en) 2014-03-24 2016-09-23 Method for determining storage location of table, forwarding device, and controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/073940 WO2015143599A1 (zh) 2014-03-24 2014-03-24 确定表的存储位置的方法、转发设备及控制器

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/274,943 Continuation US10158503B2 (en) 2014-03-24 2016-09-23 Method for determining storage location of table, forwarding device, and controller

Publications (1)

Publication Number Publication Date
WO2015143599A1 true WO2015143599A1 (zh) 2015-10-01

Family

ID=54193843

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/073940 WO2015143599A1 (zh) 2014-03-24 2014-03-24 确定表的存储位置的方法、转发设备及控制器

Country Status (4)

Country Link
US (1) US10158503B2 (zh)
EP (1) EP3110092B1 (zh)
CN (1) CN105379214B (zh)
WO (1) WO2015143599A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355492A (zh) * 2007-07-27 2009-01-28 华为技术有限公司 简单对象访问协议路由方法及路由系统以及相关设备
US20090103536A1 (en) * 2002-08-29 2009-04-23 International Business Machines Corporation Method and System for Reducing Look-Up Time in Packet Forwarding on Computer Networks
CN102340445A (zh) * 2010-07-26 2012-02-01 杭州华三通信技术有限公司 一种报文转发流程中的表项处理方法和装置
CN103064901A (zh) * 2012-12-18 2013-04-24 中兴通讯股份有限公司 一种ram、网络处理系统和一种ram查表方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100550847C (zh) * 2006-09-29 2009-10-14 华为数字技术有限公司 一种解决Hash冲突的方法及装置
US8180896B2 (en) * 2008-08-06 2012-05-15 Edgecast Networks, Inc. Global load balancing on a content delivery network
US7826369B2 (en) * 2009-02-20 2010-11-02 Cisco Technology, Inc. Subsets of the forward information base (FIB) distributed among line cards in a switching device
EP2466810B1 (en) * 2010-12-17 2015-09-23 Alcatel Lucent Method and router for a service dependent routing
US8611355B1 (en) * 2013-09-03 2013-12-17 tw telecom holdings inc. Buffer-less virtual routing
CN103491006B (zh) * 2013-09-13 2016-08-17 清华大学 虚拟网络路由器的数据统一转发方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090103536A1 (en) * 2002-08-29 2009-04-23 International Business Machines Corporation Method and System for Reducing Look-Up Time in Packet Forwarding on Computer Networks
CN101355492A (zh) * 2007-07-27 2009-01-28 华为技术有限公司 简单对象访问协议路由方法及路由系统以及相关设备
CN102340445A (zh) * 2010-07-26 2012-02-01 杭州华三通信技术有限公司 一种报文转发流程中的表项处理方法和装置
CN103064901A (zh) * 2012-12-18 2013-04-24 中兴通讯股份有限公司 一种ram、网络处理系统和一种ram查表方法

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
EP3110092A1 (en) 2016-12-28
US10158503B2 (en) 2018-12-18
CN105379214B (zh) 2019-04-19
EP3110092B1 (en) 2019-03-13
EP3110092A4 (en) 2017-04-26
US20170012800A1 (en) 2017-01-12
CN105379214A (zh) 2016-03-02

Similar Documents

Publication Publication Date Title
EP3273643B1 (en) Method for sending virtual extensible local area network packet, computer device, and readable medium
EP3432514B1 (en) Information transmission methods and apparatuses
EP2997702B1 (en) Compressing singly linked lists sharing common nodes for multi-destination group expansion
CN106453138B (zh) 一种报文处理方法和装置
JP2020520612A (ja) パケット伝送方法、エッジデバイス及び機械可読記憶媒体
CN108028801B (zh) 一种基于sdn的arp实现方法及装置
EP3734917B1 (en) Downlink message sending method and apparatus and downlink message forwarding method and apparatus
WO2013123847A1 (zh) 报文发送方法和网络设备
WO2013107245A1 (zh) 在透明多链路互联(trill)网络中实现组播的方法、装置及系统
US9565112B2 (en) Load balancing in a link aggregation
US9948482B2 (en) Apparatus and method for enabling flexible key in a network switch
WO2018068588A1 (zh) 提供组播业务的方法和软件定义网络控制器
WO2015055058A1 (zh) 转发表项生成的方法、转发节点和控制器
US10581738B2 (en) Efficient inter-VLAN routing in openflow networks
CN113726915A (zh) 网络系统及其中的报文传输方法和相关装置
CN112822097A (zh) 报文转发的方法、第一网络设备以及第一设备组
CN113542114B (zh) 路由配置方法和路由配置装置
EP3389231B1 (en) Cluster and forwarding method
WO2015039616A1 (zh) 一种报文处理方法及设备
WO2022166465A1 (zh) 一种报文处理方法及相关装置
WO2015143599A1 (zh) 确定表的存储位置的方法、转发设备及控制器
WO2014169439A1 (zh) 实现FCoE的方法、装置和系统
WO2024002101A1 (zh) 报文传输方法、装置、相关设备及存储介质
EP3166260B1 (en) Method, device and system for managing trill network using three-layer network manager

Legal Events

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

Ref document number: 14886808

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2014886808

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014886808

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE