CN115361306B - Port state reporting method and switch - Google Patents

Port state reporting method and switch Download PDF

Info

Publication number
CN115361306B
CN115361306B CN202210939929.5A CN202210939929A CN115361306B CN 115361306 B CN115361306 B CN 115361306B CN 202210939929 A CN202210939929 A CN 202210939929A CN 115361306 B CN115361306 B CN 115361306B
Authority
CN
China
Prior art keywords
port
switch
state
processor
ports
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.)
Active
Application number
CN202210939929.5A
Other languages
Chinese (zh)
Other versions
CN115361306A (en
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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202210939929.5A priority Critical patent/CN115361306B/en
Publication of CN115361306A publication Critical patent/CN115361306A/en
Application granted granted Critical
Publication of CN115361306B publication Critical patent/CN115361306B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the application provides a port state reporting method and a switch, wherein the switch comprises a first processor, a second processor and a plurality of switch ports, wherein the switch ports are designated to be connected with chip ports of the second processor, other switch ports are used for being connected with other devices, and the switch ports are designated as a destination port of other switch ports; the other switch ports guide the received code stream to the appointed switch port; designating a switch port to direct the code stream to the second processor; the second processor trains the chip port by using the code stream to obtain the port state of the chip port, takes the port state of the chip port as the port state of other switch ports, and reports the port states of the other switch ports to the first processor; the first processor performs a corresponding processing operation. By applying the technical scheme provided by the embodiment of the application, the automatic reporting of the port state can be realized, and the application range of the ultra-low delay switch is enlarged.

Description

Port state reporting method and switch
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method for reporting a port state and a switch.
Background
The switch with ultra-low time delay has only one layer of forwarding function, and can realize the forwarding function of the message with ultra-low time delay. However, the ultra-low latency switch has the advantages of extremely simple function and extremely low latency, and also has the defect that messages cannot be processed, so that when a port is connected or disconnected with a tester or other equipment, the port of the ultra-low latency switch cannot report port states, such as open (Up) and close (Down), and the use of the ultra-low latency switch is limited.
Disclosure of Invention
The embodiment of the application aims to provide a port state reporting method and a switch, so as to realize automatic reporting of port states and expand the application range of an ultralow-delay switch. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a switch, where the switch includes a first processor, a second processor, and a plurality of switch ports, where a designated switch port of the plurality of switch ports is connected to a chip port of the second processor, other switch ports except the designated switch port are used to connect to other devices, and the designated switch port is a destination port of the other switch ports;
The other switch ports are used for guiding the received code stream to the designated switch port according to the fact that the designated switch port is a destination port of the other switch ports;
the designated switch port is configured to direct the code stream to the second processor by connecting with the chip port;
the second processor is configured to train the chip port by using the code stream to obtain a port state of the chip port, and report the port state of the other switch ports to the first processor by using the port state of the chip port as the port state of the other switch ports;
the first processor is configured to perform a processing operation corresponding to a port state of the other switch port.
In some embodiments, the switch further comprises indicator lights in one-to-one correspondence with the plurality of switch ports;
the first processor is specifically configured to:
if the port state of the other switch port is the Up state, the indicator lamp corresponding to the other switch port is lightened;
and if the port state of the other switch ports is the Down state, turning off the indicator lights corresponding to the other switch ports.
In some embodiments, the first processor is further configured to:
selecting the appointed switch port from the switch ports, and connecting the appointed switch port with the chip port of the second processor;
and connecting the appointed switch port with the chip port for software recording.
In some embodiments, the first processor is further configured to:
polling to detect whether each other switch port meets an automatic status reporting condition; if yes, configuring a destination port of the other switch ports as a designated switch port; if not, the other switch port is set to the Down state.
In some embodiments, the automatic status reporting condition includes one or more of not cancelling port closure configuration, an optical module in place, and configured with a port type;
the first processor is specifically configured to:
when the automatic status reporting condition includes that the port closing configuration is not canceled, polling to detect whether each other switch port has the port closing configuration canceled; if not, configuring a destination port of the other switch ports as a designated switch port; if yes, setting the other switch ports to a Down state;
When the automatic status reporting condition comprises that the optical module is in place, polling to detect whether the optical module of each other switch port is in place; if the switch port is in place, configuring a destination port of the other switch ports as the designated switch port; if not, setting the other switch ports to a Down state;
when the automatic status report condition comprises that the port type is configured, polling to detect whether each other switch port is configured with the port type; if the port type is configured, configuring a destination port of the other switch ports as the designated switch port; if the port type is not configured, the other switch port is set to the Down state.
In some embodiments, the first processor is further configured to:
before setting the other switch port to the Down state, detecting whether the other switch port is in the Up state in the software record; and if the switch port is in the Up state, executing the step of setting the other switch port to the Down state, and recording the other switch port in the Down state by software.
In a second aspect, an embodiment of the present application provides a method for reporting a port status, which is applied to a switch, where the switch includes a first processor, a second processor, and a plurality of switch ports, where a designated switch port in the plurality of switch ports is connected to a chip port of the second processor, other switch ports except the designated switch port are used for being connected to other devices, and the designated switch port is a destination port of the other switch ports; the method comprises the following steps:
The other switch ports guide the received code stream to the appointed switch port according to the software record that the appointed switch port is the destination port of the other switch ports;
the appointed switch port is connected with the chip port to guide the code stream to the second processor;
the second processor trains the chip port by using the code stream to obtain the port state of the chip port, takes the port state of the chip port as the port state of the other switch ports, and reports the port state of the other switch ports to the first processor;
the first processor performs processing operations corresponding to port states of the other switch ports.
In some embodiments, the switch further comprises indicator lights in one-to-one correspondence with the plurality of switch ports;
the step of executing processing operations corresponding to port states of the other switch ports includes:
if the port state of the other switch port is the Up state, the indicator lamp corresponding to the other switch port is lightened;
and if the port state of the other switch ports is the Down state, turning off the indicator lights corresponding to the other switch ports.
In some embodiments, the method further comprises:
selecting the appointed switch port from the switch ports, and connecting the appointed switch port with the chip port of the second processor;
and connecting the appointed switch port with the chip port for software recording.
In some embodiments, the method further comprises:
the first processor polls and detects whether each other switch port meets an automatic status report condition; if so, one destination port of the other switch ports is configured as the designated switch port.
In some embodiments, the automatic status reporting condition includes one or more of not cancelling port closure configuration, an optical module in place, and configured with a port type;
the step of polling to detect whether each of the other switch ports satisfies an automatic status report condition includes:
when the automatic status reporting condition includes that the port closing configuration is not canceled, polling to detect whether each other switch port has the port closing configuration canceled; if not, determining that the other switch ports meet the automatic status reporting condition; if yes, determining that the other switch ports do not meet the automatic state reporting condition;
When the automatic status reporting condition comprises that the optical module is in place, polling to detect whether the optical module of each other switch port is in place; if yes, determining that the other switch ports meet an automatic state reporting condition; if not, determining that the other switch ports do not meet the automatic state reporting condition;
when the automatic status report condition comprises that the port type is configured, polling to detect whether each other switch port is configured with the port type; if the port type is configured, determining that the other switch ports meet an automatic status reporting condition; if the port type is not configured, determining that the other switch ports do not meet the automatic status report condition.
In some embodiments, the method further comprises:
the first processor detects whether the other switch port in the software record is in an Up state; and if the switch port is in the Up state, executing the step of setting the other switch port to the Down state, and recording the other switch port in the Down state by software.
The embodiment of the application has the beneficial effects that:
in the technical scheme provided by the embodiment of the application, the second processor is introduced into the switch, a designated switch port of the switch is fixedly connected with a chip port of the second processor, and the destination ports of other switch ports except the designated switch port are configured with one part to the designated switch port. Thus, when a switch port receives a code stream, the code stream received by the switch port is introduced into the designated switch port because the designated switch port is the destination port of the switch port, and the designated switch port is fixedly connected with the chip port, so that the code stream received by the switch port enters the second processor through the designated switch port and the chip port. The second processor trains the chip port based on the entered code stream, so that the port state of the chip port can be obtained, and the code stream for training the chip port comes from a switch port, so that the port state of the chip port indirectly reflects the port state of the switch port. At this time, the second processor reports the port state of the switch port to the first processor, which realizes the automatic reporting of the port state, and further facilitates the first processor to execute corresponding processing operation, thus, when the switch is an ultralow time delay switch, the application range of the ultralow time delay switch is enlarged.
Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the application, and other embodiments may be obtained according to these drawings to those skilled in the art.
FIG. 1 is a schematic diagram of an ultra-low latency switch in the related art;
fig. 2 is a schematic structural diagram of a switch according to an embodiment of the present application;
fig. 3 is a schematic diagram of an automatic port status reporting process according to an embodiment of the present application;
fig. 4 is a schematic diagram of a port status reporting method according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by the person skilled in the art based on the present application are included in the scope of protection of the present application.
At present, the demand for high-frequency trade in the financial securities industry is increasingly strong, and the demand for extremely-fast trade systems consisting of ultra-low-latency exchanges is increased. On the premise of the background of the requirement, the ultra-low-delay switch is inoculated with the advantages of extremely low delay, extremely simple function and the like. The ultra-low delay switch has only one layer of forwarding function, and can realize ultra-low delay forwarding. The structure of the ultra-low latency switch is shown in fig. 1, and includes a plurality of switch ports, such as Small Form-factor Pluggable (SFP) ports.
The ultra-low delay switch has the advantages of extremely simple function and extremely low delay, and also has the defect that a message cannot be processed, so that when a port is connected with a tester or other equipment, the port of the ultra-low delay switch cannot report Up, and when the port is disconnected with the tester or other equipment, the port of the ultra-low delay switch cannot report Down, and therefore a user cannot judge whether the port of the ultra-low delay switch is normally connected or not and whether the port of the ultra-low delay switch is normally used, and the ultra-low delay switch is limited in use.
In order to solve the technical problems in the related art and realize automatic reporting of port states, the application range of the switch with ultra-low time delay is enlarged, and the embodiment of the application provides the switch, as shown in fig. 2. The switch includes a first processor 21, a second processor 22, and a plurality of switch ports 23, wherein a designated switch port of the plurality of switch ports 23 is connected to a chip port of the second processor 22, other switch ports than the designated switch port are used for connection with other devices, and the designated switch port is a destination port of the other switch ports.
In the embodiment of the application, the switch port can be realized by adopting an SPF port or an SFP+ port. Designating a switch port as any one switch port, other switch ports are simply referred to as panel ports for ease of understanding. The switch provided by the embodiment of the application can be an ultralow-delay switch, and the switch comprises a plurality of panel ports. The switch has stored therein a software record which may include a destination port designating the switch port as a panel port, i.e., a chip port having a connection of the designated switch port with the second processor 22. The software record may also include the port status of each panel port, which is not limited. The port states include an Up state, a Down state, and the like.
The first processor 21 may be the same as the processor in the ultra low latency switch in the related art. The second processor 22 may be implemented using a Pipe chip or a network processor (Network Processor, NP) chip, or other chip implementation, without limitation. The second processor 22 and the first processor 21 may be mounted on the same switch or on different switches, and the second processor 22 and the first processor 21 may communicate directly via a serial bus or via a parallel bus, which is not limited.
Each panel port is used for guiding the received code stream to the appointed switch port according to the appointed switch port as the destination port of the panel port.
A switch port is designated for directing the code stream to the second processor by connecting to the chip port.
The second processor 22 is configured to train the chip port by using the code stream to obtain a port state of the chip port, and report the port state of the panel port to the first processor 21 by using the port state of the chip port as the port state of the panel port.
The first processor 21 is configured to perform a processing operation corresponding to a port state of the panel port.
In the technical scheme provided by the embodiment of the application, the second processor is introduced into the switch, a designated switch port of the switch is fixedly connected with a chip port of the second processor, and the destination ports of the panel ports except the designated switch port are all configured with one part to the designated switch port. Thus, when a panel port receives a code stream, the code stream received by the panel port is introduced to the designated switch port because the designated switch port is the destination port of the panel port. The code stream received by the panel port may be a code stream sent by a tester or other devices connected to the panel port.
The designated switch port is fixedly connected with the chip port of the second processor, so that after the designated switch receives the code stream from the panel port, the code stream can be sent into the second processor through the fixed connection between the designated switch port and the chip port of the second processor.
The second processor trains the chip port based on the entered code stream, and can obtain the port state of the chip port. Here, if the second processor trains the chip port successfully, the chip port Up obtains the port state of the chip port Up. Is in the Up state; if the second processor fails to train the chip port, the chip port cannot Up, the chip port keeps Down, the panel port is considered to have no code stream, and the port state of the chip port is obtained to be Down.
The code stream of the training chip port comes from the panel port, so that the port state of the chip port indirectly reflects the port state of the panel port. At this time, the second processor can take the port state of the chip port as the port state of the panel port and report the port state of the panel port to the first processor, which realizes the automatic report of the port state of the panel port, thereby facilitating the first processor to execute corresponding processing operation.
In some embodiments, the switch may further include an indicator light in one-to-one correspondence with the plurality of switch ports. In this case, the first processor 21 may be specifically configured to: if the port state of the panel port is the Up state, the indicator lamp corresponding to the panel port is lightened; if the port state of the panel port is the Down state, the indicator light corresponding to the panel port is turned off.
In the embodiment of the present application, the first processor 21 lights Up the indicator lamp corresponding to the panel port Up under the condition of the panel port Up; under the condition of the panel port Down, the indicator lamp corresponding to the panel port is extinguished, the visibility of the port state is increased, and a user can intuitively judge whether the panel port is normally connected and normally used, so that the ultra-low time delay switch is wider and has competitiveness.
In some embodiments, the first processor may be further configured to select a designated switch port from a plurality of switch ports, and connect the designated switch port with a chip port of the second processor; and connecting the designated switch port with the chip port for software recording. Here, the information recorded by the software is that the switch port fixedly connected with the chip port of the second processor is a designated switch port.
In the embodiment of the application, before the code stream received by the panel ports is introduced into the second processor and the port state is automatically reported to the first processor, the first processor selects any switch port as a designated switch port, the designated switch port is fixedly connected with the chip port of the second processor, in addition, software records that the switch port fixedly connected with the chip port of the second processor is the designated switch port, so that the destination port of each panel port is conveniently configured on the designated switch port, the automatic reporting of the port state of the panel port is conveniently realized, and when the switch is an ultralow-delay switch, the application range of the ultralow-delay switch can be enlarged.
In some embodiments, the first processor is further configured to poll to detect whether each panel port satisfies an automatic status reporting condition; if yes, configuring a destination port of the panel port as a designated switch port; if not, the panel mouth is set to the Down state.
In the embodiment of the application, the switch is preconfigured with an automatic state reporting condition and a monitoring task aiming at the port state. The automatic status reporting condition may include one or more of not cancelling a port shutdown (shutdown) configuration, an optical module being in place, and configured with a port type. The port type may be a source port or a destination port.
The first processor executes a monitoring task to poll and detect each panel port, determine a port state of each panel port, and record the port state of each panel port by software, which may specifically be: polling to detect whether each panel port meets an automatic status reporting condition; if the automatic status report condition is satisfied, a destination port of the panel port is configured to a designated switch port. If one of the panel ports polled does not meet the automatic status reporting condition, the first processor may set the other switch port to a Down state, and continue to poll to detect whether each of the panel ports meets the automatic status reporting condition.
In the embodiment of the application, the first processor may start the monitoring task when the switch is initialized, or may start the monitoring task after receiving the user input or the monitoring instruction sent by other devices, which is not limited.
By applying the technical scheme provided by the embodiment of the application, the first processor can timely determine the port state of each panel port meeting the automatic state reporting condition, realize the automatic reporting of the port state of the panel port, and expand the application range of the ultralow time delay switch when the switch is the ultralow time delay switch.
In some embodiments, the automatic status reporting conditions as described above may include one or more of no shutdown configuration, an optical module in place, and configured with a port type. In this case, the first processor 21 may be specifically configured to:
when the automatic status report condition includes no shutdown configuration, polling to detect whether each panel port has a shutdown configuration; if the Sout Down configuration is not available, configuring a destination port of the panel port as a designated switch port; if the shutdown configuration exists, setting the panel port to be in a Down state;
when the automatic status reporting condition comprises that the optical module is in place, polling to detect whether the optical module of each panel port is in place; if the optical module is in place, configuring a destination port of the panel port as a designated switch port; if the optical module is out of position, setting the panel port to be in a Down state;
when the automatic status reporting condition includes configuration of port types, polling to detect whether each panel port is configured with a port type; if the port type is configured, configuring a destination port of the panel port as a designated switch port; if the port type is not configured, the front panel port is set to the Down state.
In the embodiment of the application, when the automatic status report condition only comprises no shutdown configuration, the first processor polls and detects whether each panel port has the shutdown configuration; if no shutdown configuration of one panel port is detected, the panel port is indicated to meet the automatic status report condition, and the first processor configures one destination port of the panel port as a designated switch port. If it is detected that a panel port has a shutdown configuration, it is indicated that the panel port does not meet the automatic status report condition, and the first processor may set the panel port to a Down status, and continue to poll to detect whether the next panel port has the shutdown configuration.
In the embodiment of the application, the Sout Down configuration is added. By adding the Sut Down configuration, a user can control ports more conveniently, for example, for different ports, based on the Sut Down configuration, the user can control the port state Down through a command line, and the flexibility of a port state reporting scheme is improved.
In the embodiment of the present application, when the automatic status report condition includes only that the optical module is in place, the first processor 21 polls to detect whether the optical module of each panel port is in place; if a panel port optical module is detected to be in place, the panel port meets the automatic state reporting condition, and the first processor configures a destination port of the panel port as a designated switch port; if it is detected that the optical module of one panel port is out of place, which indicates that the panel port does not meet the automatic status report condition, the first processor may set the panel port to a Down status, and continuously poll and detect whether the optical module of the next panel port is in place.
In the embodiment of the present application, when the automatic status report condition includes only the configuration of the port type, the first processor 21 polls to detect whether each panel port is configured with the port type; if it is detected that a port type is configured in one of the panel ports, the panel port is indicated to meet the automatic status report condition, and the first processor configures a destination port of the panel port as a designated switch port.
If it is detected that a port type is not configured in one of the panel ports, the panel port is indicated not to meet the automatic status report condition, and the first processor may set the panel port to a Down status and continue to poll to detect whether a port type is configured in the next panel port.
In the embodiment of the application, one or more automatic state reporting conditions can be flexibly configured on the switch, so that the flexibility of automatic reporting of the port state is improved.
When a plurality of automatic status report conditions are configured on the switch, such as when the port closing configuration is not canceled, the optical module is in place, and the port type 3 conditions are configured, the first processor 21 detects that one panel port satisfies the 3 conditions at the same time, and considers that the panel port satisfies the automatic status report conditions, and configures one destination port of the panel port as the designated switch port. Otherwise, the panel port is set to be in a Down state, and the polling is continued to detect whether the next panel port meets the automatic status reporting condition. This can improve the reliability of the automatic reporting of port status. The sequence of the first processor detecting that the panel port meets the reporting condition of each automatic state is not limited.
In some embodiments, the first processor 21 may be specifically configured to:
before setting the panel port to a Down state, detecting whether the panel port is in an Up state in a software record; and if the panel port is in the Up state, executing the step of setting the panel port to the Down state, and recording the panel port in the Down state by software. If the panel port is not in the Up state, namely in the Down state, no other processing is carried out on the panel port.
In the embodiment of the present application, when it is determined that one panel port does not satisfy the automatic reporting condition, before setting the panel port to the Down state, the first processor 21 detects whether the panel port is in the Up state in the software record. If the front panel is in the Up state, the first processor 21 sets the front panel to the Down state, and records the front panel in the Down state by software, and continues to poll and detect the next front panel. If the front panel is in the Down state, the first processor 21 may keep the front panel in the Down state and perform no other processing on the front panel.
In the embodiment of the application, when the switch is provided with the indicator lamp, and the first processor detects that the panel port does not meet the automatic reporting condition, or receives that the port state of the panel port reported by the second processor is Down, the indicator lamp corresponding to the panel port can be turned off while the panel port is set to be in the Down state, so that the visibility of the port state is improved, and a user can intuitively judge whether the panel port is normally connected and normally used, so that the switch with ultra-low time delay faces wider and has competitiveness.
Taking the switch as an example of an ultralow time delay switch, the automatic reporting flow of the port state of the switch provided by the embodiment of the application is described in detail below in combination with the automatic reporting flow of the port state shown in fig. 3. In fig. 3, the first processor includes a plurality of ultra low latency switch ports and the second processor includes a plurality of chip ports B.
The first processor selects an ultra-low latency switch port, such as port a, and selects a chip port, such as port B, and fixedly connects port a with port B. Here, port a is used in the flow guide. The first processor may record that port a is fixedly connected to port B by software. Here, the ultra low latency switch ports other than port a are referred to as panel ports.
In step S31, when the ultra-low latency switch is initialized, the first processor starts a monitoring task, polls all panel ports, is used for monitoring port states of all panel ports, and the software records port states of all panel ports.
Step S32, the first processor judges whether the panel port detected by polling has a Sout Down configuration; if so, the port Shut Down state is considered, and step S33 is executed; if not, step S35 is performed.
In the embodiment of the application, the port can be controlled by a user more conveniently by adding the Sout Down configuration judgment, and for the unused port, the user can control the port state through a command line.
Step S33, the first processor judges whether the panel port recorded by the software is in an Up state; if the Up state is the Up state, step S34 is executed; if the status is not Up, i.e., the front panel is Down, no other processing is performed on the front panel. Subsequently, the first processor may return to executing step S31 to poll the detection of the next panel port.
In step S34, the first processor reports the panel Down, and turns off the light, and the software records. The method specifically comprises the following steps: the first processor sets the panel port to be in a Down state, records the panel port in the Down state by software, and turns off the indicator light corresponding to the panel port. Subsequently, the first processor may return to executing step S31 to poll the detection of the next panel port.
Step S35, the first processor judges whether the panel port has an optical module in place; if yes, go to step S36; if not, step S33 is performed.
Step S36, the first processor judges whether the panel port is configured with a port type; if the port type is not configured, step S33 is performed. And (5) not reporting the panel ports without the port types. If the port type is configured, step S37 is performed.
In step S37, the first processor configures a destination port of the panel port to the port a. Thus, the code stream entering the panel port is introduced into port A; the code stream is introduced to the second processor through the fixed connection of port a and port B.
In step S38, the second processor trains the port B using the code stream. If training is successful, the port B is in the Up state; if training fails, port B is in the Down state.
Step S39, the first processor judges whether the port B is in the Up state; if the port B is in the Up state, executing step S310; if port B is not in the Up state, i.e., port B is in the Down state, step S33 is performed.
In step S310, the first processor reports the panel port Up and lights Up. The method specifically comprises the following steps: the first processor sets the panel port to be in an Up state, records software when the panel port is in the Up state, and turns on an indicator lamp corresponding to the panel port. Subsequently, the first processor may continue to step S31 to poll the next panel port.
According to the technical scheme provided by the embodiment of the application, the port state of the ultralow-delay switch can be automatically reported, the visibility of the port state is improved, and a user can intuitively judge whether the panel port is normally connected and normally used, so that the ultralow-delay switch is wider in scope and has competitiveness.
Corresponding to the switch embodiment, the embodiment of the application also provides a port status reporting method, as shown in fig. 4, applied to a switch, where the switch includes a first processor, a second processor, and a plurality of switch ports, and a designated switch port in the plurality of switch ports is connected with a chip port of the second processor, other switch ports except the designated switch port are used for being connected with other devices, and the designated switch port is a destination port of the other switch ports. The port state reporting method comprises the following steps:
step S41, other exchanger ports guide the received code stream to the appointed exchanger port according to the software record that the appointed exchanger port is the destination port of the other exchanger ports;
step S42, designating a switch port to guide the code stream to the second processor by connecting with the chip port;
step S43, the second processor trains the chip port by using the code stream to obtain the port state of the chip port, takes the port state of the chip port as the port state of other switch ports, and reports the port states of the other switch ports to the first processor;
in step S44, the first processor performs a processing operation corresponding to the port status of the other switch port.
In the technical scheme provided by the embodiment of the application, the second processor is introduced into the switch, a designated switch port of the switch is fixedly connected with a chip port of the second processor, and the destination ports of other switch ports except the designated switch port are configured with one part to the designated switch port. Thus, when a switch port receives a code stream, the code stream received by the switch port is introduced into the designated switch port because the designated switch port is the destination port of the switch port, and the designated switch port is fixedly connected with the chip port, so that the code stream received by the switch port enters the second processor through the designated switch port and the chip port. The second processor trains the chip port based on the entered code stream, so that the port state of the chip port can be obtained, and the code stream for training the chip port comes from a switch port, so that the port state of the chip port indirectly reflects the port state of the switch port. At this time, the second processor reports the port state of the switch port to the first processor, which realizes the automatic reporting of the port state, and further facilitates the first processor to execute corresponding processing operation, thus, when the switch is an ultralow time delay switch, the application range of the ultralow time delay switch is enlarged.
In some embodiments, the switch may further include an indicator light in one-to-one correspondence with the plurality of switch ports;
the step of performing processing operations corresponding to port states of other switch ports may include:
if the port state of the other switch ports is the Up state, the indicator lights corresponding to the other switch ports are lightened; if the port state of the other switch ports is the Down state, the indicator lights corresponding to the other switch ports are turned off.
In some embodiments, the method for reporting a port state may further include:
selecting a designated switch port from a plurality of switch ports, and connecting the designated switch port with a chip port of a second processor;
and connecting the designated switch port with the chip port for software recording.
In some embodiments, the method for reporting a port state may further include:
the first processor polls and detects whether each other switch port meets an automatic status report condition; if so, one destination port of the other switch ports is configured as the designated switch port.
In some embodiments, the automatic status reporting condition includes one or more of not cancelling the port close configuration, the optical module being in place, and configured with a port type;
The step of polling to detect whether each other switch port satisfies the automatic status report condition may include:
when the automatic status reporting condition includes that the port closing configuration is not canceled, polling to detect whether each other switch port has the port closing configuration canceled; if not, determining that the other switch ports meet the automatic status reporting condition; if yes, determining that the other switch ports do not meet the automatic state reporting condition;
when the automatic status reporting condition comprises that the optical module is in place, polling to detect whether the optical module of each other switch port is in place; if yes, determining that the other switch ports meet an automatic state reporting condition; if not, determining that the other switch ports do not meet the automatic state reporting condition;
when the automatic status reporting condition includes configuration of a port type, polling to detect whether each other switch port is configured with a port type; if the port type is configured, determining that the other switch ports meet an automatic status reporting condition; if the port type is not configured, determining that the other switch ports do not meet the automatic status report condition.
In some embodiments, the method for reporting a port state may further include: the first processor detects whether the other switch port in the software record is in an Up state; if the switch port is in the Up state, the step of setting the other switch port to the Down state is executed, and the software recording is carried out on the other switch port to the Down state.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the method embodiments, since they are substantially similar to the switch embodiments, the description is relatively simple, with reference to the partial description of the switch embodiments.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (12)

1. A switch, characterized in that the switch comprises a first processor, a second processor and a plurality of switch ports, wherein a designated switch port of the plurality of switch ports is connected with a chip port of the second processor, other switch ports except the designated switch port are used for being connected with other devices, the designated switch port is a destination port of the other switch ports, and the destination ports of the other switch ports except the designated switch port are all configured with one copy to the designated switch port;
the other switch ports are used for guiding the received code stream to the designated switch port according to the fact that the designated switch port is a destination port of the other switch ports;
the designated switch port is configured to direct the code stream to the second processor by connecting with the chip port;
The second processor is configured to train the chip port by using the code stream to obtain a port state of the chip port, and report the port state of the other switch ports to the first processor by using the port state of the chip port as the port state of the other switch ports;
the first processor is configured to perform a processing operation corresponding to a port state of the other switch port.
2. The switch of claim 1, further comprising indicator lights in one-to-one correspondence with the plurality of switch ports;
the first processor is specifically configured to:
if the port state of the other switch port is the Up opening state, the indicator lamp corresponding to the other switch port is lightened;
and if the port state of the other switch ports is the Down closing state, closing the indicator lights corresponding to the other switch ports.
3. The switch of claim 1, wherein the first processor is further configured to:
selecting the appointed switch port from the switch ports, and connecting the appointed switch port with the chip port of the second processor;
And connecting the appointed switch port with the chip port for software recording.
4. The switch of claim 1, wherein the first processor is further configured to:
polling to detect whether each other switch port meets an automatic status reporting condition; if yes, configuring a destination port of the other switch ports as a designated switch port; if not, the other switch port is set to the Down state.
5. The switch of claim 4, wherein the automatic status reporting condition includes one or more of not cancelling a port close configuration, an optical module in place, and configured with a port type;
the first processor is specifically configured to:
when the automatic status reporting condition includes that the port closing configuration is not canceled, polling to detect whether each other switch port has the port closing configuration canceled; if not, configuring a destination port of the other switch ports as a designated switch port; if yes, setting the other switch ports to a Down state;
when the automatic status reporting condition comprises that the optical module is in place, polling to detect whether the optical module of each other switch port is in place; if the switch port is in place, configuring a destination port of the other switch ports as the designated switch port; if not, setting the other switch ports to a Down state;
When the automatic status report condition comprises that the port type is configured, polling to detect whether each other switch port is configured with the port type; if the port type is configured, configuring a destination port of the other switch ports as the designated switch port; if the port type is not configured, the other switch port is set to the Down state.
6. The switch of claim 4 or 5, wherein the first processor is further configured to:
before setting the other switch ports to the Down state, detecting whether the other switch ports in the software record are in the Up state; and if the switch port is in the Up state, executing the step of setting the other switch port to the Down state, and recording the other switch port in the Down state by software.
7. The port state reporting method is characterized by being applied to a switch, wherein the switch comprises a first processor, a second processor and a plurality of switch ports, wherein an appointed switch port in the switch ports is connected with a chip port of the second processor, other switch ports except the appointed switch port are used for being connected with other devices, the appointed switch port is a destination port of the other switch ports, and the destination ports of the other switch ports except the appointed switch port are all configured with one part to the appointed switch port; the method comprises the following steps:
The other switch ports guide the received code stream to the appointed switch port according to the software record that the appointed switch port is the destination port of the other switch ports;
the appointed switch port is connected with the chip port to guide the code stream to the second processor;
the second processor trains the chip port by using the code stream to obtain the port state of the chip port, takes the port state of the chip port as the port state of the other switch ports, and reports the port state of the other switch ports to the first processor;
the first processor performs processing operations corresponding to port states of the other switch ports.
8. The method of claim 7, wherein the switch further comprises indicator lights in one-to-one correspondence with the plurality of switch ports;
the step of executing processing operations corresponding to port states of the other switch ports includes:
if the port state of the other switch port is the Up opening state, the indicator lamp corresponding to the other switch port is lightened;
And if the port state of the other switch ports is the Down closing state, closing the indicator lights corresponding to the other switch ports.
9. The method of claim 7, wherein the method further comprises:
selecting the appointed switch port from the switch ports, and connecting the appointed switch port with the chip port of the second processor;
and connecting the appointed switch port with the chip port for software recording.
10. The method of claim 7, wherein the method further comprises:
the first processor polls and detects whether each other switch port meets an automatic status report condition; if so, one destination port of the other switch ports is configured as the designated switch port.
11. The method of claim 10, wherein the automatic status reporting condition includes one or more of not cancelling a port close configuration, an optical module in place, and configured with a port type;
the step of polling to detect whether each of the other switch ports satisfies an automatic status report condition includes:
when the automatic status reporting condition includes that the port closing configuration is not canceled, polling to detect whether each other switch port has the port closing configuration canceled; if not, determining that the other switch ports meet the automatic status reporting condition; if yes, determining that the other switch ports do not meet the automatic state reporting condition;
When the automatic status reporting condition comprises that the optical module is in place, polling to detect whether the optical module of each other switch port is in place; if yes, determining that the other switch ports meet an automatic state reporting condition; if not, determining that the other switch ports do not meet the automatic state reporting condition;
when the automatic status report condition comprises that the port type is configured, polling to detect whether each other switch port is configured with the port type; if the port type is configured, determining that the other switch ports meet an automatic status reporting condition; if the port type is not configured, determining that the other switch ports do not meet the automatic status report condition.
12. The method of claim 11, wherein the method further comprises:
the first processor detects whether the other switch ports in the software record are in an open Up state; and if the switch port is in the Up state, executing the step of setting the other switch port to the Down state, and recording the other switch port in the Down state by software.
CN202210939929.5A 2022-08-05 2022-08-05 Port state reporting method and switch Active CN115361306B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210939929.5A CN115361306B (en) 2022-08-05 2022-08-05 Port state reporting method and switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210939929.5A CN115361306B (en) 2022-08-05 2022-08-05 Port state reporting method and switch

Publications (2)

Publication Number Publication Date
CN115361306A CN115361306A (en) 2022-11-18
CN115361306B true CN115361306B (en) 2023-10-24

Family

ID=84033548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210939929.5A Active CN115361306B (en) 2022-08-05 2022-08-05 Port state reporting method and switch

Country Status (1)

Country Link
CN (1) CN115361306B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000045117A (en) * 1998-12-30 2000-07-15 김영환 Method for alerting processor alarm in communication system
CN101877631A (en) * 2010-06-28 2010-11-03 中兴通讯股份有限公司 Server and business switching method thereof
CN114579499A (en) * 2022-01-20 2022-06-03 飞腾信息技术有限公司 Control method, device, equipment and storage medium of processor communication interface

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7908368B2 (en) * 2008-09-23 2011-03-15 International Business Machines Corporation Method and apparatus for redirecting data traffic based on external switch port status
US20210243070A1 (en) * 2020-01-31 2021-08-05 Hewlett Packard Enterprise Development Lp Switch port protection mechanism
US11494893B2 (en) * 2020-05-20 2022-11-08 Verizon Patent And Licensing Inc. Systems and methods for managing physical connections of a connector panel

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000045117A (en) * 1998-12-30 2000-07-15 김영환 Method for alerting processor alarm in communication system
CN101877631A (en) * 2010-06-28 2010-11-03 中兴通讯股份有限公司 Server and business switching method thereof
CN114579499A (en) * 2022-01-20 2022-06-03 飞腾信息技术有限公司 Control method, device, equipment and storage medium of processor communication interface

Also Published As

Publication number Publication date
CN115361306A (en) 2022-11-18

Similar Documents

Publication Publication Date Title
US7565570B2 (en) Disk array device and path failure detection method thereof
US7007191B2 (en) Method and apparatus for identifying one or more devices having faults in a communication loop
US7843836B2 (en) Systems, methods and computer program products for controlling high speed network traffic in server blade environments
US20110173504A1 (en) Communication system, a communication method and a program thereof
CN108959031B (en) NVME backboard lighting control method, system, medium and equipment
US11032129B2 (en) Information processing apparatus, network system, and computer-readable recording medium
US20070183337A1 (en) FC-AL cabling management system
CN111049765A (en) Aggregation port switching method, device, chip, switch and storage medium
US8984333B2 (en) Automatic computer storage medium diagnostics
CN113612659A (en) Equipment networking test method and device, electronic equipment and storage medium
CN115361306B (en) Port state reporting method and switch
JP2007157089A (en) Storage virtualization device and computer system using the same
CN111026585A (en) Storage server hot standby switching method in recording and broadcasting system
CN102664755A (en) Control channel fault determining method and device
CN102216909A (en) A network processor and a diagnostic method of procedures stored in the network process
CN112181880B (en) Method and device for controlling USB channel switching
CN110601985B (en) Interface configuration information switching method, device, equipment and storage medium
US7155636B2 (en) Method for detecting faults between storage devices and storage devices using the same
US10528339B2 (en) Cognitive feature based code level update
CN100490343C (en) A method and device for realizing switching between main and backup units in communication equipment
CN114296976A (en) I2C communication fault recovery method and system
JP4357433B2 (en) Storage system
US8111610B2 (en) Flagging of port conditions in high speed networks
CN104022909B (en) The method for processing business switched, device and system based on XAUI link
JP2006301701A (en) Digital output substrate for monitoring control of plant and its method and plant monitoring controller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant