CN112787961B - Physical port splitting method and device - Google Patents

Physical port splitting method and device Download PDF

Info

Publication number
CN112787961B
CN112787961B CN202011621243.9A CN202011621243A CN112787961B CN 112787961 B CN112787961 B CN 112787961B CN 202011621243 A CN202011621243 A CN 202011621243A CN 112787961 B CN112787961 B CN 112787961B
Authority
CN
China
Prior art keywords
port
physical
identifier
hardware
physical port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011621243.9A
Other languages
Chinese (zh)
Other versions
CN112787961A (en
Inventor
翁明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202011621243.9A priority Critical patent/CN112787961B/en
Publication of CN112787961A publication Critical patent/CN112787961A/en
Application granted granted Critical
Publication of CN112787961B publication Critical patent/CN112787961B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The invention discloses a method and a device for splitting a physical port, wherein the method comprises the following steps: receiving a splitting request which is sent by a user terminal and carries a first physical port father port identification and each first physical port son port identification corresponding to the first physical port father port identification; sending a configuration information acquisition request to the user terminal so that the user terminal sends the acquired configuration information corresponding to each first physical port sub-port identifier to the network equipment; configuring a first hardware port corresponding to each first physical port sub-port identifier according to the hardware port identifier, the global split mapping relation between the physical port parent port identifier and the physical port sub-port identifier and the configuration information corresponding to each first physical port sub-port identifier; determining an active physical port parent and/or physical port child of the at least two physical ports based on the global split mapping relationship. The scheme can meet the splitting requirements of all physical ports.

Description

Physical port splitting method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for splitting a physical port.
Background
The 40G/100G physical port is a high-bandwidth physical port, and is usually applied to switches in a convergence layer and a core layer, switches at different layers in a network environment often cannot be directly networked due to the difference in connectors of the high-bandwidth physical port and the low-bandwidth physical port, and the problem is solved by splitting the physical port. The splitting of the physical port is to split a high-bandwidth physical port into a plurality of low-bandwidth physical ports, for example, a 100G physical port may be split into 4 25G physical ports, a 40G physical port may be split into 4 10G physical ports, and then 40G/100G optical modules are respectively interconnected with 10G/25G optical modules through optical module splitting lines, so as to meet the requirement of interconnection between the high-bandwidth physical port and the low-bandwidth physical port of the switch, and improve the flexibility of networking between the switches.
The switch is provided with a physical port and a hardware port, the physical port is used for interacting with a user, the hardware port is a port on a switch chip and is used for reading and writing a drive of the hardware port, and the hardware port can be identified to be effective only if the configuration information based on the physical port is converted into the drive of the hardware port; similarly, the state of the hardware port also needs to be converted into the state of the physical port, and then the state can be fed back to the user. The switching chip used by the switch needs to allocate independent table entries and register resources as the judgment basis for the decision of the forwarding direction of the internal message for the hardware ports, and the number of the supported hardware ports is naturally limited because the table entries and the register resources of the switching chip are limited.
Taking the BCM56860 switching chip as an example for explanation, the maximum number of hardware ports that the BCM56860 switching chip can support is 128, meanwhile, 128 serdes are supported, each serdes supports the speed of 10G, every 4 serdes can be bound to be a 40G physical port, therefore, the BCM56860 switching chip can support up to 32 40G physical ports, which have occupied 32 hardware ports, because the physical ports are arranged in one-to-one correspondence with the hardware ports, the number of the remaining hardware ports which can be used for splitting the physical ports is 96 (128-32), namely the BCM56860 switching chip can split up 96 physical ports at most, however, the total splitting of 32 40G physical ports requires 128 hardware ports, that is, the current splitting method of physical ports is limited by the number of hardware ports of the switch chip, and cannot meet the requirement of complete splitting.
Disclosure of Invention
The embodiment of the invention provides a method and a device for splitting a physical port, which are used for solving the problem that the requirement of complete splitting cannot be met due to the limitation of the number of hardware ports of a switching chip in the prior art.
According to an embodiment of the present invention, a method for splitting a physical port is provided, which is applied to a network device, where the network device includes at least two physical ports and at least two hardware ports, and the method includes:
receiving a splitting request which is sent by a user terminal and carries a first physical port father port identification and each first physical port son port identification corresponding to the first physical port father port identification;
sending a configuration information acquisition request to the user terminal so that the user terminal sends the acquired configuration information corresponding to each first physical port sub-port identifier to the network equipment;
configuring a first hardware port corresponding to each first physical port sub-port identifier according to a global splitting mapping relation among hardware port identifiers, physical port parent port identifiers and physical port child port identifiers and configuration information corresponding to each first physical port child port identifier, wherein each hardware port identifier in the global splitting mapping relation corresponds to at most one physical port child port identifier and a physical port parent port identifier corresponding to the physical port child port identifier;
determining an active physical port parent and/or physical port child of the at least two physical ports based on the global split mapping relationship.
Specifically, configuring, according to the global split mapping relationship between the hardware port identifier, the physical port parent identifier and the physical port child identifier, and the configuration information corresponding to each first physical port child identifier, a first hardware port corresponding to each first physical port child identifier specifically includes:
acquiring a preset global split mapping relation of a hardware port identifier, a physical port parent port identifier and a physical port child port identifier;
determining each first hardware port identifier corresponding to each first physical port sub-port identifier according to the global split mapping relation;
loading a driver of a first hardware port corresponding to each first hardware port identifier based on configuration information corresponding to each first physical port sub-port identifier;
and adding split identifiers to the father port identifiers of the first physical ports included in the global split mapping relationship, and adding sharing identifiers to the first hardware port identifiers included in the global split mapping relationship.
Optionally, before sending the configuration information acquisition request to the user terminal, the method further includes:
determining whether the first physical port father port identifier included in the global split mapping relation carries the split identifier;
if the fact that the first physical port father port identification included in the global splitting mapping relation does not carry the split identification is determined, the step of sending a configuration information acquisition request to the user terminal is executed;
and if the fact that the first physical port father port identification included in the global splitting mapping relation carries the split identification is determined, returning error prompt information to the user terminal.
Specifically, determining, based on the global split mapping relationship, a physical port parent and/or a physical port child that are valid in the at least two physical ports includes:
determining whether the hardware port identifier of an effective hardware port in the at least two hardware ports in the global split mapping relationship carries the shared identifier;
for a first validated hardware port carrying the shared identifier by a hardware port identifier, acquiring a second physical port sub-port identifier corresponding to the first validated hardware port in the global split mapping relation;
and for a second validated hardware port of which the hardware port identification does not carry the shared identification, acquiring a second physical port parent identification or a third physical port child identification corresponding to the second validated hardware port in the global split mapping relation.
According to an embodiment of the present invention, there is also provided a physical port splitting apparatus, which is applied to a network device, where the network device includes at least two physical ports and at least two hardware ports, and the apparatus includes:
the receiving module is used for receiving a splitting request which is sent by a user terminal and carries a first physical port father port identifier and each corresponding first physical port son port identifier;
a sending module, configured to send a configuration information acquisition request to the user terminal, so that the user terminal sends, to the network device, configuration information corresponding to the acquired first physical port sub-port identifiers;
the configuration module is used for configuring a first hardware port corresponding to each first physical port sub-port identifier according to a hardware port identifier, a global split mapping relationship of a physical port parent port identifier and a physical port sub-port identifier, and configuration information corresponding to each first physical port sub-port identifier, wherein each hardware port identifier in the global split mapping relationship corresponds to at most one physical port sub-port identifier and a physical port parent port identifier corresponding to the physical port sub-port identifier;
a determining module, configured to determine, based on the global split mapping relationship, a physical port parent and/or a physical port child that are valid in the at least two physical ports.
Specifically, the configuration module is configured to configure, according to the global split mapping relationship between the hardware port identifier, the physical port parent identifier, and the physical port child identifier, and the configuration information corresponding to each first physical port child identifier, the first hardware port corresponding to each first physical port child identifier, and specifically configured to:
acquiring a preset global split mapping relation of a hardware port identifier, a physical port parent port identifier and a physical port child port identifier;
determining each first hardware port identifier corresponding to each first physical port sub-port identifier according to the global split mapping relation;
loading a driver of a first hardware port corresponding to each first hardware port identifier based on configuration information corresponding to each first physical port sub-port identifier;
and adding split identifiers to the father port identifiers of the first physical ports included in the global split mapping relationship, and adding sharing identifiers to the first hardware port identifiers included in the global split mapping relationship.
Optionally, the sending module is further configured to:
determining whether the first physical port father port identifier included in the global split mapping relation carries the split identifier;
if the fact that the first physical port father port identification included in the global splitting mapping relation does not carry the split identification is determined, the step of sending a configuration information acquisition request to the user terminal is executed;
and if the fact that the first physical port father port identification included in the global splitting mapping relation carries the split identification is determined, returning error prompt information to the user terminal.
Specifically, the determining module is configured to determine, based on the global split mapping relationship, a physical port parent and/or a physical port child that are valid in the at least two physical ports, and specifically is configured to:
determining whether the hardware port identifier of an effective hardware port in the at least two hardware ports in the global split mapping relationship carries the shared identifier;
for a first validated hardware port carrying the shared identifier by a hardware port identifier, acquiring a second physical port sub-port identifier corresponding to the first validated hardware port in the global split mapping relation;
and for a second validated hardware port of which the hardware port identification does not carry the shared identification, acquiring a second physical port parent identification or a third physical port child identification corresponding to the second validated hardware port in the global split mapping relation.
According to the embodiment of the invention, the electronic equipment comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the above method steps when executing the program stored in the memory.
According to an embodiment of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, which computer program, when executed by a processor, implements the above-mentioned method steps.
The invention has the following beneficial effects:
the embodiment of the invention provides a method and a device for splitting a physical port, which are characterized in that a splitting request which is sent by a user terminal and carries a first physical port father port identifier and each corresponding first physical port son port identifier is received; sending a configuration information acquisition request to the user terminal so that the user terminal sends the acquired configuration information corresponding to each first physical port sub-port identifier to the network equipment; configuring a first hardware port corresponding to each first physical port sub-port identifier according to a global splitting mapping relation among hardware port identifiers, physical port parent port identifiers and physical port sub-port identifiers and configuration information corresponding to each first physical port sub-port identifier, wherein each hardware port identifier in the global splitting mapping relation corresponds to at most one physical port sub-port identifier and a physical port parent port identifier corresponding to the physical port sub-port identifier; determining an active physical port parent and/or physical port child of the at least two physical ports based on the global split mapping relationship. In the scheme, a global splitting mapping relation among hardware port identifiers, physical port parent port identifiers and physical port child port identifiers can be preset, each hardware port identifier in the global splitting mapping relation corresponds to at most one physical port child port identifier and a physical port parent port identifier corresponding to the physical port child port identifier, that is, one hardware port can correspond to one physical port parent port and one physical port child port, and since the physical port parent port cannot be used after being split, the corresponding hardware port can be allocated to one physical port child port for use, after a splitting request sent by a user terminal is received, the corresponding hardware port is determined based on the global mapping relation, and then the valid physical port parent port and the valid physical port child port are determined, so that the splitting of the physical port is realized, and since the global mapping relation has been previously configured with all the physical ports as the hardware ports corresponding to the child ports which can be split by the parent port, the splitting of one or all physical port father ports can be realized based on the global mapping relation, so that the splitting requirements of all physical ports can be met, and the flexibility of the network equipment is greatly improved.
Drawings
Fig. 1 is a flowchart of a method for splitting a physical port according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a physical port splitting apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device shown in the present application.
Detailed Description
To solve the problem that the number of hardware ports limited by a switch chip in the prior art cannot meet the requirement of complete splitting, an embodiment of the present invention provides a splitting method for physical ports, which is applied to a network device, where the network device includes at least two physical ports and at least two hardware ports, and a flow of the method is shown in fig. 1, and the method includes the following steps:
s11: and receiving a splitting request which is sent by a user terminal and carries the first physical port father port identification and each corresponding first physical port son port identification.
The identifier of each physical port and the identifier of the physical port obtained after the splitting of each physical port may be set in advance on the network device, where the split physical port may be defined as a physical port parent port, the identifier of the physical port parent port may be defined as a physical port parent port identifier, the physical port obtained after the splitting may be defined as a physical port child port, and the identifier of the physical port child port may be defined as a physical port child port identifier. When a user needs to split a certain physical port of the network device, a physical port parent port identifier needing to be split can be selected on a user terminal, the physical port parent port identifier can be defined as a first physical port parent port identifier, and a plurality of physical port child port identifiers obtained after splitting are usually defined as first physical port child port identifiers; and then the user sends a splitting request carrying the father port identification of the first physical port and the corresponding son port identification of each first physical port to the network equipment through the user terminal.
S12: and sending a configuration information acquisition request to the user terminal so that the user terminal sends the acquired configuration information corresponding to each first physical port sub-port identifier to the network equipment.
After receiving the splitting request, the network device may obtain configuration information from the user terminal, and specifically, may send a configuration information obtaining request to the user terminal, and the user terminal returns, to the network device, the configuration information corresponding to each obtained first physical port sub-port identifier.
S13: and configuring the first hardware port corresponding to each first physical port sub-port identifier according to the hardware port identifier, the global split mapping relation between the physical port parent port identifier and the physical port sub-port identifier and the configuration information corresponding to each first physical port sub-port identifier.
The global splitting mapping relationship of the hardware port identifier, the physical port parent port identifier and the physical port child port identifier can be preset, each hardware port identifier in the global splitting mapping relationship can only correspond to one physical port child port identifier, and can also simultaneously correspond to one physical port child port identifier and the corresponding physical port parent port identifier, that is, one hardware port identifier can simultaneously correspond to one physical port parent port identifier and one physical port child port identifier, and the physical port parent port identifier and the physical port child port identifier are also corresponding, that is, the physical port corresponding to the physical port child port identifier is obtained after splitting the physical port corresponding to the physical port parent port identifier, because the physical port parent port is not used after splitting, the hardware port corresponding to the physical port parent port can be allocated to one physical port child port of the physical port parent port for use, therefore, the waste of hardware ports is avoided, and the utilization rate of the hardware ports is improved.
When a user needs to split a physical port, the first hardware port corresponding to each first physical port sub-port identifier can be configured according to the hardware port identifier, the global split mapping relationship between the physical port parent port identifier and the physical port sub-port identifier, and the configuration information corresponding to each first physical port sub-port identifier.
S14: and determining the effective physical port parent port and/or physical port child port in the at least two physical ports based on the global split mapping relation.
Since the user splits the physical port, the state of the physical port is changed, and the valid physical port parent port and/or physical port child port of the at least two physical ports may be further determined based on the global split mapping relationship, and of course, the valid physical port parent port and/or physical port child port may be notified to the user through the user terminal.
In the scheme, a global splitting mapping relation among hardware port identifiers, physical port parent port identifiers and physical port child port identifiers can be preset, each hardware port identifier in the global splitting mapping relation corresponds to at most one physical port child port identifier and a physical port parent port identifier corresponding to the physical port child port identifier, that is, one hardware port can correspond to one physical port parent port and one physical port child port, and since the physical port parent port cannot be used after being split, the corresponding hardware port can be allocated to one physical port child port for use, after a splitting request sent by a user terminal is received, the corresponding hardware port is determined based on the global mapping relation, and then the valid physical port parent port and the valid physical port child port are determined, so that the splitting of the physical port is realized, and since the global mapping relation has been previously configured with all the physical ports as the hardware ports corresponding to the child ports which can be split by the parent port, the splitting of one or all physical port father ports can be realized based on the global mapping relation, so that the splitting requirements of all physical ports can be met, and the flexibility of the network equipment is greatly improved.
Specifically, in the step S13, configuring, according to the global split mapping relationship between the hardware port identifier, the physical port parent identifier, and the physical port child identifier, and the configuration information corresponding to each first physical port child identifier, a first hardware port corresponding to each first physical port child identifier, the implementation process specifically includes:
acquiring a preset global split mapping relation of a hardware port identifier, a physical port parent port identifier and a physical port child port identifier;
determining each first hardware port identifier corresponding to each first physical port sub-port identifier according to the global split mapping relation;
loading a driver of a first hardware port corresponding to each first hardware port identifier based on configuration information corresponding to each first physical port sub-port identifier;
and adding split identifiers to the father port identifiers of the first physical ports included in the global split mapping relationship, and adding shared identifiers to the first hardware port identifiers included in the global split mapping relationship.
When a user splits a physical port, the physical port sub-port can be validated only after a hardware port corresponding to the physical port sub-port in the network device is validated, so that each first hardware port identifier corresponding to each first physical port sub-port identifier can be determined according to the global split mapping relationship, and a driver of the first hardware port corresponding to each first hardware port identifier is loaded based on configuration information corresponding to each first physical port sub-port identifier. In order to facilitate subsequent determination of the split physical port, it is further required to add a split identifier to each first physical port parent identifier included in the global split mapping relationship, where the split identifier is used to indicate that a physical port parent corresponding to the first physical port parent identifier is split, and add a shared identifier to each first hardware port identifier included in the global split mapping relationship, where the shared identifier is used to indicate that the first hardware port is shared by the physical port parent and the physical port child.
Optionally, before sending the configuration information obtaining request to the user terminal in S12, the method further includes:
determining whether a first physical port father port identifier included in the global splitting mapping relation carries a split identifier or not;
if it is determined that the first physical port parent identifier included in the global split mapping relationship does not carry the split identifier, the step of sending a configuration information acquisition request to the user terminal in S12 is executed;
and if the fact that the first physical port father port identification included in the global splitting mapping relation carries the split identification is determined, returning error prompt information to the user terminal.
In order to ensure that the splitting request of the user is valid, it is further required to determine whether the first physical port parent port identifier included in the global splitting mapping relationship carries a split identifier, and if it is determined that the first physical port parent port identifier included in the global splitting mapping relationship does not carry a split identifier, which indicates that the physical port corresponding to the first physical port parent port identifier is not split, the step of sending the configuration information acquisition request to the user terminal in S12 is executed; and if the fact that the first physical port father port identification included in the global splitting mapping relation carries the split identification is determined, the fact that the physical port corresponding to the first physical port father port identification is split is indicated, error prompt information is returned to the user terminal, and therefore the user can resend the splitting request.
Specifically, in the step S14, determining an effective physical port parent and/or physical port child among the at least two physical ports based on the global split mapping relationship specifically includes:
determining whether the hardware port identifier of an effective hardware port in at least two hardware ports in the global split mapping relation carries a shared identifier or not;
for a first validated hardware port with a shared identifier carried by a hardware port identifier, acquiring a second physical port sub-port identifier corresponding to the first validated hardware port in the global split mapping relation;
and for a second validated hardware port of which the hardware port identification does not carry the shared identification, acquiring a second physical port parent identification or a third physical port child identification corresponding to the second validated hardware port in the global split mapping relation.
In determining the physical port parent and/or physical port child of the at least two physical ports that are in effect, it may first poll whether the at least two hardware ports are in effect, for the validated hardware port, it can further determine whether the hardware port identifier of the validated hardware port in the global split mapping relationship carries the sharing identifier, for the first validated hardware port with the shared identifier carried by the hardware port identifier, it means that the hardware port corresponding to the hardware port identifier is shared by two physical ports, because the hardware port is shared by the physical port father port and the physical port daughter port at the same time, only after the physical port father port is disassembled, the sharing identification is added to the corresponding hardware port identification, which indicates that the hardware port is actually used by the physical port daughter port at the moment, therefore, acquiring a second physical port sub-port identifier corresponding to the first validated hardware port identifier in the global split mapping relation; for a second valid hardware port of which the hardware port identifier does not carry a shared identifier, it indicates that the hardware port corresponding to the hardware port identifier is not shared, and the hardware port may be used by a parent port of a physical port or may be used by a child port of the physical port, so that a parent port identifier or a child port identifier of the physical port corresponding to the second valid hardware port may be obtained in the global split mapping relationship, the parent port identifier of the physical port may locate a parent port identifier of the second physical port, and the child port identifier of the physical port may be defined as a child port identifier of a third physical port. Based on the above, the valid physical port parent port and/or physical port child port of the at least two physical ports can be determined, and further the valid physical port parent port and/or physical port child port can be fed back to the user terminal, so that the user can know the state of each physical port.
Based on the same inventive concept, an embodiment of the present invention provides a splitting apparatus for physical ports, which is applied to a network device, where the network device includes at least two physical ports and at least two hardware ports, and a structure of the apparatus is shown in fig. 2, and includes:
a receiving module 21, configured to receive a splitting request sent by a user terminal and carrying a first physical port parent port identifier and each corresponding first physical port child port identifier;
a sending module 22, configured to send a configuration information obtaining request to the user terminal, so that the user terminal sends, to the network device, the configuration information corresponding to each obtained first physical port sub-port identifier;
the configuration module 23 is configured to configure a first hardware port corresponding to each first physical port sub-port identifier according to the hardware port identifier, the global split mapping relationship between the physical port parent port identifier and the physical port child port identifier, and the configuration information corresponding to each first physical port child port identifier, where each hardware port identifier in the global split mapping relationship corresponds to at most one physical port child port identifier and a physical port parent port identifier corresponding to the physical port child port identifier;
a determining module 24, configured to determine, based on the global split mapping relationship, a physical port parent and/or a physical port child that is valid in at least two physical ports.
In the scheme, a global splitting mapping relation among hardware port identifiers, physical port parent port identifiers and physical port child port identifiers can be preset, each hardware port identifier in the global splitting mapping relation corresponds to at most one physical port child port identifier and a physical port parent port identifier corresponding to the physical port child port identifier, that is, one hardware port can correspond to one physical port parent port and one physical port child port, and since the physical port parent port cannot be used after being split, the corresponding hardware port can be allocated to one physical port child port for use, after a splitting request sent by a user terminal is received, the corresponding hardware port is determined based on the global mapping relation, and then the valid physical port parent port and the valid physical port child port are determined, so that the splitting of the physical port is realized, and since the global mapping relation has been previously configured with all the physical ports as the hardware ports corresponding to the child ports which can be split by the parent port, the splitting of one or all physical port father ports can be realized based on the global mapping relation, so that the splitting requirements of all physical ports can be met, and the flexibility of the network equipment is greatly improved.
Specifically, the configuration module 23 is configured to configure, according to the global split mapping relationship between the hardware port identifier, the physical port parent identifier, and the physical port child identifier, and the configuration information corresponding to each first physical port child identifier, the first hardware port corresponding to each first physical port child identifier, and specifically configured to:
acquiring a preset global split mapping relation of a hardware port identifier, a physical port parent port identifier and a physical port child port identifier;
determining each first hardware port identifier corresponding to each first physical port sub-port identifier according to the global split mapping relation;
loading a driver of a first hardware port corresponding to each first hardware port identifier based on configuration information corresponding to each first physical port sub-port identifier;
and adding split identifiers to the father port identifiers of the first physical ports included in the global split mapping relationship, and adding shared identifiers to the first hardware port identifiers included in the global split mapping relationship.
Optionally, the sending module 22 is further configured to:
determining whether a first physical port father port identifier included in the global splitting mapping relation carries a split identifier or not;
if the fact that the first physical port father port identification included in the global splitting mapping relation does not carry the split identification is determined, a step of sending a configuration information obtaining request to a user terminal is executed;
and if the fact that the first physical port father port identification included in the global splitting mapping relation carries the split identification is determined, returning error prompt information to the user terminal.
Specifically, the determining module 24 is configured to determine, based on the global split mapping relationship, a physical port parent and/or a physical port child that are valid in at least two physical ports, and specifically configured to:
determining whether the hardware port identifier of an effective hardware port in at least two hardware ports in the global split mapping relation carries a shared identifier;
for a first validated hardware port with a shared identifier carried by a hardware port identifier, acquiring a second physical port sub-port identifier corresponding to the first validated hardware port in the global split mapping relation;
and for a second validated hardware port of which the hardware port identification does not carry the shared identification, acquiring a second physical port parent identification or a third physical port child identification corresponding to the second validated hardware port in the global split mapping relation.
An electronic device is further provided in the embodiment of the present application, please refer to fig. 3, which includes a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 complete communication with each other through the communication bus 340.
A memory 330 for storing a computer program;
the processor 310 is configured to implement the method for splitting a physical port according to any of the above embodiments when executing the program stored in the memory 330.
The communication interface 320 is used for communication between the above-described electronic device and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In the scheme, a global splitting mapping relation among hardware port identifiers, physical port parent port identifiers and physical port child port identifiers can be preset, each hardware port identifier in the global splitting mapping relation corresponds to at most one physical port child port identifier and a physical port parent port identifier corresponding to the physical port child port identifier, that is, one hardware port can correspond to one physical port parent port and one physical port child port, and since the physical port parent port cannot be used after being split, the corresponding hardware port can be allocated to one physical port child port for use, after a splitting request sent by a user terminal is received, the corresponding hardware port is determined based on the global mapping relation, and then the valid physical port parent port and the valid physical port child port are determined, so that the splitting of the physical port is realized, and since the global mapping relation has been previously configured with all the physical ports as the hardware ports corresponding to the child ports which can be split by the parent port, the splitting of one or all physical port father ports can be realized based on the global mapping relation, so that the splitting requirements of all physical ports can be met, and the flexibility of the network equipment is greatly improved.
Accordingly, an embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute the method for splitting a physical port in any of the foregoing embodiments.
In the scheme, a global splitting mapping relation among hardware port identifiers, physical port parent port identifiers and physical port child port identifiers can be preset, each hardware port identifier in the global splitting mapping relation corresponds to at most one physical port child port identifier and a physical port parent port identifier corresponding to the physical port child port identifier, that is, one hardware port can correspond to one physical port parent port and one physical port child port, and since the physical port parent port cannot be used after being split, the corresponding hardware port can be allocated to one physical port child port for use, after a splitting request sent by a user terminal is received, the corresponding hardware port is determined based on the global mapping relation, and then the valid physical port parent port and the valid physical port child port are determined, so that the splitting of the physical port is realized, and since the global mapping relation has been previously configured with all the physical ports as the hardware ports corresponding to the child ports which can be split by the parent port, the splitting of one or all physical port father ports can be realized based on the global mapping relation, so that the splitting requirements of all physical ports can be met, and the flexibility of the network equipment is greatly improved.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While alternative embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

Claims (10)

1. A method for splitting a physical port is applied to network equipment, the network equipment comprises at least two physical ports and at least two hardware ports, and the method comprises the following steps:
receiving a splitting request which is sent by a user terminal and carries a first physical port father port identification and each first physical port son port identification corresponding to the first physical port father port identification;
sending a configuration information acquisition request to the user terminal so that the user terminal sends the acquired configuration information corresponding to each first physical port sub-port identifier to the network equipment;
configuring a first hardware port corresponding to each first physical port sub-port identifier according to a global splitting mapping relation among hardware port identifiers, physical port parent port identifiers and physical port child port identifiers and configuration information corresponding to each first physical port child port identifier, wherein each hardware port identifier in the global splitting mapping relation corresponds to at most one physical port child port identifier and a physical port parent port identifier corresponding to the physical port child port identifier;
determining an active physical port parent and/or physical port child of the at least two physical ports based on the global split mapping relationship.
2. The method of claim 1, wherein configuring the first hardware port corresponding to each first physical port sub-port identifier according to the global split mapping relationship among the hardware port identifier, the physical port parent port identifier, and the physical port sub-port identifier, and the configuration information corresponding to each first physical port sub-port identifier specifically includes:
acquiring a preset global split mapping relation of a hardware port identifier, a physical port parent port identifier and a physical port child port identifier;
determining each first hardware port identifier corresponding to each first physical port sub-port identifier according to the global split mapping relation;
loading a driver of a first hardware port corresponding to each first hardware port identifier based on configuration information corresponding to each first physical port sub-port identifier;
and adding split identifiers to the father port identifiers of the first physical ports included in the global split mapping relationship, and adding sharing identifiers to the first hardware port identifiers included in the global split mapping relationship.
3. The method of claim 2, wherein before sending the configuration information acquisition request to the user terminal, further comprising:
determining whether the first physical port father port identifier included in the global split mapping relation carries the split identifier;
if the fact that the first physical port father port identification included in the global splitting mapping relation does not carry the split identification is determined, the step of sending a configuration information acquisition request to the user terminal is executed;
and if the fact that the first physical port father port identification included in the global splitting mapping relation carries the split identification is determined, returning error prompt information to the user terminal.
4. The method according to claim 2 or 3, wherein determining, based on the global split mapping relationship, a physical port parent and/or a physical port child that is valid among the at least two physical ports specifically comprises:
determining whether the hardware port identifier of an effective hardware port in the at least two hardware ports in the global split mapping relationship carries the shared identifier;
for a first validated hardware port carrying the shared identifier by a hardware port identifier, acquiring a second physical port sub-port identifier corresponding to the first validated hardware port in the global split mapping relation;
and for a second validated hardware port of which the hardware port identification does not carry the shared identification, acquiring a second physical port parent identification or a third physical port child identification corresponding to the second validated hardware port in the global split mapping relation.
5. A physical port splitting device is applied to network equipment, the network equipment comprises at least two physical ports and at least two hardware ports, and the device comprises:
the receiving module is used for receiving a splitting request which is sent by a user terminal and carries a first physical port father port identifier and each corresponding first physical port son port identifier;
a sending module, configured to send a configuration information acquisition request to the user terminal, so that the user terminal sends, to the network device, configuration information corresponding to the acquired first physical port sub-port identifiers;
the configuration module is used for configuring a first hardware port corresponding to each first physical port sub-port identifier according to a hardware port identifier, a global split mapping relationship of a physical port parent port identifier and a physical port sub-port identifier, and configuration information corresponding to each first physical port sub-port identifier, wherein each hardware port identifier in the global split mapping relationship corresponds to at most one physical port sub-port identifier and a physical port parent port identifier corresponding to the physical port sub-port identifier;
a determining module, configured to determine, based on the global split mapping relationship, a physical port parent and/or a physical port child that are/is in effect in the at least two physical ports.
6. The apparatus of claim 5, wherein the configuration module is configured to configure, according to the hardware port identifier, the global split mapping relationship between the physical port parent identifier and the physical port child identifier, and the configuration information corresponding to each first physical port child identifier, the first hardware port corresponding to each first physical port child identifier, and specifically is configured to:
acquiring a preset global split mapping relation of a hardware port identifier, a physical port parent port identifier and a physical port child port identifier;
determining each first hardware port identifier corresponding to each first physical port sub-port identifier according to the global split mapping relation;
loading a driver of a first hardware port corresponding to each first hardware port identifier based on configuration information corresponding to each first physical port sub-port identifier;
and adding split identifiers to the father port identifiers of the first physical ports included in the global split mapping relationship, and adding sharing identifiers to the first hardware port identifiers included in the global split mapping relationship.
7. The apparatus of claim 6, wherein the sending module is further configured to:
determining whether the first physical port father port identifier included in the global split mapping relation carries the split identifier;
if the fact that the first physical port father port identification included in the global splitting mapping relation does not carry the split identification is determined, the step of sending a configuration information acquisition request to the user terminal is executed;
and if the fact that the first physical port father port identification included in the global splitting mapping relation carries the split identification is determined, returning error prompt information to the user terminal.
8. The apparatus of claim 6 or 7, wherein the determining module is configured to determine, based on the global split mapping relationship, a physical port parent and/or a physical port child that is valid among the at least two physical ports, and is specifically configured to:
determining whether the hardware port identifier of an effective hardware port in the at least two hardware ports in the global split mapping relationship carries the shared identifier;
for a first validated hardware port carrying the shared identifier by a hardware port identifier, acquiring a second physical port sub-port identifier corresponding to the first validated hardware port in the global split mapping relation;
and for a second validated hardware port of which the hardware port identification does not carry the shared identification, acquiring a second physical port parent identification or a third physical port child identification corresponding to the second validated hardware port in the global split mapping relation.
9. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-4 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
CN202011621243.9A 2020-12-31 2020-12-31 Physical port splitting method and device Active CN112787961B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011621243.9A CN112787961B (en) 2020-12-31 2020-12-31 Physical port splitting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011621243.9A CN112787961B (en) 2020-12-31 2020-12-31 Physical port splitting method and device

Publications (2)

Publication Number Publication Date
CN112787961A CN112787961A (en) 2021-05-11
CN112787961B true CN112787961B (en) 2022-08-16

Family

ID=75753304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011621243.9A Active CN112787961B (en) 2020-12-31 2020-12-31 Physical port splitting method and device

Country Status (1)

Country Link
CN (1) CN112787961B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072141A (en) * 2006-05-09 2007-11-14 杭州华三通信康技术有限公司 Ethernet accessing converting device, multiplexing gateway device and accessing converting method
CN102195818A (en) * 2011-05-27 2011-09-21 中兴通讯股份有限公司 Data service processing single board and method
CN106254165A (en) * 2016-09-30 2016-12-21 杭州华三通信技术有限公司 Interface processing method and processing device
CN107454021A (en) * 2017-07-13 2017-12-08 北京神州绿盟信息安全科技股份有限公司 A kind of communication means and device
CN109845385A (en) * 2016-09-30 2019-06-04 高通股份有限公司 It is transmitted using the RACH of multiple ports
CN110568946A (en) * 2019-09-02 2019-12-13 腾讯科技(深圳)有限公司 Port control method, device and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10824603B2 (en) * 2017-06-15 2020-11-03 Sap Se Concurrent enumeration of multiple hierarchies in a database environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072141A (en) * 2006-05-09 2007-11-14 杭州华三通信康技术有限公司 Ethernet accessing converting device, multiplexing gateway device and accessing converting method
CN102195818A (en) * 2011-05-27 2011-09-21 中兴通讯股份有限公司 Data service processing single board and method
CN106254165A (en) * 2016-09-30 2016-12-21 杭州华三通信技术有限公司 Interface processing method and processing device
CN109845385A (en) * 2016-09-30 2019-06-04 高通股份有限公司 It is transmitted using the RACH of multiple ports
CN107454021A (en) * 2017-07-13 2017-12-08 北京神州绿盟信息安全科技股份有限公司 A kind of communication means and device
CN110568946A (en) * 2019-09-02 2019-12-13 腾讯科技(深圳)有限公司 Port control method, device and medium

Also Published As

Publication number Publication date
CN112787961A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
US20240045824A1 (en) Remote Mapping Method, Apparatus and Device for Computing Resources, and Storage Medium
US11080404B2 (en) Firmware upgrade method, slave station of robot, and machine readable storage medium
EP3291089B1 (en) Data processing method and apparatus
CN112291387B (en) Method, device and equipment for automatically addressing master and slave machines and storage medium
CN109634720B (en) Method, system and device for sharing FPGA (field programmable Gate array) board card by multiple virtual machines
CN111597061A (en) Method and device for remote procedure call of client or server
CN107315697A (en) Embodied on computer readable storage device, system and method for reducing management port
CN105677605A (en) Highly-efficient interconnected system capable of configuring chips and realization system thereof and device
CN112637371A (en) Node address determination method and device, electronic equipment and storage medium
CN112787961B (en) Physical port splitting method and device
EP2913759B1 (en) Memory access processing method based on memory chip interconnection, memory chip, and system
WO2024078634A1 (en) Service management method, system and apparatus, and electronic device and storage medium
CN105095149B (en) A kind of batch processing method and device of system on chip parameter
CN115022424B (en) Hydropower LCU controller network card virtual control method, system, equipment and medium thereof
CN115794317A (en) Processing method, device, equipment and medium based on virtual machine
CN113346983B (en) EPA equipment with mirror redundancy and EPA system
CN101902436A (en) Interplate communication method, device and system
CN113438606B (en) Message transmission method, device, related equipment and storage medium
CN113961218A (en) Remote batch upgrading method, device, equipment and storage medium for switch
CN107454021B (en) Communication method and device
CN105072047A (en) Message transmitting and processing method
CN107122268B (en) NUMA-based multi-physical-layer partition processing system
CN110995867A (en) Communication system for human-computer interaction and robot
RU161315U1 (en) SPEED INPUT-OUTPUT CONTROLLER (SWR)
CN115032972B (en) Vehicle diagnostic data communication method, device, electronic equipment and medium

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