METHOD OF USING BIT VECTORS TO ALLOW EXPANSION AND COLLAPSE OF HEADER LAYERS WITHIN PACKETS FOR ENABLING FLEXIBLE MODIFICATIONS AND AN APPARATUS THEREOF
First Claim
1. A method of a rewrite engine of a network device, the method comprising:
- maintaining a bit vector for a generalized protocol header;
updating the bit vector based on modification of at least one generalized protocol header; and
using the updated bit vector to compress the at least one generalized protocol header.
8 Assignments
0 Petitions
Accused Products
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.
3 Citations
25 Claims
-
1. A method of a rewrite engine of a network device, the method comprising:
-
maintaining a bit vector for a generalized protocol header; updating the bit vector based on modification of at least one generalized protocol header; and using the updated bit vector to compress the at least one generalized protocol header. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method of a network switch, the method comprising:
-
receiving a packet at an incoming port of the network switch; generalizing each protocol header of the packet according to a generic format for the protocol header; maintaining a bit vector for each generalized protocol header, wherein the bit vector includes bits marked as 0 for invalid fields and bits marked as 1 for valid fields; modifying at least one of the generalized protocol headers by applying, thereby updating the bit vector; collapsing the updated bit vector; and forming a new protocol header based on the compressed bit vector. - View Dependent Claims (8, 9, 10, 11, 12, 13)
-
-
14. A network switch comprising:
-
an input port for receiving a packet; a memory storing a set of generic commands, wherein the set of generic commands is used for header modifications irrespective of incoming headers; and a rewrite engine using bit vectors to allow expansion and collapse of protocols headers of the packet, thereby enabling flexible modification of the packet by using the set of generic commands. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A network switch comprising:
-
an input port for receiving a packet, wherein the packet includes a body and a protocol stack; an output port for transmitting modified packets; a memory to store a set of software-defined mappings of generic formats of protocols and a set of generic modification commands, wherein the set of generic modification commands is used for header modifications irrespective of incoming headers; and a rewrite engine to; convert each protocol header of the protocol stack into a generic format based on one from the set of software-defined mappings; maintain a bit vector for each converted protocol header; use the set of generic modifications commands to modify each converted protocol header; update each bit vector after the bit vector; collapse each updated bit vector to thereby form a new protocol stack; and attach the new protocol stack with the body to be transmitted via the output port. - View Dependent Claims (24, 25)
-
Specification