The invention discloses a protocol-level
deadlock avoiding method and
system based on a credit mechanism, and the method comprises the steps: 1, setting NP cache submodules on a plurality of receiving ports in a PCIe switching structure; wherein the plurality of receiving ports are respectively in communication connection with at least one sending port, and the NP cache submodules are in communication connection with the sending ports which are in communication connection with the corresponding receiving ports; 2, constructing a message
polling request module, and enabling the message
polling request module to be in communication connection with the plurality of NP cache sub-modules, so as to complete the construction of a
queue back pressure structure under a credit linkage mechanism; and step 3, carrying out
data transmission by using a
queue back pressure structure under a credit linkage mechanism. According to the method and the device, the
resource utilization rate in a complex scene is effectively improved while the performance of an exchange structure is not influenced, and a
deadlock avoiding function of a blocking type message is effectively realized.