CN115798543A - Method and equipment for counting RAM multiplexing by MAC port message - Google Patents

Method and equipment for counting RAM multiplexing by MAC port message Download PDF

Info

Publication number
CN115798543A
CN115798543A CN202111054238.9A CN202111054238A CN115798543A CN 115798543 A CN115798543 A CN 115798543A CN 202111054238 A CN202111054238 A CN 202111054238A CN 115798543 A CN115798543 A CN 115798543A
Authority
CN
China
Prior art keywords
random access
message
port
access memory
multiplexing
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.)
Pending
Application number
CN202111054238.9A
Other languages
Chinese (zh)
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.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications 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 Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202111054238.9A priority Critical patent/CN115798543A/en
Publication of CN115798543A publication Critical patent/CN115798543A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method and a device for counting RAM multiplexing by MAC port messages, wherein the device for counting RAM multiplexing by the MAC port messages comprises the following steps: a plurality of ports configured to receive or transmit messages; the random access memories are configured for being read and written by the ports to access so as to count the messages of the corresponding ports; at least one port of the plurality of ports is configured to: and the random access memory is connected with at least two random access memories so as to carry out read-write access on the at least two random access memories. According to the MAC port message statistic RAM multiplexing equipment, the total capacity of the port is larger, so that the longer time can be supported without overflowing, the frequency of reading a random access memory by a control unit is reduced, and the burden of the control unit is reduced. The multiplexing of the random access memory effectively reduces the area of a chip; and the manufacturing cost is reduced under the condition of meeting the same port rate.

Description

