To minimize latency when routing large Transaction Layer Packets (TLPs), PCI Express (PCIe) Switches can utilize a feature known as Cut-Through Mode. Instead of using a traditional store-and-forward method, the Switch reads the routing information in the TLP header and immediately begins forwarding the packet out of the Egress Port before the entire payload has arrived at the Ingress Port.
While this drastically improves transit times, it introduces a unique problem: what happens if the packet turns out to be corrupted? Because the Switch cannot check the 32-bit Link Cyclic Redundancy Code (LCRC) until the very end of the packet arrives, it runs the risk of forwarding a bad packet. By the time the Ingress Port discovers the bit error and sends a Nak back to the source to request a replay, most of the corrupted packet is already traveling out the Egress Port to the next device.
Because the PCIe specification strictly prohibits truncating a packet in flight, the Switch must use a clever mechanism to clean up the pipeline: packet nullification.
How to Nullify a Packet
To solve this mid-flight crisis, the Switch actively alters the tail end of the outgoing TLP as it leaves the Egress Port. It does this in two specific ways to make the corruption completely unambiguous to the receiving device:
- Appending an End Bad (EDB) Symbol: Instead of attaching the standard End Good (END) framing symbol to mark the completion of the packet, the Switch intentionally terminates the packet with an EDB symbol.
- Inverting the LCRC: To further guarantee the packet is flagged as invalid, the Switch inverts the calculated 32-bit LCRC value (calculating its 1’s complement).
The Aftermath: Erasing the Packet from Existence
Once a packet is officially nullified, the PCIe architecture treats the corrupted transmission as if it never existed at all. This seamless cleanup process happens simultaneously at both the Switch and the final destination:
- At the Switch’s Egress Port: Because the packet is bad, the Egress Port immediately drops the nullified TLP from its Replay Buffer. It also rolls back its expected sequence by decrementing the
NEXT_TRANSMIT_SEQcounter by one. - At the Receiving Endpoint: When the downstream device receives the packet and detects the EDB symbol and inverted LCRC, it instantly recognizes the packet has been nullified and silently discards it. Crucially, the receiver will not return a Nak, will not increment its NEXT_RCV_SEQ expected sequence counter, and will not start its AckNak_LATENCY_TIMER or set its NAK_SCHEDULED flag.
Summary By explicitly nullifying the corrupted packet with an EDB symbol and an inverted LCRC, the Switch safely warns the downstream device to ignore the incoming data. The receiver drops the packet silently without generating redundant Nak messages, allowing the original transmitting device to simply replay the corrected packet to the Switch’s Ingress Port to complete the transaction flawlessly.
