CN102215145A - Method and device for reporting detection result of link connected state - Google Patents

Method and device for reporting detection result of link connected state Download PDF

Info

Publication number
CN102215145A
CN102215145A CN2011101505724A CN201110150572A CN102215145A CN 102215145 A CN102215145 A CN 102215145A CN 2011101505724 A CN2011101505724 A CN 2011101505724A CN 201110150572 A CN201110150572 A CN 201110150572A CN 102215145 A CN102215145 A CN 102215145A
Authority
CN
China
Prior art keywords
connected state
link
link connected
unusual
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011101505724A
Other languages
Chinese (zh)
Inventor
李川
邱圣斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN2011101505724A priority Critical patent/CN102215145A/en
Publication of CN102215145A publication Critical patent/CN102215145A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The invention provides a method and a device for reporting a detection result of link connected state, wherein the method comprises the following steps: detecting the link connected state between end points; comparing the detected link connected state and the recorded former link connected state, and reporting the detected link connected state through interruption when the states are not consistent; and recording the detected link connected state. By adopting the technical scheme provided by the invention, the reporting frequency of link connection detection result is reduced.

Description

A kind of method and apparatus of reporting links connected state testing result
Technical field
The present invention relates to the Ethernet data communications field, relate in particular to a kind of method and apparatus of reporting links connected state testing result.
Background technology
Ethernet technology has obtained widespread usage with advantages such as its good and economic, interoperability and ease for use, and Ethernet transmits network technology as a kind of operation level the multiple service supporting service is provided progressively to metropolitan area network and wide area network development at present.
In the application of Ethernet, often need finish the link communication with detection of end points, and notify central processor CPU by interrupt mode testing result to end points, CPU carries out respective handling according to the content of interrupting reporting.
Interrupting at present reporting mainly is real-time report.When link communication with detection device detect link when unusual by interrupting reporting CPU.The shortcoming of existing link communication with detection is: when can't recover immediately unusually appears in link, because the cycle time of link communication with detection is very short, be generally Millisecond, cause interrupting frequently reporting taking local bus Local Bus, CPU can't communicate by letter with other devices in the system by Local Bus; Existing link communication with detection is not carried out record to detected link connected state, is unfavorable for follow-up failure diagnosis.
Summary of the invention
The invention provides a kind of method and apparatus of reporting links connected state testing result, occur when unusual, how to reduce link communication with detection result's the problem that reports frequency to solve when link.
For addressing this problem, the invention provides a kind of method of reporting links connected state testing result, a kind of method of reporting links connected state testing result comprises:
Detect the link connected state between the end points;
Relatively this last link connected state that detects the link connected state and write down when state is inconsistent, just reports this to detect the link connected state by interruption;
Write down this detected link connected state.
Further, described state is inconsistent comprises:
This detects the link connected state for normal, and the last link connected state that has write down is for unusual; Or this detects the link connected state for unusual, and the last link connected state that has write down is for normal.
Further, described interruption is divided into unusual generation interruption and unusual elimination interruption;
When this detects the link connected state for normal, when the last link connected state that has write down is unusual, interrupt reporting this detected link connected state by described unusual generation; When this detected link connected state is unusual, the last link connected state that has write down reports this detected link connected state for just often by described unusual elimination interruption.
Further, alternately report described unusual generation to interrupt and described unusual elimination interruption.
For addressing this problem, the present invention also provides a kind of device of reporting links connected state testing result, and described device comprises link configuration table module, link detecting module, interrupts reporting module, wherein
Described link configuration table module is used to store the detected link connected state of link detection module;
Described link detecting module is used to detect the link connected state between the end points; The link connected state of one-time detection before reading from link configuration table module, the link connected state of the link connected state of one-time detection and this detection before the contrast, when state was inconsistent, just the link connected state with this detection was sent to the interruption reporting module; And detected link connected state is sent to described link configuration table module;
Interrupt reporting module, be used to report from the detected link connected state of link detecting module.
Further, the link connected state of the preceding one-time detection that described link detecting module contrast obtains and inconsistent the comprising of link connected state of this detection: this detects the link connected state for normal, and the last link connected state that has write down is for unusual; Or this detects the link connected state for unusual, and the last link connected state that has write down is for normal.
Further, described interruption reporting module comprises unusual generation and interrupts reporting module and the unusual interruption reporting module of eliminating, and wherein, reporting module is interrupted in described unusual generation, is used to report from the detected unusual link connected state of link detecting module; Reporting module is interrupted in described unusual elimination, is used to report from the detected normal link connected state of link detecting module.
Further, described unusual generation interrupt reporting module and described unusual elimination interrupt reporting module alternately report receive separately from the detected link connected state of link detecting module.
Technical scheme provided by the invention only reports detected link connected state when the link connected state changes detecting, avoided once detect link report unusually bring report the too high problem of frequency; In addition, technical scheme provided by the invention interruption when unusual occurs with the link connected state and reports and recover just often interruption with the link connected state and report and transfer to different interruption reporting module and handle, help the situation of change that the technical staff understands the link connected state more intuitively, be convenient to the consequent malfunction analysis.
Description of drawings
Fig. 1 is the apparatus function module diagram of a kind of reporting links connected state testing result of the embodiment of the invention;
Fig. 2 is the method flow schematic diagram of a kind of reporting links connected state testing result of the embodiment of the invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, hereinafter will be elaborated to embodiments of the invention in conjunction with the accompanying drawings.Need to prove that under the situation of not conflicting, embodiment among the application and the feature among the embodiment be combination in any mutually.
The device of reporting links connected state testing result provided by the invention is positioned at end points, be used to detect the connected state of the link between any two end points, after the connected state that detects described link changes, by interrupt reporting up-to-date detect the link connected state.
Fig. 1 is the apparatus function module diagram of a kind of reporting links connected state testing result of the embodiment of the invention.
Described link communication with detection device comprises link configuration table module 1, link detecting module 2, interrupts reporting module 3, wherein
Link configuration table module 1 is used to store link detection module 2 detected link connected states;
When initial configuration, the link connected state of link configuration table module 1 storage is normal;
Link configuration table module 1, also be used to store the information that is used to detect the link connected state, as endpoint configurations information, link communication with detection message transmission cycle etc., wherein the endpoint configurations information source endpoint ID that can comprise described reporting links connected state testing result device place and purpose endpoint id relative etc. with source endpoint;
Link detecting module 2, be used to detect the link connected state between the end points, read a preceding link connected state from link configuration table module 1, contrast a preceding link connected state and this link connected state, when state is inconsistent, just the link connected state with this detection is sent to interruption reporting module 3, and the link connected state of this detection is sent to link configuration table module 1;
Described link detecting module 2 can be sent to the link connected state that at every turn detects link configuration table module 1, also can be when a preceding link connected state and this link connected state be inconsistent, just the link connected state with this detection is sent to link configuration table module 1.
Described link detecting module 2 realizes that the process that detects the connected state between the end points comprises:
Read the information that is used to detect the link connected state of link configuration table module 1 storage, generate link communication with detection message, cycle according to setting sends this link communication with detection message from source endpoint to the purpose end points, and waits for the link communication with detection message from the purpose end points;
If link detecting module 2 is not received the link communication with detection message that the purpose end points sends at the appointed time, the link communication with detection message that the purpose end points of perhaps receiving at the appointed time sends is wrong, judges that then the link connected state between source endpoint and the purpose end points is unusual; Otherwise, if link detecting module 2 is received the connectivity of link detection messages that the purpose end points sends at the appointed time, and the link communication with detection message that the purpose end points of receiving at the appointed time sends is errorless, judges that then the link connected state between source endpoint and the purpose end points is normal;
Above-mentioned link detecting module 2 is judged wrong the comprising of link communication with detection message that the purpose end points received at the appointed time sends: destination ID that reads from link communication with detection message or the information such as cycle that receives link communication with detection message and its information that reads out from link configuration table module 1 judge that the link communication with detection message of the purpose end points transmission of receiving at the appointed time is wrong not simultaneously;
If the source endpoint and the link connected state between the purpose end points of 2 these detections of link detecting module are normal, the source endpoint of the preceding one-time detection that reads from link configuration table module 1 and the link connected state between the purpose end points be for unusual, and link detecting module 2 sends the link connected state of these detections to interrupting reporting module 3;
If the source endpoint and the link connected state between the purpose end points of 2 these detections of link detecting module are unusual, the source endpoint of the preceding one-time detection that reads from link configuration table module 1 and the link connected state between the purpose end points be for normal, and link detecting module 2 sends the link connected state of these detections to interrupting reporting module 3;
If the source endpoint and the link connected state between the purpose end points of 2 these detections of link detecting module are normal, the source endpoint of the preceding one-time detection that reads from link configuration table module 1 and the link connected state between the purpose end points be also for normal, and link detecting module 2 no longer sends the link connected state of these detections to interrupting reporting module 3;
If it is unusual that link detecting module 2 detects the source endpoint and the link connected state between the purpose end points of this detection, the source endpoint of the preceding one-time detection that reads from link configuration table module 1 and the link connected state between the purpose end points be also for unusual, and link detecting module 2 no longer sends the link connected state of these detections to interrupting reporting module 3;
Interrupt reporting module 3, be used to report from link detecting module 2 detected link connected states;
This interruption reporting module 3 can be made of pushup storage FIFO;
This interruption reporting module 3 can comprise unusual generation again and interrupt reporting module 31 and the unusual interruption reporting module 32 of eliminating; Wherein, the unusual generation interrupted reporting module 31, is used to report from the detected unusual link connected state of link detecting module; The unusual elimination interrupted reporting module 32, is used to report from the detected normal link connected state of link detecting module;
Reporting module 31 is interrupted in unusual generation and the unusual interruption reporting module 32 of eliminating alternately reports.
Shown in Figure 2, be the method flow schematic diagram of a kind of reporting links connected state testing result of the embodiment of the invention.
S201 detects the link connected state between the end points;
The link communication with detection device that is positioned at one of them end points periodically sends link communication with detection message to the opposite end, and the transmission cycle can be by this end points and opposite end consult to decide, and chronomere can be Millisecond; Link communication with detection device prepares to receive the link communication with detection message from the opposite end simultaneously.
If link communication with detection device is not received the link communication with detection message that the opposite end sends at the appointed time, the link communication with detection message that the opposite end of perhaps receiving at the appointed time sends is wrong, judges that then the link connected state between this end points and the opposite end is unusual;
The wrong method of link communication with detection message that the opposite end that above-mentioned judgement is received at the appointed time sends comprises: detect the opposite end ID mistake of link communication with detection message accounting, judge that then this link communication with detection message is wrong; Or detect the cycle mistake of the reception link communication with detection message of link communication with detection message accounting, judge that then this link communication with detection message is wrong.
The link connected state that the link connected state of this detection of S202 comparison and the last time of having write down are detected; When if state is inconsistent, execution in step S203; Otherwise, execution in step S204;
The initial connected state of link is set to normally usually;
Described state is inconsistent to be comprised: this detects the link connected state for normal, and the last link connected state that has write down is for unusual; Or this detects the link connected state for unusual, and the last link connected state that has write down is for normal;
S203 writes down this detected link connected state, and by interrupting reporting this link connected state, execution in step S205;
Described interruption is divided into unusual generation and interrupts interrupting with unusual the elimination;
When the last link connected state that has write down is normal, when this detected link connected state is unusual, interrupt reporting this detected link connected state by described unusual generation;
When the last link connected state that has write down for unusual, the link connected state of this detection reports this detected link connected state for just often by described unusual elimination interruption;
The unusual elimination interrupts and produces unusually interrupting alternately reporting;
The interruption that reports is delivered to CPU by local bus;
S204 writes down detected link connected state, not by interrupting reporting this detected link connected state, execution in step S205;
Step S204 also can not write down detected link connected state, and this moment, link communication with detection device only just write down the link connected state when the link connected state changes;
S205 waits for next link communication with detection message from the opposite end, continues to detect the link connected state.
Need to prove; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.

