IP Library Granted Patent US 11,799,989
Granted Patent B2
US 11,799,989 · App. 17/330,782 · Granted Oct 24, 2023

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,799,989
App. No.
17/330,782
Granted
Oct 24, 2023
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 (51)

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

maintaining a bit vector for a generalized protocol header layer of a packet, wherein the bit vector includes bits marked as a first value for invalid fields of the generalized protocol header layer and bits marked as a second value for valid fields of the generalized protocol header layer; and

updating the bit vector based on modification of the generalized protocol header layer forming an updated bit vector;

collapsing the updated bit vector by removing each bit marked as the first value in the updated bit vector.

2. The method of claim 1 , wherein the generalized protocol header layer is a protocol header of a packet expanded to a generic format.

3. A method of a network switch, the method comprising:

maintaining a bit vector for a generalized protocol header layer of a packet, wherein the bit vector includes bits marked as a first value for invalid fields of the generalized protocol header layer and bits marked as a second value for valid fields of the generalized protocol header layer; and

updating the bit vector based on modification of the generalized protocol header layer forming an updated bit vector;

collapsing the updated bit vector by removing each bit marked as the first value in the updated bit vector, wherein the generalized protocol header layer is divided into a plurality of equal size subsections and the bit vector includes a bit per subsection for each subsection of the generalized protocol header layer.

4. The method of claim 1 , wherein the modification uses at least one command from a set of generic commands that is stored in a memory of the network switch to modify the at least one generalized protocol header layer.

5. The method of claim 4 , wherein the set of generic commands include a Delete command, a Copy command and a Move command.

6. The method of claim 5 , further comprising, prior to using the updated bit vector, comparing the bit vector and the updated bit vector to determine how many bits changed.

7. The method of claim 6 , further comprising modifying the packet based on the updated bit vector and outputting the packet from the network switch via an outgoing port of the network switch.

8. The method of claim 7 , wherein the modification of the at least one generalized protocol header layer is based on egress portType of the outgoing port of the network switch.

9. The method of claim 8 , further comprising forming a new header for the packet based on the collapsed updated bit vector.

10. A network switch comprising:

an input port for receiving a packet;

an output port for outputting the packet after the packet is processed; and

a rewrite engine that:

maintains a bit vector for a generalized protocol header layer of the packet, wherein the bit vector includes bits marked as a first value for invalid fields of the generalized protocol header layer and bits marked as a second value for valid fields of the generalized protocol header layer;

updates the bit vector based on modification of the generalized protocol header layer forming an updated bit vector; and

collapses the updated bit vector by removing each bit marked as the first value in the updated bit vector.

11. The network switch of claim 10 , wherein the generalized protocol header layer is a protocol header of a packet expanded to a generic format.

12. A network switch comprising:

an input port for receiving a packet;

an output port for outputting the packet after the packet is processed; and

a rewrite engine that:

maintains a bit vector for a generalized protocol header layer of the packet, wherein the bit vector includes bits marked as a first value for invalid fields of the generalized protocol header layer and bits marked as a second value for valid fields of the generalized protocol header layer;

updates the bit vector based on modification of the generalized protocol header layer forming an updated bit vector; and

collapses the updated bit vector by removing each bit marked as the first value in the updated bit vector, wherein the generalized protocol header layer is divided into a plurality of equal size subsections and the bit vector includes a bit per subsection for each subsection of the generalized protocol header layer.

13. The network switch of claim 10 , wherein the modification uses at least one command from a set of generic commands that is stored in a memory of the network switch to modify the at least one generalized protocol header layer.

14. The network switch of claim 13 , wherein the set of generic commands include a Delete command, a Copy command and a Move command.

15. The network switch of claim 14 , wherein the rewrite engine, prior to using the updated bit vector, compares the bit vector and the updated bit vector to determine how many bits changed.

16. The network switch of claim 15 , wherein the rewrite engine modifies the packet based on the updated bit vector and outputs the packet from the network switch via the outgoing port of the network switch.

17. The network switch of claim 16 , wherein the modification of the at least one generalized protocol header layer is based on egress portType of the outgoing port of the network switch.

18. The network switch of claim 17 , wherein the rewrite engine forms a new header for the packet based on the collapsed updated bit vector.

19. A non-transitory computer readable medium storing a rewrite engine for inputting, processing and outputting a packet, wherein the rewrite engine:

maintains a bit vector for a generalized protocol header layer of the packet, wherein the bit vector includes bits marked as a first value for invalid fields of the generalized protocol header layer and bits marked as a second value for valid fields of the generalized protocol header layer;

updates the bit vector based on modification of the generalized protocol header layer forming an updated bit vector; and

collapses the updated bit vector by removing each bit marked as the first value in the updated bit vector.

20. The medium of claim 19 , wherein the generalized protocol header layer is a protocol header of a packet expanded to a generic format.

21. A non-transitory computer readable medium storing a rewrite engine for inputting, processing and outputting a packet, wherein the rewrite engine:

maintains a bit vector for a generalized protocol header layer of the packet, wherein the bit vector includes bits marked as a first value for invalid fields of the generalized protocol header layer and bits marked as a second value for valid fields of the generalized protocol header layer;

updates the bit vector based on modification of the generalized protocol header layer forming an updated bit vector; and

collapses the updated bit vector by removing each bit marked as the first value in the updated bit vector, wherein the generalized protocol header layer is divided into a plurality of equal size subsections and the bit vector includes a bit per subsection for each subsection of the generalized protocol header layer.

22. The medium of claim 19 , wherein the modification uses at least one command from a set of generic commands that is stored on the non-transitory computer readable medium to modify the at least one generalized protocol header layer.

23. The medium of claim 22 , wherein the set of generic commands include a Delete command, a Copy command and a Move command.

24. The medium of claim 23 , wherein the rewrite engine, prior to using the updated bit vector, compares the bit vector and the updated bit vector to determine how many bits changed.

25. The medium of claim 24 , wherein the rewrite engine modifies the packet based on the updated bit vector and outputs the packet via the outgoing port of a network switch.

26. The medium of claim 25 , wherein the modification of the at least one generalized protocol header layer is based on egress portType of the outgoing port of the network switch.

27. The medium of claim 26 , wherein the rewrite engine forms a new header for the packet based on the collapsed updated bit vector.

Assignments (6)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 26, 2021
From: SINGH, CHIRINJEEV; DANIEL, TSAHI; SCHMIDT, GERALD
To: XPLIANT, INC.
Reel/Frame 056357/0394 →
MERGER Recorded May 26, 2021
From: XPLIANT, INC.
To: CAVIUM NETWORKS LLC
Reel/Frame 056357/0528 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 26, 2021
From: CAVIUM NETWORKS LLC
To: CAVIUM, INC.
Reel/Frame 056357/0651 →
CHANGE OF NAME Recorded May 26, 2021
From: CAVIUM, INC.
To: CAVIUM, LLC
Reel/Frame 056394/0569 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 26, 2021
From: CAVIUM, LLC
To: CAVIUM INTERNATIONAL
Reel/Frame 056399/0199 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 26, 2021
From: CAVIUM INTERNATIONAL
To: MARVELL ASIA PTE, LTD.
Reel/Frame 056518/0001 →
Continuity (3)
Continuation 15457970 · Mar 13, 2017
Continuation 14309659 · Jun 19, 2014
Related Publication 20210329104A1 · Oct 21, 2021