CN113014606B - Access device and method for hardware module in network chip - Google Patents

Access device and method for hardware module in network chip Download PDF

Info

Publication number
CN113014606B
CN113014606B CN202110571113.7A CN202110571113A CN113014606B CN 113014606 B CN113014606 B CN 113014606B CN 202110571113 A CN202110571113 A CN 202110571113A CN 113014606 B CN113014606 B CN 113014606B
Authority
CN
China
Prior art keywords
module
management
control
packet
management control
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
CN202110571113.7A
Other languages
Chinese (zh)
Other versions
CN113014606A (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.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
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 National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN202110571113.7A priority Critical patent/CN113014606B/en
Publication of CN113014606A publication Critical patent/CN113014606A/en
Application granted granted Critical
Publication of CN113014606B publication Critical patent/CN113014606B/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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses an access device and method of hardware module in network chip, when a controller sends down management control message to access the hardware module in the network chip, because each hardware module has related adapter module, and the adapter modules are distributed on a plurality of control chains, and each hardware module is assigned with corresponding number, thus the hardware module can be sent to different control chains according to the number of the hardware module which requests access and is carried in the management control message, parallel and streamlined processing of the management control message is realized, thereby reducing access delay of the hardware module in the network chip, meanwhile, because each control chain is independent, when the access response on different control chains has time delay difference, even if the access speed on a control chain with larger time delay is slower, no blocking can be caused to other control chains, thereby non-blocking access can be carried out to the hardware module in the network chip, the management control efficiency is effectively improved.

Description

Access device and method for hardware module in network chip
Technical Field
The present invention relates to the field of network chip technology, and in particular, to an access device and method for a hardware module in a network chip.
Background
The high-performance network chip adopts a modularized design idea, hardware resources such as a forwarding table, a counter, a state register, a configuration register and the like of each component need to be controlled by a management control module, namely management control information sent by a controller is firstly sent to the management control module, and then internal logic of the management control module realizes operations such as reading, writing, inserting, deleting and the like on the register or table entry of each component in the chip. And the method provides support for complex network functions such as message analysis, table look-up, message encapsulation, service quality guarantee and the like. The components of the high-performance network chip that need management and control are often distributed around the chip and have certain requirements on real-time performance, so that certain challenges are provided for the management and control design of the high-performance network chip.
Usually, a very large-scale network chip has a plurality of components inside, each component has a certain amount of hardware resources, and a typical processing structure in access control implementation has a star structure or a ring structure. The access control design of the star structure adopts a single centralized management control module, hardware resources such as forwarding tables, counters, state registers, configuration registers and the like of all functional modules of a chip are connected with the management control module, the design mode needs to place the centralized management control module at the center of the chip, a large amount of fan-out routing is needed, and a relay register is required to be added at the rear end to facilitate time sequence convergence. The star-shaped structure is compared to the annular structure, and chip access control module no longer restricts the overall arrangement position of chip, has reduced the fan-out of other sub-modules and has walked the line, has reduced long line number of walking, can the effectual overall arrangement pressure who reduces the rear end, but owing to adopt a plurality of modules of annular structure connection, the access delay is great, and wherein certain module if the access speed is slower, will block whole access control route.
Disclosure of Invention
In order to solve the above technical problems, the present invention provides an access apparatus and method for a hardware module in a network chip, which can reduce access delay of the hardware module in the network chip, and simultaneously perform non-blocking access to the hardware module, thereby effectively improving management control efficiency.
The invention provides an access device of a hardware module in a network chip, which comprises an access control module, an address decoding module and an adaptation module associated with each hardware module in the network chip, wherein each hardware module in the network chip has a corresponding number, the address decoding module is connected with the access control module, a plurality of adaptation modules are sequentially connected to form a control chain, and the adaptation modules at the head end and the tail end of each control chain are respectively connected with the address decoding module and the access control module;
the access control module is used for receiving and analyzing the management control message sent by the controller, storing message information in the management control message, packaging the management control message into a management control packet, and sending the management control packet to the address decoding module; the management control message carries the number of the hardware module requesting access;
the address decoding module is used for decoding the address of the management control packet and sending the management control packet to a control chain to which an adaptation module associated with the hardware module belongs according to the number of the hardware module which is carried in the management control packet and requests access; the address decoding module stores the serial number of the hardware module associated with each adaptation module on each control chain;
the adaptation module is used for judging whether the serial number of the hardware module which is carried in the management control group and requires access is the serial number of the hardware module associated with the adaptation module, and if not, the management control group is sent to the next adaptation module on the control chain; if so, accessing the hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and sending the management response packet to the next adaptation module or the access control module on the control chain;
the access control module is further configured to read message information in a management control message corresponding to the management response packet according to the management response packet, encapsulate the management response packet into a management response message, and send the management response message to the controller.
Preferably, the apparatus further comprises an output scheduling module, and the adaptation module at the tail end of each control chain is connected to the access control module through the output scheduling module;
the output scheduling module is used for receiving the management response packets sent by the adaptation module at the tail end of each control chain and sending the management response packets to the access control module in sequence according to the priority order of each control chain; the output scheduling module stores the priority sequence of each control chain.
Preferably, the access control module includes: the device comprises a connection establishing unit, a message analyzing unit, a first caching unit and a message packaging unit;
the connection establishing unit is used for receiving a connection establishing request sent by the controller and establishing connection with the controller according to the connection establishing request;
the message analysis unit is used for receiving and analyzing the management control message sent by the controller, packaging the management control message into a management control packet and sending the management control packet to the address decoding module; the management control message carries the number of the hardware module requesting access;
the first cache unit is used for storing the message information in the management control message;
the message packaging unit is configured to receive a management response packet sent by the output scheduling module, read message information in a management control message corresponding to the management response packet from the first cache unit according to the management response packet, package the management response packet into a management response message, and send the management response message to the controller.
Preferably, the access control module further comprises a first determination unit;
the first determination unit is configured to determine whether the management control packet is valid after the packet analysis unit receives the management control packet sent by the controller, and if not, discard the management control packet and send a response that the access request is invalid to the controller; and if so, analyzing the management control message through the message analyzing unit.
Preferably, the adaptation module comprises: a second judging unit, a second buffer unit, a grouping processing unit, a third buffer unit and a grouping output unit;
the second judging unit is configured to judge whether the number of the hardware module requesting access, which is carried in the management control packet, is the number of the hardware module associated with the second judging unit, and if not, send the management control packet to the second cache unit; if yes, the management control packet is sent to the packet processing unit;
the second cache unit is used for storing the management control packet;
the packet processing unit is used for accessing the hardware module associated with the packet processing unit according to the management control packet, generating a management response packet after the access is successful, and sending the management response packet to the third cache unit;
the third cache unit is used for storing the management response packet;
and the packet output unit is used for reading the management control packet from the second cache unit and the management response packet from the third cache unit in sequence, and respectively sending the management control packet to the next adaptation module on the control chain and sending the management response packet to the next adaptation module or the access control module on the control chain.
The invention provides an access method of a hardware module in a network chip, which is applied to an access device of the hardware module in the network chip, the device comprises an access control module, an address decoding module and an adapting module associated with each hardware module in the network chip, each hardware module in the network chip has a corresponding number, the address decoding module is connected with the access control module, a plurality of adapting modules are sequentially connected to form a control chain, the adapting modules at the head end and the tail end of each control chain are respectively connected with the address decoding module and the access control module, the method comprises the following steps:
the access control module receives and analyzes a management control message sent by a controller, stores message information in the management control message, packages the management control message into a management control packet and sends the management control packet to the address decoding module; the management control message carries the number of the hardware module requesting access;
the address decoding module is used for decoding the address of the management control packet and sending the management control packet to a control chain to which an adaptation module associated with the hardware module belongs according to the number of the hardware module which is carried in the management control packet and requests to access; the address decoding module stores the serial number of the hardware module associated with each adaptation module on each control chain;
the adaptation module judges whether the serial number of the hardware module which is carried in the management control group and requires access is the serial number of the hardware module associated with the adaptation module, if not, the management control group is sent to the next adaptation module on the control chain; if so, accessing the hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and sending the management response packet to the next adaptation module or the access control module on the control chain;
and the access control module reads message information in a management control message corresponding to the management response packet according to the management response packet, encapsulates the management response packet into a management response message, and sends the management response message to the controller.
Preferably, the apparatus further includes an output scheduling module, the adaptation module at the tail end of each control chain is connected to the access control module through the output scheduling module, and the method further includes:
the output scheduling module receives the management response packet sent by the adaptation module at the tail end of each control chain, and sequentially sends the management response packet to the access control module according to the priority order of each control chain; the output scheduling module stores the priority sequence of each control chain.
Preferably, the first and second electrodes are formed of a metal,
the access control module receives and analyzes a management control message sent by a controller, stores message information in the management control message, packages the management control message into a management control packet, and sends the management control packet to the address decoding module, wherein the management control message carries the number of a hardware module requesting access, and the access control module comprises:
receiving a connection establishment request sent by the controller, and establishing connection with the controller according to the connection establishment request;
receiving and analyzing a management control message sent by the controller, packaging the management control message into a management control packet, and sending the management control packet to the address decoding module; the management control message carries the number of the hardware module requesting access;
storing message information in the management control message;
the access control module reads message information in a management control message corresponding to the management response packet according to the management response packet, encapsulates the management response packet into a management response message, and sends the management response message to the controller, and the method comprises the following steps:
and receiving a management response packet sent by the output scheduling module, reading message information in a management control message corresponding to the management response packet according to the management response packet, packaging the management response packet into a management response message, and sending the management response message to the controller.
Preferably, after receiving the management control packet sent by the controller, the method further includes:
judging whether the management control message is effective or not, if not, discarding the management control message, and sending a response that the access request is invalid to the controller; and if so, analyzing the management control message.
Preferably, the first and second electrodes are formed of a metal,
the adaptation module judges whether the serial number of the hardware module which is carried in the management control group and requires access is the serial number of the hardware module associated with the adaptation module, if not, the management control group is sent to the next adaptation module on the control chain; if yes, accessing a hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and sending the management response packet to a next adaptation module on a control chain or the access control module, wherein the steps of:
judging whether the number of the hardware module which requests to access and is carried in the management control group is the number of the hardware module associated with the hardware module;
if not, storing the management control group to a first address;
if yes, accessing a hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and storing the management response packet to a second address different from the first address;
and reading the management control packet from the first address and the management response packet from the second address in sequence, and respectively sending the management control packet to a next adaptation module on a control chain and sending the management response packet to the next adaptation module or the access control module on the control chain.
The invention has at least the following beneficial effects:
when the embodiment of the invention is applied, when the controller issues the management control message to access the hardware module in the network chip, each hardware module has an associated adaptation module, the adaptation modules are distributed on a plurality of control chains, and a corresponding number is distributed for each hardware module, so that the hardware module requesting access carried in the management control message can be sent to different control chains according to the number of the hardware module to be accessed, the management control message is processed in parallel and in a pipelined manner, thereby reducing the access delay of the hardware module in the network chip, meanwhile, because each control chain is independent, when the access response on different control chains has time delay difference, even if the access speed on a certain control chain with larger time delay is slower, the other control chains can not be blocked, thereby the hardware module in the network chip can be accessed in a non-blocking manner, the management control efficiency is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic structural diagram of an access apparatus for a hardware module in a network chip according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of another access apparatus for a hardware module in a network chip according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an access control module according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an adaptation module according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of an access method for a hardware module in a network chip according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating another method for accessing a hardware module in a network chip according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide an access device and method for a hardware module in a network chip, which can reduce the access delay of the hardware module in the network chip, and simultaneously can carry out non-blocking access on the hardware module, thereby effectively improving the management control efficiency.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In one aspect, an embodiment of the present invention provides an access apparatus for a hardware module in a network chip, please refer to fig. 1, the apparatus includes an access control module 110, an address decoding module 120, and an adaptation module 130 associated with each hardware module in the network chip, each hardware module in the network chip has a corresponding number, the address decoding module 120 is connected to the access control module 110, a plurality of adaptation modules 130 are sequentially connected to form a control chain, and the adaptation modules 130 at the head and tail ends of each control chain are respectively connected to the address decoding module 120 and the access control module 110.
In the embodiment of the present invention, each hardware module in the network chip has an associated adaptation module 130, and the adaptation modules 130 are distributed on a plurality of control chains, which can be expanded according to user requirements and assign corresponding numbers to each hardware module. The hardware module in the network chip comprises a state register, a configuration register, a counter, a forwarding table and the like.
The access control module 110 is configured to receive and analyze the management control packet sent by the controller, store the packet information in the management control packet, encapsulate the management control packet into a management control packet, and send the management control packet to the address decoding module 120; the management control message carries the number of the hardware module requesting access.
In the embodiment of the present invention, the access control module 110 is connected to the controller through the access control port, receives and analyzes the management control packet sent by the controller, encapsulates the management control packet into a management control packet with a uniform format, and sends the management control packet to the address decoding module 120, and stores key packet information in the management control packet.
The address decoding module 120 is configured to perform address decoding on the management control packet, and send the management control packet to a control chain to which the adaptation module 130 associated with the hardware module belongs according to a serial number of the hardware module requesting access, where the serial number is carried in the management control packet; the address decoding module 120 stores therein the number of the hardware module associated with each adaptation module 130 in each control chain.
In the embodiment of the present invention, the address decoding module 120 distributes the management control packet to each control chain according to the number of the hardware module requesting access, which is carried in the management control packet. For example, when the numbers of the hardware modules requesting access carried in the management control packet are 2 and 4, respectively, if the adaptation module 130 associated with the hardware module with the number 2 is located on the first control chain and the adaptation module 130 associated with the hardware module with the number 4 is located on the second control chain, the address decoding module 120 sends the management control packet with the numbers 2 and 4 carrying the hardware modules requesting access to the first control chain and the second control chain, respectively.
The adaptation module 130 is configured to determine whether the number of the hardware module requesting access, which is carried in the management control packet, is the number of the hardware module associated with the adaptation module 130, and if not, send the management control packet to the next adaptation module 130 in the control chain; if yes, accessing the hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and sending the management response packet to the next adaptation module 130 or access control module 110 on the control chain.
In the embodiment of the present invention, after receiving the management control packet, the adaptation module 130 in each control chain determines each management control packet, and if the number of the hardware module requesting access carried in the management control packet is different from the number of the hardware module associated with itself, sends the management control packet to the next adaptation module 130 in the control chain to which the management control packet belongs; if the data is the same as the data, the hardware module associated with the management control packet is accessed according to the management control packet, the operations of reading, writing, inserting, deleting and the like of the register or the table entry are completed, the management response packet is generated after the access is successful, and the management response packet is continuously transmitted downwards along the control chain to which the management response packet belongs until the management response packet is sent to the access control module 110.
The access control module 110 is further configured to read message information in the management control message corresponding to the management response packet according to the management response packet, encapsulate the management response packet into a management response message, and send the management response message to the controller.
In this embodiment of the present invention, after receiving the management response packet returned from the adaptation module 130, the access control module 110 reads the key packet information in the management control packet corresponding to the management response packet, and encapsulates the key packet information into a management response packet meeting the specification of the management control protocol, so as to respond to the controller.
As can be seen from the above, when the controller issues the management control message to access the hardware module in the network chip, each hardware module has an associated adaptation module 130, the adaptation modules 130 are distributed on a plurality of control chains, and each hardware module is assigned with a corresponding number, so that the hardware module requesting access carried in the management control message can be sent to different control chains according to the number of the hardware module, thereby implementing parallel and pipelined processing on the management control message, and reducing the access delay of the hardware module in the network chip, and meanwhile, because each control chain is independent from each other, when the access response on different control chains has a delay difference, even if the access speed on a control chain with a larger delay is slower, no blocking is caused to other control chains, therefore, non-blocking access can be performed on the hardware module in the network chip, and the management control efficiency is effectively improved.
In specific implementation, the access control module 110 encapsulates the received management control packet into a management control packet Ctrl _ MSG with a uniform format, where the format of the management control packet Ctrl _ MSG may be shown in the following table:
Figure 227017DEST_PATH_IMAGE001
each management control group carries key information of network chip management control, and the key information mainly comprises two types: one type is information closely related to management control commands, including: a Header _ flag/Tail _ flag field, a Burst operation length Burst field, an operation Type field, a Reply/Result field, a hardware module number MID field, a storage resource Address field and a Data field are marked from the beginning to the end; another type is information related to the management control protocol, such as the message Sequence number field.
Optionally, in combination with the embodiment shown in fig. 1, in some embodiments of the present invention, as shown in fig. 2, the apparatus further includes an output scheduling module 140, where the adaptation module 130 at the tail end of each control chain is connected to the access control module 110 through the output scheduling module 140;
an output scheduling module 140, configured to receive the management response packet sent by the adaptation module 130 at the tail end of each control chain, and send the management response packet to the access control module 110 in sequence according to the priority order of each control chain; the output scheduling module 140 stores therein a priority order of each control chain.
In the embodiment of the present invention, the adaptation module 130 at the tail end of each control chain sends the management response packet to the output scheduling module 140, and the output scheduling module 140 schedules the management response packet of each control chain according to the preset priority order of each control chain, thereby ensuring that the control chain with high priority can quickly respond to the access of the controller. In specific implementation, a user can set the priority order of the control chains in a register configuration mode according to actual application conditions, so that the control chains sensitive to access delay have high priority authority, and response messages can pass preferentially.
Further, as shown in fig. 3, in some embodiments of the invention, the access control module 110 includes: a connection establishing unit 111, a message parsing unit 112, a first caching unit 113 and a message encapsulation unit 114.
And a connection establishing unit 111, configured to receive the connection establishing request sent by the controller, and establish a connection with the controller according to the connection establishing request.
In the embodiment of the present invention, the connection establishing unit 111 establishes a connection with the controller through the access control port, the connection establishing mode may adopt a TCP three-way handshake mode, the controller sends a connection establishing request, the connection establishing unit 111 establishes a connection with the controller according to the connection establishing request after receiving the connection establishing request, and then the controller can access the hardware module through the access control port, if the connection is not established, the access is not allowed, and all management control messages are discarded.
A message parsing unit 112, configured to receive and parse the management control message sent by the controller, encapsulate the management control message into a management control packet, and send the management control packet to the address decoding module 120; the management control message carries the number of the hardware module requesting access.
In the embodiment of the present invention, after establishing connection with the controller, the message parsing unit 112 receives the management control message from the access control port, parses the management control message, encapsulates the management control message into a management control packet Ctrl _ MSG with a uniform format, and sends the management control packet Ctrl _ MSG to the address decoding module 120. In specific implementation, the message parsing unit 112 generates a Sequence number Sequence of the management control message for each management control message, and puts each Sequence number of the management control message into the corresponding management control packet Ctrl _ MSG.
The first buffer unit 113 is configured to store the message information in the management control message.
In this embodiment of the present invention, the first cache unit 113 stores the key packet information in each management control packet according to the Sequence number of the management control packet. In specific implementation, the first cache unit 113 uses a RAM (random access memory, full name of english, full name of chinese, random access memory), and the key message information in the management control message may include: input port number, message sequence number, source destination address, source IP address, etc.
The packet encapsulating unit 114 is configured to receive the management response packet sent by the output scheduling module 140, read, according to the management response packet, the packet information in the management control packet corresponding to the management response packet from the first cache unit 113, encapsulate the management response packet into a management response packet, and send the management response packet to the controller.
In this embodiment of the present invention, after receiving the management response packet Ctrl _ MSG sent by the output scheduling module 140, the message encapsulation unit 114 reads the key message information in the management control message corresponding to the management response packet Ctrl _ MSG from the first cache unit 113 according to the management control message Sequence in the management response packet Ctrl _ MSG, encapsulates the management response packet Ctrl _ MSG into the management response message, sends the management response message to the controller, and releases the management control message Sequence at the same time to provide a space for storing the next management control message.
Further, in some embodiments of the present invention, the access control module 110 further comprises a first determination unit 115;
a first determining unit 115, configured to determine whether the management control packet is valid after the packet parsing unit 112 receives the management control packet sent by the controller, and if not, discard the management control packet and send a response that the access request is invalid to the controller; if yes, the management control message is parsed by the message parsing unit 112.
In the embodiment of the present invention, after the message parsing unit 112 receives a management control message sent by a controller, the first determining unit 115 determines a source destination address and a source IP address of the management control message, if the source destination address and the source IP address are inconsistent with an address of a current controller, the management control message is considered to be invalid, the management control message is discarded, and a response that an access request is invalid is sent to the controller; if the two are consistent, the management control message is considered to be valid, and the management control message is analyzed through the message analysis unit 112.
Optionally, as shown in fig. 4, in some embodiments of the present invention, the adaptation module 130 includes: a second determination unit 131, a second buffer unit 132, a packet processing unit 133, a third buffer unit 134, and a packet output unit 135;
a second determining unit 131, configured to determine whether the number of the hardware module requesting access, carried in the management control packet, is the number of the hardware module associated with the second determining unit, and if not, send the management control packet to the second caching unit 132; if so, the management control packet is sent to the packet processing unit 133.
In the embodiment of the present invention, the second determining unit 131 determines the number of the hardware module requesting access, which is carried in each management control packet Ctrl _ MSG, and if the number of the hardware module associated with the second determining unit is different, sends the management control packet Ctrl _ MSG to the second caching unit 132; if the same, the management control packet Ctrl _ MSG is sent to the packet processing unit 133.
And a second buffer unit 132 for storing the management control packet.
In the embodiment of the present invention, the second buffer unit 132 uses a FIFO (First Input First Output, chinese First in First out memory), stores the management control packet Ctrl _ MSG with different numbers of its associated hardware modules, and prepares to be quickly forwarded to the next adaptation module 130 on the control chain.
The packet processing unit 133 is configured to access the hardware module associated with the packet processing unit according to the management control packet, generate a management response packet after the access is successful, and send the management response packet to the third cache unit 134.
In the embodiment of the present invention, the packet processing unit 133 accesses the hardware module associated with itself according to the management control packet, implements operations such as reading, writing, inserting, deleting, etc. on the register or table entry of each component in the network chip, provides support for complex network functions such as message analysis, table lookup, message encapsulation, quality of service guarantee, etc., generates a management response packet after successful access, and sends the management response packet to the third cache unit 134. In particular, the control interface of the packet processing unit 133 is determined by the management interface of each hardware module.
And a third buffer unit 134 for storing the management response packet.
In the embodiment of the present invention, the third buffer unit 134 also uses a FIFO and has a different address from the second buffer unit 132, so as to implement clock domain crossing isolation.
And a packet output unit 135, configured to sequentially read the management control packet from the second buffer unit 132 and the management response packet from the third buffer unit 134, and send the management control packet to the next adaptation module 130 in the control chain and send the management response packet to the next adaptation module 130 or the access control module 110 in the control chain, respectively.
In the embodiment of the present invention, the packet output unit 135 preferentially reads the management control packet from the second buffer unit 132 and sends the management control packet to the next adaptation module 130 in the control chain, and then reads the management response packet from the third buffer unit 134 and sends the management response packet to the next adaptation module 130 or the access control module 110 in the control chain.
In specific implementation, the management control message sent by the controller includes connection establishment, connection release, a read request, a write request, a read response, a write response, an insert request, an insert response, a delete request, a delete response, and the like, and after the controller completes access control, the management control message for releasing connection is sent to the access control module 110, so that the access control module 110 releases connection.
In the above-described embodiments, the access device of the hardware module in the network chip is described in detail, and the following description is made in detail by using the method of the embodiment to the access device of the hardware module in the network chip.
Another aspect of the present invention provides a method for accessing a hardware module in a network chip, which is applied to an access device for accessing a hardware module in a network chip, and the device includes an access control module, an address decoding module and an adaptation module associated with each hardware module in the network chip, each hardware module in the network chip has a corresponding number, the address decoding module is connected to the access control module, a plurality of adaptation modules are sequentially connected to form a control chain, the adaptation modules at the head and tail ends of each control chain are respectively connected to the address decoding module and the access control module, please refer to fig. 5, which includes:
s510, the access control module receives and analyzes the management control message sent by the controller, stores message information in the management control message, packages the management control message into a management control packet and sends the management control packet to the address decoding module; the management control message carries the number of the hardware module requesting access.
S520, the address decoding module performs address decoding on the management control packet, and sends the management control packet to a control chain to which an adaptation module associated with the hardware module belongs according to the number of the hardware module which requests access and is carried in the management control packet; the address decoding module stores the serial number of the hardware module associated with each adaptation module on each control chain.
S530, the adaptation module judges whether the serial number of the hardware module which is carried in the management control group and requires access is the serial number of the hardware module associated with the adaptation module, if not, the management control group is sent to the next adaptation module on the control chain; if yes, accessing the hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and sending the management response packet to the next adaptation module or access control module on the control chain.
And S540, the access control module reads message information in the management control message corresponding to the management response packet according to the management response packet, encapsulates the management response packet into the management response message, and sends the management response message to the controller.
Optionally, with reference to the embodiment shown in fig. 5, in some embodiments of the present invention, the apparatus further includes an output scheduling module, and the adaptation module at the tail end of each control chain is connected to the access control module through the output scheduling module, as shown in fig. 6, the method includes:
s610, the access control module receives and analyzes the management control message sent by the controller, stores message information in the management control message, packages the management control message into a management control packet and sends the management control packet to the address decoding module; the management control message carries the number of the hardware module requesting access.
S620, the address decoding module performs address decoding on the management control packet, and sends the management control packet to a control chain to which an adaptation module associated with the hardware module belongs according to the number of the hardware module which is requested to access and carried in the management control packet; the address decoding module stores the serial number of the hardware module associated with each adaptation module on each control chain.
S630, the adaptation module judges whether the serial number of the hardware module which is carried in the management control group and requires access is the serial number of the hardware module associated with the adaptation module, if not, the management control group is sent to the next adaptation module on the control chain; if yes, accessing the hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and sending the management response packet to the next adaptation module or the output scheduling module on the control chain.
S640, the output scheduling module receives the management response packets sent by the adaptation module at the tail end of each control chain, and sends the management response packets to the access control module in sequence according to the priority sequence of each control chain; the output scheduling module stores the priority sequence of each control chain.
S650, the access control module reads message information in the management control message corresponding to the management response packet according to the management response packet, encapsulates the management response packet into a management response message, and sends the management response message to the controller.
Further, in some embodiments of the present invention, step S610 includes:
and receiving a connection establishment request sent by the controller, and establishing connection with the controller according to the connection establishment request.
Receiving and analyzing the management control message sent by the controller, packaging the management control message into a management control packet, and sending the management control packet to an address decoding module; the management control message carries the number of the hardware module requesting access.
And storing the message information in the management control message.
Step S650 includes:
and receiving the management response packet sent by the output scheduling module, reading message information in the management control message corresponding to the management response packet according to the management response packet, packaging the management response packet into a management response message, and sending the management response message to the controller.
Further, in some embodiments of the present invention, in the process of performing step S610, after receiving the management control packet sent by the controller, the method further includes:
judging whether the management control message is effective or not, if not, discarding the management control message, and sending a response that the access request is invalid to the controller; and if so, analyzing the management control message.
Optionally, in some embodiments of the present invention, step S630 includes:
judging whether the number of the hardware module which requests access and is carried in the management control group is the number of the hardware module associated with the hardware module;
if not, storing the management control group to the first address;
if yes, accessing the hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and storing the management response packet to a second address different from the first address;
and reading the management control packet from the first address and the management response packet from the second address in sequence, and respectively sending the management control packet to a next adaptation module on the control chain and sending the management response packet to the next adaptation module or access control module on the control chain.
As can be seen from the above, in the method for accessing a hardware module in a network chip provided in the embodiments of the present invention, when a controller issues a management control message to access the hardware module in the network chip, each hardware module has an associated adaptation module, the adaptation modules are distributed on a plurality of control chains, and each hardware module is assigned with a corresponding number, so that the management control message can be sent to different control chains according to the number of the hardware module requesting access carried in the management control message, thereby implementing parallel and pipelined processing on the management control message, thereby reducing access delay of the hardware module in the network chip, and meanwhile, when access responses on different control chains have delay differences due to mutual independence of the control chains, even if the access speed on a control chain with a larger delay is slower, no blocking is caused to other control chains, thereby enabling non-blocking access to the hardware module in the network chip, the management control efficiency is effectively improved.
For a description of relevant steps in the method for accessing a hardware module in a network chip provided by the embodiment of the present invention, please refer to a detailed description of a corresponding part in an access device for a hardware module in a network chip provided by the embodiment of the present invention, and all of the detailed descriptions have corresponding effects that the access device for a hardware module in a network chip provided by the embodiment of the present invention has, and no further description is given here.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An access device of a hardware module in a network chip is characterized by comprising an access control module, an address decoding module and an adaptation module associated with each hardware module in the network chip, wherein each hardware module in the network chip has a corresponding number, the address decoding module is connected with the access control module, a plurality of adaptation modules are sequentially connected to form a control chain, and the adaptation modules at the head end and the tail end of each control chain are respectively connected with the address decoding module and the access control module;
the access control module is used for receiving and analyzing the management control message sent by the controller, storing message information in the management control message, packaging the management control message into a management control packet, and sending the management control packet to the address decoding module; the management control message carries the number of the hardware module requesting access;
the address decoding module is used for decoding the address of the management control packet and sending the management control packet to a control chain to which an adaptation module associated with the hardware module belongs according to the number of the hardware module which is carried in the management control packet and requests access; the address decoding module stores the serial number of the hardware module associated with each adaptation module on each control chain;
the adaptation module is used for judging whether the serial number of the hardware module which is carried in the management control group and requires access is the serial number of the hardware module associated with the adaptation module, and if not, the management control group is sent to the next adaptation module on the control chain; if so, accessing the hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and sending the management response packet to the next adaptation module or the access control module on the control chain;
the access control module is further configured to read message information in a management control message corresponding to the management response packet according to the management response packet, encapsulate the management response packet into a management response message, and send the management response message to the controller.
2. The apparatus according to claim 1, further comprising an output scheduling module, wherein the adaptation module at the tail end of each control chain is connected to the access control module through the output scheduling module;
the output scheduling module is used for receiving the management response packets sent by the adaptation module at the tail end of each control chain and sending the management response packets to the access control module in sequence according to the priority order of each control chain; the output scheduling module stores the priority sequence of each control chain.
3. The apparatus for accessing a hardware module in a network chip according to claim 2, wherein the access control module comprises: the device comprises a connection establishing unit, a message analyzing unit, a first caching unit and a message packaging unit;
the connection establishing unit is used for receiving a connection establishing request sent by the controller and establishing connection with the controller according to the connection establishing request;
the message analysis unit is used for receiving and analyzing the management control message sent by the controller, packaging the management control message into a management control packet and sending the management control packet to the address decoding module; the management control message carries the number of the hardware module requesting access;
the first cache unit is used for storing the message information in the management control message;
the message packaging unit is configured to receive a management response packet sent by the output scheduling module, read message information in a management control message corresponding to the management response packet from the first cache unit according to the management response packet, package the management response packet into a management response message, and send the management response message to the controller.
4. The apparatus for accessing a hardware module in a network chip according to claim 3, wherein the access control module further comprises a first determining unit;
the first determination unit is configured to determine whether the management control packet is valid after the packet analysis unit receives the management control packet sent by the controller, and if not, discard the management control packet and send a response that the access request is invalid to the controller; and if so, analyzing the management control message through the message analyzing unit.
5. The apparatus for accessing a hardware module in a network chip according to claim 1, wherein the adapting module comprises: a second judging unit, a second buffer unit, a grouping processing unit, a third buffer unit and a grouping output unit;
the second judging unit is configured to judge whether the number of the hardware module requesting access, which is carried in the management control packet, is the number of the hardware module associated with the second judging unit, and if not, send the management control packet to the second cache unit; if yes, the management control packet is sent to the packet processing unit;
the second cache unit is used for storing the management control packet;
the packet processing unit is used for accessing the hardware module associated with the packet processing unit according to the management control packet, generating a management response packet after the access is successful, and sending the management response packet to the third cache unit;
the third cache unit is used for storing the management response packet;
and the packet output unit is used for reading the management control packet from the second cache unit and the management response packet from the third cache unit in sequence, and respectively sending the management control packet to the next adaptation module on the control chain and sending the management response packet to the next adaptation module or the access control module on the control chain.
6. A method for accessing hardware modules in a network chip is characterized in that the method is applied to an access device of the hardware modules in the network chip, the device comprises an access control module, an address decoding module and an adapting module associated with each hardware module in the network chip, each hardware module in the network chip has a corresponding number, the address decoding module is connected with the access control module, a plurality of adapting modules are sequentially connected to form a control chain, the adapting modules at the head end and the tail end of each control chain are respectively connected with the address decoding module and the access control module, and the method comprises the following steps:
the access control module receives and analyzes a management control message sent by a controller, stores message information in the management control message, packages the management control message into a management control packet and sends the management control packet to the address decoding module; the management control message carries the number of the hardware module requesting access;
the address decoding module is used for decoding the address of the management control packet and sending the management control packet to a control chain to which an adaptation module associated with the hardware module belongs according to the number of the hardware module which is carried in the management control packet and requests to access; the address decoding module stores the serial number of the hardware module associated with each adaptation module on each control chain;
the adaptation module judges whether the serial number of the hardware module which is carried in the management control group and requires access is the serial number of the hardware module associated with the adaptation module, if not, the management control group is sent to the next adaptation module on the control chain; if so, accessing the hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and sending the management response packet to the next adaptation module or the access control module on the control chain;
and the access control module reads message information in a management control message corresponding to the management response packet according to the management response packet, encapsulates the management response packet into a management response message, and sends the management response message to the controller.
7. The method according to claim 6, wherein the apparatus further comprises an output scheduling module, the adaptation module at the tail end of each control chain is connected to the access control module through the output scheduling module, and the method further comprises:
the output scheduling module receives the management response packet sent by the adaptation module at the tail end of each control chain, and sequentially sends the management response packet to the access control module according to the priority order of each control chain; the output scheduling module stores the priority sequence of each control chain.
8. The method of claim 7,
the access control module receives and analyzes a management control message sent by a controller, stores message information in the management control message, packages the management control message into a management control packet, and sends the management control packet to the address decoding module, wherein the management control message carries the number of a hardware module requesting access, and the access control module comprises:
receiving a connection establishment request sent by the controller, and establishing connection with the controller according to the connection establishment request;
receiving and analyzing a management control message sent by the controller, packaging the management control message into a management control packet, and sending the management control packet to the address decoding module; the management control message carries the number of the hardware module requesting access;
storing message information in the management control message;
the access control module reads message information in a management control message corresponding to the management response packet according to the management response packet, encapsulates the management response packet into a management response message, and sends the management response message to the controller, and the method comprises the following steps:
and receiving a management response packet sent by the output scheduling module, reading message information in a management control message corresponding to the management response packet according to the management response packet, packaging the management response packet into a management response message, and sending the management response message to the controller.
9. The method of claim 8, wherein after receiving the management control message sent by the controller, the method further comprises:
judging whether the management control message is effective or not, if not, discarding the management control message, and sending a response that the access request is invalid to the controller; and if so, analyzing the management control message.
10. The method of claim 6,
the adaptation module judges whether the serial number of the hardware module which is carried in the management control group and requires access is the serial number of the hardware module associated with the adaptation module, if not, the management control group is sent to the next adaptation module on the control chain; if yes, accessing a hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and sending the management response packet to a next adaptation module on a control chain or the access control module, wherein the steps of:
judging whether the number of the hardware module which requests to access and is carried in the management control group is the number of the hardware module associated with the hardware module;
if not, storing the management control group to a first address;
if yes, accessing a hardware module associated with the management control packet according to the management control packet, generating a management response packet after the access is successful, and storing the management response packet to a second address different from the first address;
and reading the management control packet from the first address and the management response packet from the second address in sequence, and respectively sending the management control packet to a next adaptation module on a control chain and sending the management response packet to the next adaptation module or the access control module on the control chain.
CN202110571113.7A 2021-05-25 2021-05-25 Access device and method for hardware module in network chip Active CN113014606B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110571113.7A CN113014606B (en) 2021-05-25 2021-05-25 Access device and method for hardware module in network chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110571113.7A CN113014606B (en) 2021-05-25 2021-05-25 Access device and method for hardware module in network chip

Publications (2)

Publication Number Publication Date
CN113014606A CN113014606A (en) 2021-06-22
CN113014606B true CN113014606B (en) 2021-07-23

Family

ID=76380829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110571113.7A Active CN113014606B (en) 2021-05-25 2021-05-25 Access device and method for hardware module in network chip

Country Status (1)

Country Link
CN (1) CN113014606B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115871691B (en) * 2023-01-19 2023-05-26 禾多科技(北京)有限公司 Vehicle travel control method, apparatus, electronic device, and computer-readable medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604057A (en) * 2003-09-30 2005-04-06 国际商业机器公司 Method and system for hardware enforcement of logical partitioning of a channel adapter's resources in a system area network
CN102823190A (en) * 2010-03-26 2012-12-12 诺基亚公司 Method and apparatus for providing a trust level to access a resource
CN104539632A (en) * 2015-01-20 2015-04-22 中国人民解放军国防科学技术大学 Programmable network equipment managing and controlling method based on virtual address spaces
CN106815176A (en) * 2015-12-01 2017-06-09 马维尔国际贸易有限公司 For the system and method via flexible register access bus transfer access request
CN107209745A (en) * 2014-12-04 2017-09-26 惠普发展公司有限责任合伙企业 Access based on hwid to network storage resource

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9390283B2 (en) * 2014-04-02 2016-07-12 International Business Machines Corporation Controlling access in a dispersed storage network
EP3532970B1 (en) * 2016-10-25 2021-12-01 Michael Ratiner A system and method for securing electronic devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604057A (en) * 2003-09-30 2005-04-06 国际商业机器公司 Method and system for hardware enforcement of logical partitioning of a channel adapter's resources in a system area network
CN102823190A (en) * 2010-03-26 2012-12-12 诺基亚公司 Method and apparatus for providing a trust level to access a resource
CN107209745A (en) * 2014-12-04 2017-09-26 惠普发展公司有限责任合伙企业 Access based on hwid to network storage resource
CN104539632A (en) * 2015-01-20 2015-04-22 中国人民解放军国防科学技术大学 Programmable network equipment managing and controlling method based on virtual address spaces
CN106815176A (en) * 2015-12-01 2017-06-09 马维尔国际贸易有限公司 For the system and method via flexible register access bus transfer access request

Also Published As

Publication number Publication date
CN113014606A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
US9774651B2 (en) Method and apparatus for rapid data distribution
CN108494817A (en) Data transmission method, relevant apparatus and system
CN100493004C (en) Message mirroring method and network device for supporting the remote message mirror
WO2019227891A1 (en) Method and apparatus for implementing communication between nodes, and electronic device
JP5645269B2 (en) Network system
KR100798926B1 (en) Apparatus and method for forwarding packet in packet switch system
CN111740847B (en) High-speed network data transmission system and method based on FPGA
CN111682994B (en) Annular or linear network system based on EPA protocol and transmission method of non-real-time data
CN103312807A (en) Data transmission method, data transmission device and data transmission system
CN113691385A (en) Message processing and advertising method and device, network bridge node, source device and medium
WO2020073907A1 (en) Method and apparatus for updating forwarding entry
CN113014606B (en) Access device and method for hardware module in network chip
US10033830B2 (en) Requesting web pages and content rating information
CN114422617B (en) Message processing method, system and computer readable storage medium
CN103327129B (en) For the domain name analytic method of more WAN mouthfuls of gateway devices
CN112751788A (en) Double-plane switching method supporting multi-type frame mixed transmission
CN114490467B (en) Message processing DMA system and method of multi-core network processor
CN108614792B (en) 1394 transaction layer data packet storage management method and circuit
CN114124848B (en) Switch multi-monitoring port method based on VLID monitoring
WO2008003267A1 (en) An optical burst switching network based burst packet transmitting system and the method thereof
WO2024037366A1 (en) Forwarding rule issuing method, and intelligent network interface card and storage medium
CN107124482A (en) A kind of DNS data package transmitting method, system and router
CN108064441A (en) Method and system for accelerating network transmission optimization
US20230409506A1 (en) Data transmission method, device, network system, and storage medium
CN112671758B (en) Protocol conversion device, method, equipment and medium for Autbus bus and Modbus

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