Opaque packet handles
First Claim
1. A computer-implemented method for providing packet processing routines with access to packets comprising:
- initializing a packet manager version counter of said packet manager routine;
receiving a request for access to a selected packet, said request comprising a packet handle, said packet handle including an identifier specifying a run version of a packet manager routine and an identifier specifying said selected packet;
comparing said run version specified in said packet handle against a current value of the packet manager version counter of said packet manager routine to determine if said run version indicates that said packet handle was provided by a current version of said packet manager routine; and
rejecting said request if said run version indicates said packet handle was not provided by said current version of said packet manager routine.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems and methods for managing packet memory. Various clients in a router need to read from and/or write to the contents of individual packets. In one embodiment, all accesses to packet memory are via a packet manager. Individual clients are issued packet handles to use in identifying particular packets to the packet manager. The packet manager translates between the packet handles and pointers to packet memory locations. To assure robust performance after restarting the packet manager, each packet handle indicates which run version of the packet manager was responsible for generating the handle. The packet manager refuses requests for packet access using handles generated by previous versions.
-
Citations
23 Claims
-
1. A computer-implemented method for providing packet processing routines with access to packets comprising:
-
initializing a packet manager version counter of said packet manager routine;
receiving a request for access to a selected packet, said request comprising a packet handle, said packet handle including an identifier specifying a run version of a packet manager routine and an identifier specifying said selected packet;
comparing said run version specified in said packet handle against a current value of the packet manager version counter of said packet manager routine to determine if said run version indicates that said packet handle was provided by a current version of said packet manager routine; and
rejecting said request if said run version indicates said packet handle was not provided by said current version of said packet manager routine. - View Dependent Claims (2, 3, 4, 5, 6)
restarting said packet manager routine and incrementing the packet manager version counter of said packet manager routine.
-
-
3. The method of claim 1 wherein fulfilling comprises:
-
translating said identifier specifying said selected packet to a pointer to said memory; and
accessing a location in said memory specified by said pointer.
-
-
4. The method of claim 1 further comprising:
passing an error indication from said packet manager routine to a packet processing routine issuing said request if said specified run version does not match said current value of said packet manager version counter.
-
5. The method of claim 1 further comprising:
prior to using said packet manager routine to receive a request, issuing said packet handle from said packet manager routine to a packet processing routine issuing said request.
-
6. The method of claim 1 wherein the packet manager version counter is a respawn counter.
-
7. A computer program product for providing packet processing routines with access to packets stored in a memory, said computer program product comprising:
-
code that uses a packet manager routine to receive a request for access to a selected packet, said request comprising a packet handle, said packet handle including an identifier specifying a run version of said packet routine and an identifier specifying said selected packet;
code that initializes a packet manager version counter of said packet manager routine;
code that checks said run version specified in said packet handle against a current value of the packet manager version counter of said packet manager routine to determine if said run version indicates that said packet handle was provided by a current version of said packet manager routine;
code that fulfills said request only if said current version matches said run version specified in said packet handle; and
a computer-readable storage medium that stores the codes. - View Dependent Claims (8, 9, 10, 11, 12, 13)
code that restarts said packet manager routine and increments said packet manager version counter of said packet manager routine.
-
-
9. The computer program product of claim 7 wherein said code that fulfills comprises:
-
code that translates said identifier specifying said selected packet to a pointer to said memory; and
code that accesses a location in said memory specified by said pointer.
-
-
10. The computer program product of claim 7 further comprising:
code that passes an error indication from said packet manager routine to a packet processing routine issuing said request if said specified run version does not match said current value of said packet manager version counter.
-
11. The computer program product of claim 7 further comprising:
code that issues said packet handle from said packet manager routine to a packet processing routine issuing said request.
-
12. The computer program product of claim 7 wherein said computer readable medium comprises a disk.
-
13. The computer program product of claim 7 wherein said computer readable medium comprises a memory device.
-
14. A computer-implemented method for providing packet processing routines with access to packets comprising:
-
means that initialize a packet manager version counter of said packet manager routine;
means that receive a request for access to a selected packet, said request comprising a packet handle, said packet handle including an identifier specifying a run version of a packet manager routine and an identifier specifying said selected packet;
means that compare said run version specified in said packet handle against a current value of the packet manager version counter of said packet manager routine to determine if said run version indicates that said packet handle was provided by a current version of said packet manager routine; and
means that reject said request if said run version indicates said packet handle was not provided by said current run version of said packet manager routine. - View Dependent Claims (15, 16, 17, 18)
means that restart said packet manager routine and increment the packet manager version counter of said packet manager routine.
-
-
16. The method of claim 14 wherein fulfilling comprises:
-
means that translate said identifier specifying said selected packet to a pointer to said memory; and
means that access a location in said memory specified by said pointer.
-
-
17. The method of claim 14 further comprising:
means that pass an error indication from said packet manager routine to a packet processing routine issuing said request if said specified run version does not match said current value of the packet manager version counter.
-
18. The method of claim 14 further comprising:
means that issue said packet handle from said packet manager routine to a packet processing routine issuing said request prior to using said packet manager routine to receive a request.
-
19. A computer-implemented method for providing packet processing routines with access to packets, said method comprising:
-
means that transfer a packet handle from a packet processing routine to a packet management routine, said packet handle comprising fewer than all of a multiplicity of bits of an actual packet memory address, said packet handle including an identifier identifying a selected one of said packets;
means that use said packet management routine to translate said identifier into a pointer to said memory; and
means that access said memory at a location identified by said pointer. - View Dependent Claims (20, 21, 22, 23)
means that write to said location with data received from said packet processing routine.
-
-
21. The method of claim 19 wherein accessing comprises:
means that read data from said location and transfer said data to said packet processing routine.
-
22. The method of claim 19 further comprising:
means that issuing said packet handle from said packet management routine to said packet processing routine prior to transferring said packet handle.
-
23. The method of claim 19 further comprising:
means that invalidate said packet handle upon reset of said packet management routine.
Specification