Claims (8)

1. the method for a reporting links connected state testing result is characterized in that,
Detect the link connected state between the end points;
Relatively this last link connected state that detects the link connected state and write down when state is inconsistent, just reports this to detect the link connected state by interruption;
Write down this detected link connected state.
2. the method for claim 1 is characterized in that, described state is inconsistent to be comprised:
This detects the link connected state for normal, and the last link connected state that has write down is for unusual; Or this detects the link connected state for unusual, and the last link connected state that has write down is for normal.
3. method as claimed in claim 2 is characterized in that,
Described interruption is divided into unusual generation and interrupts interrupting with unusual the elimination;
When this detects the link connected state for normal, when the last link connected state that has write down is unusual, interrupt reporting this detected link connected state by described unusual generation; When this detected link connected state is unusual, the last link connected state that has write down reports this detected link connected state for just often by described unusual elimination interruption.
4. method as claimed in claim 3 is characterized in that,
Alternately report described unusual generation to interrupt and described unusual elimination interruption.
5. the device of a reporting links connected state testing result is characterized in that, described device comprises link configuration table module, link detecting module, interrupts reporting module, wherein
Described link configuration table module is used to store the detected link connected state of link detection module;
Described link detecting module is used to detect the link connected state between the end points; The link connected state of one-time detection before reading from link configuration table module, the link connected state of the link connected state of one-time detection and this detection before the contrast, when state was inconsistent, just the link connected state with this detection was sent to the interruption reporting module; And detected link connected state is sent to described link configuration table module;
Interrupt reporting module, be used to report from the detected link connected state of link detecting module.
6. device as claimed in claim 5 is characterized in that, the link connected state of the preceding one-time detection that described link detecting module contrast obtains and inconsistent the comprising of link connected state of this detection:
This detects the link connected state for normal, and the last link connected state that has write down is for unusual; Or this detects the link connected state for unusual, and the last link connected state that has write down is for normal.
7. device as claimed in claim 6 is characterized in that, described interruption reporting module comprises unusual generation and interrupts reporting module and the unusual interruption reporting module of eliminating, wherein
Reporting module is interrupted in described unusual generation, is used to report from the detected unusual link connected state of link detecting module;
Reporting module is interrupted in described unusual elimination, is used to report from the detected normal link connected state of link detecting module.
8. device as claimed in claim 7 is characterized in that, described unusual generation interrupt reporting module and described unusual elimination interrupt reporting module alternately report receive separately from the detected link connected state of link detecting module.
CN2011101505724A 2011-06-07 2011-06-07 Method and device for reporting detection result of link connected state Pending CN102215145A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011101505724A CN102215145A (en) 2011-06-07 2011-06-07 Method and device for reporting detection result of link connected state

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011101505724A CN102215145A (en) 2011-06-07 2011-06-07 Method and device for reporting detection result of link connected state

