发明名称 |
Method and system for detecting abnormality of network processor |
摘要 |
The disclosure discloses a method and a system for detecting an abnormality of a network processor. The method comprises the following steps: an abnormality detection operation code is added into an execution flow of each thread in a network processor, and the network processor sets a flag bit corresponding to a current thread in an abnormality protection flag data area in a shared memory to a first flag when executing the abnormality detection operation code in the current thread; and when a period of a timer is expire, a coprocessor detects all the flag bits in the abnormality protection flag data area in the shared memory, determines that a thread corresponding to a flag bit which is not the first flag is abnormal when detecting that not all the flag bits are the first flag, and sets all the flag bits to a second flag when detecting that all the flag bits are the first flag. Through the disclosure, the abnormality of a thread can be detected timely and efficiently, so that the failure detection capability of the network device using the network processor as a core unit at run time is improved without influencing the forwarding performance and service processing flow of the network processor. |
申请公布号 |
US8977905(B2) |
申请公布日期 |
2015.03.10 |
申请号 |
US201113881875 |
申请日期 |
2011.09.13 |
申请人 |
ZTE Corporation |
发明人 |
Zhu Yin;Wu Yirong |
分类号 |
G06F11/00;G06F11/30;G06F11/07 |
主分类号 |
G06F11/00 |
代理机构 |
Oppedahl Patent Law Firm LLC |
代理人 |
Oppedahl Patent Law Firm LLC |
主权项 |
1. A method for detecting an abnormality of a network processor, comprising:
adding an abnormality detection operation code into an execution flow of each thread in a network processor, and setting a flag bit corresponding to a current thread in an abnormality protection flag data area in a shared memory to a first flag by the network processor when executing the abnormality detection operation code in the current thread; and when a period of a timer is expired, detecting, by a coprocessor, all the flag bits in the abnormality protection flag data area in the shared memory, determining that a thread corresponding to a flag bit which is not the first flag is abnormal when detecting that not all the flag bits are the first flag, and setting all the flag bits to a second flag when detecting that all the flag bits are the first flag. |
地址 |
Shenzhen CN |