IP Library Granted Patent US 11,050,859
Granted Patent B2
US 11,050,859 · App. 15/457,970 · Granted Jun 29, 2021

Method of using bit vectors to allow expansion and collapse of header layers within packets for enabling flexible modifications and an apparatus thereof

Inventors: Chirinjeev Singh (San Jose, CA); Tsahi Daniel (Palo Alto, CA); Gerald Schmidt (San Jose, CA)
Assignee: MARVELL ASIA PTE, LTD.
H04L69/22H04L49/3009H04L69/04H04L69/08
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,050,859
App. No.
15/457,970
Granted
Jun 29, 2021
Kind
B2
Abstract

Embodiments of the apparatus for modifying packet headers relate to a use of bit vectors to allow expansion and collapse of protocol headers within packets for enabling flexible modification. A rewrite engine expands each protocol header into a generic format and applies various commands to modify the generalized protocol header. The rewrite engine maintains a bit vector for the generalized protocol header with each bit in the bit vector representing a byte of the generalized protocol header. A bit marked as 0 in the bit vector corresponds to an invalid byte, while a bit marked as 1 in the bit vector corresponds to a valid byte. The rewrite engine uses the bit vector to remove all the invalid bytes after all commands have been operated on the generalized protocol header to thereby form a new protocol header.

Claims (35)

1. A method of a network device, the method comprising:

for each protocol of a plurality of protocols:

maintaining a generic protocol layer format associated with the protocol; and

maintaining a set of one or more generic commands associated with the protocol;

receiving a packet having a header including a plurality of protocol layers; and

for at least one protocol layer of the plurality of protocol layers:

converting the protocol layer to the generic protocol layer format associated with the protocol of the protocol layer by adding one or more fields to the protocol layer increasing a size of the protocol layer, wherein the one or more fields added to the protocol layer are dependent on the protocol of the protocol layer; and

modifying the protocol layer as converted using the set of generic commands associated with the protocol of the protocol layer regardless of which variant of the protocol the protocol layer is.

2. The method of claim 1 , further comprising maintaining a protocol table including a plurality of entries, wherein each entry of the plurality of entries is associated with a unique identifier and stores data associated with a different combination of protocol layers.

3. The method of claim 1 , wherein the header of the packet includes a body that is a portion of the header that is not modified by the set of generic commands, the method further comprising:

maintaining a pointer structure for the packet that includes an end pointer, a plurality of layer pointers and a total size of the header of the packet, wherein each of the layer pointers point to a start position of a different one of the protocol layers of the header of the packet and the end pointer points to the start of the body of the header.

4. The method of claim 1 , further comprising, for each protocol layer of the protocol layers that is converted, storing a bit vector including a plurality of values that each represent a different portion of the converted protocol layer.

5. The method of claim 1 , wherein the generic format includes all supported fields of the protocol.

6. The method of claim 1 , wherein converting each of the protocol layers includes:

of fields supported by the protocol of the protocol layer, detecting which of the fields are missing from the protocol layer; and

based on the detection, expanding the protocol layer to the generic format by including the missing fields.

7. A network switch comprising:

an input port for receiving a packet having a header including one or more protocol layers each corresponding to a different one of a plurality of protocols;

a memory storing, for each protocol of a plurality of protocols, a generic protocol layer format associated with the protocol and a set of one or more generic commands associated with the protocol; and

a rewrite engine that, for at least one protocol layer of the plurality of protocol layers, converts the protocol layer to the generic protocol layer format associated with the protocol of the protocol layer by adding one or more fields to the protocol layer increasing a size of the protocol layer and modifies the protocol layer as converted using the set of generic commands associated with the protocol of the protocol layer regardless of which variant of the protocol the protocol layer is, wherein the one or more fields added to the protocol layer are dependent on the protocol of the protocol layer.

8. The network of claim 7 , wherein the memory stores a protocol table including a plurality of entries, wherein each entry of the plurality of entries is associated with a unique identifier and stores data associated with a different combination of protocol layers.