Publications (1)

Publication Number Publication Date
CN102215145A true CN102215145A (en) 2011-10-12

Family

ID=44746284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011101505724A Pending CN102215145A (en) 2011-06-07 2011-06-07 Method and device for reporting detection result of link connected state

Country Status (1)

Country Link
CN (1) CN102215145A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306306A (en) * 2015-11-12 2016-02-03 姚焕根 Link connectivity detection system and method
CN107995065A (en) * 2017-12-18 2018-05-04 迈普通信技术股份有限公司 Port status notifying method, device and ethernet device
CN110191018A (en) * 2019-05-28 2019-08-30 百度在线网络技术(北京)有限公司 Method for monitoring abnormality, device and the computer equipment of vehicle CAN bus
CN110290019A (en) * 2019-05-27 2019-09-27 网宿科技股份有限公司 Monitoring method and system
CN110650051A (en) * 2019-09-25 2020-01-03 深圳市证通电子股份有限公司 Self-service terminal monitoring method and system and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040073220A (en) * 2003-02-13 2004-08-19 삼성전자주식회사 Method for gathering alarm in base station system
CN1838087A (en) * 2005-03-21 2006-09-27 华为技术有限公司 Fault alarm reporting management method
CN101394642A (en) * 2007-09-17 2009-03-25 华为技术有限公司 Method, device and system for uploading link exception information
CN101562827A (en) * 2009-05-22 2009-10-21 中兴通讯股份有限公司 Fault information acquisition method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040073220A (en) * 2003-02-13 2004-08-19 삼성전자주식회사 Method for gathering alarm in base station system
CN1838087A (en) * 2005-03-21 2006-09-27 华为技术有限公司 Fault alarm reporting management method
CN101394642A (en) * 2007-09-17 2009-03-25 华为技术有限公司 Method, device and system for uploading link exception information
CN101562827A (en) * 2009-05-22 2009-10-21 中兴通讯股份有限公司 Fault information acquisition method and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306306A (en) * 2015-11-12 2016-02-03 姚焕根 Link connectivity detection system and method
CN105306306B (en) * 2015-11-12 2018-08-24 姚焕根 Link connectivity detection system and method
CN107995065A (en) * 2017-12-18 2018-05-04 迈普通信技术股份有限公司 Port status notifying method, device and ethernet device
CN110290019A (en) * 2019-05-27 2019-09-27 网宿科技股份有限公司 Monitoring method and system
CN110191018A (en) * 2019-05-28 2019-08-30 百度在线网络技术(北京)有限公司 Method for monitoring abnormality, device and the computer equipment of vehicle CAN bus
CN110191018B (en) * 2019-05-28 2023-02-17 阿波罗智联(北京)科技有限公司 Abnormity monitoring method and device for vehicle CAN bus and computer equipment
CN110650051A (en) * 2019-09-25 2020-01-03 深圳市证通电子股份有限公司 Self-service terminal monitoring method and system and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN102647320B (en) Integrated circuit suitable for high-speed 1553 bus protocol control
CN105700510B (en) The disperse errors detection method and CAN communication system of CAN communication system
CN100366029C (en) Communication controller, host-side controller, communication equipment, communication system and method
CN102984059B (en) Gigabit Ethernet redundancy network interface card and link switching condition criterion output control method thereof
CN103440188B (en) The detection method of a kind of PCIE hardware fault and device
CN102215145A (en) Method and device for reporting detection result of link connected state
CN102148724B (en) Link detecting method and network access device
CN100571170C (en) A kind of detection of communication link failure and restoration methods
CN102594643B (en) A kind of Controller Area Network BUS communicating control method, Apparatus and system
CN106502952B (en) A kind of PCIE device goes offline safely design method
CN110569988B (en) Payment machine fault processing system and processing method
CN110808873A (en) Method and device for detecting link failure
JPWO2015098589A1 (en) Cluster system, server apparatus, cluster system management method, and program
CN102413008B (en) Based on method of testing and the system of electric power 104 stipulations
CN102768561B (en) Design method for twinbridge piece mainboard redundancy
CN102486746A (en) Server and method for detecting PCI (Peripheral Component Interconnect) system error thereof
JP4774347B2 (en) Node device, control device, control method, and control program
TW201424295A (en) Apparatus and method for monitoring signals transmitted in bus
CN115729164B (en) Industrial communication system management method and device and industrial communication system
CN104113871B (en) A kind of invalid number detecting system and method based on various dimensions
CN102136882B (en) Method and device for transferring error code status
CN114826962A (en) Link fault detection method, device, equipment and machine readable storage medium
CN111930582A (en) System management bus detection platform, processor and system management bus detection method
JP2014532236A (en) Connection method
US8978052B1 (en) System and methods for inter-driver communication

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20111012

WD01 Invention patent application deemed withdrawn after publication