WO2006017689A2 - Data context switching in a semantic processor - Google Patents
Data context switching in a semantic processor Download PDFInfo
- Publication number
- WO2006017689A2 WO2006017689A2 PCT/US2005/027803 US2005027803W WO2006017689A2 WO 2006017689 A2 WO2006017689 A2 WO 2006017689A2 US 2005027803 W US2005027803 W US 2005027803W WO 2006017689 A2 WO2006017689 A2 WO 2006017689A2
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- parser
- data
- sts
- packet
- parsing
- Prior art date
Links
- 239000000872 buffer Substances 0.000 claims description 142
- 238000012545 processing Methods 0.000 claims description 71
- 230000006855 networking Effects 0.000 claims description 36
- 238000000034 method Methods 0.000 claims description 25
- 230000008569 process Effects 0.000 claims description 19
- 230000005540 biological transmission Effects 0.000 claims description 16
- 230000007246 mechanism Effects 0.000 claims description 7
- 230000003139 buffering effect Effects 0.000 claims description 5
- 230000004044 response Effects 0.000 claims description 5
- 230000002093 peripheral effect Effects 0.000 claims description 4
- 238000013459 approach Methods 0.000 abstract description 8
- RGNPBRKPHBKNKX-UHFFFAOYSA-N hexaflumuron Chemical compound C1=C(Cl)C(OC(F)(F)C(F)F)=C(Cl)C=C1NC(=O)NC(=O)C1=C(F)C=CC=C1F RGNPBRKPHBKNKX-UHFFFAOYSA-N 0.000 abstract 3
- 238000004519 manufacturing process Methods 0.000 description 99
- 230000015654 memory Effects 0.000 description 60
- 239000012634 fragment Substances 0.000 description 24
- 230000006870 function Effects 0.000 description 15
- 238000004891 communication Methods 0.000 description 13
- 238000012163 sequencing technique Methods 0.000 description 11
- 208000037656 Respiratory Sounds Diseases 0.000 description 8
- 102100040338 Ubiquitin-associated and SH3 domain-containing protein B Human genes 0.000 description 8
- 101710143616 Ubiquitin-associated and SH3 domain-containing protein B Proteins 0.000 description 8
- 206010037833 rales Diseases 0.000 description 8
- 238000012546 transfer Methods 0.000 description 7
- 239000000835 fiber Substances 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000009432 framing Methods 0.000 description 5
- 241000288140 Gruiformes Species 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 229920001098 polystyrene-block-poly(ethylene/propylene) Polymers 0.000 description 4
- 238000000348 solid-phase epitaxy Methods 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 241001522296 Erithacus rubecula Species 0.000 description 3
- 101100156282 Neurospora crassa (strain ATCC 24698 / 74-OR23-1A / CBS 708.71 / DSM 1257 / FGSC 987) vib-1 gene Proteins 0.000 description 3
- 238000013467 fragmentation Methods 0.000 description 3
- 238000006062 fragmentation reaction Methods 0.000 description 3
- 238000011084 recovery Methods 0.000 description 3
- 238000004513 sizing Methods 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 238000013478 data encryption standard Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000009472 formulation Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 238000006424 Flood reaction Methods 0.000 description 1
- KHGNFPUMBJSZSM-UHFFFAOYSA-N Perforine Natural products COC1=C2CCC(O)C(CCC(C)(C)O)(OC)C2=NC2=C1C=CO2 KHGNFPUMBJSZSM-UHFFFAOYSA-N 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 239000000969 carrier Substances 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 239000003999 initiator Substances 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 229930192851 perforin Natural products 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000000135 prohibitive effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/16—Time-division multiplex systems in which the time allocation to individual channels within a transmission cycle is variable, e.g. to accommodate varying complexity of signals, to vary number of channels transmitted
- H04J3/1605—Fixed allocated frame structures
- H04J3/1611—Synchronous digital hierarchy [SDH] or SONET
Definitions
- This invention relates generally to digital semantic processors, and more particularly to methods and apparatus for switching parsing contexts while parsing a data stream.
- a packet is a finite-length (generally several tens to several thousands of octets) digital transmission unit comprising one or more header fields and a data field.
- the data field may contain virtually any type of digital data.
- the header fields convey information (in different formats depending on the type of header and options) related to delivery and interpretation of the packet contents. This information may, e.g., identify the packet's source or destination, identify the protocol to be used to interpret the packet, identify the packet's place in a sequence of packets, provide an error correction checksum, or aid packet flow control.
- the finite length of a packet can vary based on the type of network that the packet is to be transmitted through and the type of application used to present the data.
- IP Internet Protocol
- a network layer typically implemented with the well-known Internet Protocol (IP)
- IP Internet Protocol
- a higher-level transport layer can provide mechanisms for end-to-end delivery of packets.
- IP Internet Protocol
- each layer can prepend its own header to a packet, and regard all higher-layer headers as merely part of the data to be transmitted.
- Transmission Control Protocol is a transport layer used to provide mechanisms for highly-reliable end-to-end delivery of packet streams during an established TCP session.
- TCP Transmission Control Protocol
- the establishment of a TCP session requires a three-way handshake between communicating endpoints. This three-way handshaking allows TCP endpoints to exchange socket information uniquely identifying the TCP session to be established, and to exchange initial sequence numbers and window sizes used in the packet sequencing, error recovery, and flow control.
- An example of a typical three-way handshake may include a first TCP endpoint sending a synchronize SYN packet to a second TCP endpoint, the second TCP endpoint responding with a synchronize and acknowledgment SYN-ACK packet, and the first TCP endpoint sending an acknowledgement ACK packet in response to the SYN-ACK packet.
- TCP further requires a similar exchange of termination FIN packets and acknowledgments to the FIN packets when closing an existing TCP session.
- TCP endpoints must be able maintain information regarding the state of each of its TCP sessions, e.g., opening a TCP session, waiting for acknowledgment, exchanging data, or closing a TCP session.
- TCP flood denial-of-service attack multiple SYN packets are received by a TCP endpoint, each requesting the establishment of a different TCP session.
- the initiator of the attack does not have any intention of completing the corresponding three-way handshakes, often times providing a fictitious source port to ensure their failure.
- Responding to this flood of SYN packets allocates the TCP endpoint' s limited processing resources by requiring it maintain state information for each session opening while waiting for acknowledgments that will never arrive.
- Another attack that misallocates processing resources involves receiving packets for a session that conflict with the maintained state information, e.g., sending a SYN packet in an already established session or a FIN packet for a session that has not been established.
- TCP endpoints may exchange data in a TCP packet stream. Since packets may be lost, or arrive out-of-order during transmission, TCP provides mechanisms to retransmit lost or late packets and reorder the packet stream upon arrival including discarding duplicate packets. TCP endpoints may also be required to perform other exception processing prior to the TCP reordering, such as reassembling lower- layer fragmented packets, e.g., IP fragments, and/or performing cryptography operations, e.g., according to an Internet Protocol Security (IPSec) header(s).
- IPSec Internet Protocol Security
- SONET Synchronous Optical NETwork
- STS-N Synchronous Transport Signal
- N is commonly one of 1, 3, 12, 24, 48, 192, and 768.
- the line rate of an STS-N signal is N x 51.84 Mbps (million bits per second), transmitted as 8000 frames/second, the frame size growing proportionally with N.
- An STS terminal multiplexer 110 receives data on one or more non-SONET tributaries, such as Ethernet links, circuit-switched voice network data links, Asynchronous Transfer Mode (ATM) data links, etc.
- STS terminal MUX 110 places data from its tributaries into SONET STS-N frames, which are then directed across a SONET path to Path-Terminating Equipment (PTE) 120, which could be another STS terminal MUX or some other device that extracts the tributary data from the STS-N signal.
- PTE Path-Terminating Equipment
- SONET devices can reside along the path between STS terminal MUX 110 and PTE 120.
- ADMs 130 and 140 add/drop multiplexers 130 and 140, and two repeaters 150 and 160 are shown in the path between STS terminal MUX 110 and PTE 120.
- ADMs 130 and 140 multiplex lower-rate STS-N signals to a higher-rate STS-N signal and vice-versa.
- ADM 130 could multiplex four STS-3 lines to an STS-12 line, and/or could extract (drop) some STS-3 lines from an incoming STS-12 and replace (add) other STS-3 lines to produce an outgoing STS-12 line.
- Repeaters such as 150 and 160 can be inserted in lines too long for a single long fiber to reliably carry the SONET signal between endpoints.
- the repeaters cannot modify the SONET payload, but merely retime and retransmit it.
- an STS path layer exists from where the data is first placed in a SONET frame to where that data is removed from a SONET frame.
- a line layer exists over any SONET path segment where the payload is unchanged.
- a section layer exists between any SONET receiver/transmitter pair that share the same fiber.
- a SONET link carries overhead bits for the path, line, and section layers. These overhead bits are referred to respectively as Path OverHead (POH), Line OverHead (LOH), and Section OverHead (SOH).
- POH Path OverHead
- LOH Line OverHead
- SOH Section OverHead
- SONET endpoints that are only section endpoints can generate and/or modify SOH, but cannot modify LOH or POH.
- Endpoints that are also line endpoints can additionally generate and/or modify LOH, but cannot modify POH.
- Path endpoints are the only endpoints allowed to create POH.
- Overhead and payload occupy specific locations in a SONET frame.
- the general structure of a SONET frame 200 is illustrated in Figure 2. Every STS-N frame contains 9ON columns and nine rows of byte data, which are transmitted in raster fashion, left-to-right and top-to-bottom.
- the first 3N columns contain overhead data, and the last 87N columns contain what is referred to as a Synchronous Payload Envelope (SPE) 230.
- SPE Synchronous Payload Envelope
- Within the first 3N columns the first three rows contain SOH 210, and the last six rows contain LOH 220.
- the POH lies within the synchronous payload envelope, as will be described shortly.
- Figure 3 shows additional SONET frame detail 300 for two consecutive STS-I frames
- the POH in an STS-I frame occupies one column of the SPE, leaving the remaining 86 columns available to transmit input data. Rather than occupying a fixed location within the frame like the SOH and LOH, however, the POH can be defined with a first byte starting at any row, column location within the SPE. This capability exists primarily to allow circuit-switched data, which also has an 8000 frames/second format but is not necessarily in perfect synchronization with the SONET frame timing, to be more easily carried as a SONET payload.
- H1H2 pointer The beginning location of the POH is actually specified by an offset stored in the first two bytes of the LOH, referred to herein as the "H1H2 pointer.”
- Path-Terminating Equipment interprets the H1H2 pointer values to locate the beginning of the next POH first byte that follows the H1H2 pointer. For instance, an H1H2 pointer offset of 0 would indicate that the frame overhead begins at row 4, column 4, just to the right of the H1H2
- the Hl H2 pointer of frame K has an offset to row 5, about seven or eight columns into the SPE, where the first byte of the POH for frame K will be found.
- the data payload for SPE K begins immediately after the first byte of the POH for frame K, and in this instance continues down to the first part of row 5 of frame K+l .
- the POH first byte for frame K+l follows immediately after the last byte of SPE K. This is not necessary, however, as frame K shows a slight shift between the frame K-I POH and the frame K POH, as represented by the H1H2 pointer.
- FIG. 4 shows an illustrative SPE K, with a data payload that begins with the terminal end of a Packet_l payload, followed by a Packet_2 IP (Internet Protocol) header, TCP (Transmission Control Protocol) header, and payload, a Packet_3 IP header, ARP (Address Resolution Protocol) header, and payload, a Packet_4 IP header, UDP (Uniform Datagram Protocol) header, and the first portion of payload.
- Packet_l Internet Protocol
- TCP Transmission Control Protocol
- ARP Address Resolution Protocol
- UDP Uniform Datagram Protocol
- a POH byte interrupts the packet data stream, as well as SOH and LOH bytes (not shown in Figure 4).
- the PTE receiving this SONET stream is expected to remove the SONET overhead bytes and output just the header and payloads from the SPEs.
- a further complication in the SONET hierarchy lies in the ability within the SONET framework to build a higher-level SONET frame stream from different combinations of lower-level SONET frame streams.
- a segment of a SONET network 500 illustrated in Figure 5, shows one way in which an STS-12 stream can be constructed from six STS-I streams and two STS-3c concatenated streams (a concatenated STS-Nc frame, designated by the "c" prefix, has a similar SPE structure as an STS-I frame, but with more columns, and also contains a few LOH differences, as is well-known by those skilled in SONET networking).
- a first STS-3 multiplexer (MUX) 510 combines three STS-I streams A, B, and C to create an STS-3 stream AA.
- a second STS-3 MUX 520 combines three other STS-I streams D, E, and F to create another STS-3 stream DD.
- STS-12 MUX 530 creates an STS-12 stream AAA by combining STS-3 streams AA and DD with two STS-3c concatenated streams BB and CC.
- the overall frame structure 600 of a frame from STS-3 stream AA is illustrated in Figure 6.
- the first 9 columns contain SOH and LOH bytes, including H1H2 bytes for each of the individual lower-rate SPEs multiplexed in the frame.
- the H1H2 pointers from STS-Is A, B, and C are copied into three consecutive byte-interleaved H1H2 fields in the LOH section of the frame structure.
- Each H1H2 pointer indicates a respective offset to the first byte of its POH. Any arrangement of starting points for the three STS-I POH columns is allowable, with each lying somewhere in the 87 columns of the STS-3 SPE that correspond to the correct STS-I stream.
- the next 261 columns in frame structure 600 contain STS-3 payload, consisting of byte-interleaved content from the three received STS-I SPEs.
- STS-3 payload consisting of byte-interleaved content from the three received STS-I SPEs.
- column 10 of frame structure 600 contains column 4 from an STS-I stream A frame
- column 11 contains column 4 from an STS-I stream B frame
- column 12 contains column 4 from an STS-I stream c frame.
- This byte-interleaved pattern then repeats for column 5 of each of the three STS-I streams, and so on up to column 87 of the three STS-I streams, which appear respectively in columns 268, 269, and 270 of the STS-3 frame.
- STS-12 multiplexer 530 takes four input STS-3 and/or STS-3c streams and byte-interleaves them in the same manner as just described.
- the output pattern for the STS-12 SPE in this example would repeatedly byte-interleave the four STS-3 input streams with the pattern AA, BB, CC, DD, AA, BB, ... , CC, DD. Expanding this pattern to include the embedded STS-Is per Figure 6, the STS-12 SPE byte-interleave pattern looks like A, BB, CC, D, B, BB, CC, E, C, BB, CC, F, repeated along each row.
- An STS-48 frame is created similarly to an STS-12 frame, except in place of the 4:1 multiplexer 530 of Figure 5, a 16:1 multiplexer is used to byte-interleave 16 STS-3 and/or STS-3c frames. Other combinations of lower-order STS streams are possible.
- Figure 1 contains a network diagram for an exemplary path of a SONET network
- Figure 2 illustrates a generalized SONET frame structure
- Figure 3 shows particulars of a SONET STS-I framing
- Figure 4 illustrates an STS-I SPE, showing one way in which packet data may be transmitted over a SONET STS-I path
- Figure 5 shows one possible arrangement of SONET multiplexers useful in generating an STS-12 frame
- FIG. 6 illustrates the general payload division for STS-3 frames generated by the
- Figure 7 illustrates the general layout for one embodiment of a semantic processor
- Figure 8 shows one possible implementation of a reconfigurable input buffer useful
- Figure 9 contains a block diagram for the parser and related components of the
- Figure 10 shows the format of STS-3 frames after removing byte-interleaving with the
- Figure 11 contains one row of de-interleaved STS-3 frame data extracted from Figure
- Figure 12 illustrates, in block form, a network communications system useful with
- FIG 13A illustrates, in block form, embodiments of the proxy shown in Figure 1;
- Figure 13B shows, in block form, an example packet flow through proxy 200 shown
- Figure 14 shows an example flow chart illustrating embodiments for operating the
- Figure 15 illustrates, in block form, a semantic processor useful with embodiments of
- Figure 16 shows an example flow chart illustrating embodiments for operating the semantic processor shown in Figure 15 as a TCP state machine.
- FIG. 17 illustrates, in block form, a semantic processor useful with embodiments of the invention.
- FIG. 18 contains a flow chart for the processing of received packets in the semantic processor with the recirculation buffer in FIG. 17.
- FIG. 19 illustrates a more detailed semantic processor implementation useful with embodiments of the invention.
- FIG. 20 contains a flow chart of received IP -fragmented packets in the semantic processor in FIG. 19.
- FIG. 21 contains a flow chart of received encrypted and/or unauthenticated packets in the semantic processor in FIG. 19.
- FIG. 22 illustrates yet another semantic processor implementation useful with embodiments of the invention.
- FIG. 23 illustrates an embodiment of the packet output buffer in the semantic processor in FIG. 22.
- FIG. 24 illustrates the information contained in the buffer in FIG. 23.
- Figure 25 shows an embodiment of a semantic processor in block form.
- Figure 26 shows an embodiment of a parser table.
- Figure 27 shows an embodiment of a production rule table organization.
- Figure 28 shows an embodiment of a parser in block form.
- Figure 29 shows a flow chart of an embodiment of processing data.
- Figure 30 shows a flow chart of an embodiment of processing a debug production rule in a semantic processor.
- STS-48, etc. and/or handle both STS demultiplexing and payload processing for an STS data
- a semantic processor having a direct execution parser can be configured to handle such tasks. For instance, the
- One difficulty in directly parsing a received SONET frame structure is that the byte
- At least one context could be divided into section, line, path, and framing contexts.
- atomic STS-I or STS-Nc payload stream also uses a different context.
- the arrangement of the contexts also depends on how the STS-N stream is created
- SONET parsing Other networking streams exist that can be parsed more easily when parsing is not constrained to a single, linear context. Because SONET is believed to represent a difficult example of such a stream, the described embodiments focus on a SONET implementation. Those skilled in the art will recognize how multiple-context parsing can be applied to other parsing problems. Those skilled in the art will also recognize that not every multiple-context parser will need some of the functionality that is specific to SONET, such as a byte de-interleaver and POH counters.
- the semantic processor embodiment illustrated in Figures 7-9 is capable of configuration to properly parse SONET data, such as that contained in Figure 6, using multiple simultaneous parsing contexts.
- FIG. 7 a semantic processor embodiment 700 is illustrated.
- OC-N PHY 710 connects semantic processor 700 to a pair of SONET fiber-optic carriers (not shown).
- the inbound STS-N stream is optically detected by PHY 710 and electrically transmitted to a Packet Input Buffer (PIB) 800.
- PB Packet Input Buffer
- the outbound STS-N stream is electrically transmitted from a Packet Output Buffer (POB) 730 to PHY 710 for laser modulation on an outbound SONET fiber.
- a parser 900 is connected to receive data input from PIB 800.
- a Parser Table (PT) 740 stores parsing data particular to the input that semantic processor is configured to parse.
- a Production Rule Table (PRT) 750 stores grammatical production rules particular to the input that semantic processor is configured to parse.
- a Semantic Code Table (SCT) 770 stores microcode segments for a SPU cluster 760, which preferably contains multiple semantic processing units capable of executing the microcode segments when so instructed, e.g., by parser 900 or another SPU.
- a SPU memory 780 stores data needed by the SPU, such as session contexts, packet data currently being processed, etc.
- PT 740, PRT 750, and SCT 770 are implemented with programmable on-chip memory
- SPU memory 780 is implemented with a cached DRAM external memory.
- PIB 800 receives input data, such as a sequence of Ethernet frames, SONET frames, Fibre Channel frames, etc., from an appropriate PHY, such as the OC-N PHY 710 of Figure 7.
- the frame data is retrieved from PIB 800 by parser 900 and/or SPU cluster 760, as directed by the grammatical production rules and the SCT microcode.
- parser 900 receives input data from PIB 800, it can do one of two things with the input data.
- parser 900 can "look up" additional production rules for the data input symbols, based on the current data input symbol(s) and a current production (“non-terminal” or "NT") symbol. It is noted that terminal symbol matching can generally be performed using either production rule terminal symbols or parser table terminal match values.
- parser 900 When parser 900 is directed by the grammar to look up an additional production rule, parser 900 supplies one or more current data input (DI) symbols and non-terminal (NT) grammar symbols to parser table 740. Based on the (NT, DI) pairing supplied by the parser, parser table 740 issues a corresponding PR code to production rule table (PRT) 750.
- parser table 740 is implemented with a Ternary Content- Addressable Memory (TCAM) consisting of entries of the form (NT, DI_match). Multiple (NT, DIjtnatch) entries can exist for the same NT symbol and different DIjtnatch values.
- TCAM Ternary Content- Addressable Memory
- the TCAM will return, as the PR code, the address of the entry with the correct NT value and DI_match value that matches the supplied data input DI. Because the TCAM allows individual bits or bytes in each TCAM entry to be set to a "don't care" value, each TCAM entry can be tailored to respond to the bits or bytes in DI that matter for the current production rule.
- parser table 740 locates the correct PR code
- the code is passed to production rule table 750.
- PRT 750 locates a production rule corresponding to the PR code, and outputs the production rule.
- the production rule can contain whatever is desired, in Figure 7 the production rule contains an array of up to M non-terminal (and/or terminal) symbols
- NT[] an array of up to R Semantic Code entry Points SEP[], and a SkipBytes value.
- the symbol array NT[] directs the parser as to what input will now be expected, based on the latest parsing cycle.
- the SkipBytes value directs the parser as to how many, if any, of the DI bytes were consumed by the latest parsing cycle, and can therefore by discarded.
- the semantic code entry point array SEP [] directs the SPU cluster 760 as to any processor tasks that should be performed based on the latest parsing cycle.
- SPU cluster 760 loads and executes a code segment to perform a task. For instance, a SPU could be directed to move the payload portion of an input packet from PIB 800 to SPU memory 780 and manipulate that payload portion in some fashion. SPU cluster 760 can also create output packet/frames and supply them to POB 720 for outbound transmission at PHY 710.
- parser 900 could conceivably operate directly on a byte-interleaved SONET stream, context-switching on every byte boundary during high-speed operation could waste a prohibitive number of parser cycles. Accordingly, Figure 8 illustrates one embodiment of
- PIB 800 that is capable of partially de-interleaving received SONET frames.
- the goal for this input buffer embodiment is to, on a row-by-row basis, de-interleave the byte-interleaved SPEs present in an STS-N stream.
- Figure 10 illustrates the desired output of PIB 800 for STS-3 frames consisting of three byte- interleaved STS-Is A, B, and C (see Figure 6).
- the SOH and FOH columns can be "de-interleaved" as well with a parser grammar written so as to expect such a structure, or specific overhead sections such as the H1H2 pointers can be de-interleaved.
- Frame structure 1000 of Figure 10 would apply to the line STS-3 AA in Figure 5.
- frame structure 1000 nine columns of SOH and LOH and 261 columns of STS-3 SPE exist, just like in frame structure 600 of Figure 6.
- the 261 columns of STS-3 SPE are divided into three consecutive 87-column sections, corresponding respectively to STS-Is A, B, and C of Figure 5.
- frame structure 1000 can be created with about a 2/3-row de-interleave latency, as the STS-I A payload section for each row cannot be completed until three bytes from the end of that row when the last STS-I A byte is received.
- PIB 800 is preferably reconfigurable, however, to perform no de-interleaving or de- interleaving for a different interleaved structure.
- An Input FIFO 810 receives an STS-N data stream from an OC-N PHY. Input FIFO 810 detects framing bytes within the STS-N data stream in order to frame-sync. Input FIFO 810 then coordinates with a standard SONET descrambler 820 to descramble the portions of each SONET frame that were scrambled prior to transmission.
- the DQI output of input FIFO 810 outputs a byte DQI of descrambled SONET frame data each time it receives a data clock signal D_CLK from a VIB (Virtual Input Buffer) stage 830.
- VIB stage 830 has the task of matching each byte of DQI with a corresponding VIBAddress entry from a programmable Byte De-Interleaver Pattern (BDIP) register 834.
- VIB stage 830 obtains one VIBAddress entry from BDIP register 834, and then BDIP register increments, each time VIB stage 830 asserts an address clock signal A_CLK.
- BDIP register 834 contains a mapping for one row of SONET frame data to a group of VIB input buffers in an input buffer 850.
- the pattern for frame structure 600 of Figure 6 can be 275 entries with the pattern:
- VIB 0 is not assigned to hold any bytes
- VIB 1 is assigned to hold STS-I A bytes
- VIB 2 is assigned to hold STS-I B bytes
- VIB 3 is assigned to hold STS-I C bytes.
- the control character "&" is not matched with a DQI by VIB stage 830, but is written to the same VIB as the last DQI, signifying "end of row" for that particular VIB.
- the control character "@” tells BDIP register that it has reached the end of a frame row, causing BDIP register 834 to reset its read pointer to the head of the register and assert the signal S_Wrap to alert an output controller 860 that a complete frame row has been (or will be in a few more clock cycles) de- interleaved and is ready for output.
- An address decode stage 832 receives DQI/VIBAddress pairs and &/VIBAddress pairs from VIB stage 830. Address decode stage 832 supplies the VIBAddress to VIB pointer registers block 840, which returns a physical buffer address corresponding to the VIBAddress. Address decode stage 832 writes the DQI or "&" to the physical buffer address in input buffer 850.
- the VIB pointer registers 840 are configured to operate as a plurality of ring buffer pointer registers, each storing a physical StartAddress, a physical EndAddress, a
- an output controller 860 interfaces with a parser through a FrameRowReady output signal, a parser output FIFO 862, and a DataRequest input.
- Output controller 860 also interfaces with a SPU or SPU cluster through a SPU output FIFO 864 and a SPU_IN FIFO 866. The operation of both interfaces will be described in turn.
- output controller 860 When output controller 860 receives an S_Wrap signal from BDIP register 834, controller 860 asserts FrameRowReady to the parser. Output controller 860 can then respond to DataRequest inputs from the parser by transmitting DQO (DQ Output) values to the parser through parser FIFO 862.
- DQO DQ Output
- Output controller 860 loads parser FIFO 862 by issuing D REQ (data request) signals to an address decode stage 870.
- Address decode stage 870 is initially set internally to read out of VIB 0. Each time it receives a D_REQ signal, address decode stage requests the current ReadPointer for VIB 0 from VIB pointer registers 840. Address decode stage 870 supplies this ReadPointer as a buffer read address to input buffer 850 and receives a DQO. Meanwhile, VIB Pointer Registers 840 increment ReadPointer, and reset it to StartAddress when ReadPointer reaches EndAddress.
- address decode stage 870 When address decode stage 870 receives a DQO from input buffer 850 that contains an "&" control character, it knows that it has reaches the end of that virtual buffer's input for the current SONET row. Accordingly, address decode stage 870 increments its internal VIBAddress from VIB 0 to VIB 1 and begins reading from VIB 1 on the next D_REQ. This same behavior is repeated as an "&" is reached in each VIB, until the "&" in the last allocated VIB is reached. At that point, the internal VIBAddress is reset to VIB 0 in preparation for reading the next frame row.
- DQO values can be read out to a SPU in similar fashion through SPU FIFO 864, based on commands received from a SPU at a SPUJDSf FIFO 866. It is also noted that "burst" read or skip forward commands can be efficiently implemented by storing pointers to the next few "&" characters in each VIB in the VIB pointer registers. Multiple consecutive DQO values can then be read at once as long as they do not read past the next "&" in the current VIB.
- SPU_IN FIFO 866 can also be used to program PIB 800 at runtime.
- a SPU can instruct output controller 860 to receive a pattern and load that pattern to BDIP register 834 through the RegisterProgram signal interface.
- a SPU can also instruct output controller 860 to configure VIB StartAddress and EndAddress values for each active VIB in VIB Pointer Registers 840 and then initialize the ReadPointer and WritePointer values.
- a SPU can also instruct output controller 860 to configure input FIFO for the appropriate frame size and alignment character sequence, and load a seed to descrambler 820.
- VIB stage 830 and/or Address Decode stage 832 can be pipelined as necessary to achieve an appropriate throughput for designed STS-N data rates.
- BDIP register 834 is designed with a size sufficient to hold a row mapping for the largest STS-N of interest.
- Input buffer 850 is designed with a size sufficient to hold at least two rows of the largest STS-N of interest.
- VIB pointer registers 840 are designed with enough pointer register sets to de- interleave the largest STS-N of interest were that STS-N composed entirely of STS-Is (for instance, 49 pointer register sets could be included to handle de-interleaving for any STS-48).
- the described hardware can be configured with a continuous VIB 0 pattern in BDIP register 834 and a VIB 0 register set with a StartAddress set to the left end of input buffer 850 and an EndAddress set to the right end of input buffer 850.
- PIB 800 can produce the modified SONET frame structure 1000 of Figure 10 to parser 900 using three virtual input buffers and the exemplary pattern stored in BDIP register 834.
- frame structure 1000 is rearranged to place the 90 columns corresponding to STS-I A TOH and SPE columns in the first 90 columns of the frame, followed by all STS-I B columns starting in column 91, followed by all STS-I C columns starting in column 181.
- Other column rearrangements are possible, as long as the parser grammar is configured to expect what is received.
- parser 900 will still use at least four different contexts to process frame structure 1000. As illustrated in Figure 11, seven contexts are used. Context 0 is the root context for the input stream. Contexts 1, 3, and 5 are used to parse the TOH bytes for STS-I A, B, and C, respectively. Contexts 2, 4, and 6 are used to parse the payloads for STS-I A, B, and C, respectively.
- Figure 11 repeats only frame K+l, row 1 from the rearranged STS-3 example of Figure 10.
- the first three bytes can be parsed in context 1, an STS-I parsing context with grammar designed to recognize the alignment and JO characters appearing in SOH row 1.
- the next 87 bytes are part of the STS-I A payload context, and contain a POH byte and 86 payload bytes, which in this example are considered to be packet data (headers and/or packet payload).
- the actual location of the POH byte within these 87 bytes is part of context 1, and must be remembered from an H1H2 LOH field that was previously parsed.
- the remaining 86 bytes in all likelihood do not start with the first byte of a packet, but could be a continuation of a previously unfinished packet parsing context that must be revisited.
- Parser 900 comprises an input data interface 910, a bank of context symbol registers 920, a parser state machine 930, a parser stack manager 940, a bank of context head/tail registers 950, and a parser stack memory 960.
- Input data interface 910 communicates with PIB 800.
- PIB 800 asserts D_RDY to interface 910, interface 910 is allowed to send load or skip requests to PIB 800 until D_RDY is deasserted, signaling the end of a SONET frame row.
- PIB 800 supplies input data to interface 910 over bus DIN.
- Input data interface 910 requests data from PIB 800 in response to requests from parser state machine 930 (although interface 910 may cache not-yet-requested data as long as it responds correctly to external requests).
- Parser state machine 930 maintains the ID for the current context on the CTS bus. Whenever parser state machine 930 instructs input data interface to load input data to context symbol registers 920, row byte counters in a POH registers/counters 912 block, internal to input data interface 910, track the number of bytes read to that context.
- register/counter block 912 two count registers are allocated for each context. The first, the previously mentioned row_byte_counter, counts the number of bytes read to the current context on the current frame row. The row byte counters for all contexts are reset each new frame row. The second, the SPE byte counter, counts the number of bytes read to the current context in the current SPE. The SPE byte counter counts are reset after each SPE is read in.
- a row_count_max register defines the maximum number of symbols that should be
- a SPE_count_max register defines the maximum number of symbols that
- a current_POH_pointer maintains a value for the column location
- next_POH_pointer maintains a value for the column
- registers are loaded when parser table 740 and production rule table 750 are configured for
- the current_POH_pointer and next_POH_pointer are dynamic, and
- a enable flag register also exists for each context; the value of the enable flag register
- interface 910 signals a level-decrement grammar context switch to parser state machine 930
- input data interface 910 signals a level-decrement
- grammar context switch to parser state machine 930 and stops any pending transfer to the
- registers/counters 912 determine when the transmitter has signaled a positive or a negative byte stuff.
- a positive byte stuff is signaled by the transmitter inverting bits 7, 9, 11, 13, and 15 of the POH pointer, and a negative byte stuff is signaled by the transmitter inverting bits 8, 10, 12, 14, and 16 of the POH pointer.
- registers/counters 912 compare the next_POH_pointer value to the current POH_pointer value and signal a positive or negative byte stuff condition, as described, to parser state machine 930. Also, for a positive byte stuff, the row byte counter is incremented by one; for a negative byte stuff, the row byte counter is decremented by one.
- Context symbol registers 920 store context symbols for ⁇ each of N potential contexts. For instance, when context 2 is an IP packet context, context 2 may be exited and re-entered several times per packet before parsing is completed on that packet. Context symbol register 920 maintains the current symbol state in the interim for the suspended contexts. When register 920 receives input bytes from input data interface 910, it stores them to the context register indicated on the CTS bus. Further, the value output on the DI bus to parser state machine 930 and parser table 740 is the value contained in the context register indicated on the CTS bus. Context symbol register 930 also preferably maintains two values for each context symbol register, indicating how many of its input bytes are valid, and how many input bytes have been requested but not filled.
- Parser state machine 930 coordinates operation of the other elements of parser 900, and signals all context switches. As previously mentioned, byte counter comparisons may in some circumstances signal the parser state machine to switch contexts. The example below will also demonstrate how context switches can be initiated by the grammar itself, when parser state machine receives special non-terminals that instruct it to switch contexts. Except for the context-switching function described herein, parser state machine 930 can in some embodiments function similarly to the parser state machine described in copending U.S. Patent Application 10/351,030.
- Parser stack manager 940 performs pushes and pops of parser stack symbols to parser
- the CTS bus value is used by parser stack
- the head/tail registers 950 are used to access a set of head/tail registers 950 for each context.
- the head/tail registers are used to access a set of head/tail registers 950 for each context.
- 950 contain two pointers for each context: a head pointer, which contains the address in
- parser stack memory 960 for the top-of-stack symbol for that context; and a tail pointer,
- the head pointer is decremented.
- parser 900 The operation of and cooperation between the elements of parser 900 will be described.
- parser 900 Before parser 900 begins processing input from an STS-N stream, it can be
- STS-3 root frame grammar for the illustrated embodiment can be any STS-3 root frame grammar.
- STS-3 root frame grammar for the illustrated embodiment can be any STS-3 root frame grammar.
- $STS-3_DI_Frame: @@L+1 CTS @@L+3 CTS @@L+5 CTS ⁇ ⁇ * 1
- the STS-3 stream is defined as a top of frame (TOF) symbol
- the TOF grammar includes an instruction to
- the STS-3 de-interlaced frame definition includes nine repetitions of a common
- parser directive to shift contexts, with relation to the present context, upwards n contexts.
- the STS-I grammar processes STS-I de-interlaced input on nine rows, for instance as
- STS-l_SPE_row processing increments to the next context, which could be an IP context
- the input data interface 910 will signal a context switch back to the STS- l_SPE_row grammar when the POH column is reached, at which time the POH byte is
- input data interface 910 signals a context switch back to the STS-l_SPE_row grammar when the end of that SPE row is reached.
- the STS-l_SPE_row grammar then instructs the parser state machine to return to the root grammar with the @@Lroot command.
- Each set of defined transport overhead bytes is parsed within the appropriate row.
- several of the transport overhead bytes may be processed with their own sub-grammars, if desired.
- the Dl through D12 bytes can be used as another data channel, which could be parsed with an appropriate grammar.
- TOH row 4 contains the POH pointer for the next SPE.
- the special directive @@XferPointer transfers the two pointer bytes to the appropriate next_POHjpointer register, causing input data interface 910 to assert Pos_Shift, Neg_Shift, or No_Shift back to parser state machine 930.
- Pos_Shift, Neg_Shift, or No_Shift back to parser state machine 930.
- either two, three, or four input bytes are then consumed.
- STS-12, STS-48, etc. streams formed from any combination of STS-I, STS-3, STS-3c, STS- 12, STS- 12c, STS-48c streams.
- Direct network communication using Transmission Control Protocol may increase a networking device's vulnerability to TCP -based attacks and require additional processing of packets upon arrival.
- TCP Transmission Control Protocol
- FIG 12 illustrates, in block form, a network communications system 100 useful with embodiments of the present invention.
- the network communications system 2100 includes a networking device 2140 that communicates over a network 2120 via a proxy 2200.
- the network 2120 may be any Wide Area Network (WAN) that provides packet switching.
- the networking device 2140 may be a server or any other device capable of network communications.
- the proxy 2200 maintains at least one TCP session over the network 2120 and a corresponding local session with the networking device 2140.
- the local session may be a TCP session established with the networking device 2140 through a private network, e.g., a company enterprise network, Internet Service Provider (ISP) network, home network, etc.
- ISP Internet Service Provider
- the proxy 2200 functions as a network communications intermediary for networking device 2140 by translating data between the local and TCP sessions. For instance, when receiving packetized data from the network 2120 in a TCP session, the proxy 2200 may sequence and depacketize the data prior to providing it to the networking device 2140 in the local session. The depacketization may include reassembling Internet Protocol (IP) fragments, and/or performing cryptography operations, e.g., according to the Internet Protocol Security (EPSec) header(s).
- IP Internet Protocol
- EPSec Internet Protocol Security
- the proxy 2200 may perform Network Address Translation (NAT) of destination and source IP addresses to help hide the identity of the networking device 2140.
- NAT Network Address Translation
- the proxy 2200 may be implemented at any network interface, such as a firewall.
- proxy 2200 may provide network communication and processing for multiple networking devices 2140.
- the management of network communication at a single network interface point may allow proxy 2200 to provide additional functionality for increasing the efficiency of the network management and packet processing.
- the proxy 2200 when the proxy 2200 discovers network changes, e.g., next hop change, Internet Control Message Protocol (ICMP) fragments, packet loss, etc., in one of the TCP sessions, the changes may be applied to all of the TCP sessions. This becomes especially powerful when combined with the full neighbor implementation of Border Gateway Protocol (BGP) or other link state routing protocol that is aware of the entire topology of network 2120. Additionally, since the proxy 2200 maintains multiple sessions, the status and statistics of these sessions can be accessed at a single network interface point.
- Border Gateway Protocol Border Gateway Protocol
- the proxy 2200 includes a network-interface proxy 2210 to manage one or more TCP sessions over the network 2120 and a device-interface proxy 2220 to manage one or more local sessions with networking device 2140.
- the network-interface proxy 2210 and device-interface proxy 2220 exchange data to be transmitted over their respective sessions. For instance, when network- interface proxy 2210 provides payload data from the TCP session to device-interface proxy 2220, the device-interface proxy 2220 transmits the data to the networking device 2140 in the local session. Alternatively, when device-interface proxy 2220 provides payload data from networking device 2140 to network-interface proxy 2210, the network-interface proxy 2210 transmits the data over the network 2120 in the TCP session.
- the network-interface proxy 2210 includes a TCP state machine 2212 to establish and manage the TCP sessions over the network 2120, including maintaining state information for each TCP session and implementing packet sequencing, error recovery and flow control mechanisms.
- the TCP state machine 2212 sequences and processes packet streams received over the TCP sessions and provides the sequenced payload data to the device-interface proxy 2220. Because TCP state machine 2212 previously sequenced and processed the payload data, the device-interface proxy 2220 is then capable of providing a uniform data stream to networking device 2140 in the local session.
- the TCP state machine 2212 further packetizes payload data received from device-interface proxy 2220 and transmits it over the corresponding TCP session.
- the device-interface proxy 2220 may include a TCP state machine 2222 to establish and manage local TCP sessions with the networking device 2140.
- TCP state machine 2222 operates similarly to TCP state machine 2212 with respect to packet streams over the local TCP sessions.
- FIG. 13B shows, in block form, an example packet flow through proxy 2200 shown in Figures 12 and 13 A.
- the network-interface proxy 2210 receives a packet stream in TCP session 2122.
- the packet stream includes three TCP data payloads 1, 2A, 2B, 2C, and 3, which may arrive at network-interface proxy 2210 at varying rates, out-of-order, IP fragmented, e.g., payload 2 fragmented into 2A, 2B and 2C, and duplicated.
- the network-interface proxy 2210 reassembles the fragmented packets (fragments 2A, 2B, and 2C into TCP payload 2), reorders the TCP payloads, and discards the duplicated packets upon their arrival.
- the in-order and reassembled TCP payload data is then provided to the device-interface proxy 2220, where it is transmitted in the local TCP session 2124 at a uniform rate.
- the network-interface proxy 2210 may also perform cryptography operations upon the TCP packets prior to the reassembly and reordering, when they are received in need of decryption and/or authentication. This processing and uniform transmission by the proxy 200 allows a networking device 2140 to II 1 "" if.,,,. II ..''''U' Ii iui Ii elect ⁇ ⁇ itTM. , ⁇ i o, H n Ji Congress3 receive a uniform in-order packet stream, thus reducing its processing burden.
- FIG 14 shows an example flow chart 2300 illustrating embodiments for operating the proxy 2200 shown in Figures 12, 13 A, and 13B.
- the proxy 2200 establishes a TCP session over the network 2120 and a local session with a networking device 2140.
- the proxy 2200 may establish the TCP session 2122 through a three-way handshake with a remote TCP endpoint.
- the proxy 2200 may then establish a local session 2124 with the networking device 2140 responsive to the remote TCP session 2122 establishment.
- the local session 2124 may be established concurrently with the establishment of the TCP session 2122 to decrease data exchange latency, or it may be established after the TCP session 2122 to avoid problems with SYN floods and other TCP- based attacks.
- the local session 2124 is also a TCP session established with a three-way handshake between the proxy 2200 and the networking device 2140.
- the proxy 2200 receives a packet stream in the TCP session 2122 over the network 2120.
- the proxy 2200 manages the TCP session 2122 by providing error recovery for lost or late packets and flow rate control by adjusting the size of the TCP window.
- the proxy 2200 translates data from the packet stream to the local session 2124.
- the translation includes sequencing and depacketizing the data, e.g., with the network-interface proxy 2210, and providing the data to the networking device 2140 in the local session 2124.
- the sequencing may include reordering of those packets received out-of-order and discarding duplicated packets, while the depacketization may include any additional processing that may be required, such as reassembly of IP fragmented packets and/or performance of cryptography operations according to IPSec headers.
- the flowchart 2300 shows data transfers from the network 2120 to the networking device 2140, proxy 2200 may also provide data in the opposite direction.
- ! 'i-i' ;:; "i ⁇ ⁇ • ⁇ ' IC .1'” fcli ItJlinger;::! provides operations that are not typically provided in firewalls.
- the proxy 2200 can also include, in addition to the TCP proxy operations, other conventional firewall operations
- Figure 15 illustrates, in block form, a semantic processor 2400 useful with embodiments of the network-interface proxy 2210 and device-interface proxy 2220 shown in Figures 13A and 13B.
- a semantic processor 2400 contains an input buffer 2430 for buffering data streams received through the input port 2410, and an output buffer 2440 for buffering data steams to be transmitted through output port 2420.
- Input 2410 and output port 2420 may comprise a physical interface to network 2120 ( Figures 12, 13 A, and 13B), e.g., an optical, electrical, or radio frequency driver/receiver pair for an Ethernet, Fibre Channel, 802.1 Ix, Universal Serial Bus, Firewire, SONET, or other physical layer interface.
- a PCI-X interface 2480 is coupled to the input buffer 2430, the output buffer 2440, and an external PCI bus 2482.
- the PCI bus 2482 can connect to other PCI-capable components, such as disk drives, interfaces for additional network ports, other semantic processors, etc.
- the PCI-X interface 2480 provides data streams or packets to input buffer 2430 from PCI bus 2482 and transmits data streams packets over PCI bus 2482 from output buffer 2440.
- Semantic processor 2400 includes a direct execution parser (DXP) 2450 that controls the processing of packets in the input buffer 2430 and a semantic processing unit (SPU) 2460 for processing segments of the packets or for performing other operations.
- the DXP 2450 maintains an internal parser stack (not shown) of non-terminal (and possibly also terminal) symbols, based on parsing of the current input frame or packet up to the current input symbol. When the symbol (or symbols) at the top of the parser stack is a terminal symbol, DXP 2450 compares data DI at the head of the input stream to the terminal symbol and expects a match in order to continue.
- DXP 2450 uses the non-terminal symbol NT and current input data DI to expand the grammar production on the stack. As parsing continues, DXP 2450 instructs a SPU 2460 to process segments of the input, or perform other operations.
- Semantic processor 2400 uses at least three tables. Code segments for SPU 2460 are stored in semantic code table 2456. Complex grammatical production rules are stored in a production rule table (PRT) 2454. Production rule (PR) codes 2453 for retrieving those production rules are stored in a parser table (PT) 2452. The PR codes 2453 in parser table 2452 also allow DXP 2450 to detect whether, for a given production rule, a code segment from semantic code table 2456 should be loaded and executed by SPU 2460. The production rule (PR) codes 2453 in parser table 2452 point to production rules in production rule table 2454. PR are stored, e.g., in a row-column format or a content- addressable format.
- a concatenation of the non-terminal symbol NT and the input data value (or values) DI can provide the input to the parser table 2452.
- semantic processor 2400 implements a content-addressable format, where DXP 2450 concatenates the non ⁇ terminal symbol NT with 8 bytes of current input data DI to provide the input to the parser table 2452.
- parser table 2452 concatenates the non-terminal symbol NT and 8 bytes of current input data DI received from DXP 2450.
- Input buffer 2430 includes a recirculation buffer 2432 to buffer data steams requiring additional passes through the DXP 2450.
- DXP 2450 parses data streams from recirculation buffer 2432 similarly to those received through input port 2410 or PCI bus 2482.
- the semantic processor 2400 includes a memory subsystem 2470 for storing or augmenting segments of the packets.
- the SPU 2460 may sequence TCP packets and/or collect and assemble IP fragmented packets within memory subsystem 2470.
- the memory subsystem 2470 may also perform cryptography operations on data streams, including encryption, decryption, and authentication, when directed by SPU 2450. Once reassembled and/or processed in the memory subsystem 2470, the packets or their headers with a specialized NT symbol may be sent to the recirculation buffer 2432 for additional parsing by DXP 2450.
- the reception order of packets gives rise to semantics that may be exploited by this semantic processing architecture. For instance, the reception of a TCP SYN packet indicates to the DXP 2450 an attempt to establish a TCP session, however if the session has already been established there is no further need to allocate resources to complete the processing of the packet, acknowledge its arrival, or maintain corresponding state information. Thus any TCP packet may be correct syntactically, but out-of-sequence with regard to the state of the TCP session.
- the semantic processor 2400 recognizes these packet-ordering semantics and implements a TCP state machine, such as 2212 or 2222 in Figure 14, for managing the required TCP interactions and maintaining the state information for TCP sessions.
- Figure 16 shows an example flow chart 2500 illustrating embodiments for operating the semantic processor 2400 shown in Figure 15 as a TCP state machine.
- the semantic processor 2400 receives a packet at input buffer 2430 (at block 2510) and determines the packet contains a TCP header (at block 2520).
- the semantic processor 2400 determines the presence of the TCP header by parsing through the received packet's lower level headers with DXP 2450.
- the semantic processor 2400 determines whether the received TCP packet corresponds to a TCP session maintained by semantic processor 2400.
- the memory subsystem 2470 maintains information for each active TCP session with IK IL. II ..• ⁇ U ⁇ 3 1L.H !b> ./ IC ./ ' Oi U réelle3 semantic processor 2400, including the current state of the session, packet sequencing, and window sizing.
- the SPU 2460 when directed by the DXP 2450, performs a lookup within memory subsystem 2470 for a maintained TCP session that corresponds to the received TCP packet.
- the semantic processor 2400 determines whether the TCP packet coincides with the current state of the TCP session.
- the SPU 2460 may retrieve the state of the maintained TCP session, e.g., one or more non-terminal (NT) symbols, for the DXP 2450. These NT symbols point to specialized grammatical production rules that correspond to each of the TCP states and control how the DXP 2450 parses the TCP packet.
- the TCP SYN packet does not coincide with the state of the TCP session and thus is discarded (at block 2580) without further processing.
- the TCP packet is a TCP data packet or a TCP FIN packet in an already established TCP session
- the DXP 2450 parses the packet according to the state of the TCP session in a next block 2550.
- the SPU 2460 may forward the TCP packet to the destination address for a networking device 2140, or send the payload to another semantic processor 2400 where it is provided to the networking device 2140 in a local session 2124.
- the SPU 2460 performs any reassembly or cryptography operations, including decryption and/or authentication, before forwarding the packets in the TCP session to the networking device 2140.
- the processed packets are provided to output buffer 2440, or to PCI bus 2482 via PCI-X interface 2480, after the processing operations have been completed by SPU 2460.
- IK L Ii . ⁇ ⁇ ' ⁇ ⁇ !hi Ui "3 / c:: .. ⁇ " ⁇ «; u .:s
- semantic processor 2400 maintained within semantic processor 2400, in a next decision block 2560, the semantic
- processor 2400 determines whether the TCP packet is a SYN packet attempting to establish a
- the DXP 2450 may determine if the TCP packet
- processor 2400 discards the packet from the input buffer 2430.
- the SPU 2460 may discard
- the semantic processor When the TCP packet is a SYN packet, in a next block 2570, the semantic processor
- the SPU 2460 when directed
- DXP 2450 executes microinstructions from semantic code table 2456 that cause the SPU
- the SPU 2460 may open the TCP session by sending a TCP
- Packets have headers that provide
- Semantic processing where the semantics of the header drive the processing of the payload as necessary, fits especially well in packet
- FIG 17 shows a block diagram of a semantic processor 3010.
- the semantic F" Ll Il ,/ U !i:::i ⁇ LH !!:::n / «:::!: ./ U Ulmony::;! processor 3010 may contain an input buffer 3014 to buffer an input data stream received through the input port 3012; a parser 3018, which may also be referred to as a direct execution parser to control the processing of packets in the input buffer 3012; at least one semantic processing unit 3016 to process segments of the packets or to perform other operations; and a memory subsystem 3026 to store or augment segments of the packets.
- the parser 18 maintains an internal parser stack 3032, shown in Figure 20, of symbols, based on parsing of the current input frame or packet up to the current input symbol. For instance, each symbol on the parser stack 3032 is capable of indicating to the parser 3018 a parsing state for the current input frame or packet.
- the symbols are generally non-terminal symbols, although terminal symbols may be in the parser stack as well.
- the parser 3018 compares data at the head of the input stream to the terminal symbol and expects a match in order to continue.
- the data is identified as Data In and is generally taken in some portion, such as bytes. Terminal symbols, for example, may be compared against one byte of data, DI.
- the symbol at the top of the parser stack 3032 is a non-terminal (NT) symbol
- parser 3018 uses the non-terminal symbol NT and current input data DI detect a match in the production rule code memory 3220 and subsequently the product rule table (PRT) 3022 which may yield more non-terminal (NT) symbols that expands the grammar production on the stack 3032.
- PRT product rule table
- the parser 3018 may instruct SPU 3016 to process segments of the input stream, or perform other operations.
- a segment of the input stream may be the next 'n' bytes of data, identified as DI[n].
- the parser 3018 may parse the data in the input stream prior to receiving all of the data to be processed by the semantic processor 3010. For instance, when the data is packetized the semantic processor 3010 may begin to parse through the headers of the packet before the entire packet IITM" Ii,.,,. it .. ⁇ ' ii,..ii :::::i ⁇ 11...11 :rn .. ⁇ ' 11::::; J' X O IUI .3 is received at input port 3012.
- Semantic processor 3010 generally uses at least three tables. Code segments for SPU 3016 are stored in semantic code table (SCT) 3024. Complex grammatical production rules are stored in a production rule table (PRT) 3022. Production rule (PR) codes for retrieving those production rules are stored in a parser table (PT) 3020. The PR codes in parser table 3020 also allow parser 3018 to detect whether a code segment from semantic code table 3024 should be loaded and executed by SPU 3016 for a give production rule.
- SCT semantic code table
- PRT production rule table
- PR Production rule
- PT parser table
- the production rule (PR) codes in parser table 3200 point to production rules in production rule table 3220.
- PR codes are stored in some fashion, such as in a row-column format or a content-addressable format.
- a row-column format the rows of the table 3020 are indexed by a non-terminal symbol NT on the top of the internal parser stack 3032 of Figure 20, and the columns of the table are indexed by an input data value or values DI at the head of the data input stream in input buffer 3012.
- a concatenation of the non-terminal symbol NT and the input data value or values DI can provide the input to the table 3020.
- Semantic processor 3010 will typically implement a content-addressable format, in which parser 3018 concatenates the non-terminal symbol NT with 8 bytes of current input data DI to provide the input to the parser table 3020.
- parser table 3020 concatenates the non-terminal symbol NT and 8 bytes of prior input data DI stored in the parser 3018. It must be noted that some embodiments may include more components than those shown in Figure 17. However, for discussion purposes and application of the embodiments, those components are peripheral.
- Parser table30 20 is comprised of a production rule (PR) code memory 3220.
- PR code IHML,,;; Ii ,/ ifj ⁇ ::::U U :::::n / c;..-' 1 om » memory 3200 contains a plurality of PR codes that are used to access a corresponding production rule stored in the production rule table (PRT) 3022.
- PRT production rule table
- the input values as discussed above such as a non-terminal (NT) symbol concatenated with current input values DI[n], where n is a selected match width in bytes need not be assigned in any particular order in PR code memory 3200.
- parser table 3200 also includes an addressor 3202 that receives an NT symbol and data values DI[n] from parser 3018 of Figure 17. Addressor 3202 concatenates an NT symbol with the data values DI[n], and applies the concatenated value to PR code memory 3200.
- parser 3018 concatenates the NT symbol and data values DI[n] prior to transmitting them to parser table 3020.
- production rule code memory 3200 Although conceptually it is often useful to view the structure of production rule code memory 3200 as a matrix with one PR code for each unique combination of NT code and data values, there is no limitation implied as to the embodiments of the present invention. Different types of memory and memory organization may be appropriate for different types of memory and memory organization.
- the parser table 3020 is implemented as a Content Addressable Memory (CAM), where addressor 3202 uses an NT code and input data values DI[n] as a key for the CAM to look up the PR code corresponding to a production rule in the PRT 3022.
- the CAM is a Ternary CAM (TCAM) populated with TCAM entries.
- TCAM entry comprises an NT code and a DI[n] match value.
- Each NT code can have multiple TCAM entries.
- Each bit of the DI[n] match value can be set to "0", "1", or "X" (representing "Don't Care").
- one row of the TCAM can contain an NT code NTJP for an IP destination address IF' 11 U I! .. ⁇ • " U bi U !bt / n / ;i::l u JS field, followed by four bytes representing an IP destination address corresponding to a device incorporating the semantic processor 3010.
- the remaining four bytes of the TCAM row are set to "don't care.”
- NTJP and eight bytes DI[8] are submitted to parser table 3020, where the first four bytes of DI[8] contain the correct IP address, a match will occur no matter what the last four bytes of DI[8] contain.
- the TCAM employs the "Don't Care" capability and there can be multiple TCAM entries for a single NT, the TCAM can find multiple matching TCAM entries for a given NT code and DI[n] match value. The TCAM prioritizes these matches through its hardware and only outputs the match of the highest priority. Further, when a NT code and a DI[n] match value are submitted to the TCAM, the TCAM attempts to match every TCAM entry with the received NT code and DI[n] match code in parallel. Thus, the TCAM has the ability to determine whether a match was found in parser table 3020 in a single clock cycle of semantic processor 3010.
- TCAM coding allows a next production rale to be based on any portion of the current eight bytes of input. If only one bit, or byte, anywhere within the current eight bytes at the head of the input stream, is of interest for the current rule, the TCAM entry can be coded such that the rest are ignored during the match. Essentially, the current "symbol" can be defined for a given production rule as any combination of the 64 bits at the head of the input stream.
- the TCAM in parser table 3020 produces a PR code corresponding to the TCAM entry 3204 matching NT and DI[n], as explained above.
- the PR code can be sent back to parser 3018, directly to PR table 3022, or both.
- the PR code is the row P L I! ⁇ • ' ⁇ U !!::;[. IUl » 3 ./ ⁇ :::!; / ' 1 B lLn index of the TCAM entry producing a match.
- the PR code is accompanied by a "valid" bit, which remains unset if no TCAM entry matched the current input.
- parser table 3020 constructs a default PR code corresponding to the NT supplied to the parser table. The use of a valid bit or default PR code will next be explained in conjunction with Figure 19.
- Parser table 3020 can be located on or off-chip or both, when parser 3018 and SPU 3016 are integrated together in a circuit.
- static RAM (SRAM) or TCAM located on-chip can serve as parser table 3020.
- off-chip DRAM or TCAM storage can store parser table 3020, with addressor 3202 serving as or communicating with a memory controller for the off-chip memory.
- the parser table 3020 can be located in off-chip memory, with an on-chip cache capable of holding a section of the parser table 3020.
- PR table 3022 comprises a production rule memory 3220, a Match All Parser entries Table (MAPT) memory 3228, and an addressor 3222.
- MTT Match All Parser entries Table
- addressor 3222 receives PR codes from either parser 3018 or parser table 3020, and receives NT symbols from parser 3018.
- the received NT symbol is the same NT symbol that is sent to parser table 3020, where it was used to locate the received PR code.
- Addressor 3222 uses these received PR codes and NT symbols to access corresponding production rules and default production rules, respectively.
- the received PR codes address production rules in production rule memory 3220 and the received NT codes address default production rules in MAPT 3228.
- Addressor 3222 may not be necessary in some implementations, but when used, can be part of parser 3018, part of PRT 3022, or an intermediate functional block.
- An addressor may not be IP C T ' / U bi U lb ./ ii:::!: ./ iEl «.:iil needed, for instance, if parser table 3020 or parser 3018 constructs addresses directly.
- Production rule memory 3220 stores the production rales 3224 containing three data segments. These data segments include: a symbol segment, a SPU entry point (SEP) segment, and a skip bytes segment. These segments can either be fixed length segments or variable length segments that are, preferably, null-terminated.
- the symbol segment contains terminal and/or non-terminal symbols to be pushed onto the parser stack 3032 of Figure 20.
- the SEP segment contains SPU entry points (SEP) used by the SPU 16 in processing segments of data.
- the skip bytes segment contains skip bytes data used by the input buffer 1 3014 to increment its buffer pointer and advance the processing of the input stream. Other information useful in processing production rules can also be stored as part of production rale 3224.
- MAPT 3228 stores default production rales 3226, which in this embodiment have the same structure as the PRs in production rule memory 3220, and are accessed when a PR code cannot be located during the parser table lookup.
- production rale memory 3220 and MAPT 3228 are shown as two separate memory blocks, there is not requirement or limitation to this implementation, hi one embodiment, production rule memory 3220 and MAPT 3228 are implemented as on-chip SRAM, where each production rale and default production rule contains multiple null- terminated segments. As production rales and default production rales can have various lengths, it is preferable to take an approach that allows easy indexing into their respective memories 3220 and 3228.
- each PR has a fixed length that can accommodate a fixed maximum number of symbols, SEPs, and auxiliary data such as the skip bytes field.
- the sequence can be terminated with a NULL symbol or SEP.
- a given PR would require more than P 11,,,;; Ii / u a i ⁇ .,. ⁇ t sn ./ EI: ./ ;i:j iy 3 the maximum number, it can be split into two PRs. These are then accessed such as by having the first issue a skip bytes value of zero and pushing an NT onto the stack that causes the second to be accessed on the following parsing cycle.
- a one-to-one correspondence between TCAM entries and PR table entries can be maintained, such that the row address obtained from the TCAM is also the row address of the corresponding production rule in PR table 3022.
- the MAPT 3228 section of PRT 3022 can be similarly indexed, but using NT codes instead of PR codes. For instance, when a valid bit on the PR code is unset, addressor 3222 ' can select as a PR table address the row corresponding to the current NT. For instance, if 256 - NTs are allowed, MAPT 3228 could contain 256 entries, each indexed to one of the NTs. When parser table 3020 has no entry corresponding to a current NT and data input DI[n], the corresponding default production rule from MAPT 3228 is accessed.
- the parser table 3020 can be configured to respond to one of two expected destination addresses during the appropriate parsing cycle. For all other destination addresses, no parser table entry would be found. Addressor 3222 would then look up the default rule for the current NT, which would direct the parser 3018 and/or SPU 3016 to flush the current packet as a packet of no interest.
- the PR code could be arithmetically manipulated to determine a production rule's physical memory starting address (this would be possible, for instance, if the production rules were sorted by expanded length, and then PR codes were assigned according to a rule's sorted position).
- an intermediate pointer table can be used to determine the address of the production rule in PRT 3022 from the PR code or the default production rule in MAPT 3228 from the NT symbol.
- Figure 20 shows one possible block implementation for parser 3018.
- Parser control finite state machine (FSM) 3030 controls and sequences overall parser 3018 operations, based on inputs from the other logical blocks in Figure 20.
- Parser stack 3032 stores the symbols to be executed by parser 3018.
- Input stream sequence control 3028 retrieves input data values from input buffer 12, to be processed by parser 18.
- SPU interface 3034 dispatches tasks to SPU 3016 on behalf of parser 3018. The particular functions of these blocks will be further described below.
- semantic processor 3010 waits for a packet to be received at input buffer 3014 through input port 3012.
- input buffer 3014 sends a Port ID signal to parser 3018 to be pushed onto parser stack 32 as a NT symbol at 3042.
- the Port ID signal alerts parser 3018 that a packet has arrived at input buffer 3014.
- the Port ID signal is received by the input stream sequence control 3028 and transferred to FSM 3030, where it is pushed onto parser stack 3032.
- a 1-bit status flag, preceding or sent in parallel with the Port ID, may denote the Port ID as an NT symbol.
- parser 3018 receives N bytes of input stream data from input buffer 3012. This is done, after determining that the symbol on the top of parser stack 3032 is not the bottom-of-stack symbol and that the DXP is not waiting for further input. Parser 3018 requests and receives the data through a DATA/CONTROL signal coupled between the input stream sequence control 3028 and input buffer 3012.
- the process determines whether the symbol on the parser stack 3032 is a terminal symbol or an NT symbol. This determination may be performed by FSM 3030 reading the status flag of the symbol on parser stack 3032.
- parser 3018 checks for a match between the T symbol and the next byte of data from the received N bytes at 3048.
- FSM 3030 may check for a match by comparing the next byte of data received by input stream sequence control 3028 to the T symbol on parser stack 3032. After the check is completed, FSM 3030 pops the T symbol off of the parser stack 3032, possibly by decrementing the stack pointer.
- parser 3018 When a match is not made at 3046 or at 3048, the remainder of the current data segment may be assumed in some circumstances to be unparseable as there was neither an NT symbol match nor a terminal symbol match.
- parser 3018 resets parser stack 3032 and launches a SEP to remove the remainder of the current packet from the input buffer 3014.
- FSM 3030 resets parser stack 3032 by popping off the remaining symbols, or preferably by setting the top-of-stack pointer to point to the bottom-of-stack symbol.
- Parser 3018 launches a SEP by sending a command to SPU 3016 through SPU interface 3034. This command may require SPU 3016 to load microinstructions from SCT 3024, that when executed, enable SPU 3016 to remove the remainder of the unparseable data segment from the input buffer 3014. Execution then returns to block 3040.
- the parser may be configured to handle ordinary header options directly with grammar.
- Other, less common or difficult header options could be dealt with using a default grammar rule that passes the header options to a SPU for parsing.
- parser 3018 requests and receives additional input stream data from input buffer 3014.
- parser 3018 would only request and receive one byte of input stream data after a T symbol match was made, to refill the DI buffer since one input symbol was consumed.
- parser 3018 sends the NT symbol from parser stack 3032 and the received N bytes DI[N] in input stream sequence control 3028 to parser table 3020, where parser table 3020 checks for a match as previously described. In the illustrated embodiment, parser table 3020 concatenates the NT symbol and the received N bytes.
- the NT symbol and the received N bytes can be concatenated prior to being sent to parser table 3020.
- the received N bytes are concurrently sent to both SPU interface 3034 and parser table 3020, and the NT symbol is concurrently sent to both the parser table 3020 and the PRT 3022.
- FSM 3030 pops the NT symbol off of the parser stack 3032, possibly by decrementing the stack pointer.
- a match is made at 3050, it is determined if the symbol is a debug symbol at 3052. If it is a debug symbol at 3052, the process moves to a debug process as set out in Figure 22. If it is not a debug symbol at 3052, a production rule code match is determined at 3056. This provides a matching production rule from the production rule table 3022. Optionally, the PR code is sent from parser table 3200 to PRT 3250, through parser 3018.
- parser 3018 uses the received NT symbol to look up a default production rule in the PRT 3022 at 3058.
- the default production rule is looked up in the MAPT 3228 memory located within PRT 3022.
- MAPT 3228 memory can be located in a memory block other than PRT 3022.
- the default production rule may be a debug rule that places the parser in debug mode in recognition of encountering a symbol that has no rule.
- PRT 3022 when PRT 3022 receives a PR code, it only returns a PR to parser 3018 at 3060, corresponding either to a found production rule or a default production rule.
- a PR and a default PR can both be returned to parser 3018 at 3060, with parser 3018 determining which will be used.
- parser 3018 processes the rule received from PRT 3250.
- the rule received by parser 3018 can either be a production rule or a default production rule.
- FSM 3030 divides the rule into three segments, a symbol segment, SEP segment, and a skip bytes segment. Each segment of the rule may be fixed length or null- terminated to enable easy and accurate division.
- FSM 3030 pushes T and/or NT symbols, contained in the symbol segment of the production rule, onto parser stack 3032.
- FSM 3030 sends the SEPs contained in the SEP segment of the production rule to SPU interface 3034.
- Each SEP contains an address to microinstructions located in SCT 3024.
- SPU interface 3034 allocates SPU 3016 to fetch and execute the microinstructions pointed to by the SEP.
- SPU interface 3034 also sends the current DI[N] value to SPU 3016, as in many situations the task to be completed by the SPU will need no further input data.
- SPU interface 3034 fetches the microinstructions to be executed by SPU 3016, and sends them to SPU 3016 concurrent with its allocation.
- FSM 3030 sends the skip bytes segment of the production rule to input buffer 3014 through input stream sequence control 3028.
- Input buffer 3014 uses the skip bytes data to increment its buffer pointer, pointing to a location in the input stream.
- Each parsing cycle can accordingly consume any number of input symbols between 0 and 8.
- the next symbol on the parser stack 3032 is determined to be a bottom-of-stack symbol at 3064, or if the parser stack need further parsing.
- parser 3018 determines whether the input data in the selected buffer is in need of further parsing.
- the input data in input buffer 3014 is in need of further parsing when the stack pointer for parser stack 3032 is pointing to a symbol other than the bottom-of-stack symbol.
- FSM 3030 receives a stack empty signal SE when the stack pointer for parser stack 3032 is pointing to the bottom-of- stack symbol.
- parser 3018 determines whether it can continue parsing the input data in the selected buffer at 3066. In one embodiment, parsing can halt on input data from a given buffer, while still in need of parsing, for a number of reasons, such as dependency on a pending or executing SPU operation, a lack of input data, other input buffers having priority over parsing, etc. Parser 3018 is alerted to SPU processing delays by SEP dispatcher 3036 through a Status signal, and is alerted to priority parsing tasks by status values in stored in FSM 3030.
- parser 3018 When parser 3018 can continue parsing in the current parsing context, execution returns to block 3044, where parser 3018 requests and receives up to N bytes of data from the input data within the selected buffer.
- parser 3018 When parser 3018 cannot continue parsing at 3066, parser 3018 saves the selected parser stack and subsequently de-selects the selected parser stack and the selected input buffer at 3068.
- Input stream sequence control 3028 after receiving a switch signal from FSM 3030, de-selects one input port within 3012 by selecting another port within 3012 that has received input data. The selected port within 3012 and the selected stack within the parser stack 3032 can remain active when there is not another port with new data waiting to be parsed.
- a NT symbol designating a debug operation may be useful.
- the parser 3018 encounters a debug NT symbol as shown at 3054 in Figure 21, the parser is placed in a debug state.
- a 'debug' symbol may be an explicit debug symbol or a previously unknown symbol in the data being parsed. Both of these will be referred to as a debug symbol.
- any NT symbol for which there is not a match may place the parser in a debug state.
- the default production rule of Figure 21 is a debug rule. In either case, the parser is placed in a debug state upon encountering a symbol that is unanticipated or for which there is no rule. The default production rule for the unknown symbol becomes a debug production rule.
- the parser assumes a debug state at 3070.
- the debug state will trigger an error message, either after the parser assumes the debug state, or simultaneously.
- the error message may be an interrupt transmitted to the SPU dispatcher indicating that an error condition or interrupt has occurred and a SPU is needed to handle the situation. The dispatcher then launches an SPU to handle the error.
- Handling the error may comprise gathering information related to the situation that caused the parser to assume the debug state. This information may include the last key used in looking up the symbol in the CAM, where the key may be the last NT symbol concatenated with the next N bytes of data, as discussed above. The information may also include the last production rule code retrieved prior to this symbol, the packet identifier of the current packet being processed, the status of the FSM, and the status of any error and interrupt registers used in the system. Further, the debug may cause the parser to save the contents of the parser stack for inspection or observation by an SPU. Once this information is gathered, it is stored, presented to a user, or transmitted back to a manufacturer.
- the present parser may save an error log for a user to view later, or create an error message on a user display.
- the log could be generated by a device operating at a customer site, and the log accessed by a service person during maintenance.
- the log or error message may be transmitted from the customer site back to the manufacturer to allow the manufacturer to remedy the problem. 5 In this manner, the ability of a manufacturer to identify and expand a grammar used in
- parsing packets is enhanced.
- the debug state allows the system to gather data related to a situation that the parser encountered and could not parse. This data can be used to determine if there is a new or previously unknown header that requires a new production rule code to be added to the grammar.
- FIG. 23 shows a block diagram of a semantic processor 4100 according to an embodiment of the invention.
- the semantic processor 4100 contains an input buffer 4140 for buffering a packet data stream (e.g., the input stream) received through the input port 4120, a direct execution parser (DXP) 4180 that controls the processing of packet data received at the input buffer 4140, a recirculation buffer 4160, a semantic processing unit (SPU) 4200 for
- DXP direct execution parser
- SPU semantic processing unit
- a memory subsystem 4240 for storing and/or augmenting segments of the packets
- an output buffer 4750 for buffering a data stream (e.g., the output stream) received from the SPU 4200.
- the DXP 4180 maintains an internal parser stack (not shown) of terminal and non ⁇ terminal symbols, based on parsing of the current frame up to the current symbol. For 0 instance, each symbol on the internal parser stack is capable of indicating to the DXP 4180 a parsing state for the current input frame or packet.
- DXP 4180 compares data at the head of the input stream to the terminal symbol and expects a match in order to continue.
- the symbol at the top of the parser stack is a non-terminal symbol
- DXP 4180 uses the non-terminal symbol
- DXP 4180 instructs SPU 4200 to process segments of the input stream or perform other operations.
- the DXP 4180 may parse the data in the input stream prior to receiving all of the data to be processed by the semantic processor 4100. For instance, when the data is packetized, the semantic processor 4100 may begin to parse through the headers of the packet before the entire packet is received at input port 4120.
- Semantic processor 4100 uses at least three tables. Code segments for SPU 4200 are stored in semantic code table (SCT) 4150. Complex grammatical production rules are stored in a production rule table (PRT) 4190. Production rule codes for retrieving those production rules are stored in a parser table (PT) 4170. The production rule codes in parser table 4170 allow DXP 4180 to detect whether, for a given production rule, a code segment from SCT 4150 should be loaded and executed by SPU 4200.
- SCT semantic code table
- PRT production rule table
- PT parser table
- Some embodiments of the invention contain many more elements than those shown in FIG. 23, but these elements may appear in every system or software embodiment. Thus, a description of the packet flow within the semantic processor 100 shown in FIG. 23 will be given before more complex embodiments are addressed.
- FIG. 24 contains a flow chart 4300 for the processing of received packets through the semantic processor 4100 of FIG. 23.
- the flowchart 4300 is used for illustrating a method of the invention.
- a packet is received at the input buffer 4140 through the input port 4120.
- the DXP 4180 begins to parse through the header of the packet within the input buffer 4140.
- the DXP 4180 If the DXP 4180 was able to completely parse through the header, then according to a next block 4370, the DXP 4180 calls a routine within the SPU 4200 to process the packet payload. The semantic processor 4100 then waits for a next packet to be received at the input buffer 4140 through the input port 4120.
- the DXP 4180 calls a routine within the SPU 4200 to manipulate the packet or wait for additional packets. Upon completion of the manipulation or the arrival of additional packets, the SPU 4200 creates an adjusted packet. According to a next block 4350, the SPU 4200 writes the adjusted packet (or a portion thereof) to the recirculation buffer 4160. This can be accomplished by either enabling the recirculation buffer 4160 with direct memory access to the memory subsystem 4240 or by having the SPU 4200 read the adjusted packet from the memory subsystem 4240 and then write the adjusted packet to the recirculation buffer 4160.
- a specialized header can be written to the recirculation buffer 4160.
- This specialized header directs the SPU 4200 to process the adjusted packet without having to transfer the entire packet out of memory subsystem 4240.
- the DXP 180 begins to parse through the header of the data within the recirculation buffer 4160. Execution is then returned to block 4330, where it is determined whether the DXP 4180 was able to completely parse through the header. If the DXP 4180 was able to completely parse through the header, then according to a next block 4370, the DXP 4180 calls a routine within the SPU 4200 to process the packet payload and the semantic processor 4100 waits for a next packet to be received at the input buffer 4140 through the input port 4120. If the DXP 4180 had to cease parsing the header, execution returns to block 4340
- DXP 4180 calls a routine within the SPU 4200 to manipulate the packet or wait for
- the SPU 4200 then writes the adjusted
- FIG. 25 shows another semantic processor embodiment 4400.
- 4400 includes memory subsystem 4240, which comprises an array machine-context data
- AMCD dynamic random access memory 4430 for accessing data in dynamic random access memory (DRAM) 4480
- CB cache 4450 for caching context control blocks to and from DRAM 4480, a
- general cache 4460 for caching data used in basic operations
- streaming cache 4470 for streaming data
- control block cache 4450 is preferably a software-controlled cache, i.e., the SPU 4410
- the SPU 4410 is coupled with AMCD 4430, cryptography block 4440, CCB cache
- the SPU 4410 loads microinstructions from semantic code table (SCT) 4150.
- SCT semantic code table
- microinstructions are then executed in the SPU 4410 and the segment of the packet is
- FIG. 26 contains a flow chart 4500 for the processing of received Internet Protocol
- IP IP-fragmented packets through the semantic processor 400 of FIG. 25.
- the flowchart 4500
- the DXP 4180 ceases parsing through the headers of the received packet because the packet is determined to be an IP-fragmented packet.
- the DXP 4180 completely parses through the IP header, but ceases to parse through any headers belonging to subsequent layers, such as TCP, UDP, iSCSI, etc.
- the DXP 4180 signals to the SPU 4410 to load the appropriate microinstructions from the SCT 4150 and read the received packet from the input buffer 4140.
- the SPU 4410 writes the received packet to DRAM 4480 through the streaming cache 4470.
- blocks 4520 and 4530 are shown as two separate steps, optionally, they can be performed as one step—with the SPU 4410 reading and writing the packet concurrently.
- This concurrent operation of reading and writing by the SPU 4410 is known as SPU pipelining, where the SPU 4410 acts as a conduit or pipeline for streaming data to be transferred between two blocks within the semantic processor 4400.
- the SPU 4410 determines if a Context
- Control Block has been allocated for the collection and sequencing of the correct IP packet fragments.
- the CCB for collecting and sequencing the fragments corresponding to an IP-fragmented packet is stored in DRAM 4480.
- the CCB contains pointers to the IP fragments in DRAM 4480, a bit mask for the IP-fragmented packets that have not arrived, and a timer value to force the semantic processor 4400 to cease waiting for additional IP -fragmented packets after an allotted period of time and to release the data stored in the CCB within DRAM 4480.
- the SPU 4410 preferably determines if a CCB has been allocated by accessing the AMCD's 4430 content-addressable memory (CAM) lookup function using the IP source address of the received IP -fragmented packet combined with the identification and protocol from the header of the received IP packet fragment as a key.
- the IP fragment keys are stored in a separate CCB table within DRAM 4480 and are accessed with the CAM by using the IP source address of the received IP-fragmented packet combined with the identification and protocol from the header of the received IP packet fragment. This optional addressing of the IP fragment keys avoids key overlap and sizing problems.
- the SPU 4410 determines that a CCB has not been allocated for the collection and sequencing of fragments for a particular IP-fragmented packet, execution then proceeds to a block 4550 where the SPU 4410 allocates a CCB.
- the SPU 4410 preferably enters a key corresponding to the allocated CCB, the key comprising the IP source address of the received IP fragment and the identification and protocol from the header of the received IP -fragmented packet, into an IP fragment CCB table within the AMCD 4430, and starts the timer located in the CCB.
- the IP header is also saved to the CCB for later recirculation. For further fragments, the IP header need not be saved.
- the SPU 4410 stores a pointer to the IP-fragmented packet (minus its IP header) in DRAM 4480 within the CCB, according to a next block 4560.
- the pointers for the fragments can be arranged in the CCB as, e.g., a linked list.
- the SPU 4410 also updates the bit mask in the newly allocated CCB by marking the portion of the mask corresponding to the received fragment as received.
- the SPU 410 determines if all of the IP fragments from the packet have been received. Preferably, this determination is accomplished by using the bit mask in the CCB. A person of ordinary skill in the art can appreciate that there are multiple techniques readily available to implement the bit mask, or an equivalent tracking mechanism, for use with the invention. If all of the fragments have not been received for the IP-fragmented packet, then the semantic processor 4400 defers further processing on that fragmented packet until another fragment is received.
- the SPU 4410 If all of the IP fragments have been received, according to a next block 4580, the SPU 4410 resets the timer, reads the IP fragments from DRAM 4480 in the correct order, and writes them to the recirculation buffer 4160 for additional parsing and processing. Preferably, the SPU 4410 writes only a specialized header and the first part of the reassembled IP packet (with the fragmentation bit unset) to the recirculation buffer 4160. The specialized header enables the DXP 4180 to direct the processing of the reassembled IP- fragmented packet stored in DRAM 4480 without having to transfer all of the IP -fragmented packets to the recirculation buffer 4160.
- the specialized header can consist of a designated non-terminal symbol that loads parser grammar for IP and a pointer to the CCB.
- the parser can then parse the IP header normally and proceed to parse higher-layer (e.g., TCP) headers.
- DXP 4180 decides to parse the data received at either the recirculation buffer 4160 or the input buffer 4140 through round robin arbitration. A high level description of round robin arbitration will now be discussed with reference to a first and a second buffer for receiving packet data streams. After completing the parsing of a packet within the first buffer, DXP 4180 looks to the second buffer to determine if data is available to be parsed.
- DXP 4180 looks back to the first buffer to determine if data is available to be parsed. DXP 4180 continues this round robin arbitration until data is available to be parsed in either the first buffer or second buffer.
- FIG. 27 contains a flow chart 4600 for the processing of received packets in need of decryption and/or authentication through the semantic processor 4400 of FIG. 25.
- the flowchart 4600 is used for illustrating another method according to an embodiment of the invention.
- the DXP 4180 ceases parsing through the headers of the received packet because it is determined that the packet needs decryption and/or authentication. IfDXP 4180 begins to parse through the packet headers from the recirculation buffer 4160, preferably, the recirculation buffer 4160 will only contain the aforementioned specialized header and the first part of the reassembled IP packet.
- the DXP 4180 signals to the SPU 4410 to load the appropriate microinstructions from the SCT 4150 and read the received packet from input buffer 4140 or recirculation buffer 4160.
- SPU 4410 will read the packet fragments from DRAM 4480 instead of the recirculation buffer 4160 for data that has not already been placed in the recirculation buffer 4160.
- the SPU 4410 writes the received packet to cryptography block 4440, where the packet is authenticated, decrypted, or both.
- decryption and authentication are performed in parallel within cryptography block 4440.
- the cryptography block 4440 enables the authentication, encryption, or decryption of a packet through the use of Triple Data Encryption Standard (T- DES), Advanced Encryption Standard (AES), Message Digest 5 (MD-5), Secure Hash Algorithm 1 (SHA-I), Rivest Cipher 4 (RC-4) algorithms, etc.
- T- DES Triple Data Encryption Standard
- AES Advanced Encryption Standard
- MD-5 Message Digest 5
- MD-5 Secure Hash Algorithm 1
- RC-4 Rivest Cipher 4
- block 4620 and 4630 are shown as two separate steps, optionally, they can be performed as one step with the SPU 4410 reading and writing the packet concurrently.
- the decrypted and/or authenticated packet is then written to SPU 4410 and, according to a next block 4640, the SPU 4410 writes the packet to the recirculation buffer 4160 for further processing.
- the cryptography block 4440 contains a direct memory access engine that can read data from and write data to DRAM 4480.
- SPU 4410 can then readjust the
- semantic processor 4400 saves processing time. Like with IP fragmentation, a
- fragmentation and encryption/authentication are contained in a single packet received by the
- FIG. 28 shows yet another semantic processor embodiment.
- SPU semantic processing unit
- each of the SPUs 4410-1 to 4410-n is the SPU processing units 4410-1, 4410-2, 4410-n.
- each of the SPUs 4410-1 to 4410-n is the SPU processing units 4410-1, 4410-2, 4410-n.
- the SPU cluster 4410 is coupled to the memory 1
- SEP SPU entry point
- PIC packet output buffer
- MCPU machine central processing unit
- DXP 4180 determines that a SPU task is to be launched at a specific point in
- DXP 4180 signals SEP dispatcher 4720 to load microinstructions from SCT 4150
- the allocated SPU then executes the microinstructions and the data packet is processed accordingly.
- the SPU can optionally load microinstructions from the
- the MCPU 4771 is coupled with the SPU cluster 4410 and memory subsystem 4240.
- the MCPU 4771 may perforin any desired function for semantic processor 4700 that can be
- the MCPU 4771 also has the capability to
- the memory subsystem 4240 further comprises a
- DRAM interface 4790 that couples the cryptography block 4440, context control block cache
- the AMCD 4430 connects directly to an external TCAM 4793,
- SRAM Static Random Access Memory
- the PIB 4730 contains at least one network interface input buffer, a recirculation
- the POB 4750 receives a Peripheral Component Interconnect (PCI-X) input buffer.
- PCI-X Peripheral Component Interconnect
- the port block 4740 contains one or more ports, each
- a physical interface e.g., an optical, electrical, or radio frequency driver/receiver
- the number of ports within port block 4740 corresponds
- the PCI-X interface 4760 is coupled to a PCI-X input buffer within the PIB 4730, a
- PCI-X output buffer within the POB 4750 and an external PCI bus 4780.
- the PCI bus 4780 can connect to other PCI-capable components, such as disk drive, interfaces for additional
- FIG. 29 shows one embodiment of the POB 4750 in more detail.
- the POB 4750 comprises two FIFO controllers and two buffers implemented in RAM.
- the POB 4750 includes a packer which comprises an address decoder.
- the output of the POB 4750 is coupled to an egress state machine which then connects to an interface.
- each buffer is 69 bits wide.
- the lower 64 bits of the buffer hold data, followed by three bits of encoded information to indicate how many bytes in that location are valid. Then two bits on the end are used to provide additional information, such as: a 0 indicates data; a 1 indicates end of packet (EOP); a 2 indicates Cyclic Redundance Code (CRC); and 3 is reserved.
- EOP end of packet
- CRC Cyclic Redundance Code
- the buffer holds 8 bytes of data.
- the packets of data sent to the buffer may be formed in "scatter-gather" format. That is, the header of the packer can be in one location in memory while the rest of the packet can be in another location.
- the SPU may, for example, first write 3 bytes of data and then write another 3 bytes of data.
- the POB 4750 includes a packer for holding bytes of data in a holding register until enough bytes are accumulated to send to the buffer.
- the SPUs in the SPU cluster 4710 access the POB 4750 via the address bus and the data bus.
- the packer in the POB 4750 decodes the lower 3 bits of the address, i.e. bits [2:0] of the address.
- the address decoding scheme implemented may be as shown in Table 1 below.
- the packer When the packer has decoded the address, the packer then determines whether it has enough data to commit to the RAM. If the packer determines there are not enough data, the packer sends the data into the holding register. When enough bytes have been accumulated in the holding register, the data is pushed into the FIFO controller and sent to the RAM. In some cases, the SPU in the SPU cluster 4710 may write an EOP into the packer. Here, the packer sends all of the data to the RAM. In one embodiment, the packer may be implemented using flip-flop registers.
- the POB 4750 further comprises an egress state machine.
- the egress state machine tracks the states of each FIFO; the state machine senses that a FIFO has data and unloads the FIFO to the interface. The state machine then alternates to the other FIFO and unloads that FIFO to the interface. If both FIFOs are empty, the state machine will assume that the first FIFO has data and then alternate between the FIFOs, unloading them to the interface. Thus, data in the packer is sent out in the order it was written into the packer.
- the POB 4750 includes a CRC engine to detect error conditions in the buffered data. Error conditions which may be encountered include underruns and invalid EOP. hi an overrun condition, the SPU cannot feed data quickly enough into the POB 4750 and there are not enough packets to process. With an invalid EOP error, an EOP is written into the packer while there is no packet in flight. These two conditions will flag an error which shut off the POB 4750, thereby preventing the SPUs from accessing the buffers. In one embodiment, underruns may be avoided by setting a programmable threshold
- underruns can be used to indicate when to start sending out the packets to the buffer.
- underruns can be used to indicate when to start sending out the packets to the buffer.
- the threshold is set to be the end of packet. In this case, packets will not
- Each SPU in the SPU cluster can access the POB 4750. However, to prevent
- a token mechanism such as flags maintained in external memory, may be used
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
- Machine Translation (AREA)
Abstract
Description
Claims
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007525009A JP2008509484A (en) | 2004-08-05 | 2005-08-05 | Data context switching in the semantic processor |
Applications Claiming Priority (8)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US59983004P | 2004-08-05 | 2004-08-05 | |
US60/599,830 | 2004-08-05 | ||
US11/181,528 | 2005-07-14 | ||
US11/181,528 US20070027991A1 (en) | 2005-07-14 | 2005-07-14 | TCP isolation with semantic processor TCP state machine |
US11/185,223 | 2005-07-19 | ||
US11/185,223 US20070043871A1 (en) | 2005-07-19 | 2005-07-19 | Debug non-terminal symbol for parser error handling |
US11/186,144 US20070019661A1 (en) | 2005-07-20 | 2005-07-20 | Packet output buffer for semantic processor |
US11/186,144 | 2005-07-20 |
Publications (3)
Publication Number | Publication Date |
---|---|
WO2006017689A2 true WO2006017689A2 (en) | 2006-02-16 |
WO2006017689A9 WO2006017689A9 (en) | 2006-03-30 |
WO2006017689A3 WO2006017689A3 (en) | 2006-06-22 |
Family
ID=35839921
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/US2005/027803 WO2006017689A2 (en) | 2004-08-05 | 2005-08-05 | Data context switching in a semantic processor |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP2008509484A (en) |
WO (1) | WO2006017689A2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112104874A (en) * | 2020-08-26 | 2020-12-18 | 西安万像电子科技有限公司 | Data transmission method and system |
WO2021044191A1 (en) * | 2019-09-04 | 2021-03-11 | Telefonaktiebolaget Lm Ericsson (Publ) | Method for debugging the parser in programmable routers |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10285206A (en) * | 1997-04-03 | 1998-10-23 | Matsushita Electric Ind Co Ltd | Reverse packet converting device |
JP2000196672A (en) * | 1998-12-28 | 2000-07-14 | Toshiba Corp | Inter-network repeater |
US6763499B1 (en) * | 1999-07-26 | 2004-07-13 | Microsoft Corporation | Methods and apparatus for parsing extensible markup language (XML) data streams |
US6549916B1 (en) * | 1999-08-05 | 2003-04-15 | Oracle Corporation | Event notification system tied to a file system |
US20020083331A1 (en) * | 2000-12-21 | 2002-06-27 | 802 Systems, Inc. | Methods and systems using PLD-based network communication protocols |
US7130987B2 (en) * | 2003-01-24 | 2006-10-31 | Mistletoe Technologies, Inc. | Reconfigurable semantic processor |
-
2005
- 2005-08-05 WO PCT/US2005/027803 patent/WO2006017689A2/en active Application Filing
- 2005-08-05 JP JP2007525009A patent/JP2008509484A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021044191A1 (en) * | 2019-09-04 | 2021-03-11 | Telefonaktiebolaget Lm Ericsson (Publ) | Method for debugging the parser in programmable routers |
CN112104874A (en) * | 2020-08-26 | 2020-12-18 | 西安万像电子科技有限公司 | Data transmission method and system |
Also Published As
Publication number | Publication date |
---|---|
JP2008509484A (en) | 2008-03-27 |
WO2006017689A9 (en) | 2006-03-30 |
WO2006017689A3 (en) | 2006-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7290134B2 (en) | Encapsulation mechanism for packet processing | |
US9077560B2 (en) | Adaptation scheme for communications traffic | |
EP1427133B1 (en) | System, method and device for security processing of data packets | |
US7647472B2 (en) | High speed and high throughput digital communications processor with efficient cooperation between programmable processing components | |
US6571291B1 (en) | Apparatus and method for validating and updating an IP checksum in a network switching system | |
JP3682082B2 (en) | Apparatus and method for packet processing in packet switching network and frame processing system for frame relay network | |
CN100594698C (en) | Packet Aggregation Protocol for Advanced Switching | |
JP4338728B2 (en) | Method and apparatus for exchanging ATM, TDM and packet data via a single communication switch | |
US20060262808A1 (en) | Methods and Systems for Fragmentation and Reassembly for IP Tunnels in Hardware Pipelines | |
KR20090031059A (en) | Packet processing apparatus and method | |
US20060174058A1 (en) | Recirculation buffer for semantic processor | |
KR20010043460A (en) | Digital communications processor | |
US8009673B2 (en) | Method and device for processing frames | |
WO2009081128A1 (en) | Adaptation scheme for communications traffic | |
EP1267543A2 (en) | Programmable protocol processing engine for network packet devices | |
JP2002280991A (en) | Data mapper and data mapping method | |
EP1339183B1 (en) | Method and device for transporting ethernet frames over a transport SDH/SONET network | |
US20020101865A1 (en) | Data transmission method and transmission apparatus using the same | |
US20040170166A1 (en) | Compression methods for packetized sonet/sdh payloads | |
WO2006017689A2 (en) | Data context switching in a semantic processor | |
US20060031555A1 (en) | Data context switching in a semantic processor | |
US20070027991A1 (en) | TCP isolation with semantic processor TCP state machine | |
JP2021533656A (en) | How to receive a code blockstream, how to send a codeblock stream, and communication equipment | |
WO2024134971A1 (en) | Method for transmitting ethernet mac frame | |
Tzeng et al. | A Flexible Cross Connect LCAS for Bandwidth Maximization in 2.5 G EoS |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AK | Designated states |
Kind code of ref document: A2 Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KM KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NG NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SM SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW |
|
AL | Designated countries for regional patents |
Kind code of ref document: A2 Designated state(s): GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LT LU LV MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG |
|
COP | Corrected version of pamphlet |
Free format text: PAGES 1/26-26/26, DRAWINGS, REPLACED BY NEW PAGES 1/25-25/25; DUE TO LATE TRANSMITTAL BY THE RECEIVING OFFICE |
|
DPEN | Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed from 20040101) | ||
121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
WWE | Wipo information: entry into national phase |
Ref document number: 2007525009 Country of ref document: JP |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: COMMUNICATION PURSUANT TO RULE 69 EPC (EPO FORM 1205A OF 280607) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 05778468 Country of ref document: EP Kind code of ref document: A2 |