A driving method and a driving system for improving compatibility of a network card and an optical module
Patent Information
- Application Number
- CN202610726311.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-25
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-05-25
AI Technical Summary
[0004]但是,上述技术方案至少还存在以下缺陷,当原有的光模块因损坏更换新的光模块后,现有的网卡与光模块不兼容,导致无法在网卡和光模块之间传输数据或传输数据不稳定
[0010] Compared with existing technologies, this invention obtains the network card identity data of the network card in the switch, generates a first information table based on the network card identity data and an identity mapping table, selects the identity data of a compatible optical module compatible with the network card from the first information table, and finally obtains new optical module identity data. Finally, the new optical module identity data is sent to the network card chip to modify the optical module identity data. This enables data transmission between the optical module and the network card when data transmission between the network card and the optical module is impossible or unstable, thereby improving the compatibility of the network card and the optical module.
Smart Images

Figure CN122293511B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a driving method and driving system for improving the compatibility of network cards and optical modules. Background Technology
[0002] A Network Interface Card (NIC), also known as a network adapter, is a core hardware device in a computer system that connects to a local area network (LAN) or wide area network (WAN), responsible for the physical connection and data transmission between the computer and the network. An Optical Module (ONM) is a core component in an optical communication system, responsible for converting electrical signals to optical signals, acting as a "bridge" for fiber optic communication.
[0003] A search revealed that Chinese patent CN113765737B discloses an automated testing method, apparatus, and electronic device for network interface card (NIC) and optical module compatibility. The method includes the following steps: obtaining basic information about the NIC; obtaining the current speed and connection information of the optical module connected to the NIC based on the obtained basic information; if the current speed is a set threshold speed, testing the optical module and outputting the test results; comparing the optical module parameter standard library file with the test results and returning the comparison results.
[0004] However, the above technical solution still has at least the following drawbacks: when the original optical module is replaced with a new optical module due to damage, the existing network card is incompatible with the optical module, resulting in the inability to transmit data between the network card and the optical module or unstable data transmission. Summary of the Invention
[0005] To address the above issues and overcome the shortcomings of existing technologies, this invention provides a driving method for improving the compatibility of network interface cards (NICs) and optical modules, comprising a switch and NICs and optical modules located within the switch, and including the following steps:
[0006] The acquisition steps include obtaining the optical module identity data, network card identity data, and identity mapping table;
[0007] In the filtering step, the optical module identity data includes the optical module manufacturer equipment identifier and the optical module manufacturer name. If the optical module manufacturer equipment identifier is the first identifier, the first information table is generated based on the network card identity data and the identity mapping table.
[0008] The modification steps involve obtaining the new optical module's identity data based on the network card's identity data and the first information table, sending the new optical module's identity data to the network card's receive buffer, and then having the network card chip read the new optical module's identity data from the network card's receive buffer.
[0009] A second aspect of the present invention provides a driver system for improving the compatibility of network interface cards (NICs) with optical modules, the system comprising at least one processor; and a memory storing instructions that, when executed by the at least one processor, implement the steps of the method described in the first aspect.
[0010] Compared with existing technologies, this invention obtains the network card identity data of the network card in the switch, generates a first information table based on the network card identity data and an identity mapping table, selects the identity data of a compatible optical module compatible with the network card from the first information table, and finally obtains new optical module identity data. Finally, the new optical module identity data is sent to the network card chip to modify the optical module identity data. This enables data transmission between the optical module and the network card when data transmission between the network card and the optical module is impossible or unstable, thereby improving the compatibility of the network card and the optical module. Attached Figure Description
[0011] Figure 1 This is a flowchart illustrating the driver method for improving the compatibility between network cards and optical modules according to the present invention.
[0012] Figure 2 This is a schematic diagram of identity data transmission in the novel optical module of this invention;
[0013] Figure 3 This is a data transmission diagram of the driver method for improving the compatibility between network cards and optical modules according to the present invention;
[0014] Figure 4 This is a schematic diagram illustrating the sequence of link oscillation testing, fast reconnection, and transmission distance modification in this invention;
[0015] Figure 5 This is a system architecture diagram of the switch of the present invention;
[0016] Figure 6 This is a system architecture diagram of the optical module of the present invention;
[0017] Figure 7 This is a schematic diagram of the driver system for improving the compatibility between network cards and optical modules according to the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] To facilitate understanding of the methods and systems provided in the embodiments of this application, the background of the embodiments of this application will be introduced before introducing the embodiments of this application.
[0020] A Network Interface Card (NIC), also known as a network adapter, is a core hardware device in a computer system that connects to a local area network (LAN) or wide area network (WAN), responsible for the physical connection and data transmission between the computer and the network. An Optical Module (ONM) is a core component in an optical communication system, responsible for converting electrical signals to optical signals, acting as a "bridge" for fiber optic communication.
[0021] A search revealed that Chinese patent CN113765737B discloses an automated testing method, apparatus, and electronic device for network interface card (NIC) and optical module compatibility. The method includes the following steps: obtaining basic information about the NIC; obtaining the current speed and connection information of the optical module connected to the NIC based on the obtained basic information; if the current speed is a set threshold speed, testing the optical module and outputting the test results; comparing the optical module parameter standard library file with the test results and returning the comparison results.
[0022] However, the above technical solution still has at least the following drawbacks: when the original optical module is replaced with a new optical module due to damage, the existing network card is incompatible with the optical module, resulting in the inability to transmit data between the network card and the optical module or unstable data transmission.
[0023] In some embodiments, such as Figure 1 and Figure 2 As shown, the first aspect of this application provides a driving method for improving the compatibility of network interface cards (NICs) and optical modules, including a switch and NICs and optical modules located within the switch, comprising the following steps:
[0024] The acquisition steps include obtaining the optical module identity data, network card identity data, and identity mapping table;
[0025] In the filtering step, the optical module identity data includes the optical module manufacturer equipment identifier and the optical module manufacturer name. If the optical module manufacturer equipment identifier is the first identifier, the first information table is generated based on the network card identity data and the identity mapping table.
[0026] The modification steps involve obtaining the new optical module's identity data based on the network card's identity data and the first information table, sending the new optical module's identity data to the network card's receive buffer, and then having the network card chip read the new optical module's identity data from the network card's receive buffer.
[0027] In the above embodiments, by obtaining the network card identity data of the network card in the switch, generating a first information table based on the network card identity data and the identity mapping table, selecting the identity data of a compatible optical module compatible with the network card from the first information table, and finally obtaining the new optical module identity data, the new optical module identity data is sent to the network card chip to modify the optical module identity data. This enables data transmission between the optical module and the network card when data transmission between the network card and the optical module is not possible or is unstable, thereby improving the compatibility of the network card and the optical module.
[0028] Furthermore, the drive filtering module indirectly reads the optical module's identity data through the I2C Master controller. The I2C controller relies on SCL (clock line) and SDA (data line) to perform read and write operations on the optical module.
[0029] Further, the steps for obtaining optical module identity data include: First, the network card driver configured within the switch is powered on, and then the self-test driver module performs a self-test and queries the optical module connected to the network card. Second, the switch chip driver receives the optical module query request from the network card driver and converts the optical module query request into an I2C transaction operation by the switch's internal management controller or bus controller. Specifically, an I2C command sequence conforming to the SFF-8472 standard is constructed, including the address offsets 0x14 and 0x34 of the device port (A0h) corresponding to the optical module. The network card driver writes the I2C command sequence into a register. Third, by connecting the SCL and SDA pins of the I2C Master controller to the SCL and SDA pins of the gold fingers in the SFP+ cage, the I2C Master controller reads the optical module identity data from the optical module according to the command sequence, relying on the SCL and SDA data lines. Fourth, the self-test driver module reads the optical module identity data from the network card controller through the network card driver in the network card control unit.
[0030] Furthermore, the driver filtering module determines whether the acquired optical module identity data is indeed optical module identity data by checking if the read port is 0xA0 and if the offset is 0x14 or 0x34. Further, by checking if the optical module manufacturer identifier is the first identifier, it modifies the optical module identity data of a specified manufacturer, improving compatibility. Specifically, the first identifier is the manufacturer identifier of one or more optical modules among the optical module manufacturer identifiers. The first identifier is preset within the switch and can be adjusted according to the actual usage environment. The offset definition in this embodiment can be set by the manufacturer and differs slightly from the SFF-8472 standard definition.
[0031] Furthermore, the network interface card (NIC) includes a NIC chip, a NIC control unit, and a NIC receive buffer. After the driver filtering module sends data to the NIC receive buffer, the NIC chip, through the NIC control unit, reads and writes data between the NIC chip and the NIC receive buffer. Specifically, the transmitted data may include new optical module identification data or replacement optical module identification data from the switch.
[0032] Table 1 Identity Mapping Table 0x1931 H3C Technologies Co., Ltd. 00-23-89 H3C GRT 00-1B-21 0x15b3 Mellanox Technologies 00-02-c9 MELLANOX MELLANOX 00-02-c9 0x15b3 Mellanox Technologies b8-59-0f MELLANOX MELLANOX b8-59-0f 0x10b7 3Com Corporation 00-50-da 3Com 3Com 00-50-da 0x10b7 3Com Corporation 00-06-5c 3Com 3Com 00-06-5c : : : : : : : : : : : :
[0033] Table 2 First Information Table 0x1931 H3C Technologies Co., Ltd. 00-23-89 H3C 0x10b7 3Com Corporation 00-50-da 3Com : : : : : : : :
[0034] like Figure 2 As shown in Tables 1 and 2, in some embodiments, a first information table is generated based on network card identity data and an identity mapping table, including:
[0035] The identity mapping table includes network card manufacturer equipment identifier, network card manufacturer name, optical module manufacturer equipment identifier, optical module manufacturer name, replacement optical module manufacturer equipment identifier, and replacement optical module manufacturer name;
[0036] Network interface card (NIC) identity data includes the NIC manufacturer's device identifier and the NIC manufacturer's name in the switch;
[0037] Based on the network card identity data, extract the network card manufacturer's equipment identifier and network card manufacturer's name from the identity mapping table, as well as the compatible optical module manufacturer's equipment identifier and compatible optical module manufacturer's name that are compatible with the network cards in the switch, and generate the first information table.
[0038] In the above embodiments, the data in the identity mapping table is pre-entered based on existing network interface card (NIC) and optical module data. By setting up the identity mapping table within the self-test driver module, it serves to generate a first information table based on NIC identity data and a second information table based on optical module and NIC identity data.
[0039] Furthermore, the network interface card (NIC) manufacturer identifiers and names in the switch listed in the first information table are the NIC manufacturer identifiers and names of the NICs actually installed in the switch. Similarly, the compatible optical module manufacturer identifiers and names in the first information table are the optical module manufacturer identifiers and names of the optical modules compatible with the NICs actually installed in the switch.
[0040] Furthermore, after the self-test driver module loads, it first enumerates all installed network cards (NICs) in the switch and reads the NIC manufacturer configuration information. Based on the NIC manufacturer device identifiers and names found in the switch, and in conjunction with the identity mapping table, it extracts the compatible optical module manufacturer device identifiers and names from the optical module manufacturer device identifiers and names in the identity mapping table, forming the first information table (Table_Vender). This first information table is then sent to the driver filtering module.
[0041] like Figure 2 As shown, in some embodiments, the new optical module identity data is obtained based on the network card identity data and the first information table, including:
[0042] Based on the network card manufacturer's equipment identifier and network card manufacturer's name in the switch, the new optical module manufacturer's equipment identifier and new optical module manufacturer's name are selected from the compatible optical module manufacturer's equipment identifier and compatible optical module manufacturer's name in the first information table to obtain the new optical module's identity data.
[0043] The new optical module identity data includes the new optical module manufacturer's equipment identifier and the new optical module manufacturer's name.
[0044] In the above embodiments, since a network card of a certain model can be compatible with optical modules from multiple manufacturers and different models of optical modules from a single manufacturer, the device identifier and manufacturer name of the optical module compatible with the network card are selected from the first information table according to the three-level priority principle as the new optical module identity data.
[0045] Furthermore, the three-tier priority principle is determined based on the manufacturer type. Specifically, the compatible optical module manufacturer equipment identifier and compatible optical module manufacturer name include: the manufacturer equipment identifier and manufacturer name of general compatible optical modules, the manufacturer equipment identifier and manufacturer name of third-party optical modules, and the manufacturer equipment identifier and manufacturer name of original equipment manufacturer (OEM) optical modules.
[0046] First, select from the compatible optical module manufacturer's equipment identifier and name. The manufacturer's equipment identifier and name of a universally compatible optical module will be used as the new optical module's identity data. (For example: Huawei universal optical module, the optical module manufacturer name is "Huawei", and the optical module manufacturer's equipment identifier is 00-0C-85). If the network interface card (NIC) in the switch is incompatible with the universally compatible optical module, then select the manufacturer's equipment identifier and name of a third-party optical module that has been certified by the switch's NIC as the new optical module's identity data. If the NIC in the switch has not been certified by any third-party optical module, then select the manufacturer's equipment identifier and name of an optical module from the same manufacturer as the original NIC in the switch as the new optical module's identity data.
[0047] Furthermore, when priorities are the same, such as two vendors offering certified third-party optical modules, the module with the closest parameters is selected by comparing the degree of match between transmission rate, temperature range, loss tolerance, and the target link requirements. (For example, if the link requirement is 10km, the module with a nominal distance of 10km is preferred.)
[0048] Furthermore, if the transmission rate, temperature range, loss tolerance, and target link requirements are also the same, then the module with the lowest bit error rate (BER≤1e-13) and the fewest reconnection times in the past 7 days can be selected by calling the historical compatibility log stored locally on the switch.
[0049] Furthermore, by selecting new optical module identity data from the compatible optical module manufacturer equipment identifier and compatible optical module manufacturer name in the first information table, and sending the new optical module identity data to the network card, the true identity of the optical module connected to the network card is hidden, thus making the network card compatible with the optical module.
[0050] like Figure 3 and Figure 5 As shown, in some embodiments, the driving method for improving the compatibility between the network card and the optical module further includes:
[0051] The system obtains the data transmission status information and data transmission rate between the network card and the optical module. If the data transmission status information indicates an interrupted connection or the transmission rate is less than the threshold, the network card and the optical module are incompatible. The system then intercepts the network card control unit's request to read the identity information of the optical module.
[0052] In some embodiments, the threshold is 50% of the nominal rate of the optical module.
[0053] In the two embodiments described above, obtaining data transmission status information helps determine whether data transmission can occur between the network card and the optical module, and obtaining data transmission rate helps determine whether data transmission is unstable due to incompatibility between the network card and the optical module.
[0054] Furthermore, based on the link layer protocol, the number of Up / Down switches per unit time can be counted to determine the compatibility between the network card and the optical module. Alternatively, the bit error rate can be obtained based on the CRC check failure count, and the compatibility between the network card and the optical module can be determined based on the bit error rate data. Finally, the compatibility between the network card and the optical module can be determined by monitoring the rate / duplex mode negotiation results between them.
[0055] Furthermore, the data transmission status information is the LOS (Loss of Signal) signal in the optical module. Specifically, the LOS pin level in the optical module directly reflects the physical connection status between the network card and the module. When the LOS signal is high, the optical module is not connected to the switch or the connection is interrupted. When the LOS signal is low, the optical module is securely connected to the switch, the optical signal is received normally, and the connection is normal.
[0056] Furthermore, the data transmission rate is the real-time transmission rate, measured in Mbps or Gbps, and can be obtained through the MAC layer statistics interface of the network card. Specifically, when the transmission rate is less than 50% of the nominal rate of the optical module (e.g., 10G optical module rate < 5000Mbps), it is determined to be packet loss or link anomaly.
[0057] Furthermore, when the actual rate is less than 50% of the nominal value, it usually indicates severe packet loss, frequent retransmissions, or physical layer signal degradation, exceeding the normal fluctuation range (e.g., measured speed of a 10G module < 5Gbps). By setting the threshold to 50% of the optical module's nominal rate, both transient noise interference can be filtered out, and link anomalies can be detected in a timely manner.
[0058] Table 3 Second Information Table 0x1931 H3C Technologies Co., Ltd. GRT 00-1B-21 0x10b7 3Com Corporation 3Com 00-50-da : : : : : : : :
[0059] like Figure 3 As shown in Table 3, in some embodiments, the driving method for improving the compatibility between the network card and the optical module further includes:
[0060] Obtain data transmission status information and data transmission rate. If the data transmission status information indicates a normal connection and the transmission rate is greater than or equal to the threshold, the network card and optical module are compatible.
[0061] Based on the replacement optical module identity data and network card identity data in the identity mapping table, a second information table is generated. Based on the second information table, the replacement optical module identity data in the switch in the second information table is sent to the network card receive buffer. The network card control unit adds the replacement optical module identity data obtained from the network card receive buffer to the optical module identification list.
[0062] In some embodiments, the replacement optical module identity data includes the replacement optical module manufacturer's equipment identifier and the replacement optical module manufacturer's name;
[0063] The identity data of the replacement optical module in the switch includes: the manufacturer's equipment identifier and the manufacturer's name of the replacement optical module in the switch;
[0064] The second information table includes the network card manufacturer's equipment identifier, the network card manufacturer's name, the replacement optical module manufacturer's equipment identifier, and the replacement optical module manufacturer's name.
[0065] In the two embodiments described above, compatibility between the network interface card (NIC) and the optical module is achieved by replacing the optical module identity data with the new optical module identity data. After achieving NIC-optical module compatibility, the self-test driver module queries the NIC manufacturer's equipment identifier and manufacturer name (i.e., NIC identity data) set in the switch for each NIC. Then, it extracts the replacement optical module manufacturer's equipment identifier and replacement optical module manufacturer name (i.e., replacement optical module identity data) from the identity mapping table corresponding to the aforementioned NIC, generating a second information table. Due to the configuration rules of some NIC manufacturers, their NICs are only compatible with optical modules produced by their own company, making it impossible to modify the optical module identification list for NICs produced by that company. For NICs whose optical module identification list can be modified, the identity data of the optical modules connected to the NIC is uniformly added to the NIC's optical module identification list. This ensures that when the optical module and NIC are subsequently connected, compatibility between the optical module and the NIC can be achieved without searching for and replacing the new optical module identity data.
[0066] Furthermore, the driver filtering module obtains the second information table, identifies the replacement optical module manufacturer's equipment identifier and the replacement optical module manufacturer's name in the switch corresponding to each network card installed in the switch, and first sends the replacement optical module equipment identifier to the network card's receive buffer. Then, it accesses the driver memory of the network card control unit through the PCIe bus to dynamically inject the replacement optical module manufacturer information and the replacement optical module manufacturer equipment identifier into the optical module identification list inside the network card.
[0067] like Figure 4 As shown, in some embodiments, the driving method for improving the compatibility between the network card and the optical module further includes:
[0068] After the network card and optical module are disconnected and reconnected, the fast reconnection protocol is obtained from the optical module according to the first command sequence;
[0069] Modify the transmission distance parameters within the optical module according to the second command sequence;
[0070] The first command sequence is the address after offsetting the first port address by a first offset, and the second command sequence is the address after offsetting the second port address by a second offset.
[0071] like Figure 4As shown, in the above embodiment, the first port is the A2h port, and the first offset is 0x30. The driving filtering module controls the network card controller within the network card chip through the network card control unit, and sends the first command sequence to the optical module through the I2C Master controller. The optical module reads the fast reconnection protocol from bit 0x30 of the A2h area in the electrically erasable programmable read-only memory (EEPROM) within the optical module according to the first command sequence. When the network card and optical module disconnect and reconnect, compared to the traditional reconnection which requires three steps ("rate negotiation → duplex mode matching → checksum verification") (taking 150ms), by obtaining the fast reconnection protocol and caching the rate (e.g., 10Gbps), duplex mode (full duplex), and equalizer parameters of the last connection, the cached parameters are directly called after disconnection, omitting the negotiation process. This achieves the beneficial effects of enhanced link stability, reduced misjudgment and unnecessary interruptions, significantly shortened service interruption time, and improved system availability. Specifically, bit 0x30 of the A2h port is used to store the fast reconnection protocol parameters through a vendor-defined protocol.
[0072] like Figure 4 As shown in Table 4, further, the second port is the A0h port, and the second offset is 0x10. The driving filter module controls the network card controller within the network card chip through the network card control unit, and sends the second command sequence to the optical module through the I2C Master controller. The optical module modifies the transmission distance parameter in bit 0x10 of the A0h area in the EEPROM memory within the optical module according to the second command sequence, changing the value of address 0x10 from the default 0x05 (5km) to 0x0A (10km). Then, the optical module automatically adjusts key parameters such as laser power (a stronger optical signal is needed for 10km) and receiving sensitivity (the signal is weaker at longer distances, requiring a more sensitive receiver).
[0073] Table 4. Meaning of Offset 0x00 1 byte Identifier Physical identifier, defines the module type. 0x01 1 byte Ext. Identifier Extended identifiers specify the special functions of a module. 0x02 1 byte Connector Connector type. 0x03 8 bytes Transceiver Transceiver type, bit-coded, describing rate, wavelength, etc. 0x0B 1 byte Encoding Line coding method. 0x0C 1 byte BR, Nominal Nominal bit rate, measured in 100 Mbps. 0x10 1 byte Length (SMF) The maximum transmission distance of single-mode optical fiber is measured in kilometers. 0x11 1 byte Length (OM2) The maximum transmission distance of OM2 multimode fiber is 10m. 0x14 1 byte Vendor Name The beginning offset of the manufacturer's name. 0x14 16 bytes Vendor Name Manufacturer name, ASCII string. 0x34 1 byte Vendor OUI The starting offset of the vendor's organization's unique identifier. 0x34 3 bytes Vendor OUI IEEE-assigned vendor OUI. 0x40 1 byte Vendor PN The beginning offset of the manufacturer's model number. 0x40 16 bytes Vendor PN Manufacturer part number / model number, ASCII string. 0x50 1 byte Vendor Rev Starting offset of the hardware version. 0x50 4 bytes Vendor Rev Hardware version number. 0x54 1 byte Vendor SN The starting offset of the serial number. 0x54 16 bytes Vendor SN Serial number, an ASCII string. 0x60 1 byte Date Code The starting offset of the production date code. 0x60 8 bytes Date Code Production date code, usually in the format YY-MM-DD.
[0074] like Figure 4As shown, during the commissioning of the optical module, a link oscillation test is first performed. This test monitors the power consumption fluctuations of the optical module to assess the effectiveness of the ramp drive circuit in suppressing laser jitter. Then, monitoring the LOS signal determines the connection status between the optical module and the network interface card (NIC). When the LOS signal goes high, the connection between the optical module and the NIC is broken, and then they are reconnected while the reconnection time is monitored. If the reconnection time is less than 100ms, the test passes. If the reconnection time is greater than 100ms, a fast reconnection protocol needs to be acquired first to improve the reconnection speed after the optical module and NIC are reconnected. Then, the transmission distance parameter is modified to reduce the reconnection time. After modifying the transmission distance parameter, the reconnection time is monitored again. If the reconnection time is less than 100ms, the test passes.
[0075] Specifically, during debugging, the optimization system reads the LOS signal level every 10ms through the GPIO interface of the network card control unit. To avoid transient interference, a 100ms debouncing time is set. If the LOS high level lasts for ≥100ms, it is determined as "disconnected"; if the LOS low level lasts for ≥100ms, it is determined as "connected normally". When the LOS is high, the disconnection reconnection process is triggered (e.g., enabling the fast reconnection protocol); when the LOS is low, data transmission rate and bit error rate monitoring are started to further verify the link quality.
[0076] Furthermore, the transmission distance parameter (stored in the A0h port of the optical module's EEPROM + 0x10 offset, in km) needs to be dynamically adjusted according to link attenuation and network card compatibility requirements. The purpose is to reduce the parameter negotiation time during reconnection by matching the characteristics of the optical module and the link.
[0077] The specific implementation details are as follows: When the optical module is inserted, the gold fingers set on the optical module connect with the contacts, connecting the I2C bus (SDA, SCL) of the switch with the EEPROM inside the module.
[0078] The optical module is used to respond to I2C requests sent by the switch.
[0079] The specific implementation details are as follows: First, the EEPROM (or microcontroller) inside the optical module acts as an I2C slave device, continuously listening to the bus. Second, the optical module identifies the address 1010000 (A0h) sent by the switch and matches it with its own address. Third, it reads the memory address pointer (0x34) sent by the switch. Fourth, starting from byte 0 of the optical module's storage space, it reads three bytes of the manufacturer's OUI consecutively. Fifth, these three bytes of data are placed bit-by-bit on the SDA line and read by the network interface card controller under the control of the SCL clock.
[0080] Furthermore, at the register level within the optical module, the registers are accessed via a two-wire serial interface (similar to I2C, defined as I2C in SFP+). Host devices (such as switches and routers) can read the module's information and perform configuration. Specifically, A0h: This address space stores basic, read-only identification information and real-time digital diagnostic monitoring data. A2h: This address space stores optional, user-writable data, such as passwords and custom diagnostic thresholds.
[0081] like Figure 7 As shown, the present invention also provides a driver system for improving the compatibility of network cards and optical modules. The driver system for improving the compatibility of network cards and optical modules includes at least one processor, a memory, an input device, and a display device. The input device is used to obtain input from the outside. The memory stores instructions. When the instructions are executed by at least one processor, the steps of the method described in the method embodiment are implemented, and the running results are displayed on the display device, thus implementing the steps of the method described in the method embodiment.
[0082] The embodiments and functional operations of the subject matter described in this specification can be implemented in the following ways: digital electronic circuits, tangibly implemented computer software or firmware, computer hardware, including the structures disclosed in this specification and their equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, that is, one or more modules of computer program instructions encoded on one or more tangible non-transitory program carriers, for execution by a data processing device or to control the operation of the data processing device.
[0083] Alternatively or additionally, program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are then generated as coded information to be transmitted to an appropriate receiver device executed by data processing equipment. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or one or more combinations of the above.
[0084] Specific implementations of the subject matter have been described. Other implementations are within the scope of the following claims. For example, the activities described in the claims can be performed in a different order and still achieve the desired result. As an example, the processes described in the drawings do not necessarily require a specific order or sequence to be shown in order to achieve the desired result. In certain implementations, multitasking and parallel processing may be advantageous.
Claims
1. A driving method for improving the compatibility of network interface cards (NICs) and optical modules, comprising a switch and NICs and optical modules located within the switch, characterized in that, Includes the following steps: The acquisition steps include obtaining the optical module identity data, network card identity data, and identity mapping table; In the filtering step, the optical module identity data includes the optical module manufacturer equipment identifier and the optical module manufacturer name. If the optical module manufacturer equipment identifier is the first identifier, the first information table is generated based on the network card identity data and the identity mapping table. The modification steps are as follows: Based on the network card identity data and the first information table, the new optical module identity data is obtained, and the new optical module identity data is sent to the network card receive buffer. The network card chip reads the new optical module identity data from the network card receive buffer. The identity mapping table includes network card manufacturer equipment identifier, network card manufacturer name, optical module manufacturer equipment identifier, optical module manufacturer name, replacement optical module manufacturer equipment identifier, and replacement optical module manufacturer name; The first information table is generated based on the network card identity data and the identity mapping table. This includes extracting the network card manufacturer's equipment identifier and network card manufacturer's name from the identity mapping table based on the network card identity data, as well as the optical module manufacturer's equipment identifier and optical module manufacturer's name that are compatible with the network cards in the switch, and generating the first information table. Based on the network interface card (NIC) manufacturer's equipment identifier and the NIC manufacturer's name in the switch, the new optical module manufacturer's equipment identifier and the new optical module manufacturer's name are selected from the compatible optical module manufacturer's equipment identifier and the compatible optical module manufacturer's name in the first information table according to the three-level priority principle, thus obtaining the new optical module's identity data. The three-level priority principle is determined based on the manufacturer type. The compatible optical module manufacturer equipment identifier and compatible optical module manufacturer name include: the manufacturer equipment identifier and manufacturer name of general compatible optical modules, the manufacturer equipment identifier and manufacturer name of third-party optical modules, and the manufacturer equipment identifier and manufacturer name of original manufacturer optical modules. First, select from the compatible optical module manufacturer's equipment identifier and name. The manufacturer's equipment identifier and name of a general-purpose compatible optical module are used as the identity data of the new optical module. If the network card in the switch is not compatible with the general-purpose compatible optical module, then select the manufacturer's equipment identifier and name of a third-party optical module that has been certified by the network card in the switch as the identity data of the new optical module. If the network card in the switch has not been certified by any third-party optical module, then select the manufacturer's equipment identifier and name of an optical module with the same manufacturer as the original network card in the switch as the identity data of the new optical module. When priorities are the same, the module with the closest parameters is selected by comparing the degree of matching between transmission rate, temperature range, loss tolerance and target link requirements. If the transmission rate, temperature range, loss tolerance and the target link requirements are also the same, the module with the lowest bit error rate and the fewest reconnection times in the past 7 days is selected by calling the historical compatibility log stored locally on the switch. Obtain data transmission status information and data transmission rate. If the data transmission status information indicates a normal connection and the transmission rate is greater than or equal to the threshold, the network card and optical module are compatible. Based on the replacement optical module identity data and network card identity data in the identity mapping table, a second information table is generated. Based on the second information table, the replacement optical module identity data in the switch in the second information table is sent to the network card receive buffer. The network card control unit adds the replacement optical module identity data obtained from the network card receive buffer to the optical module identification list. The replacement optical module identification data includes: the replacement optical module manufacturer's equipment identifier and the replacement optical module manufacturer's name; The identity data of the replacement optical module in the switch includes: the manufacturer's equipment identifier and the manufacturer's name of the replacement optical module in the switch; The second information table includes the network card manufacturer's equipment identifier, the network card manufacturer's name, the replacement optical module manufacturer's equipment identifier, and the replacement optical module manufacturer's name.
2. The driving method for improving the compatibility between network cards and optical modules according to claim 1, characterized in that, The first information table is generated based on the network card identity data and the identity mapping table, including: Network interface card (NIC) identity data includes the NIC manufacturer's device identifier and the NIC manufacturer's name in the switch.
3. The driving method for improving the compatibility between network cards and optical modules according to claim 2, characterized in that, Driver methods to improve network card and optical module compatibility also include: The system obtains the data transmission status information and data transmission rate between the network card and the optical module. If the data transmission status information indicates an interrupted connection or the transmission rate is less than the threshold, the network card and the optical module are incompatible. The system then intercepts the network card control unit's request to read the identity information of the optical module.
4. The driving method for improving the compatibility between network cards and optical modules according to claim 3, characterized in that, The threshold is 50% of the nominal rate of the optical module.
5. The driving method for improving the compatibility between network cards and optical modules according to claim 1, characterized in that, Driver methods to improve network card and optical module compatibility also include: After the network card and optical module are disconnected and reconnected, the fast reconnection protocol is obtained from the optical module according to the first command sequence; Modify the transmission distance parameters within the optical module according to the second command sequence.
6. The driving method for improving the compatibility between network cards and optical modules according to claim 5, characterized in that, The first command sequence is the address after offsetting the first port address by the first offset amount, and the second command sequence is the address after offsetting the second port address by the second offset amount.
7. A driver system for improving the compatibility between network interface cards (NICs) and optical modules, characterized in that, The system includes at least one processor; and a memory storing instructions that, when executed by the at least one processor, perform the steps of the method according to any one of claims 1-6.
Citation Information
Patent Citations
Automated testing methods, apparatus, and electronic equipment for network interface card (NIC) and optical module compatibility.
CN113765737B
Compatibility detection method and server
CN116015437A