# US 2015/0146718 A1 · Method, apparatus and system for processing data packet

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2015/0146718 A1
- Document ID: US20150146718A1
- Status: Published application
- Kind: A1
- Application number: 14/611,470
- Filed: 2015-02-02
- Published: 2015-05-28
- Earliest claimed: 2012-08-02
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Yan WANG; Weihua HU
- Web page: https://patentgrep.com/patent/US20150146718A1

## CPC

- H04L 47/2483: involving identification of individual flows
- H04L 45/38: {Flow based routing}
- H04L 45/52: Multiprotocol routers
- H04L 45/70: {Routing based on monitoring results}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The disclosure provides a method, apparatus and system. The method includes: matching a data packet with match field information of a flow entry, the flow entry including the match field information and operation field information; wherein the operation field information includes an operation type and first bit field indication information which includes a first offset and a first field length and is used for indicating the first bit field of the data packet, or the match field information includes second bit field indication information and a match value, the second bit field indication information includes a second offset and a second field length, and the second bit field indication information is used for indicating the second bit field of the data packet; performing, if the data packet is successfully matched with the match field information, an operation on the data packet according to the operation field information.

## Claims

### Claim 1

A method for processing a data packet, comprising:
matching a data packet with match field information of a flow entry, the flow entry comprising the match field information and operation field information; wherein the operation field information comprises an operation type and first bit field indication information, the first bit field indication information comprises a first offset and a first field length, and the first bit field indication information indicates a first bit field of the data packet, or the match field information comprises second bit field indication information and a match value, the second bit field indication information comprises a second offset and a second field length, and the second bit field indication information indicates a second bit field of the data packet; and
performing, if the data packet is successfully matched with the match field information, an operation on the data packet according to the operation field information.

### Claim 2 (depends on 1)

The method of claim 1, wherein when the operation field information comprises the operation type and the first bit field indication information, the performing the operation on the data packet according to the operation field information, comprises:
determining the first bit field of the data packet according to the first bit field indication information; and
performing the operation on the first bit field according to the operation type.

### Claim 3 (depends on 1)

The method of claim 1, wherein when the operation field information comprises the operation type and the first bit field indication information, the first bit field indication information further comprises a first mask, and the performing the operation on the data packet according to the operation field information, comprises:
determining the first bit field of the data packet according to the first bit field indication information;
acquiring at least one bit of the first bit field according to the first mask; and
performing the operation on the at least one bit of the first bit field according to the operation type.

### Claim 4 (depends on 1)

The method of claim 1, wherein when the match field information comprises the second bit field indication information and the match value, the matching the data packet with the match field information of the flow entry comprises:
determining the second bit field of the data packet according to the second bit field indication information; and
matching the second bit field according to the match value.

### Claim 5 (depends on 1)

The method of claim 1, wherein when the match field information comprises the second bit field indication information and the match value, the second bit field indication information further comprises a second mask, and the matching the data packet with the match field information of the flow entry comprises:
determining the second bit field of the data packet according to the second bit field indication information;
acquiring at least one bit of the second bit field according to the second mask; and
matching the at least one bit of the second bit field according to the match value.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
receiving a flow entry addition indication message sent by a control device, wherein the flow entry addition indication message comprises the match field information and the operation field information; and
generating the flow entry according to the match field information and the operation field information.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
receiving a flow entry modification indication message sent by a control device, wherein the flow entry modification indication message comprises the match field information and new operation field information; and
modifying the flow entry according to the match field information and the new operation field information.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
receiving a feature request message sent by a control device, wherein the feature request message is used for inquiring whether the operation field information or the match field information is supported; and
sending a feature response message to the control device, wherein the feature response message indicates that the operation field information or the match field information is supported.

### Claim 9