Method and equipment for counting RAM multiplexing by MAC port message
Technical Field
The invention relates to the technical field of network communication, in particular to a method and equipment for counting RAM (random access memory) multiplexing of an MAC (media access control) port message.
Background
In the device for counting the RAM multiplexing of the Ethernet MAC port message, the number of the message to be received and transmitted and the byte number of the message need to be counted based on the port ground according to the message format and the message length. The message types are, for example, multicast, unicast, broadcast, error message, control message, etc. For example, when a unicast message with a length of 65 bytes is received, the statistical module performs:
1. reading data in a column (messages ranging in length from 64 bytes to 128 bytes) of a Random Access Memory (RAM), the data comprising: the total number of messages and the total number of bytes that have been received before (messages with a length ranging from 64 bytes to 128 bytes); 2. adding 1 to the number of the read messages and 65 to the number of bytes; 3. the calculated total number of messages and the total number of bytes are written back to a column (messages with the length ranging from 64 bytes to 128 bytes) in the RAM.
2. Reading out data in a column (of a unicast type message) of a RAM, wherein the data comprises: the total number of messages and the total number of bytes that have been received before (messages of unicast type); 2. adding 1 to the number of the read messages and 65 to the number of bytes; 3. and writing the calculated message total number and the byte total number back to a column (of the unicast type message) in the RAM.
Therefore, when a message is received, the statistical module needs to read and write the 1R1W RAM for 2 times respectively; similarly, each time a message is sent, the statistical module needs to read and write 2 times to the 1R1W RAM.
Generally speaking, the port mode of the device with MAC port message statistics RAM multiplexing during operation is matchable. When the port is operating in the high rate mode, for example 800G, the packet rate can be as high as 1.2Gpps. As can be seen from the above, each time a message is received or sent, the RAM needs to be read and written twice. The RAM needs to be read and written 4.8G times per second, and if a 1R1W type RAM is adopted, the clock frequency needs to be 4.8GHZ. If 2 blocks of 1R1W RAM are used and data in the transmission direction and the reception direction are stored separately, the clock frequency needs to be 2.4GHZ.
As the clock frequency increases, the delay required for each gate circuit must be reduced to complete the same number of logic operations in one clock cycle, which results in increased chip foundry challenges and increased chip manufacturing costs.
In addition, the RAM storage space in the ASIC is relatively small, requiring software to periodically read data from the RAM, and ensuring that the software can read the data out of the RAM to be empty before the statistics in the RAM overflow. In the high-rate port mode, the RAM will fill up faster, while the slow processing speed and the many processing tasks of the software may make it impossible to read the RAM before it overflows.
In the prior art, each port fixedly corresponds to one RAM, and when a certain port is not enabled, the corresponding RAM is in an idle state, which causes resource waste
Therefore, there is a need for an improvement over existing MAC port message statistics RAM multiplexing devices.
Disclosure of Invention
In view of the above technical problems in the prior art, the present application provides an apparatus for multiplexing an MAC port packet statistics RAM, which multiplexes a random access memory for packet statistics of a high-rate port and packet statistics of other rates, so that the usage of the random access memory is effectively reduced without affecting the packet statistics performance of the high-rate port, and thus the total storage space of the random access memory is reduced, and the area and manufacturing cost of a chip are reduced.
The application provides a device for counting RAM multiplexing of MAC port messages, which comprises: a plurality of ports configured to receive or transmit messages; the random access memories are configured for being read and written by the ports to access so as to count the messages of the corresponding ports; at least one port of the plurality of ports is configured to: and the random access memory is connected with at least two random access memories so as to carry out read-write access on the at least two random access memories.
Optionally, at least one of the plurality of ports is connected to all the random access memories, so as to perform read-write access on all the random access memories.
Optionally, each of the ports is connected to at least one of the random access memories, so as to perform read-write access on the random access memory connected thereto.
Optionally, the method further comprises: and the message identification module can identify the number of the message start symbols and the number of the message end symbols of the message in the current clock period based on the content of the message.
Optionally, the packet identification module is configured to: generating and outputting the message type and the message length for the message ending in the current clock period; and for the messages which are not finished in the current clock period, calculating and latching the counted message types and the message lengths for outputting when the messages are finished.
Optionally, the method further comprises: the random access memory selection module can calculate all the random access memories owned by the current port based on the port speed of the current port, then calculate the random access memory to be read and written at present according to the number of messages which need to be counted at present and the selection condition of the random access memory read and written at last time, and read/operate/write back the message length and the message type of each message from the corresponding random access memory.
Optionally, the storage spaces of the plurality of random access memories are all equal.
Optionally, the method further comprises: a control unit configured to: and responding to a message reading instruction, reading all the data in the random access memory used by the corresponding port together, accumulating and outputting.
In order to achieve the above object, the present application further provides a method for MAC port packet statistics RAM multiplexing, which performs packet statistics by using the above device for MAC port packet statistics RAM multiplexing.
The invention realizes the statistics of the high-speed port on the premise of not losing the performance on the premise of not increasing the cost of the additional random access memory by multiplexing the random access memory; the chip area is effectively reduced; the utilization rate of the random access memory is increased, the storage capacity of a high-rate port is increased, and the processing burden of the control unit is lightened.
Drawings
Fig. 1 is a schematic structural diagram of each port and a corresponding random access memory in a first operation mode of an apparatus for MAC port packet statistics RAM multiplexing provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of each port in the MAC port packet statistics RAM multiplexing device and a random access memory corresponding to each port in a second operation mode according to the embodiment of the present application;
fig. 3 is a schematic structural diagram of each port in the MAC port packet statistics RAM multiplexing device and a random access memory corresponding to each port in a third operating mode according to the embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a process of accessing a random access memory during message transmission according to an embodiment of the present application.
Detailed Description
Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings. However, the present application is not limited to the following embodiments, but includes various changes, substitutions, and alterations within the technical scope of the present disclosure. The terms "first," "second," and the like may be used to explain various elements, the number of elements is not limited by such terms. These terms are only used to distinguish one element from another. Thus, an element referred to as a first element in one embodiment may be referred to as a second element in another embodiment. The singular forms "a", "an" and "the" do not exclude the plural forms unless the context requires otherwise. The following description of the embodiments of the present application is provided for illustrative purposes, and other advantages and capabilities of the present application will become apparent to those skilled in the art from the present disclosure.
Examples
The embodiment provides a device for multiplexing MAC port packet statistics RAM, as shown in fig. 1, which takes eight ports 1 as an example for explanation, and the following are respectively: a first port 11, a second port 12, a third port 13, a fourth port 14, a fifth port 15, a sixth port 16, a seventh port 17, and an eighth port 18, each port 1 being configured to receive or transmit a message; the equipment for counting the RAM multiplexing of the MAC port message also comprises a plurality of random access memories 2 which are configured to be used for reading and/or writing access of eight ports 1 so as to count the message information (such as the number of messages, the length of the messages and the number of bytes of the messages) of the messages received and sent by the ports 1; in the present embodiment, the number of the random access memories 2 is also set to eight, and the number is respectively the first random access memory 21, the second random access memory 22, the third random access memory 23, the fourth random access memory 24, the fifth random access memory 25, the sixth random access memory 26, the seventh random access memory 27, and the eighth random access memory 28.
Take the example that the maximum port bandwidth supported by each random access memory 2 is 100 Gbps.
The MAC port packet statistics RAM multiplexing device provided in this embodiment can operate in at least three operation modes, a first operation mode, as shown in fig. 1: the first port 11 is communicatively connected to the first random access memory 21 to the eighth random access memory 28, so that the MAC port packet statistics RAM multiplexing device can operate in a mode with a port rate of 800G.
Second operating mode, as shown in fig. 2: the first port 11 to the eighth port 18 are correspondingly connected with the first random access memory 21 to the eighth random access memory 28 in a communication way, so that the equipment with the MAC port message statistics RAM multiplexing can operate in an eight 100G port mode.
A third operating mode, as shown in fig. 3: the first port 11 is connected with the first random access memories 21 to the fourth random access memories 24 in a communication mode, the fifth port 15 is connected with the fifth random access memories 25 and the sixth random access memories 26 in a communication mode, the seventh port 17 is connected with the seventh random access memories 27 in a communication mode, and the eighth port 18 is connected with the eighth random access memories 28 in a communication mode, so that the MAC port message statistics RAM multiplexing equipment can operate in an operation mode of one 400G port, one 200G port and two 100G ports.
Optionally, in this embodiment, the MAC port packet statistics RAM multiplexing device may adaptively switch among the first operation mode, the second operation mode, and the third operation mode based on a usage requirement, so as to match port statistics of ports with different rates on the premise that the random access memory 2 is not additionally provided.
It should be noted that the number of ports 1, the number of random access memories 2, and the combination of the ports 1 and the random access memories 2 in the first to third operation modes are shown in this embodiment, which are only exemplary illustrations of the present application and are not limitations of the present application. Based on the present application, the skilled person will know: the port 1 and the random access memory 2 of the equipment for counting RAM multiplexing by the MAC port message can be set based on the use requirement, and the port 1 and the random access memory 2 can be freely combined based on the use requirement in each operation mode as long as the requirements are met: at least one port 1 of the plurality of ports 1 is configured to: it is sufficient to connect at least two random access memories 2 for read-write access to at least two random access memories 2.
Optionally, as shown in fig. 4, the apparatus for MAC port packet statistics RAM multiplexing provided in this embodiment further includes: the message identification module 3 can identify the number of the message start symbol and the number of the message end symbol of the message in the current clock cycle based on the content of the message, and accordingly, the number of the messages in the current clock cycle is determined.
Optionally, the packet identifying module 3 is configured to: generating and outputting the message type and the message length of the message ending in the current clock period;
and for the message which is not finished in the current clock period, calculating and latching the counted message type and message length for outputting when the message is finished.
Optionally, with continued reference to fig. 4, the apparatus for mac port packet statistics RAM multiplexing further includes: the random access memory selection module 4 can calculate the random access memory 2 owned by the current port 1 based on the port rate of the current port 1, then calculate the random access memory 2 to be read and written currently according to the number of messages which need to be counted currently and the selection condition of the random access memory 2 read and written last time, and read/operate/write back the message length and the message type of each message from the corresponding random access memory 2, thereby realizing the switching of the port 1 between different operation modes.
Alternatively, the random access memory selection module 4 may employ a polling mechanism to achieve substantially the same rate of increase of the values in the respective random access memories 2.
Optionally, the apparatus for MAC port packet statistics RAM multiplexing further includes: a control unit (not shown) configured to: and responding to a message reading instruction, reading all data in the random access memories 2 used by the corresponding ports 1 together, accumulating and outputting the data, and thus, the problem that the number of bytes and the number of messages read are not matched due to delay in reading each random access memory 2 can be avoided.
The MAC port packet statistics RAM multiplexing device provided in this embodiment allocates a plurality of random access memories 2 to one port 1, and has at least the following advantages compared to a scheme in which a single random access memory 2 is allocated to one port 1:
(1) the total capacity of the port 1 is larger and therefore can support longer time without overflowing, thereby realizing the reduction of the frequency of the control unit to read the random access memory 2 and lightening the burden of the control unit.
(2) The multiplexing of the random access memory 2 effectively reduces the area of the chip; and the manufacturing cost is reduced under the condition of meeting the same port rate.
Optionally, this embodiment provides a method for MAC port packet statistics RAM multiplexing, where the above-described device for MAC port packet statistics RAM multiplexing is used to perform packet statistics.
The above embodiments are merely illustrative of the principles and utilities of the present application and are not intended to limit the present application. Any person skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present application. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical concepts disclosed in the present application shall be covered by the claims of the present application.

