# US 2021/0176345 A1 · Flexible Parser in a Networking Device

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

- Number: US 2021/0176345 A1
- Document ID: US20210176345A1
- Status: Published application
- Kind: A1
- Application number: 16/708,470
- Filed: 2019-12-10
- Published: 2021-06-10
- Earliest claimed: 2019-12-10
- Assignees: Mellanox Technologies, Ltd.
- Applicants: Mellanox Technologies, Ltd.
- Inventors: Avi Urman; Lior Narkis; Noam Bloch
- Web page: https://patentgrep.com/patent/US20210176345A1

## CPC

- H04L 69/22: Parsing or analysis of headers
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- H04L 12/4641: {Virtual LANs, VLANs, e.g. virtual private networks [VPN] (LAN interconnection over a bridge based backbone H04L12/462; encapsulation techniques H04L12/4633; routing of packets H04L45/00; packet switches H04L49/00; virtual private networks for security H04L63/0272)}
- H04L 41/24: {using dedicated network management hardware}
- H04L 67/568: Storing data temporarily at an intermediate stage, e.g. caching
- G06F 2009/45595: {Network integration; Enabling network access in virtual machine instances}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

One embodiment includes a network device, including hardware parsers to receive data of a header section of a packet, the header section including respective headers, parser configuration registers to store a default parsing configuration data set, wherein at least one of the hardware parsers is configured to parse at least one of the headers responsively to the default parsing configuration data set, yielding first parsed data, a packet processing engine to select a selected parsing configuration data set from a selection of parsing configuration data sets responsively to the first parsed data, cause loading of the selected parsing configuration data set into the parser configuration registers, and wherein ones of the hardware parsers are configured to parse respective ones of the headers responsively to the selected parsing configuration data set, yielding second parsed data, and process the packet responsively to the second parsed data.

## Claims

### Claim 1

A network device, comprising:
hardware parsers coupled to receive data of a header section of a packet, the header section including respective headers;
parser configuration registers configured to store a default parsing configuration data set, wherein at least one of the hardware parsers is configured to parse at least one of the headers responsively to the default parsing configuration data set, yielding first parsed data;
a packet processing engine coupled to the hardware parsers, and configured to:
select a parsing configuration data set from a selection of parsing configuration data sets responsively to the first parsed data;
cause loading of the selected parsing configuration data set into the parser configuration registers, and wherein ones of the hardware parsers are configured to parse respective ones of the headers responsively to the selected parsing configuration data set, yielding second parsed data; and
process the packet responsively to the second parsed data.

### Claim 2 (depends on 1)

The device according to claim 1, further comprising an interface configured as an egress port, wherein the packet processing engine is configured to forward the packet via the egress port to a network node in a packet data network responsively to the second parsed data.

### Claim 3 (depends on 1)

The device according to claim 1, wherein the packet processing engine is configured to change data in the header section responsively to the second parsed data.

### Claim 4 (depends on 1)

The device according to claim 1, further comprising a cache memory configured to cache the selection of parsing configuration data sets including the selected parsing configuration data set, the packet processing engine being configured to cause loading of the selected parsing configuration data set from the cache memory into the parser configuration registers.

### Claim 5 (depends on 1)

The device according to claim 1, wherein:
the hardware parsers are configured to parse header sections of respective virtual network functions (VNFs) having respective header parsing schemes responsively to respective ones of the selection of parsing configuration data sets;
the packet processing engine is configured to select the selected parsing configuration data set from the selection of parsing configuration data sets responsively to the first parsed data being identified as associated with one of the VNFs;
ones of the hardware parsers are configured to parse respective ones of the headers in accordance with one of the header parsing schemes of the one VNF responsively to the selected parsing configuration data set; and
the packet processing engine is configured to forward the packet responsively to the second parsed data.

### Claim 6 (depends on 5)

The device according to claim 5, wherein respective ones of the VNFs include at least one virtual machine.

### Claim 7 (depends on 6)

The device according to claim 6, wherein the packet processing engine is configured to forward the packet to a virtual machine responsively to the second parsed data.

### Claim 8 (depends on 6)

The device according to claim 6, wherein the packet processing engine is configured to identify the one VNF from a network address included in the first parsed data.

### Claim 9 (depends on 1)