Apparatus for processing a data packet, comprising:
a processor, configured to match a data packet with match field information of a flow entry; the flow entry comprising the match field information and operation field information; wherein the operation field information comprises an operation type and first bit field indication information, the first bit field indication information comprises a first offset and a first field length, and the first bit field indication information indicates a first bit field of the data packet, or the match field information comprises second bit field indication information and a match value, the second bit field indication information comprises a second offset and a second field length, and the second bit field indication information indicates a second bit field of the data packet; and
the processor is further configured to perform, if the data packet is successfully matched with the match field information, an operation on the data packet according to the operation field information.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein when the operation field information comprises the operation type and the first bit field indication information, the processor is configured to, if the data packet is successfully matched with the match field information, determine the first bit field of the data packet according to the first bit field indication information, and perform the operation on the first bit field according to the operation type.

### Claim 11 (depends on 9)

The apparatus of claim 9, wherein when the operation field information comprises the operation type and the first bit field indication information, the first bit field indication information further comprises a first mask, and the processor is configured to, if the data packet is successfully matched with the match field information, determine the first bit field of the data packet according to the first bit field indication information, acquire at least one bit of the first bit field according to the first mask, and perform the operation on the at least one bit of the first bit field according to the operation type.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein when the operation field information further comprises an operand, and the processor is configured to, if the data packet is successfully matched with the match field information, determine the first bit field of the data packet according to the first bit field indication information, and perform the operation on the first bit field and the operand according to the operation type.

### Claim 13 (depends on 9)

The apparatus of claim 9, wherein when the match field information comprises the second bit field indication information and the match value, the processor is configured to determine the second bit field of the data packet according to the second bit field indication information, and match the second bit field according to the match value.

### Claim 14 (depends on 9)

The apparatus of claim 9, wherein when the match field information comprises the second bit field indication information and the match value, the second bit field indication information further comprises a second mask, the processor is configured to determine the second bit field of the data packet according to the second bit field indication information, acquire at least one bit of the second bit field according to the second mask, and match the at least one bit of the second bit field according to the match value.

### Claim 15 (depends on 9)

The apparatus of claim 9, wherein the operation type comprises a pop operation type, a push operation type, a Set-value operation type, a Calculate-Length operation type, a Calculate-Checksum operation type, a Verify-Checksum operation type, an increment operation type, a decrement operation type or a copy operation type.

### Claim 16 (depends on 9)

The apparatus of claim 9, further comprising:
a network interface, configured to receive a flow entry addition indication message sent by a control device, wherein the flow entry addition indication message comprises the match field information and the operation field information; and
the processor is further configured to generate the flow entry according to the match field information and the operation field information.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein
the network interface is further configured to receive a feature request message sent by a control device, wherein the feature request message queries whether the operation field information or the match field information is supported; and
the network interface is further configured to send a feature response message to the control device, wherein the feature response message indicates that the operation field information or the match field information is supported.

### Claim 18

Apparatus for processing a data packet, comprising:
a processor configured to generate a flow entry addition indication message, the flow entry addition indication message comprising match field information and operation field information; wherein the operation field information comprises an operation type and first bit field indication information, the first bit field indication information comprises a first offset and a first field length, and the first bit field indication information indicates a first bit field of the data packet, or the match field information comprises second bit field indication information and a match value, the second bit field indication information comprises a second offset and a second field length, and the second bit field indication information indicates a second bit field of the data packet; and
a network interface, configured to send the flow entry addition indication message to a switching device, to enable the switching device to generate a flow entry according to the flow entry addition indication message and process the data packet according to the flow entry.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein
the processor is further configured to generate a flow entry modification indication message, wherein the flow entry modification indication message comprises the match field information and new operation field information; and
the network interface is further configured to send the flow entry modification indication message to the switching device, to enable the switching device to modify the flow entry corresponding to the match field information according to the match field information and the new operation field information.

### Claim 20 (depends on 18)

The apparatus of claim 18, wherein
the network interface is further configured to send a feature request message to the switching device, wherein the feature request message queries whether the match field information or the operation field information is supported; and
the network interface is further configured to receive a feature response message sent by the switching device, wherein the feature response message indicates that the match field information or the operation field information is supported.
