摘要 |
A method and apparatus is presented for performing a sequence-level CRC calculation on fiber channel communications within a switching platform domain. Specifically, the disclosed invention utilizes a CRC generator to monitor data communication between an external interface and a fiber channel controller. The CRC generator searches the data communication for frames that contain the type of data for which a sequence-level CRC is desired, such as for a sequence containing SCSI data. When found, the CRC generator performs an 8B/10B decode, strips off any fill bytes, and performs a CRC calculation on the data payload. If the found frame is the first frame in the sequence, the CRC is done starting with a reset value. If the frame is not the first, an intermediate value containing the previous CRC calculation results for this sequence is retrieved and used to perform the CRC calculations. Upon completion of the calculation for the frame, a determination is made whether the sequence is complete. If so, the calculated value is the sequence-level CRC. If not, the calculated value is stored in memory for use with the next frame in that sequence. With inbound data, the calculated sequence-level CRC is appended to the end of the data comprising that sequence. With outbound data, the calculated value is compared with the appended, expected value, and a CRC error is generated if the values do not match. The sequence-level CRC value appended to the sequence data is typically removed before the data exits the switching platform domain.
|