The device according to claim 1, wherein respective ones of the hardware parsers are configured to successively parse the header section according to respective offsets in the header section, ones of the hardware parsers being configured to compute the respective offsets responsively to the selected parsing configuration data and the header section.

### Claim 10 (depends on 9)

The device according to claim 9, wherein the selected parsing configuration data set includes for respective ones of the hardware parsers: a next header offset of a next header identification (ID) in the header section; and a next protocol table linking next header IDs with next protocols, wherein a first one of the hardware parsers is coupled to:
retrieve the next header offset for the first hardware parser from the selected parsing configuration data set in the parser configuration registers;
retrieve the next header ID, which is located in the header section at the next header offset, from the header section responsively to the retrieved next header offset;
retrieve an identification of a next protocol to be processed from the next protocol table for the first hardware parser from the selected parsing configuration data set in the parser configuration registers responsively to the retrieved next header ID; and
transfer the header section to a second one of the hardware parsers, which is configured to parse the header section in accordance with the next protocol.

### Claim 11 (depends on 9)

The device according to claim 9, wherein the selected parsing configuration data set includes for respective ones of the hardware parsers, at least one data extraction offset in the header section for which data is to be extracted, a first one of the hardware parsers being configured to extract data from the header section responsively to the at least one data extraction offset of the first hardware parser in the selected parsing configuration data set.

### Claim 12

A network method, comprising:
receiving data of a header section of a packet, the header section including respective headers;
storing a default parsing configuration data set in parser configuration registers;
parsing at least one of the headers responsively to the default parsing configuration data set, yielding first parsed data;
selecting a selected parsing configuration data set from a selection of parsing configuration data sets responsively to the first parsed data;
causing loading of the selected parsing configuration data set into the parser configuration registers;
parsing respective ones of the headers responsively to the selected parsing configuration data set, yielding second parsed data; and
processing the packet responsively to the second parsed data.

### Claim 13 (depends on 12)

The method according to claim 12, further comprising forwarding the packet via an egress port to a network node in a packet data network responsively to the second parsed data.

### Claim 14 (depends on 12)

The method according to claim 12, further comprising changing data in the header section responsively to the second parsed data.

### Claim 15 (depends on 12)

The method according to claim 12, further comprising: caching the selection of parsing configuration data sets including the selected parsing configuration data set in a cache memory; and cause loading of the selected parsing configuration data set from the cache memory into the parser configuration registers.

### Claim 16 (depends on 12)

The method according to claim 12, further comprising:
parsing header sections of respective virtual network functions (VNFs) having respective header parsing schemes responsively to respective ones of the selection of parsing configuration data sets;
selecting the selected parsing configuration data set from the selection of parsing configuration data sets responsively to the first parsed data being identified as associated with one of the VNFs;
parsing respective ones of the headers in accordance with one of the header parsing schemes of the one VNF responsively to the selected parsing configuration data set; and
forwarding the packet responsively to the second parsed data.

### Claim 17 (depends on 16)

The method according to claim 16, wherein respective ones of the VNFs include at least one virtual machine.

### Claim 18 (depends on 17)

The method according to claim 17, further comprising forwarding the packet to a virtual machine responsively to the second parsed data.

### Claim 19 (depends on 17)

The method according to claim 17, further comprising identifying the one VNF from a network address included in the first parsed data.

### Claim 20 (depends on 12)

The method according to claim 12, further comprising:
successively parsing the header section according to respective offsets in the header section; and
computing the respective offsets responsively to the selected parsing configuration data set and the header section.

### Claim 21 (depends on 20)

The method according to claim 20, wherein the selected parsing configuration data set includes: a next header offset of a next header identification (ID) in the header section; and a next protocol table linking next header IDs with next protocols, the method further comprising:
retrieving the next header offset from the selected parsing configuration data set;
retrieving the next header ID, which is located in the header section at the next header offset, from the header section responsively to the retrieved next header offset;
retrieving an identification of a next protocol to be processed from the next protocol table from the selected parsing configuration data set responsively to the retrieved next header ID; and
parsing the header section in accordance with the next protocol.

### Claim 22 (depends on 20)

The method according to claim 20, wherein the selected parsing configuration data set includes at least one data extraction offset in the header section for which data is to be extracted, the method further comprising extracting data from the header section responsively to the at least one data extraction offset of the first hardware parser in the selected parsing configuration data set.
