CN111417034B - Switch and hot plug method, device and system for switch board card thereof - Google Patents
Switch and hot plug method, device and system for switch board card thereof Download PDFInfo
- Publication number
- CN111417034B CN111417034B CN202010176069.5A CN202010176069A CN111417034B CN 111417034 B CN111417034 B CN 111417034B CN 202010176069 A CN202010176069 A CN 202010176069A CN 111417034 B CN111417034 B CN 111417034B
- Authority
- CN
- China
- Prior art keywords
- board card
- switch
- communication
- plugging
- plug
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 238000004891 communication Methods 0.000 claims abstract description 170
- 238000006243 chemical reaction Methods 0.000 claims description 26
- 230000003287 optical effect Effects 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 6
- 238000001514 detection method Methods 0.000 claims description 4
- 238000003780 insertion Methods 0.000 claims description 2
- 230000037431 insertion Effects 0.000 claims description 2
- 238000000926 separation method Methods 0.000 claims description 2
- 230000006870 function Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 3
- JFLRKDZMHNBDQS-UCQUSYKYSA-N CC[C@H]1CCC[C@@H]([C@H](C(=O)C2=C[C@H]3[C@@H]4C[C@@H](C[C@H]4C(=C[C@H]3[C@@H]2CC(=O)O1)C)O[C@H]5[C@@H]([C@@H]([C@H]([C@@H](O5)C)OC)OC)OC)C)O[C@H]6CC[C@@H]([C@H](O6)C)N(C)C.CC[C@H]1CCC[C@@H]([C@H](C(=O)C2=C[C@H]3[C@@H]4C[C@@H](C[C@H]4C=C[C@H]3C2CC(=O)O1)O[C@H]5[C@@H]([C@@H]([C@H]([C@@H](O5)C)OC)OC)OC)C)O[C@H]6CC[C@@H]([C@H](O6)C)N(C)C Chemical group CC[C@H]1CCC[C@@H]([C@H](C(=O)C2=C[C@H]3[C@@H]4C[C@@H](C[C@H]4C(=C[C@H]3[C@@H]2CC(=O)O1)C)O[C@H]5[C@@H]([C@@H]([C@H]([C@@H](O5)C)OC)OC)OC)C)O[C@H]6CC[C@@H]([C@H](O6)C)N(C)C.CC[C@H]1CCC[C@@H]([C@H](C(=O)C2=C[C@H]3[C@@H]4C[C@@H](C[C@H]4C=C[C@H]3C2CC(=O)O1)O[C@H]5[C@@H]([C@@H]([C@H]([C@@H](O5)C)OC)OC)OC)C)O[C@H]6CC[C@@H]([C@H](O6)C)N(C)C JFLRKDZMHNBDQS-UCQUSYKYSA-N 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q1/00—Details of selecting apparatus or arrangements
- H04Q1/02—Constructional details
- H04Q1/10—Exchange station construction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0806—Configuration setting for initial configuration or provisioning, e.g. plug-and-play
- H04L41/0809—Plug-and-play configuration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/40—Constructional details, e.g. power supply, mechanical construction or backplane
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Details Of Connecting Devices For Male And Female Coupling (AREA)
Abstract
The invention discloses a method, a device and a system for hot plugging of a switch board card of a switch and the switch, wherein the method comprises the following steps: the processor detects an in-place signal of the exchange board card in the CPLD; determining the state information of the pluggable board card according to the in-place signal; the state information comprises identity information and a plugging state, and the plugging state is plugging or removing; according to the state information, configuring the driving communication of the processor and the communication equipment in the plug board card, and configuring a communication port corresponding to the plug board card; according to the invention, the CPLD for detecting the in-place condition of the switching board card inserted into the switch is arranged in the switch, so that the processor can determine the state information of the switching board card subjected to plugging according to the in-place signal of the switching board card in the CPLD, and the communication setting of the switching board card subjected to plugging is correspondingly configured, so that the switch completes the plugging and unplugging operation of the switching board card without power failure, the service is quickly recovered, the hot plugging function of the switching board card is realized, and the user experience is improved.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a switch and a hot plug method, a device and a system of a switch board card thereof.
Background
As a Switch is a network device for electrical (optical) signal forwarding. It may provide an exclusive electrical signal path for any two network nodes accessing the switch. The most common switch is an ethernet switch. Other common are telephone voice switches, fiber switches, and the like.
The switch front panel has a number of ports that provide network access nodes. In recent years, with the increasing bandwidth and capacity of switch chips, it is often necessary to arrange front panel ports on different switch boards. Each switch board card is provided with a plurality of ports, and each switch board card can be independently plugged and unplugged.
When the switch is deployed, one or more switch boards may be inserted, and then, along with the operation and maintenance needs, it may be necessary to replace an existing switch board, add a new switch board, or remove a switch board.
In the prior art, before the traditional switch is used for replacing, adding and removing the plugging operation of the switching board cards such as the switching board card, the switch needs to be powered off, the normal service of other switching board cards which do not need to be plugged is influenced, and the user experience is not facilitated. Therefore, how to enable the switch to complete the plugging operation of the switch board card without power failure, and quickly recover the service, so as to realize the hot plugging function of the switch board card, improve the user experience, and solve the problem that the switch board card is urgently needed.
Disclosure of Invention
The invention aims to provide a switch and a hot plug method, a device and a system of a switch board card thereof, so as to realize the hot plug function of the switch board card and improve the user experience.
In order to solve the technical problem, the invention provides a hot plug method for a switch board card of a switch, which comprises the following steps:
the processor detects an in-place signal of the exchange board card in the CPLD;
determining the state information of the pluggable board card according to the in-place signal; the pluggable board card is an exchange board card which is pluggable, the state information comprises identity information and a pluggable state, and the pluggable state is plugging or unplugging;
according to the state information, configuring the processor to be in drive communication with communication equipment in the pluggable board card, and configuring a communication port corresponding to the pluggable board card; wherein, the communication equipment includes: at least one of a sensor, a memory, and a light module.
Optionally, the detecting, by the processor, an in-place signal of the switch board card in the CPLD includes:
the processor receives a plugging interrupt signal sent by the CPLD; wherein, the plugging interrupt signal is an interrupt signal sent by the CPLD when the CPLD detects that the in-place signal changes;
and detecting an in-place signal of the exchange board card in the CPLD according to the plugging interrupt signal.
Optionally, when the processor is in communication connection with the communication device through an I2C interface, the configuring, according to the state information, the driver communication between the processor and the communication device in the plug board card includes:
when the plugging state is plugging, creating corresponding I2C slave equipment corresponding to the communication equipment, and matching the communication equipment with corresponding drivers;
and when the plugging state is removal, removing the corresponding I2C slave device corresponding to the communication device, and separating the communication device from the corresponding drive.
Optionally, when the communication device includes a first communication device corresponding to the first I2C route and a second communication device corresponding to the second I2C route in the pluggable board card, the creating a corresponding I2C slave device corresponding to the communication device, so that the communication device is matched with the corresponding driver, includes:
creating a corresponding I2C slave device corresponding to the first communication device, and matching the first communication device with a corresponding driver; wherein the first communication device comprises the sensor and the memory;
creating a corresponding I2C slave device corresponding to the second communication device, and matching the second communication device with a corresponding driver; wherein the second communication device comprises the optical module.
Optionally, the configuring, according to the state information, drive communication between the processor and the communication device in the plug board card, and configuring a communication port corresponding to the plug board card include:
configuring physical layer communication between a switching chip in a switch and a communication signal conversion chip in the pluggable board card; the switching chip can communicate with communication signal conversion chips in the switching board cards in preset number, and the preset number is greater than or equal to 2.
Optionally, the physical layer communication between the switch chip in the configuration switch and the communication signal conversion chip in the pluggable board card includes:
when the plug-in state is plug-in, calling an external physical layer initialization command of the exchange chip, and initializing an external physical layer corresponding to a communication signal conversion chip in the plug-in board card;
and when the plugging state is removal, calling an external physical layer closing command of the exchange chip, and closing an external physical layer corresponding to the communication signal conversion chip in the plugging board card.
The invention also provides a hot plug device for the switch board card of the switch, which comprises:
the detection unit is used for detecting an in-place signal of the exchange board card in the CPLD;
the determining unit is used for determining the state information of the pluggable board card according to the in-place signal; the pluggable board card is an exchange board card which is pluggable, the state information comprises identity information and a pluggable state, and the pluggable state is plugging or unplugging;
the configuration unit is used for configuring the driving communication between the processor and the communication equipment in the pluggable board card according to the state information and configuring a communication port corresponding to the pluggable board card; wherein, the communication equipment includes: at least one of a sensor, a memory, and a light module.
The present invention also provides a switch, comprising:
the CPLD is used for detecting the in-place situation of the inserted switching board card;
a memory for storing a computer program;
and the processor is used for realizing the steps of the hot plug method of the switch board card of the switch when executing the computer program.
Optionally, the switch further includes:
the exchange chip is used for communicating with a communication signal conversion chip inserted into an exchange board card of the exchanger; the number of the switching board cards is less than or equal to a preset number, and the preset number is greater than or equal to 2.
The invention also provides a system for hot plug of the exchange board card of the exchanger, which comprises:
such as the switch described above and a switch board for plugging into the switch.
The invention provides a hot plug method for a switch board card of a switch, which comprises the following steps: the processor detects an in-place signal of the exchange board card in the CPLD; determining the state information of the pluggable board card according to the in-place signal; the pluggable board card is an exchange board card which is subjected to plugging, the state information comprises identity information and a plugging state, and the plugging state is plugging or removing; according to the state information, configuring the driving communication of the processor and the communication equipment in the plug board card, and configuring a communication port corresponding to the plug board card; wherein, the communication equipment includes: at least one of a sensor, a memory, and a light module;
therefore, the invention sets the CPLD for detecting the in-place situation of the exchange board card inserted into the exchanger in the exchanger, so that the processor can determine the state information of the exchange board card subjected to plugging and unplugging according to the in-place signal of the exchange board card in the CPLD, and correspondingly configures the communication setting of the exchange board card subjected to plugging and unplugging, thereby completing the plugging and unplugging operation of the exchange board card without power loss of the exchanger, rapidly recovering the service, realizing the hot plugging and unplugging function of the exchange board card, and improving the user experience. In addition, the invention also provides a switch and a hot plug device and a system of the switch board card thereof, and the switch board card hot plug device and the system also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a hot plug method for a switch board card of a switch according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a hot plug system of a switch board card of a switch according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating processing of an interrupt handler of another method for hot-plugging a switch board card of a switch according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating an application process of another method for hot plugging a switch board of a switch according to an embodiment of the present invention;
fig. 5 is a block diagram of a hot plug apparatus for a switch board card of a switch according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for hot plugging a switch board of a switch according to an embodiment of the present invention. The method can comprise the following steps:
step 101: and the processor detects the on-position signal of the exchange board card in the CPLD.
The CPLD (Complex Programmable Logic Device) in this step may be a Device that is set in the switch and is used to detect the on-site condition of the switch board inserted into the switch, that is, the CPLD may detect the on-site condition of the switch board inserted into the switch and generate an on-site signal corresponding to the on-site condition of each switch board, so that the processor in the switch may determine the condition that the switch board is inserted into the switch board by detecting the on-site signal of the switch board in the CPLD.
Specifically, the specific way in which the processor in the switch detects the in-place signal of the switch board in the CPLD in this step may be set by a designer according to a use scene and a user requirement, for example, the processor may detect the in-place signal of the switch board in the CPLD at a preset time interval; for example, the processor can determine that the switch board card is plugged or unplugged, that is, the in-place signal changes, by detecting the in-place signal in real time. In order to reduce the workload of the processor, the processor may also detect an in-place signal of the switch board in the CPLD after receiving an interrupt signal (plug interrupt signal) corresponding to a plug-in condition of the switch board sent by the CPLD, that is, the CPLD may send the plug interrupt signal to the processor when detecting that the in-place signal of the switch board changes, as shown in fig. 2, the CPLD on the motherboard may send an interrupt signal (IRQ, plug interrupt signal) to the processor (CPU) when the switch board is plugged, where the interrupt signal is connected to an IRQA pin of the processor; correspondingly, as shown in fig. 3, after receiving the plugging interrupt signal, the processor may first clear the interrupt status flag corresponding to the plugging interrupt signal, and then detect the on-site signal of the switch board card in the CPLD, so as to ensure that the subsequent plugging interrupt signal is successfully received. The present embodiment does not set any limit to this.
Correspondingly, the embodiment does not limit the specific process of detecting the on-position signal of the switch board in the CPLD by the processor, for example, when the processor and the CPLD are connected through I2C for communication, in this step, the processor may detect the on-position signal of the switch board in the CPLD through I2C for communication.
It can be understood that, for the specific number of the in-place signals of the switch boards in the CPLD in this embodiment, the specific number may be set according to the number of the switch boards that can be inserted into the switch, as shown in fig. 2, the CPLD on the switch motherboard may detect the in-place states of 4 switch boards, and generate corresponding in-place signals. The present embodiment does not set any limit to this.
Step 102: determining the state information of the pluggable board card according to the in-place signal; the pluggable board card is an exchange board card which is pluggable, the state information comprises identity information and a pluggable state, and the pluggable state is plugging or removing.
It can be understood that the purpose of this step may be to determine, for the in-place signal detected by the processor, state information of the switch board card that is plugged (i.e., the plug board card), so as to configure the communication setting of the switch board card that is plugged correspondingly by using the state information, thereby implementing the hot-plugging function of the switch board card.
Specifically, the present embodiment does not limit the specific content of the status information of the pluggable board, for example, the status information may include the identity information (such as the number of the switch board) of the pluggable board and the corresponding pluggable status (i.e., insertion or removal), as long as the processor can use the status information, find each pluggable board and determine whether the pluggable board is plugged or removed, which is not limited in this embodiment.
It should be noted that, in this step, the specific manner in which the processor determines the state information of the pluggable board card according to the in-place signal may be set by a designer, or may be set correspondingly according to the specific manner of detecting the in-place signal, for example, when the processor detects the in-place signal after receiving the plug interrupt signal sent by the CPLD, the state information of the pluggable board card may be determined according to the currently detected in-place signal and the last detected in-place signal or the switch in-place condition detected during startup; if the processor receives the plugging interrupt signal sent by the CPLD for the first time after the switch is started, the state information of the plugging board card can be determined by comparing the on-position signal detected this time with the on-position condition of the switch detected during starting or the stored on-position signal detected last time during last starting; if the processor receives the plugging interrupt signal sent by the CPLD after the switch is started for the first time, the state information of the plugging board card can be determined by comparing the in-place signal detected this time with the in-place signal detected last time. When the processor detects the in-place signal according to the preset time interval, whether the pulling and plugging condition of the exchange board card occurs or not can be judged firstly through the comparison between the currently detected in-place signal and the last detected in-place signal, and therefore when the pulling and plugging condition of the exchange board card occurs, the state information is determined according to the comparison between the currently detected in-place signal and the last detected in-place signal.
Step 103: according to the state information, configuring the driving communication of the processor and the communication equipment in the plug board card, and configuring a communication port corresponding to the plug board card; wherein, the communication equipment includes: at least one of a sensor, a memory, and a light module.
It can be understood that the purpose of this step may be to configure, by the processor, communication settings of the swap board card that is unplugged and plugged according to the determined status information of the pluggable board card, so as to implement a hot plug function of the swap board card.
Specifically, the communication device in this step may be a device in the switch board that directly communicates with the processor, such as a sensor (e.g., a temperature sensor, a voltage sensor, and the like), a memory (e.g., an EEPROM) and an optical module (e.g., a 100G optical module in fig. 2) in the switch board.
It should be noted that, in this step, the processor may create, according to the state information corresponding to each plug-in board, when the plug-in state is the plug-in state, the drive communication between the processor and the switch board (plug-in board) corresponding to the identity information, and create a communication port corresponding to the switch board, such as a Kernel Ethernet port; and when the plugging state is removal, removing the drive communication between the processor and the exchange board card (plugging board card) corresponding to the identity information, and removing the communication port corresponding to the exchange board card. For example, when the processor is in communication connection with the communication device through the I2C interface (i.e., the I2C pin), if the plugging state is plugging, the processor matches the communication device with the corresponding driver by creating the corresponding I2C slave device corresponding to the communication device, and completes creation of the driver communication between the processor and the plug board card; if the plugging state is removal, the processor removes the corresponding I2C slave equipment corresponding to the communication equipment, so that the communication equipment is separated from the corresponding drive, and the removal of the drive communication between the processor and the plugging board card is completed.
In this embodiment, because the switch board has a plurality of communication devices, two paths of I2C may be set in the switch board to connect all the communication devices, that is, all the communication devices are divided into a first path of I2C corresponding to the first communication device and a second path of I2C corresponding to the second communication device, the first communication device may be a communication device other than optical modules such as a sensor and a memory, and the second communication device may be an optical module. Correspondingly, as shown in fig. 3, in this step, when the plug-in state is the plug-in state, the processor may respectively create a corresponding I2C slave device corresponding to the first communication device to match the first communication device with the corresponding driver, and create a corresponding I2C slave device corresponding to the second communication device to match the second communication device with the corresponding driver, so as to complete the creation of the drive communication between the processor and the plug-in board card; when the plugging state is the removal state, the processor may remove the corresponding I2C slave device corresponding to the first communication device to separate the first communication device from the corresponding drive, and remove the corresponding I2C slave device corresponding to the second communication device to separate the second communication device from the corresponding drive, respectively, thereby completing the removal of the drive communication between the processor and the plugging board card.
Further, in this embodiment, the processor may utilize an I2C expansion device in the switch to connect with an I2C channel in a plurality of switch boards. As shown in fig. 2, when the processor (CPU) has only one I2C pin, 8I 2C channels can be extended by using an I2C extension device (PCA9548 chip) on the motherboard, and are connected to I2C channels of 4 switch boards respectively.
Further, in order to reduce the use cost of the switch, the switch in this embodiment may be provided with a switch chip, so that the switch board inserted into the switch does not need to be provided with an independent switch chip, i.e., a communication signal conversion chip in the switch board inserted into the switch may perform physical layer (PHY) communication with the switch chip in the switch. As shown in fig. 2, when each switch board card supports 32 ports of 100G, a Tomahawk 3 chip (switch chip) may be disposed on a main board of the switch, where the single-chip processing capability of the Tomahawk 3 chip is 12.8Tbps, and at most 32x400GbE, 64x200GbE, or 128x100GbE ports are supported; there are 32 Blackhawk cores (one Core) in the Tomahawk 3 chip; each blackhawktcore has 8 pairs of SerDes (serializer) interfaces, each pair having a SerDes rate of 56 Gbps. 8 BCM81724 chips (communication signal conversion chips) are designed in the switch board card, wherein each BCM81724 chip is an 8X56Gbps PAM 4-16X 25Gbps NRZ forward-backward conversion (georbox) chip; each BCM81724 chip is connected with 8 pairs of SerDes interfaces corresponding to one Blackhawk Core of the exchange chip Tomahawk 3, then 16 SerDes interfaces of 25Gbps are expanded and connected with 4 100G optical modules; the switching chip can communicate with the communication signal conversion chips of the 4 switching boards.
Correspondingly, the processor in the step can also be configured with a step of physical layer communication between a switching chip in the switch and a communication signal conversion chip in the pluggable board card; the switching chip can communicate with the communication signal conversion chips in the switching board cards with preset number, and the preset number is greater than or equal to 2. The specific value setting of the preset number is not limited in this embodiment, and may be correspondingly set according to a specific switch structure and a specific switch card structure, as shown in fig. 2, where the preset number may be 4.
Specifically, as shown in fig. 4, when the plug-in state is the plug-in state, an external physical layer initialization command of the switch chip is called to initialize an external physical layer corresponding to the communication signal conversion chip in the plug-in board card, so as to complete initialization of the external physical layer corresponding to the switch chip in the switch chip; and when the plugging state is removal, calling an external physical layer closing command of the exchange chip, closing the external physical layer corresponding to the communication signal conversion chip in the plugging board card, and finishing closing the external physical layer corresponding to the exchange chip in the exchange chip.
That is, as shown in fig. 3 and 4, after the processor configures the driver communication between the processor and the communication device in the plug board card by using the terminal handler, the processor may send a Netlink (socket) message corresponding to the state information to the application, so that the processor may configure the physical layer communication between the switch chip in the switch and the communication signal conversion chip in the plug board card by using the application, and configure the communication port corresponding to the plug board card.
In this embodiment, the CPLD for detecting the in-place condition of the switch board card inserted into the switch is arranged in the switch, so that the processor can determine the state information of the switch board card subjected to plugging according to the in-place signal of the switch board card in the CPLD, and correspondingly configure the communication setting of the switch board card subjected to plugging, thereby enabling the switch to complete the plugging and unplugging operation of the switch board card without power loss, rapidly recovering the service, realizing the hot plugging and unplugging function of the switch board card, and improving the user experience.
Referring to fig. 5, fig. 5 is a block diagram of a hot plug device for a switch board of a switch according to an embodiment of the present invention. The apparatus may include:
the detection unit 10 is used for detecting an in-place signal of a switching board card in the CPLD;
the determining unit 20 is configured to determine state information of the pluggable board card according to the in-place signal; the pluggable board card is an exchange board card which is subjected to plugging, the state information comprises identity information and a plugging state, and the plugging state is plugging or removing;
the configuration unit 30 is configured to configure the processor for drive communication with the communication device in the pluggable board card according to the state information, and configure a communication port corresponding to the pluggable board card; wherein, the communication equipment includes: at least one of a sensor, a memory, and a light module.
Optionally, the detection unit 10 may be specifically configured to receive a plug interrupt signal sent by the CPLD; the plugging interrupt signal is an interrupt signal sent by the CPLD when the CPLD detects that the in-place signal changes; and detecting an in-place signal of the exchange board card in the CPLD according to the plugging interrupt signal.
Optionally, when the processor is communicatively connected to the communication device through the I2C interface, the configuration unit 30 may include:
the drive matching subunit is used for creating corresponding I2C slave equipment corresponding to the communication equipment when the plug-in state is plug-in, so that the communication equipment is matched with the corresponding drive;
and the drive separation subunit is used for removing the corresponding I2C slave equipment corresponding to the communication equipment when the plugging state is removal, so as to separate the communication equipment from the corresponding drive.
Optionally, when the communication device includes a first communication device corresponding to the first route I2C and a second communication device corresponding to the second route I2C in the pluggable board card, the drive matching subunit may be specifically configured to create a corresponding I2C slave device corresponding to the first communication device, so that the first communication device is matched with the corresponding drive; creating a corresponding I2C slave device corresponding to the second communication device, and enabling the second communication device to be matched with the corresponding drive; wherein the first communication device comprises a sensor and a memory and the second communication device comprises a light module.
Optionally, the configuration unit 30 may include:
the switching chip configuration subunit is used for configuring the physical layer communication between the switching chip in the switch and the communication signal conversion chip in the pluggable board card; the switching chip can communicate with the communication signal conversion chips in the switching board cards with preset number, and the preset number is greater than or equal to 2.
The optional switching chip configuration subunit may be specifically configured to, when the plug-in state is the plug-in state, call an external physical layer initialization command of the switching chip, and initialize an external physical layer corresponding to a communication signal conversion chip in the plug-in board card; and when the plugging state is removal, calling an external physical layer closing command of the exchange chip, and closing the external physical layer corresponding to the communication signal conversion chip in the plugging board card.
In this embodiment, the CPLD for detecting the in-place condition of the switch board inserted into the switch is set in the switch, so that the determining unit 20 can determine the state information of the switch board which is unplugged and plugged according to the in-place signal of the switch board in the CPLD, and thus the configuration unit 30 configures the communication setting of the switch board which is unplugged and plugged correspondingly, so that the switch can complete the plugging and unplugging operation of the switch board without power loss, and the service is quickly recovered, thereby implementing the hot plugging function of the switch board and improving the user experience.
An embodiment of the present invention further provides a switch, including:
the CPLD is used for detecting the in-place situation of the inserted switching board card;
a memory for storing a computer program;
and the processor is used for implementing the steps of the hot plug method of the switch board of the switch provided by the embodiment when executing the computer program.
Optionally, the switch may further include:
the exchange chip is used for communicating with a communication signal conversion chip inserted into an exchange board card of the exchanger; the number of the switching board cards is less than or equal to a preset number, and the preset number is greater than or equal to 2.
Optionally, the switch may further include: I2C expansion equipment;
an I2C interface of the processor performs I2C communication with a preset number of switch boards through an I2C expansion device.
In addition, an embodiment of the present invention further provides a system for hot plug of a switch board card of a switch, including:
the switch and the switch board card for inserting the switch are provided by the embodiment.
The switch board card in this embodiment may not be provided with a switch chip.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device, the system and the switch disclosed by the embodiment correspond to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software unit executed by a processor, or in a combination of the two. The software cells may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The switch and the hot plug method, the device and the system for the switch board card thereof provided by the invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Claims (9)
1. A hot plug method for a switch board card of a switch is characterized by comprising the following steps:
the processor detects an in-place signal of the exchange board card in the CPLD;
determining the state information of the pluggable board card according to the in-place signal; the pluggable board card is an exchange board card which is pluggable, the state information comprises identity information and a pluggable state, and the pluggable state is plugging or unplugging;
according to the state information, configuring the processor to be in drive communication with communication equipment in the pluggable board card, and configuring a communication port corresponding to the pluggable board card; wherein, the communication equipment includes: at least one of a sensor, a memory, and a light module;
when the processor is in communication connection with the communication device through an I2C interface, the configuring, according to the state information, the driver communication between the processor and the communication device in the plug board card includes:
when the plugging state is plugging, creating an I2C slave device corresponding to the communication device, and matching the communication device with a corresponding driver;
and when the plugging state is removal, removing the I2C slave equipment corresponding to the communication equipment, and separating the communication equipment from the corresponding drive.
2. The method according to claim 1, wherein the detecting, by the processor, the presence signal of the switch board in the CPLD includes:
the processor receives a plugging interrupt signal sent by the CPLD; wherein, the plugging interrupt signal is an interrupt signal sent by the CPLD when the CPLD detects that the in-place signal changes;
and detecting an in-place signal of the exchange board card in the CPLD according to the plugging interrupt signal.
3. The method according to claim 1, wherein when the communication device includes a first communication device corresponding to a first channel I2C and a second communication device corresponding to a second channel I2C in the pluggable board, the creating an I2C slave device corresponding to the communication device to match the communication device with a corresponding driver includes:
creating an I2C slave device corresponding to the first communication device, and matching the first communication device with a corresponding driver; wherein the first communication device comprises the sensor and the memory;
creating an I2C slave device corresponding to the second communication device, and enabling the second communication device to be matched with the corresponding driver; wherein the second communication device comprises the optical module.
4. The method for hot plug of a switch board card of an exchange according to any one of claims 1 to 3, wherein the configuring, according to the state information, the processor to communicate with the driver of the communication device in the plug-in board card and configuring the communication port corresponding to the plug-in board card includes:
configuring physical layer communication between a switching chip in a switch and a communication signal conversion chip in the pluggable board card; the switching chip can communicate with communication signal conversion chips in the switching board cards in preset number, and the preset number is greater than or equal to 2.
5. The method for hot plug of a switch board card of a switch according to claim 4, wherein the configuring of the physical layer communication between the switch chip in the switch and the communication signal conversion chip in the plug board card comprises:
when the plug-in state is plug-in, calling an external physical layer initialization command of the exchange chip, and initializing an external physical layer corresponding to a communication signal conversion chip in the plug-in board card;
and when the plugging state is removal, calling an external physical layer closing command of the exchange chip, and closing an external physical layer corresponding to the communication signal conversion chip in the plugging board card.
6. The utility model provides a device is inserted to exchange integrated circuit board hot plug of switch which characterized in that includes:
the detection unit is used for detecting an in-place signal of the exchange board card in the CPLD;
the determining unit is used for determining the state information of the pluggable board card according to the in-place signal; the pluggable board card is an exchange board card which is pluggable, the state information comprises identity information and a pluggable state, and the pluggable state is plugging or unplugging;
the configuration unit is used for configuring the driving communication between the processor and the communication equipment in the plug board card according to the state information and configuring a communication port corresponding to the plug board card; wherein, the communication equipment includes: at least one of a sensor, a memory, and a light module;
when the processor is connected with the communication device through an I2C interface in a communication mode, the configuration unit comprises:
the drive matching subunit is used for creating an I2C slave device corresponding to the communication device when the plug-in state is plug-in, so that the communication device is matched with the corresponding drive;
and the drive separation subunit is used for removing the I2C slave equipment corresponding to the communication equipment when the plugging state is removal, so that the communication equipment is separated from the corresponding drive.
7. A switch, comprising:
the CPLD is used for detecting the in-place situation of the inserted switching board card;
a memory for storing a computer program;
a processor for implementing the steps of the method for hot plug of the switch board of the switch according to any one of claims 1 to 5 when executing the computer program.
8. The switch of claim 7, further comprising:
the exchange chip is used for communicating with a communication signal conversion chip inserted into an exchange board card of the exchanger; the number of the switching board cards is less than or equal to a preset number, and the preset number is greater than or equal to 2.
9. The utility model provides a system for hot plug of switch integrated circuit board of switch which characterized in that includes:
a switch as claimed in claim 7 or 8 and a switch card for insertion into the switch.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010176069.5A CN111417034B (en) | 2020-03-13 | 2020-03-13 | Switch and hot plug method, device and system for switch board card thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010176069.5A CN111417034B (en) | 2020-03-13 | 2020-03-13 | Switch and hot plug method, device and system for switch board card thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111417034A CN111417034A (en) | 2020-07-14 |
CN111417034B true CN111417034B (en) | 2022-02-18 |
Family
ID=71492966
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010176069.5A Active CN111417034B (en) | 2020-03-13 | 2020-03-13 | Switch and hot plug method, device and system for switch board card thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111417034B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112953859B (en) * | 2021-01-28 | 2022-05-27 | 新华三信息安全技术有限公司 | Method and equipment for refreshing forwarding table item |
CN113556249B (en) * | 2021-07-20 | 2024-06-28 | 浪潮思科网络科技有限公司 | Hot plug method, device, equipment and medium based on single-chip switch |
CN113630187B (en) * | 2021-07-25 | 2022-06-10 | 苏州浪潮智能科技有限公司 | PHY initialization method, system, equipment and medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101782884A (en) * | 2009-12-25 | 2010-07-21 | 福建星网锐捷网络有限公司 | Hot plugging realization method and system of high-speed signal circuit and hot plugging circuit board card |
CN110502464A (en) * | 2019-07-26 | 2019-11-26 | 苏州浪潮智能科技有限公司 | A kind of hot-swappable processing method, device, equipment, system and readable storage medium storing program for executing |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1678087A (en) * | 2004-03-31 | 2005-10-05 | 迈普(四川)通信技术有限公司 | Single-plate hot-plug-pull controlling method and board with hot plug-pull controlling module |
CN100462954C (en) * | 2007-03-14 | 2009-02-18 | 杭州华三通信技术有限公司 | SPI4 buds interface card supporting hot swap, corresponding host machine and method thereof |
CN102347904B (en) * | 2011-10-21 | 2015-07-22 | 杭州华三通信技术有限公司 | Router equipment, main card thereof and method for adapting main card to interface card |
CN106713149B (en) * | 2015-11-12 | 2020-06-30 | 新华三技术有限公司 | Daughter card and wire clamping board of router |
US10082842B1 (en) * | 2017-08-10 | 2018-09-25 | Super Micro Computer, Inc. | Hot swapping technique for expansion cards |
-
2020
- 2020-03-13 CN CN202010176069.5A patent/CN111417034B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101782884A (en) * | 2009-12-25 | 2010-07-21 | 福建星网锐捷网络有限公司 | Hot plugging realization method and system of high-speed signal circuit and hot plugging circuit board card |
CN110502464A (en) * | 2019-07-26 | 2019-11-26 | 苏州浪潮智能科技有限公司 | A kind of hot-swappable processing method, device, equipment, system and readable storage medium storing program for executing |
Also Published As
Publication number | Publication date |
---|---|
CN111417034A (en) | 2020-07-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111417034B (en) | Switch and hot plug method, device and system for switch board card thereof | |
US7757020B2 (en) | Point-to-point link negotiation method and apparatus | |
CN100511200C (en) | Control method, system and equipment of single serial port multi-CPU | |
US20160179734A1 (en) | Method and system for hot-plug functions | |
CN104081368A (en) | Mobile device automatic detection apparatus and method | |
CN211427190U (en) | Server circuit and mainboard based on Feiteng treater 2000+ | |
CN104133533A (en) | Expansion board card system for supporting full-length PCIE | |
CN103019991A (en) | Interface system, switching method, USB key and UART terminal | |
CN101276319B (en) | Equipment and method for making USB interface to time-sharing apply as standard I /O interface | |
CN103345459B (en) | The changing method multiplexing based on the multiple processor serial ports on veneer and commutation circuit | |
WO2024148860A1 (en) | Pcie network card and interface mode switching method therefor, electronic device, and storage medium | |
US20150269110A1 (en) | Cable with multiple functions | |
CN102073602A (en) | Computer system, connection control device as well as connecting and disconnecting method | |
US20180011713A1 (en) | Bios control method for pci-e lane | |
CN115865743A (en) | Device and method for realizing network connectivity detection of fusion type set top box | |
CN108885484B (en) | Remote terminal device, control method thereof, computer system, and recording medium | |
WO2022105448A1 (en) | Method and system for maintaining pcie signal connection by using in-place signal, device, and medium | |
CN206515777U (en) | A kind of reset controlling system and the control circuit resetted for PCIE plug-in cards | |
JP2008065364A (en) | Extension system, add-in card, and external device | |
CN101599050A (en) | PCI-E controller core and method thereof that can be adaptive | |
US8954623B2 (en) | Universal Serial Bus devices supporting super speed and non-super speed connections for communication with a host device and methods using the same | |
CN110188060A (en) | Mode switching system and the mode switching method for applying it | |
US9547615B2 (en) | Peripheral protocol negotiation | |
CN112527719A (en) | JBOF connection method, device and system based on PCIe link | |
US8972625B2 (en) | Electronic apparatus and host determination method |
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 |