Claims (9)

1. An apparatus for counting RAM multiplexing of MAC port message is characterized in that the apparatus comprises:
a plurality of ports configured to receive or transmit messages; and
the random access memories are configured for being read and written by the ports to access so as to count the messages of the corresponding ports;
at least one port of the plurality of ports is configured to: and the random access memory is connected with at least two random access memories so as to carry out read-write access on the at least two random access memories.
2. The MAC port packet statistics RAM multiplexing device of claim 1, wherein at least one of the plurality of ports is connected to all of the random access memories for read and write access to all of the random access memories.
3. The MAC port packet statistics RAM multiplexing device of claim 1, wherein each of said ports is connected to at least one of said random access memories for read and write access to said random access memory connected thereto.
4. The apparatus for MAC port packet statistics RAM multiplexing according to any of claims 1-3, further comprising:
and the message identification module can identify the number of the message start symbols and the number of the message end symbols of the message in the current clock cycle based on the content of the message.
5. The apparatus for MAC port message statistics RAM multiplexing of claim 4, wherein the message identification module is configured to: generating and outputting a message type and a message length for the message ending in the current clock period;
and for the messages which are not finished in the current clock period, calculating and latching the counted message types and the message lengths for outputting when the messages are finished.
6. The apparatus for MAC port packet statistics RAM multiplexing according to any of claims 1-3, 5, further comprising:
the random access memory selection module can calculate all the random access memories owned by the current port based on the port speed of the current port, then calculate the random access memory to be read and written at present according to the number of messages which need to be counted at present and the selection condition of the random access memory read and written at last time, and read/operate/write back the message length and the message type of each message from the corresponding random access memory.
7. The apparatus for MAC port message statistics RAM multiplexing according to any of claims 1-3, 5, wherein the plurality of random access memories have equal storage space.
8. The apparatus for MAC port packet statistics RAM multiplexing according to any of claims 1-3, 5, further comprising:
a control unit configured to: and responding to a message reading instruction, reading all data in the random access memory used by the corresponding port together, accumulating and outputting.
9. A method for counting the multiplexing of the message on the MAC port into the RAM, which is characterized in that the message counting is performed by the device for counting the multiplexing of the message on the MAC port according to any one of claims 1 to 8.
CN202111054238.9A 2021-09-09 2021-09-09 Method and equipment for counting RAM multiplexing by MAC port message Pending CN115798543A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111054238.9A CN115798543A (en) 2021-09-09 2021-09-09 Method and equipment for counting RAM multiplexing by MAC port message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111054238.9A CN115798543A (en) 2021-09-09 2021-09-09 Method and equipment for counting RAM multiplexing by MAC port message

