Packet processing method and forwarding element
Summary by NHIP
Dynamic Packet Key Extraction
The method processes packets by extracting a key from a specific data segment defined by offset and length values stored in a port table entry. The forwarding element determines this key without interpreting the packet's data format, enabling flexible support for different formats.
Claim Score by NHIP
Abstract
Embodiments provide a method, including: receiving, by a forwarding element, a packet through an inbound port; searching for, by the forwarding element, a port table according to the inbound port and determining a first offset, a first length, and an identifier of a first table; determining, by the forwarding element, a first key according to the first offset and the first length, searching for the first table according to the first key, and determining a first instruction; and processing, by the forwarding element, the packet according to the first instruction. In addition, a forwarding element is provided. In the foregoing technical solutions, before processing a packet, the forwarding element does not need to interpret a data format of the packet, so that the forwarding element can flexibly support packets in different data formats.

Term
Projected expiry 13 August 2033.
- Priority
- Filed
- Granted
- Today
- Projected expiry
12 claims: 2 independent, 10 dependent
- 1A packet processing method, comprising:receiving, by a forwarding element, a packet through an inbound port;searching, by the forwarding element, for a first offset, a first length, and an identifier of a first table according to a port table and the inbound port, wherein the first offset, the first length, and the identifier of the first table are stored in an entry of the port table and the first offset, the first length, and the identifier of the first table correspond to the inbound port;determining, by the forwarding element, a first key and a first instruction, wherein the first key is determined according to the first offset and the first length, and wherein the first instruction is determined via a search of the first table according to the first key;and processing, by the forwarding element, the packet according to the first instruction.
- 7Broadest claimClaim Score 65, broad(NHIP)A forwarding element, comprising:a receiving circuit, configured to receive a packet through an inbound port;a searching unit, configured to search for a first offset, a first length, and an identifier of a first table according to a port table and the inbound port, wherein the first offset, the first length, and the identifier of the first table are stored in an entry of the port table and the first offset, the first length, and the identifier of the first table correspond to the inbound port;a determining unit, configured to determine a first key and a first instruction, wherein the first key is determined according to the first offset and the first length, and wherein the first instruction is determined via a search of the first table according to the first key;and a processing unit, configured to process the packet according to the first instruction.
Independent claims2
206 paragraphs in 6 sections, as filed
CROSS-REFERENCE TO RELATED APPLICATIONS
0001This application is a continuation of International Application No. PCT/CN2013/071088, filed on Jan. 29, 2013, which is hereby incorporated by reference in its entirety.
TECHNICAL FIELD
0002Embodiments of the present invention relate to communications technologies, and in particular, to a packet processing method and a forwarding element.
BACKGROUND
0003In the prior art, after receiving a packet, a forwarding element needs to determine a data format of the packet, for example, the forwarding element determines whether the packet is an Internet Protocol (IP) packet or a Multiprotocol Label Switching (MPLS) packet, to process the packet. For example, after receiving an Ethernet packet, a switch needs to determine, according to a port table, that a protocol with which the Ethernet packet complies is the Media Access Control (MAC) Protocol. Then, the switch parses a MAC Protocol header of the Ethernet packet according to the MAC Protocol, to acquire a destination MAC Protocol address of the Ethernet packet.
SUMMARY
0004Embodiments of the present invention provide a packet processing method and a forwarding element. Before processing a packet, the forwarding element does not need to interpret a data format of the packet, so that the forwarding element can flexibly support packets in different data formats. When needing to support a new data format, the forwarding element can process a packet in the data format without the need of updating hardware or software.
0005According to a first aspect, a packet processing method is provided, including:
0006receiving, by a forwarding element, a packet through an inbound port;
0007searching for, by the forwarding element, a port table according to the inbound port, and determining a first offset, a first length, and an identifier of a first table, where the first offset, the first length, and the identifier of the first table correspond to the inbound port;
0008determining, by the forwarding element, a first key according to the first offset and the first length, searching for the first table according to the first key, and determining a first instruction; and
0009processing, by the forwarding element, the packet according to the first instruction.
0010In the foregoing technical solution, the forwarding element determines the first offset and the first length according to the inbound port. The forwarding element determines the first key according to the first offset and the first length. The forwarding element determines the first instruction according to the first key, to process the packet. Therefore, before processing the packet, the forwarding element does not need to interpret a data format of the packet, so that the forwarding element can flexibly support packets in different data formats. When needing to support a new data format, the forwarding element can process a packet in the data format without the need of updating hardware or software.
0011In a first possible implementation manner of the first aspect, the determining, by the forwarding element, the first key according to the first offset and the first length includes:
0012acquiring, by the forwarding element, a first data segment in the packet, where a start position of the first data segment is determined according to the first offset, and a length of the first data segment is the first length; and
0013determining, by the forwarding element, the first data segment as the first key.
0014In a second possible implementation manner of the first aspect, the determining, by the forwarding element, the first key according to the first offset and the first length includes:
0015acquiring, by the forwarding element, a second data segment in metadata, where a start position of the second data segment is determined according to the first offset, and a length of the second data segment is the first length; and
0016determining, by the forwarding element, the second data segment as the first key.
0017According to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the metadata is stored in registers of the forwarding element; or the metadata is stored in a memory of the forwarding element.
0018According to the first aspect, the first possible implementation manner of the first aspect, the second possible implementation manner of the first aspect, or the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the first instruction is used to instruct the forwarding element to perform an operation, where the operation includes at least one of the following operations: modifying the packet, calculating a checksum of the packet, writing the metadata, reading the metadata, updating a counter, performing committed access rate (CAR) processing on the packet, discarding the packet, sending the packet, and modifying a base offset of the packet.
0019According to the first aspect, the first possible implementation manner of the first aspect, the second possible implementation manner of the first aspect, or the third possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the processing, by the forwarding element, the packet according to the first instruction includes:
0020determining, by the forwarding element, a base offset of the packet, a second offset, a second length, an identifier of a second table according to the first table, where the base offset of the packet, the second offset, the second length, and the identifier of the second table correspond to the first key;
0021determining, by the forwarding element, a second key according to the base offset of the packet, the second offset, and the second length, searching for the second table according to the second key, and determining a second instruction; and
0022processing, by the forwarding element, the packet according to the second instruction.
0023According to a second aspect, a forwarding element is provided, including:
0024a receiving circuit, configured to receive a packet through an inbound port;
0025a searching unit, configured to search for a port table according to the inbound port, and determine a first offset, a first length, and an identifier of a first table, where the first offset, the first length, and the identifier of the first table correspond to the inbound port;
0026a determining unit, configured to determine a first key according to the first offset and the first length, search for the first table according to the first key, and determine a first instruction; and
0027a processing unit, configured to process the packet according to the first instruction.
0028In the foregoing technical solution, the forwarding element determines the first offset and the first length according to the inbound port. The forwarding element determines the first key according to the first offset and the first length. The forwarding element determines the first instruction according to the first key, to process the packet. Therefore, before processing the packet, the forwarding element does not need to interpret a data format of the packet, so that the forwarding element can flexibly support packets in different data formats. When needing to support a new data format, the forwarding element can process a packet in the data format without the need of updating hardware or software.
0029In a first possible implementation manner of the second aspect, the searching unit is configured to:
0030acquire a first data segment in the packet, where a start position of the first data segment is determined according to the first offset, and a length of the first data segment is the first length; and
0031determine the first data segment as the first key.
0032In a second possible implementation manner of the second aspect, the searching unit is configured to:
0033acquire a second data segment in metadata, where a start position of the second data segment is determined according to the first offset, and a length of the second data segment is the first length; and
0034determine the second data segment as the first key.
0035According to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the forwarding element further includes registers or a memory, where the metadata is stored in the registers or the memory.
0036According to the second aspect, the first possible implementation manner of the second aspect, the second possible implementation manner of the second aspect, or the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the first instruction is used to instruct the forwarding element to perform an operation, where the operation includes at least one of the following operations: modifying the packet, calculating a checksum of the packet, writing the metadata, reading the metadata, updating a counter, performing CAR processing on the packet, discarding the packet, sending the packet, and modifying a base offset of the packet.
0037According to the second aspect, the first possible implementation manner of the second aspect, the second possible implementation manner of the second aspect, or the third possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the processing unit is configured to:
0038determine a base offset of the packet, a second offset, a second length, an identifier of a second table according to the first table, where the base offset of the packet, the second offset, the second length, and the identifier of the second table correspond to the first key;
0039determine a second key according to the base offset of the packet, the second offset, and the second length, search for the second table according to the second key, and determine a second instruction; and
0040process the packet according to the second instruction.
0041According to a third aspect, a forwarding element is provided, including: a receiving circuit, a processor, a search engine, and a memory, where
0042the receiving circuit is configured to receive a packet through an inbound port; and
0043the processor is coupled with the receiving circuit, the processor is coupled with the memory, and the processor includes an instruction execution circuit and an instruction memory, where the instruction execution circuit is coupled with the instruction memory, the instruction memory is configured to store a computer instruction, and the instruction execution circuit performs the following actions by reading the computer instruction:
0044triggering the search engine, so that the search engine searches for a port table according to the inbound port, and determines a first offset, a first length, and an identifier of a first table, where the first offset, the first length, and the identifier of the first table correspond to the inbound port, and the port table is stored in the memory;
0045determining a first key according to the first offset and the first length;
0046triggering the search engine, so that the search engine searches for the first table according to the first key, and determines a first instruction; and
0047processing the packet according to the first instruction.
0048In a first possible implementation manner of the third aspect, the search engine is further configured to acquire a first data segment in the packet, where a start position of the first data segment is determined according to the first offset, and a length of the first data segment is the first length;
0049the instruction execution circuit is further configured to determine the first data segment as the first key; and
0050the processor further includes a data memory, where the data memory is coupled with the instruction execution circuit, and the packet is stored in the data memory.
0051In a second possible implementation manner of the third aspect, the search engine is further configured to acquire a second data segment in metadata, where a start position of the second data segment is determined according to the first offset, and a length of the second data segment is the first length; and
0052the instruction execution circuit is further configured to determine the second data segment as the first key.
0053According to the second possible implementation manner of the third aspect, in a third possible implementation manner of the third aspect, the processor further includes registers, where the registers are coupled with the instruction execution circuit, and the metadata is stored in the registers.
0054According to the second possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the metadata is stored in the memory.
0055According to the third aspect, the first possible implementation manner of the third aspect, the second possible implementation manner of the third aspect, the third possible implementation manner of the third aspect, or the fourth possible implementation manner of the third aspect, in a fifth possible implementation manner of the third aspect, the first instruction is used to instruct the instruction execution circuit to perform an operation, where the operation includes at least one of the following operations: modifying the packet, calculating a checksum of the packet, writing the metadata, reading the metadata, updating a counter, performing CAR processing on the packet, discarding the packet, sending the packet, and modifying a base offset of the packet.
0056According to the third aspect, the first possible implementation manner of the third aspect, the second possible implementation manner of the third aspect, the third possible implementation manner of the third aspect, or the fourth possible implementation manner of the third aspect, in a sixth possible implementation manner of the third aspect, the instruction execution circuit is further configured to:
0057determine a base offset of the packet, a second offset, a second length, an identifier of a second table according to the first table, where the base offset of the packet, the second offset, the second length, and the identifier of the second table correspond to the first key;
0058the instruction execution circuit is further configured to:
0059determine a second key according to the base offset of the packet, the second offset, and the second length;
0060the instruction execution circuit is further configured to trigger the search engine, so that the search engine searches for the second table according to the second key, and determines a second instruction; and
0061the instruction execution circuit is further configured to process the packet according to the second instruction.
BRIEF DESCRIPTION OF THE DRAWINGS
0062To describe the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings required for describing the embodiments. Apparently, the accompanying drawings in the following description show some embodiments of the present invention, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.
0063<figref idref="DRAWINGS">FIG. 1</figref> is a schematic flowchart of a packet processing method according to an embodiment of the present invention;
0064<figref idref="DRAWINGS">FIG. 2</figref> is a schematic flowchart of a packet processing method according to an embodiment of the present invention;
0065<figref idref="DRAWINGS">FIG. 3</figref> is a schematic flowchart of a packet processing method according to an embodiment of the present invention;
0066<figref idref="DRAWINGS">FIG. 4</figref> is a schematic flowchart of a packet processing method according to an embodiment of the present invention;
0067<figref idref="DRAWINGS">FIG. 5</figref> is a schematic structural diagram of a forwarding element according to an embodiment of the present invention;
0068<figref idref="DRAWINGS">FIG. 6</figref> is a schematic structural diagram of a forwarding element according to an embodiment of the present invention;
0069<figref idref="DRAWINGS">FIG. 7</figref> is a schematic diagram of a format of an entry according to an embodiment of the present invention; and
0070<figref idref="DRAWINGS">FIG. 8</figref> is a schematic diagram of a format of an entry according to an embodiment of the present invention.
DETAILED DESCRIPTION
0071To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following clearly describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are a part rather than all of the embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
0072<figref idref="DRAWINGS">FIG. 1</figref> is a schematic flowchart of a packet processing method according to an embodiment of the present invention. Referring to <figref idref="DRAWINGS">FIG. 1</figref>, the method includes:
0073<b>102</b>: A forwarding element receives a packet through an inbound port.
0074For example, the forwarding element may be a router, a switch, a firewall, or a load balancer.
0075For example, the packet may be an IP packet, an Ethernet packet, or an MPLS packet.
0076For example, <b>102</b> may be performed by a receiving circuit.
0077<b>104</b>: The forwarding element searches for a port table according to the inbound port, and determines a first offset, a first length, and an identifier of a first table, where the first offset, the first length, and the identifier of the first table correspond to the inbound port.
0078For example, the first offset, the first length, and the identifier of the first table are stored in an entry of the port table matching the inbound port. There may be one or more first offsets. There may be one or more first lengths. The multiple offsets are in a one-to-one correspondence to the multiple lengths.
0079For example, the first table may be a MAC Protocol table, an Address Resolution Protocol (ARP) table, a forwarding information base (FIB), or an MPLS label table.
0080For example, <b>104</b> may be performed by a search engine.
0081<b>106</b>: The forwarding element determines a first key according to the first offset and the first length, searches for the first table according to the first key, and determines a first instruction.
0082For example, the first key may be a data segment in the packet. The first key may also be a data segment in metadata. The metadata is stored in registers.
0083For example, there may be one or more first keys. The multiple keys are in a one-to-one correspondence to the multiple offsets. The multiple keys are in a one-to-one correspondence to the multiple lengths.
0084For example, the first key may come only from the packet, or may come only from the metadata. The first key may also come from the packet and the metadata.
0085For example, <b>106</b> may be performed by the search engine and an instruction execution circuit.
0086<b>108</b>: The forwarding element processes the packet according to the first instruction.
0087For example, the first instruction may be an instruction defined in the <i>OpenFlow Switch Specification </i>1.3.0 released by a standard setting organization (SSO), the Open Networking Foundation (ONF).
0088For example, <b>108</b> may be performed by a network processor (NP). Specifically, <b>108</b> may be performed by an instruction execution circuit in the NP.
0089In the foregoing technical solution, the forwarding element determines the first offset and the first length according to the inbound port. The forwarding element determines the first key according to the first offset and the first length. The forwarding element determines the first instruction according to the first key, to process the packet. Therefore, before processing the packet, the forwarding element does not need to interpret a data format of the packet, so that the forwarding element can flexibly support packets in different data formats. When needing to support a new data format, the forwarding element can process a packet in the data format without the need of updating hardware or software.
0090Optionally, in the method shown in <figref idref="DRAWINGS">FIG. 1</figref>, the determining, by the forwarding element, the first key according to the first offset and the first length includes:
0091<b>202</b>: The forwarding element acquires a first data segment in the packet, where a start position of the first data segment is determined according to the first offset, and a length of the first data segment is the first length.
0092<b>204</b>: The forwarding element determines the first data segment as the first key.
0093For details about <b>202</b> and <b>204</b>, refer to <figref idref="DRAWINGS">FIG. 2</figref>.
0094For example, that the start position of the first data segment is determined according to the first offset may specifically be that the start position of the first data segment may be identified by using a sum of a first base offset and the first offset, where the first base offset is 0.
0095In the foregoing technical solution, the first key comes from the packet.
0096Optionally, in the method shown in <figref idref="DRAWINGS">FIG. 1</figref>, the determining, by the forwarding element, the first key according to the first offset and the first length includes:
0097<b>302</b>: The forwarding element acquires a second data segment in metadata, where a start position of the second data segment is determined according to the first offset, and a length of the second data segment is the first length.
0098<b>304</b>: The forwarding element determines the second data segment as the first key.
0099For details about <b>302</b> and <b>304</b>, refer to <figref idref="DRAWINGS">FIG. 3</figref>.
0100For example, that the start position of the second data segment is determined according to the first offset may specifically be that the start position of the second data segment may be identified by using a sum of a second base offset and the first offset, where the second base offset is 0.
0101In the foregoing technical solution, the first key comes from the metadata.
0102Optionally, in the method shown in <figref idref="DRAWINGS">FIG. 1</figref>, the metadata is stored in registers of the forwarding element.
0103For example, the registers may be located in an NP.
0104Optionally, in the method shown in <figref idref="DRAWINGS">FIG. 1</figref>, the metadata is stored in a memory of the forwarding element.
0105For example, the memory may be coupled with the NP.
0106Optionally, in the method shown in <figref idref="DRAWINGS">FIG. 1</figref>, the first instruction is used to instruct the forwarding element to perform an operation, where the operation includes at least one of the following operations: modifying the packet, calculating a checksum of the packet, writing the metadata, reading the metadata, updating a counter, performing CAR processing on the packet, discarding the packet, sending the packet, and modifying a base offset of the packet.
0107For example, modifying the packet may be deleting a data segment in the packet, replacing a data segment in the packet, or inserting a data segment into the packet.
0108For example, the checksum may be an IP checksum, a Transmission Control Protocol (TCP) checksum, or a User Datagram Protocol (UDP) checksum.
0109Optionally, in the method shown in <figref idref="DRAWINGS">FIG. 1</figref>, the processing, by the forwarding element, the packet according to the first instruction includes:
0110<b>402</b>: The forwarding element determines a base offset, a second offset, a second length, an identifier of a second table according to the first table, where the base offset, the second offset, the second length, and the identifier of the second table correspond to the first key.
0111For example, the base offset is equal to the sum of the first base offset and the first offset.
0112<b>404</b>: The forwarding element determines a second key according to the base offset, the second offset, and the second length, searches for the second table according to the second key, and determines a second instruction.
0113For example, there may be one or more second keys. If there are multiple second keys, there are multiple base offsets, there are multiple second offsets, and there are multiple second lengths. The multiple base offsets are in a one-to-one correspondence to the multiple keys. The multiple second offsets are in a one-to-one correspondence to the multiple keys. The multiple second lengths are in a one-to-one correspondence to the multiple keys.
0114For example, the second key may come only from the packet, or may come only from the metadata. The second key may also come from the packet and the metadata.
0115<b>406</b>: The forwarding element processes the packet according to the second instruction.
0116For example, the second instruction may be an instruction defined in the <i>OpenFlow Switch Specification </i>1.3.0 released by the ONF.
0117For details about <b>402</b>, <b>404</b>, and <b>406</b>, refer to <figref idref="DRAWINGS">FIG. 4</figref>.
0118<figref idref="DRAWINGS">FIG. 5</figref> is a schematic structural diagram of a forwarding element according to an embodiment of the present invention. The forwarding element may be configured to perform the method shown in <figref idref="DRAWINGS">FIG. 1</figref>. For example, the forwarding element may be a router, a switch, a firewall, or a load balancer. Referring to <figref idref="DRAWINGS">FIG. 5</figref>, the forwarding element includes a receiving circuit <b>502</b>, a searching unit <b>504</b>, a determining unit <b>506</b>, and a processing unit <b>508</b>.
0119The receiving circuit <b>502</b> is configured to receive a packet through an inbound port.
0120For example, the packet may be an IP packet, an Ethernet packet, or an MPLS packet.
0121The searching unit <b>504</b> is configured to search for a port table according to the inbound port, and determine a first offset, a first length, and an identifier of a first table, where the first offset, the first length, and the identifier of the first table correspond to the inbound port.
0122For example, the first offset, the first length, and the identifier of the first table are stored in an entry of the port table matching the inbound port. There may be one or more first offsets. There may be one or more first lengths. The multiple offsets are in a one-to-one correspondence to the multiple lengths.
0123For example, the first table may be a MAC Protocol table, an ARP table, a FIB, or an MPLS label table.
0124For example, the searching unit <b>504</b> may be a search engine.
0125The determining unit <b>506</b> is configured to determine a first key according to the first offset and the first length, search for the first table according to the first key, and determine a first instruction.
0126For example, the first key may be a data segment in the packet. The first key may also be a data segment in metadata. The metadata is stored in registers.
0127For example, there may be one or more first keys. The multiple keys are in a one-to-one correspondence to the multiple offsets. The multiple keys are in a one-to-one correspondence to the multiple lengths.
0128For example, the first key may come only from the packet, or may come only from the metadata. The first key may also come from the packet and the metadata.
0129For example, the determining unit <b>506</b> may be a search engine and an instruction execution circuit.
0130The processing unit <b>508</b> is configured to process the packet according to the first instruction.
0131For example, the first instruction may be an instruction defined in the <i>OpenFlow Switch Specification </i>1.3.0 released by the ONF.
0132For example, the processing unit <b>508</b> may be an NP, and specifically, the processing unit <b>508</b> may be an instruction execution circuit in the NP.
0133In the foregoing technical solution, the forwarding element determines the first offset and the first length according to the inbound port. The forwarding element determines the first key according to the first offset and the first length. The forwarding element determines the first instruction according to the first key, to process the packet. Therefore, before processing the packet, the forwarding element does not need to interpret a data format of the packet, so that the forwarding element can flexibly support packets in different data formats. When needing to support a new data format, the forwarding element can process a packet in the data format without the need of updating hardware or software.
0134Optionally, in the forwarding element described in <figref idref="DRAWINGS">FIG. 5</figref>, the searching unit <b>504</b> is configured to:
0135acquire a first data seyinent in the packet, where a start position of the first data segment is determined according to the first offset, and a length of the first data segment is the first length; and
0136determine the first data segment as the first key.
0137For example, that the start position of the first data segment is determined according to the first offset may specifically be that the start position of the first data segment may be identified by using a sum of a first base offset and the first offset, where the first base offset is 0.
0138In the foregoing technical solution, the first key comes from the packet.
0139Optionally, in the forwarding element described in <figref idref="DRAWINGS">FIG. 5</figref>, the searching unit <b>504</b> is configured to:
0140acquire a second data segment in metadata, where a start position of the second data segment is determined according to the first offset, and a length of the second data segment is the first length; and
0141determine the second data segment as the first key.
0142For example, that the start position of the second data segment is determined according to the first offset may specifically be that the start position of the second data segment may be identified by using a sum of a second base offset and the first offset, where the second base offset is 0.
0143In the foregoing technical solution, the first key comes from the metadata.
0144Optionally, the forwarding element described in <figref idref="DRAWINGS">FIG. 5</figref> further includes registers or a memory.
0145The metadata is stored in the registers or the memory.
0146Optionally, in the forwarding element described in <figref idref="DRAWINGS">FIG. 5</figref>, the first instruction is used to instruct the forwarding element to perform an operation, where the operation includes at least one of the following operations: modifying the packet, calculating a checksum of the packet, writing the metadata, reading the metadata, updating a counter, performing CAR processing on the packet, discarding the packet, sending the packet, and modifying a base offset of the packet.
0147For example, modifying the packet may be deleting a data segment in the packet, replacing a data segment in the packet, or inserting a data segment into the packet.
0148For example, the checksum may be an IP checksum, a Transmission Control Protocol TCP checksum, or a UDP checksum.
0149Optionally, in the forwarding element described in <figref idref="DRAWINGS">FIG. 5</figref>, the processing unit <b>508</b> is configured to:
0150determine a base offset of the packet, a second offset, a second length, an identifier of a second table according to the first table, where the base offset of the packet, the second offset, the second length, and the identifier of the second table correspond to the first key;
0151determine a second key according to the base offset of the packet, the second offset, and the second length, search for the second table according to the second key, and determine a second instruction; and
0152process the packet according to the second instruction.
0153For example, the base offset is equal to the sum of the first base offset and the first offset.
0154For example, there may be one or more second keys. If there are multiple second keys, there are multiple base offsets, there are multiple second offsets, and there are multiple second lengths. The multiple base offsets are in a one-to-one correspondence to the multiple keys. The multiple second offsets are in a one-to-one correspondence to the multiple keys. The multiple second lengths are in a one-to-one correspondence to the multiple keys.
0155For example, the second key may come only from the packet, or may come only from the metadata. The second key may also come from the packet and the metadata.
0156For example, the second instruction may be an instruction defined in the <i>OpenFlow Switch Specification </i>1.3.0 released by the ONF.
0157<figref idref="DRAWINGS">FIG. 6</figref> is a schematic structural diagram of a forwarding element according to an embodiment of the present invention. The forwarding element may be configured to perform the method shown in <figref idref="DRAWINGS">FIG. 1</figref>. For example, the forwarding element may be a router, a switch, a firewall, or a load balancer. Referring to <figref idref="DRAWINGS">FIG. 6</figref>, the forwarding element includes: an interface circuit <b>601</b>, an interface circuit <b>602</b>, a memory <b>603</b>, a search engine <b>604</b>, and a processor <b>609</b>. The processor <b>609</b> includes an instruction execution circuit <b>605</b> and an instruction memory <b>607</b>. Optionally, the processor <b>609</b> may include registers <b>606</b> and a data memory <b>608</b>.
0158The receiving circuit <b>601</b> is configured to receive a packet through an inbound port.
0159The processor <b>609</b> is coupled with the receiving circuit <b>601</b>, the processor <b>609</b> is coupled with the memory <b>603</b>, and the processor <b>609</b> includes the instruction execution circuit <b>605</b> and the instruction memory <b>607</b>, where the instruction execution circuit <b>605</b> is coupled with the instruction memory <b>607</b>, the instruction memory <b>607</b> is configured to store a computer instruction, and the instruction execution circuit <b>605</b> performs the following actions by reading the computer instruction:
0160triggering the search engine <b>604</b>, so that the search engine <b>604</b> searches for a port table according to the inbound port, and determines a first offset, a first length, and an identifier of a first table, where the first offset, the first length, and the identifier of the first table correspond to the inbound port, and the port table is stored in the memory <b>603</b>;
0161determining a first key according to the first offset and the first length;
0162triggering the search engine <b>604</b>, so that the search engine <b>604</b> searches for the first table according to the first key, and determines a first instruction; and
0163processing the packet according to the first instruction.
0164For example, the processor <b>609</b> may be coupled with the memory <b>603</b> by using a crossbar. The processor <b>609</b> may be coupled with the search engine <b>604</b> by using the crossbar.
0165For example, the packet may be an IP packet, an Ethernet packet, or an MPLS packet.
0166For example, the first offset, the first length, and the identifier of the first table are stored in an entry of the port table matching the inbound port. There may be one or more first offsets. There may be one or more first lengths. The multiple offsets are in a one-to-one correspondence to the multiple lengths.
0167<figref idref="DRAWINGS">FIG. 7</figref> is a schematic diagram of a format of an entry of the port table. An inbound port <b>701</b>, a first offset <b>702</b>, a first length <b>703</b>, and an identifier <b>704</b> of a first table in <figref idref="DRAWINGS">FIG. 7</figref> respectively correspond to the inbound port, the first offset, the first length, and the identifier of the first table.
0168For example, the first table may be a MAC Protocol table, an ARP table, a FIB, or an MPLS label table.
0169For example, the first key may be a data segment in the packet. The first key may also be a data segment in metadata. The metadata is stored in the registers.
0170For example, there may be one or more first keys. The multiple keys are in a one-to-one correspondence to the multiple offsets. The multiple keys are in a one-to-one correspondence to the multiple lengths.
0171For example, the first key may come only from the packet, or may come only from the metadata. The first key may also come from the packet and the metadata.
0172For example, the first instruction may be an instruction defined in the <i>OpenFlow Switch Specification </i>1.3.0 released by the ONF.
0173In the foregoing technical solution, the forwarding element determines the first offset and the first length according to the inbound port. The forwarding element determines the first key according to the first offset and the first length. The forwarding element determines the first instruction according to the first key, to process the packet. Therefore, before processing the packet, the forwarding element does not need to interpret a data format of the packet, so that the forwarding element can flexibly support packets in different data formats. When needing to support a new data format, the forwarding element can process a packet in the data format without the need of updating hardware or software.
0174Optionally, in the forwarding element shown in <figref idref="DRAWINGS">FIG. 6</figref>, the search engine <b>604</b> is further configured to acquire a first data segment in the packet, where a start position of the first data segment is determined according to the first offset, and a length of the first data segment is the first length.
0175The instruction execution circuit <b>605</b> is further configured to determine the first data segment as the first key.
0176The processor further includes the data memory <b>608</b>, where the data memory <b>608</b> is coupled with the instruction execution circuit <b>605</b>, and the packet is stored in the data memory <b>608</b>.
0177For example, that the start position of the first data segment is determined according to the first offset may specifically be that the start position of the first data segment may be identified by using a sum of a first base offset and the first offset, where the first base offset is 0.
0178In the foregoing technical solution, the first key comes from the packet.
0179Optionally, in the forwarding element shown in <figref idref="DRAWINGS">FIG. 6</figref>, the search engine <b>604</b> is further configured to acquire a second data segment in metadata, where a start position of the second data segment is determined according to the first offset, and a length of the second data segment is the first length.
0180The instruction execution circuit <b>605</b> is further configured to determine the second data segment as the first key.
0181For example, that the start position of the second data segment is determined according to the first offset may specifically be that the start position of the second data segment may be identified by using a sum of a second base offset and the first offset, where the second base offset is 0.
0182In the foregoing technical solution, the first key comes from the metadata.
0183Optionally, in the forwarding element shown in <figref idref="DRAWINGS">FIG. 6</figref>, the processor <b>609</b> further includes the registers <b>606</b>, where the registers <b>606</b> are coupled with the instruction execution circuit <b>605</b>, and the metadata is stored in the registers <b>606</b>.
0184Optionally, in the forwarding element shown in <figref idref="DRAWINGS">FIG. 6</figref>, the metadata is stored in the memory <b>603</b>.
0185Optionally, in the forwarding element shown in <figref idref="DRAWINGS">FIG. 6</figref>, the first instruction is used to instruct the instruction execution circuit to perform an operation, where the operation includes at least one of the following operations: modifying the packet, calculating a checksum of the packet, writing the metadata, reading the metadata, updating a counter, performing CAR processing on the packet, discarding the packet, sending the packet, and modifying a base offset of the packet.
0186For example, modifying the packet may be deleting a data segment in the packet, replacing a data segment in the packet, or inserting a data segment into the packet.
0187For example, the checksum may be an IP checksum, a TCP checksum, or a UDP checksum.
0188For example, the packet may be sent by the interface circuit <b>602</b>.
0189Optionally, in the forwarding element shown in <figref idref="DRAWINGS">FIG. 6</figref>, the instruction execution circuit <b>605</b> is further configured to:
0190determine a base offset of the packet, a second offset, a second length, an identifier of a second table according to the first table, where the base offset of the packet, the second offset, the second length, and the identifier of the second table correspond to the first key;
0191the instruction execution circuit <b>605</b> is further configured to:
0192determine a second key according to the base offset of the packet, the second offset, and the second length.
0193The instruction execution circuit <b>605</b> is further configured to trigger the search engine <b>604</b>, so that the search engine <b>604</b> searches for the second table according to the second key, and determines a second instruction.
0194The instruction execution circuit <b>605</b> is further configured to process the packet according to the second instruction.
0195For example, the base offset is equal to the sum of the first base offset and the first offset.
0196For example, there may be one or more second keys. If there are multiple second keys, there are multiple base offsets, there are multiple second offsets, and there are multiple second lengths. The multiple base offsets are in a one-to-one correspondence to the multiple keys. The multiple second offsets are in a one-to-one correspondence to the multiple keys. The multiple second lengths are in a one-to-one correspondence to the multiple keys.
0197For example, the second key may come only from the packet, or may come only from the metadata. The second key may also come from the packet and the metadata.
0198For example, the second instruction may be an instruction defined in the <i>OpenFlow Switch Specification </i>1.3.0 released by the ONF.
0199For example, an entry of the second table includes the second key and the second instruction. <figref idref="DRAWINGS">FIG. 8</figref> is a schematic diagram of a format of the entry of the second table. A second key <b>801</b> and a second instruction <b>802</b> in <figref idref="DRAWINGS">FIG. 8</figref> respectively correspond to the second key and the second instruction.
0200A person of ordinary skill in the art may be aware that, in combination with the examples described in the embodiments disclosed in this specification, units and algorithm steps may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of the present invention.
0201It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working process of the foregoing system, apparatus, and unit, reference may be made to a corresponding process in the foregoing method embodiments, and details are not described herein again.
0202In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the described apparatus embodiment is merely exemplary. For example, the unit division is merely logical function division and may be other division in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.
0203The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. A part or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
0204In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.
0205When the functions are implemented in the form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of the present invention essentially, or the part contributing to the prior art, or a part of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or a part of the steps of the methods described in the embodiments of the present invention. The foregoing storage medium includes: any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc.
0206The foregoing descriptions are merely specific implementation manners of the present invention, but are not intended to limit the protection scope of the present invention. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present invention shall fall within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Contents6
6 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| EP0993162A2 | Cites | European Patent Office (EPO) | Applicant |
| CN101047649A | Cites | China | Applicant |
| CN101267331A | Cites | China | Applicant |
| CN101471923A | Cites | China | Applicant |
| CN101989954A | Cites | China | Applicant |
| CN102143074A | Cites | China | Applicant |
| CN102333039A | Cites | China | Applicant |
| CN102780619A | Cites | China | Applicant |
| EP1168710A2 | Cites | European Patent Office (EPO) | Applicant |
| EP1533956A2 | Cites | European Patent Office (EPO) | Applicant |
| JP2000156713A | Cites | Japan | Applicant |
| JP2001517024A | Cites | Japan | Applicant |
| US2003223364A1 | Cites | United States of America | Search report |
| US2006212426A1 | Cites | United States of America | Search report |
| US2006262583A1 | Cites | United States of America | Search report |
| US2010268952A1 | Cites | United States of America | Search report |
| US2012131046A1 | Cites | United States of America | Applicant |
| WO9914906A1 | Cites | World Intellectual Property Organization (WIPO) | Applicant |
| US20030223364A1 | Cites | United States of America | Search report |
| US20060212426A1 | Cites | United States of America | Search report |
| US20060262583A1 | Cites | United States of America | Search report |
| US20100268952A1 | Cites | United States of America | Search report |
| US20120131046A1 | Cites | United States of America | Applicant |
| EP993162A2 | Cites | European Patent Office (EPO) | Applicant |
| EP1168710A2 | Cites | European Patent Office (EPO) | Applicant |
| EP1533956A2 | Cites | European Patent Office (EPO) | Applicant |
| JP2000156713A | Cites | Japan | Applicant |
| JP2001517024A | Cites | Japan | Applicant |
| WO9914906A1 | Cites | World Intellectual Property Organization (WIPO) | Applicant |
| “OpenFlow Switch Specification, Version1.3.0 (Wire Protocol 0×04)”, Apr. 16, 2012, 105 pages. | Non-patent | – | Applicant |
| “OpenFlow Switch Specification, Version1.3.0 (Wire Protocol 0×04)”, Apr. 16, 2012, 105 pages. | Non-patent | – | Applicant |
17 members in 6 offices
Priority claims1
| Document | Office | Kind | Date |
|---|---|---|---|
| 2013071088 | China | W |
Members17
| Document | Office | Kind | |
|---|---|---|---|
| WO2014117327A1 | World Intellectual Property Organization (WIPO) | A1 | |
| CN104205742A | China | A | |
| EP2942913A1 | European Patent Office (EPO) | A1 | |
| US2015334055A1 | United States of America | A1 | |
| EP2942913A4 | European Patent Office (EPO) | A4 | |
| JP2016506217A | Japan | A | |
| JP6070863B2 | Japan | B2 | |
| CN104205742B | China | B | |
| CN106850442A | China | A | |
| EP2942913B1 | European Patent Office (EPO) | B1 | |
| US9749262B2This record | United States of America | B2 | |
| EP3255844A1 | European Patent Office (EPO) | A1 | |
| CN106850442B | China | B | |
| EP3255844B1 | European Patent Office (EPO) | B1 | |
| ES2766861T3 | Spain | T3 | |
| EP3687123A1 | European Patent Office (EPO) | A1 | |
| EP3687123B1 | European Patent Office (EPO) | B1 |
64 transactions on the USPTO file
Allowed after 1 non-final rejection.
- Non-final rejections
- 1
- Final rejections
- 0
- RCEs
- 0
- Appeals
- 0
Over time
Point at a mark for the transactionTransactions
| Event | Code | |
|---|---|---|
| Expire PatentEXP. | EXP. | |
| Maintenance Fee Reminder MailedREM. | REM. | |
| Payment of Maintenance Fee, 4th Year, Large EntityM1551 | M1551 | |
| Mail Pub Notice re 312 amendmentMM327-G | MM327-G | |
| Post Issue Communication - Certificate of Correction DeniedCDEN | CDEN | |
| Post issue other communication to applicant- certificate of correctionM327-G | M327-G | |
| Post Issue Communication - Certificate of CorrectionN423 | N423 | |
| Mail Pub Notice re 312 amendmentMM327-G | MM327-G | |
| Post issue other communication to applicant- certificate of correctionM327-G | M327-G | |
| Post Issue Communication - Certificate of Correction DeniedCDEN | CDEN | |
| Recordation of Patent Grant MailedPGM/ | PGM/ | |
| Patent Issue Date Used in PTA CalculationAllowedPTAC | PTAC | |
| Email NotificationEML_NTR | EML_NTR | |
| Issue Notification MailedAllowedWPIR | WPIR | |
| Dispatch to FDCD1935 | D1935 | |
| Application Is Considered Ready for IssuePILS | PILS | |
| Issue Fee Payment VerifiedN084 | N084 | |
| Issue Fee Payment ReceivedIFEE | IFEE | |
| Electronic ReviewELC_RVW | ELC_RVW | |
| Email NotificationEML_NTF | EML_NTF | |
| Mail Notice of AllowanceAllowedMN/=. | MN/=. | |
| Notice of Allowance Data Verification CompletedAllowedN/=. | N/=. | |
| Reasons for AllowanceEX.R | EX.R | |
| Date Forwarded to ExaminerFWDX | FWDX | |
| Response after Non-Final ActionA... | A... | |
| Email NotificationEML_NTR | EML_NTR | |
| Change in Power of Attorney (May Include Associate POA)PA.. | PA.. | |
| Correspondence Address ChangeC.AD | C.AD | |
| Electronic ReviewELC_RVW | ELC_RVW | |
| Email NotificationEML_NTF | EML_NTF | |
| Mail Non-Final RejectionNon-final rejectionMCTNF | MCTNF | |
| Non-Final RejectionNon-final rejectionCTNF | CTNF | |
| Information Disclosure Statement consideredIDSC | IDSC | |
| Information Disclosure Statement consideredIDSC | IDSC | |
| Information Disclosure Statement consideredIDSC | IDSC | |
| Information Disclosure Statement consideredIDSC | IDSC | |
| Case Docketed to Examiner in GAUDOCK | DOCK | |
| Reference capture on IDSRCAP | RCAP | |
| Information Disclosure Statement (IDS) FiledM844 | M844 | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Reference capture on IDSRCAP | RCAP | |
| Information Disclosure Statement (IDS) FiledM844 | M844 | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Information Disclosure Statement (IDS) FiledM844 | M844 | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Email NotificationEML_NTR | EML_NTR | |
| Application ready for PDX access by participating foreign officesCCRDY | CCRDY | |
| PG-Pub Issue NotificationPG-ISSUE | PG-ISSUE | |
| Reference capture on IDSRCAP | RCAP | |
| Information Disclosure Statement (IDS) FiledM844 | M844 | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Case Docketed to Examiner in GAUDOCK | DOCK | |
| Application Dispatched from OIPEOIPE | OIPE | |
| Email NotificationEML_NTR | EML_NTR | |
| Application Is Now CompleteCOMP | COMP | |
| Filing ReceiptFLRCPT.O | FLRCPT.O | |
| Sent to Classification ContractorPGPC | PGPC | |
| FITF set to NO - revise initial settingFTFI | FTFI | |
| Cleared by OIPE CSRL194 | L194 | |
| Patent Term Adjustment - Ready for ExaminationPTA.RFE | PTA.RFE | |
| Applicants have given acceptable permission for participating foreignAPPERMS | APPERMS | |
| IFW Scan & PACR Auto Security ReviewSCAN | SCAN | |
| Entity Status Set To Undiscounted (Initial Default Setting or Status Change)BIG. | BIG. | |
| Initial Exam Team nnIEXX | IEXX |
8 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Lapsed due to failure to pay maintenance feeLapsedFP | FP | |
| Lapse for failure to pay maintenance feesLapsedPATENT EXPIRED FOR FAILURE TO PAY MAINTENANCE FEES (ORIGINAL EVENT CODE: EXP.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITYLAPS | LAPS | |
| Information on status: patent discontinuationPATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362STCH | STCH | |
| Fee payment procedureMAINTENANCE FEE REMINDER MAILED (ORIGINAL EVENT CODE: REM.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITYFEPP | FEPP | |
| Maintenance fee paymentMAFP | MAFP | |
| Certificate of correctionCC | CC | |
| Information on status: patent grantGrantedPATENTED CASESTCF | STCF | |
| AssignmentAS | AS |
Numbers
- Publication
- 9749262
- Application
- 14811611
Titles
- English
- Packet processing method and forwarding element
Patent term adjustment
- A delay
- +196 daysthe office missed an examination deadline
- Net adjustment
- 196 days
Classification
- CPC, 3
- H04L49/3009
- H04L45/54
- H04L45/745
- IPC, 6
- H04L12 935
- H04L12 741
- H04L45 74
- H04L45 745
- H04L47 43
- H04L49 111