9. The network of claim 7 , wherein the header of the packet includes a body that is a portion of the header that is not modified by the set of generic commands, and further wherein the memory stores a pointer structure for the packet that includes an end pointer, a plurality of layer pointers and a total size of the header of the packet, wherein each of the layer pointers point to a start position of a different one of the protocol layers of the header of the packet and the end pointer points to the start of the body of the header.

10. The network of claim 7 , wherein, for each protocol layer of the protocol layers that is converted, the memory stores a bit vector including a plurality of values that each represent a different portion of the converted protocol layer.

11. The network of claim 7 , wherein the generic format includes all supported fields of the protocol.

12. The network of claim 7 , wherein converting each of the protocol layers includes:

of fields supported by the protocol of the protocol layer, detecting which of the fields are missing from the protocol layer; and

based on the detection, expanding the protocol layer to the generic format by including the missing fields.

13. A non-transitory computer-readable medium storing a rewrite engine for receiving a packet having a header including one or more protocol layers each corresponding to a different one of a plurality of protocols, the rewrite engine configure to, for at least one protocol layer of the plurality of protocol layers, convert the protocol layer to a generic protocol layer format associated with the protocol of the protocol layer by adding one or more fields to the protocol layer increasing a size of the protocol layer and modify the protocol layer as converted using a set of generic commands associated with the protocol of the protocol layer regardless of which variant of the protocol the protocol layer is, wherein the one or more fields added to the protocol layer are dependent on the protocol of the protocol layer.

14. The non-transitory computer-readable medium of claim 13 , wherein the rewrite engine is configured to access a protocol table including a plurality of entries, wherein each entry of the plurality of entries is associated with a unique identifier and stores data associated with a different combination of protocol layers.

15. The non-transitory computer-readable medium of claim 13 , wherein the header of the packet includes a body that is a portion of the header that is not modified by the set of generic commands, and further wherein the rewrite ending is configured to access a pointer structure for the packet that includes an end pointer, a plurality of layer pointers and a total size of the header of the packet, wherein each of the layer pointers point to a start position of a different one of the protocol layers of the header of the packet and the end pointer points to the start of the body of the header.

16. The non-transitory computer-readable medium of claim 13 , wherein, for each protocol layer of the protocol layers that is converted, the rewrite engine is configured to generate a bit vector including a plurality of values that each represent a different portion of the converted protocol layer.

17. The non-transitory computer-readable medium of claim 13 , wherein the generic format includes all supported fields of the protocol.

18. The non-transitory computer-readable medium of claim 13 , wherein converting each of the protocol layers includes:

of fields supported by the protocol of the protocol layer, detecting which of the fields are missing from the protocol layer; and

based on the detection, expanding the protocol layer to the generic format by including the missing fields.

Assignments (6)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 15, 2020
From: CAVIUM INTERNATIONAL
To: MARVELL ASIA PTE, LTD.
Reel/Frame 053179/0320 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 17, 2020
From: CAVIUM, LLC
To: CAVIUM INTERNATIONAL
Reel/Frame 051948/0807 →
CHANGE OF NAME Recorded Sep 27, 2018
From: CAVIUM, INC.
To: CAVIUM, LLC
Reel/Frame 047577/0653 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 13, 2017
From: SINGH, CHIRINJEEV; DANIEL, TSAHI; SCHMIDT, GERALD
To: XPLIANT, INC.
Reel/Frame 041563/0776 →
MERGER AND CHANGE OF NAME Recorded Mar 13, 2017
From: XPLIANT, INC.; CAVIUM NETWORKS LLC
To: CAVIUM NETWORKS LLC
Reel/Frame 041563/0780 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 13, 2017
From: CAVIUM NETWORKS LLC
To: CAVIUM, INC.
Reel/Frame 041563/0785 →
Continuity (2)
Continuation 14309659 · Jun 19, 2014
Related Publication 20170244816A1 · Aug 24, 2017
Cited By (1)
US 12,231,498