Publications (1)

Publication Number Publication Date
CN115798543A true CN115798543A (en) 2023-03-14

Family

ID=85473453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111054238.9A Pending CN115798543A (en) 2021-09-09 2021-09-09 Method and equipment for counting RAM multiplexing by MAC port message

Country Status (1)

Country Link
CN (1) CN115798543A (en)

Similar Documents

Publication Publication Date Title
US8310934B2 (en) Method and device for controlling information channel flow
US7684326B2 (en) Methods and structures for improved buffer management and dynamic adaptation of flow control status in high-speed communication networks
CN112154630A (en) Shaping traffic on PLCA-supported 10SPE networks
CN100355239C (en) Management information interactive system and special interface card and master control card in network equipment
CN1993687A (en) Message administrator and method for controlling access to data of the message memory of a communications component
CN108199976B (en) Switching equipment, switching system and data sending method of RapidIO network
US10237870B2 (en) Managing orthogonal frequency division multiple access uplink operations
US7724683B2 (en) Arrangements for controlling multiple MAC interfaces
CN105812063B (en) Network on mating plate system based on statistic multiplexing and communication means
CN113051204A (en) Serial backplane bus communication method and system
CN114490467A (en) Message processing DMA (direct memory access) system and method of multi-core network processor
CN105532046A (en) Power savings with preamble in WLAN systems
CN115798543A (en) Method and equipment for counting RAM multiplexing by MAC port message
CN100499563C (en) Increasing memory access efficiency for packet applications
EP2761825B1 (en) Credit based power management
CN101702714B (en) Method, system, and apparatus for a credit based flow control in a computer system
CN102932265A (en) Data caching management device and method
CN115967752A (en) Communication protocol implementation method and communication system
CN109484430A (en) The data framing method and device of high-speed magnetic floating onboard wireless electric control unit
CN117499351A (en) Message forwarding device and method, communication chip and network equipment
CN114978430A (en) Data sending method and terminal equipment
CN107241404B (en) Method, device and system for receiving and transmitting messages
US20210399992A1 (en) Service transmitting method and device, and service receiving method and device
KR100720709B1 (en) Wireless usb system
CN117858262B (en) Base station resource scheduling optimization method, device, base station, equipment, medium and product

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