CN114124848B - Switch multi-monitoring port method based on VLID monitoring - Google Patents

Switch multi-monitoring port method based on VLID monitoring Download PDF

Info

Publication number
CN114124848B
CN114124848B CN202111286030.XA CN202111286030A CN114124848B CN 114124848 B CN114124848 B CN 114124848B CN 202111286030 A CN202111286030 A CN 202111286030A CN 114124848 B CN114124848 B CN 114124848B
Authority
CN
China
Prior art keywords
monitoring
port
frame
communication port
message frame
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
CN202111286030.XA
Other languages
Chinese (zh)
Other versions
CN114124848A (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.)
Xi'an Yunwei Zhilian Technology Co ltd
Original Assignee
Xi'an Yunwei Zhilian Technology 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 Xi'an Yunwei Zhilian Technology Co ltd filed Critical Xi'an Yunwei Zhilian Technology Co ltd
Priority to CN202111286030.XA priority Critical patent/CN114124848B/en
Publication of CN114124848A publication Critical patent/CN114124848A/en
Application granted granted Critical
Publication of CN114124848B publication Critical patent/CN114124848B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • H04L47/6225Fixed service order, e.g. Round Robin
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9021Plurality of buffers per packet

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a switch multi-monitoring port method based on VLID monitoring, which specifically comprises the following steps: step 1: according to the communication port, establishing a communication port cache, establishing a monitoring lookup table, establishing a monitoring port cache and configuring a CT (computed tomography) mark register; step 2: setting a corresponding frame filtering module at each communication port; step 3: reading out and writing the message frame stored in each communication port cache into the corresponding monitoring port cache of the communication port cache; step 4: each monitoring port corresponds to M monitoring port caches, and when part or all of the M monitoring port caches store message frames, the stored message frames are read out through algorithm polling and then sent to the monitoring ports. The method greatly improves the monitored information quantity, coverage, accuracy and time sequence.

Description

Switch multi-monitoring port method based on VLID monitoring
Technical Field
The invention belongs to the field of computer networks, and particularly relates to a switch multi-monitoring port method based on VLID monitoring.
Background
The switch in the computer network is a very important ring in the network structure, the monitoring of the current common Ethernet switch has only one monitoring port, and a communication port is temporarily set as the monitoring port, and the monitoring of the received message or the transmitted message of a specified single communication port can only be realized, and the input frames with specified fields in all communication ports cannot be monitored, the monitored message frames cannot be prioritized, and the frame content received by the communication port and the frame content output by the monitoring port have larger delay. Therefore, the monitoring technology of the traditional network switch mostly cannot pay attention to the diversity of monitoring functions, so that the problems of large monitoring bandwidth, single coverage port, no screening, low efficiency, high delay and the like are caused.
Disclosure of Invention
In order to solve the technical problems of large monitoring bandwidth, single coverage port, no screening, low efficiency and high delay existing in the common switch, the invention aims to provide a switch multi-monitoring port method based on VLID monitoring.
In order to achieve the above purpose, the invention adopts the following technical scheme:
A switch multi-monitoring port method based on VLID monitoring, wherein a processing chip of the switch is an FPGA chip, and the method specifically comprises the following steps:
Step 1: according to the communication port, establishing a communication port cache, establishing a monitoring lookup table, establishing a monitoring port cache and configuring a CT (computed tomography) mark register;
step 2: setting a corresponding frame filtering module at each communication port, wherein the frame filtering module is used for filtering all message frames received from the corresponding communication port;
Step 3: reading out and writing the message frame stored in each communication port cache into the corresponding monitoring port cache of the communication port cache;
Step 4: each monitoring port corresponds to M monitoring port caches, and when part or all of the M monitoring port caches store message frames, the stored message frames are read out through polling of a Round Robin algorithm and then sent to the monitoring ports.
Further, the step 1 specifically includes the following sub-steps:
step 1_1, establishing a corresponding communication port cache for each communication port, wherein M is more than or equal to 2;
Step 1_2, a monitoring lookup table is established, and a plurality of communication port caches share 1 monitoring lookup table; the VLID value and the monitoring port selection parameter monitor_sel [ N-1:0] are prestored in the monitoring lookup table, the N-1 bit is 1 and represents that a message frame containing an address corresponding to the VLID value is sent out from the monitoring port N, the current message frame is 0 and is not sent out from the monitoring port N, N is the number of the monitoring ports, and N is more than or equal to 2;
step 1_3, a monitoring port cache is established, each communication port cache is guaranteed to correspond to N monitoring port caches, and M multiplied by N monitoring port caches are shared;
step 1_4, configuring a CT flag register.
Furthermore, each communication port cache is a RAM with a storage space of 8KB, the data bit width of the RAM is 64 bits, and the depth of the RAM is 1KB; 1 monitoring lookup table is shared by every 8 communication port caches; each monitoring port cache is 8KB in size; the configuration CT flag register is a 32-bit software readable and writable register.
Further, the monitoring lookup table is a RAM with a storage space of n×64KB, specifically, a data bit width of Nbit, an address bit width of 16 bits, and a depth of 64KB; wherein the 16-bit address bit width corresponds to a VLID value from 0 to 65535; the N bits bit width corresponds to monitor_sel [ N-1:0].
Further, the operation of the frame filtering module in the step 2 includes the following steps:
Step 2_01, writing a frame of message received by each communication port into a corresponding communication port buffer;
Step 2_02, obtaining the value in the CT flag register, and simultaneously detecting Ctmark and VLID of the frame header of the message frame in the communication port cache and recording;
Step 2_03, taking the VLID value detected in step 2_02 as a 16-bit address of a monitoring lookup table, and inquiring the monitoring lookup table to obtain a monitoring port selection parameter monitor_sel [ N-1:0];
Step 2_04, writing monitor_sel [ N-1:0] into the communication port cache;
step 2_05, writing the frame length byte number of the current message frame into a communication port cache, wherein the frame length does not contain monitoring port selection parameters and the byte length occupied by the frame length;
step 2_06, judging whether the value of the configuration CT flag register obtained in step 2_02 is equal to Ctmark, if so, executing step 2_07, otherwise, executing step 2_08;
Step 2_07, judging whether monitor_sel [ N-1:0] is equal to 0, if so, executing step 2_09, otherwise, executing step 2_08;
step 2_08, deleting the current message frame content from the communication port cache;
step 2_09, the operation execution of the frame filtering module ends.
Further, the message frame received from the communication port includes a destination MAC address, a source MAC address, a type, and a frame content; the destination MAC address consists of Ctmark and VLID;
the message frames in the communication port cache comprise monitoring port selection parameters, frame length, destination MAC address, source MAC address, type and frame content; the destination MAC address consists of Ctmark and VLID.
Further, the step 3 includes the following sub-steps:
Step 3_01, when the communication port buffer is not empty, reading the frame header of a frame of message frame in the communication port buffer, and obtaining monitor_sel [ N-1:0], wherein N=4;
Step 3_02, judging whether monitor_sel [3:0] =0001 is true, executing step 3_05 if yes, otherwise executing step 3_03;
Step 3_03, judging whether monitor_sel [3:0] =0010 is satisfied, if yes, executing step 3_06, otherwise, executing step 3_04;
Step 3_04, judging whether monitor_sel [3:0] =0100 is true, executing step 3_07 if yes, otherwise executing step 3_08;
Step 3_05, judging whether the monitoring port buffer 1 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_09, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
step 3_06, judging whether the monitoring port buffer memory 2 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_10, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_07, judging whether the monitoring port buffer memory 3 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_11, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_08, judging whether the monitoring port buffer 4 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_12, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_09, the message frame is read and written into the corresponding channel monitoring port buffer 1, and then the process is finished; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_10, reading the message frame, writing the message frame into the corresponding channel monitoring port cache 2, and ending; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
step 3_11, reading the message frame, writing the message frame into the corresponding channel monitoring port buffer 3, and ending; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_12, the read message frame is written into the corresponding channel monitoring port buffer 4, and then the process is finished. The channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_13, discard after reading the message frame, and then end.
Further, the step 4 specifically includes the following sub-steps:
Step 4_1, when traversing and judging whether the buffer non-empty of M monitoring ports corresponding to a certain monitoring port is established, executing step 4_2 if the buffer non-empty of M monitoring ports is established, otherwise executing step 4_1;
step 4_2, M monitoring port caches generate a polling request, and then step 4_3 is executed;
Step 4_3, polling and generating a sending request by a Round Robin algorithm, wherein the sending request corresponds to one of M monitoring port caches, and then executing step 4_4;
And 4_4, reading a frame of message frame in the monitoring port cache corresponding to the sending request, and sending the message frame to the corresponding monitoring port.
And 4_5, ending the transmission of the message frame of the round.
Further, the frame format sent to the monitor port includes a destination MAC address, a source MAC address, a type, and a frame content, the destination MAC address being composed of Ctmark and VLID.
Compared with the prior art, the invention has the following technical effects:
The technical effect of the step 1 of the invention is as follows: as shown in fig. 1, the switch architecture is provided with M communication ports and N monitoring ports, each monitoring port represents a priority level, N monitoring priorities are set according to the number of monitoring ports, and the message frame received by each communication port queries the monitoring lookup table according to the parsed VLID field to determine from which priority monitoring port the current frame is output, so that prioritizing the monitoring content is a great advantage of the present invention. The N priorities are divided, so that a user can monitor the message frames received by the communication port according to the weight concerned by the user, the time and effort and personnel resources for analyzing the message frames by the user are greatly saved, and the accurate positioning of the monitoring function is realized.
The technical effect of the step 2_03 of the invention is as follows: the traditional lookup method needs to traverse all addresses of the monitoring lookup table for finding out the data content matched with the VLID, so that the query time is long and the efficiency is low. In contrast, step 2_03 proposes to look up the VLID value as the address of the monitoring lookup table to obtain the monitoring port selection parameter monitor_sel [ N-1:0], so that only one accurate address query is required to obtain the result, and the query time is greatly shortened.
The technical effect of the step 2 of the invention is as follows: the traditional Ethernet switch monitoring function can only monitor the whole content of a single communication port, has no filtering function, and a user needs to manually screen the required message frames when viewing the monitored content. The method comprises the steps of adding a filtering module to each communication port, and outputting the message frames needing to be monitored from the monitoring port by customizing and intelligently filtering VLID fields in the message frames and discarding the message frames needing not to be monitored. The customized intelligent filtering of the monitoring content is an advantage which is not possessed by the conventional common switch. Because the monitored content of the user is smaller than all the messages, the filtering function of the invention greatly improves the monitoring efficiency and the effective monitoring bandwidth.
The technical effect of the step 4 of the invention is as follows: the traditional Ethernet switch monitoring port can only monitor the message frame of one communication port; in this step, each monitoring port corresponds to M monitoring port caches, and the M monitoring port caches correspond to M communication ports respectively. Each monitoring port can monitor M communication ports simultaneously. This feature is an important advantage of the switch in the present invention.
In order to solve the problem of ordering of message frames output from one monitoring port in the M monitoring port caches, the invention proposes to apply a Round Robin algorithm therein. The Round Robin algorithm is used for determining which monitoring port is preferred to read the message frames from, and the message frames read preferentially are sent out from the monitoring ports preferentially. According to the Round Robin polling principle, which monitoring port buffer stores message frames preferentially reads one frame of message frame in which monitoring port buffer preferentially, which maintains the time ordering characteristic of message frames to a certain extent, namely, first-come first-served monitoring. The Round Robin algorithm is applied to the switch monitoring function so as to solve the problem of monitoring content ordering, which is not available in the traditional switch.
The message frames received by all communication ports are monitored simultaneously by one monitoring port, and the message frames are arranged basically according to the sequence of the received messages. The utilization efficiency and the effective bandwidth of a single monitoring port are improved, and the method has the advantage of processing monitoring content in batches.
In summary, in order to solve various drawbacks of the conventional switch monitoring technology, the present invention makes a significant improvement on the monitoring function. The method comprises the steps that a plurality of special monitoring ports are arranged, each monitoring port independently operates, the monitoring ports work simultaneously, resources of normal communication ports are not preempted, the monitoring ports can monitor more message frame contents, and monitoring bandwidth is greatly improved, so that monitoring traffic is improved. Meanwhile, the priority is divided for the monitoring ports, so that the monitored contents are classified according to the weight, the attention of users to the concerned contents is improved, one monitoring port covers the frame contents of all communication ports, one monitoring port focuses on one priority of the message frame, and the message frames obtained by one monitoring port are basically in time sequence. In addition, adding a filtering function at each communication port directly discards all message frames that are not of interest to the user. Thereby greatly improving the monitored information quantity, coverage, accuracy and time sequence. Finally, the monitoring function of the invention is realized by the FPGA chip, and the advantage of high-speed parallel processing of the FPGA is fully utilized, so that the low-delay characteristic exists between the frame content output by the monitoring port and the frame content received by the communication port, which is also one of the important advantages of the invention.
Drawings
FIG. 1 is a block diagram of VLID-based monitoring logic (M communication ports N monitoring ports);
FIG. 2 is a block diagram of VLID-based monitoring logic (M communication ports 4 monitoring ports); the broken line part in the figure represents the frame filtering module;
FIG. 3 is a frame filtering flow chart;
FIG. 4 is a frame format received by a communication port;
FIG. 5 is a monitoring look-up table lookup process;
FIG. 6 is a frame format written to a communication port buffer;
FIG. 7 is a flow chart of a write monitor port cache;
FIG. 8 is a write monitor port cache frame format;
FIG. 9 is a flow chart of monitoring port buffer frame transmission;
fig. 10 is a frame format sent to the monitor port.
The invention is further explained below with reference to the drawing and the specific embodiments.
Detailed Description
First, the technical terms involved in the present invention are described as follows:
Ctmark and VLID refer to the high 4-byte field and the low 2-byte field, respectively, of the ethernet frame destination MAC address, see fig. 4.
Communication port: refers to the port of the switch that performs normal routing switching.
Monitoring ports: refers to ports dedicated to monitoring communication port message frames.
The overall logic block diagram of the switch multi-monitoring port method based on VLID monitoring provided by the embodiment is shown in figure 1; wherein, the MAC_1-MAC_M are communication ports 1-M, and monitor_MAC_1-monitor_MAC_N monitors ports 1-N. For convenience of description, a logic block diagram of 4 monitor ports of M communication ports is taken as an example to explain the N value as 4 (see fig. 2).
In the switch multi-monitoring port method based on VLID monitoring, the processing chip of the switch is an FPGA chip, and the method specifically comprises the following steps:
Step 1: according to the communication port, a communication port cache is established, a monitoring lookup table is established, a monitoring port cache is established, and a CT flag register reg_Cfg_ Ctmark is configured. The method specifically comprises the following substeps:
Step 1_1, a communication port cache is built, specifically: establishing a corresponding communication port cache for each communication port, wherein M communication ports share M communication port caches; preferably, each communication port cache is a RAM with a storage space of 8KB, and the data bit width is 64 bits and the depth is 1KB;
Step 1_2, a monitoring lookup table is established, and 1 monitoring lookup table is guaranteed to be shared by every 8 communication port caches, and 1 monitoring lookup table is shared by less than 8 communication port caches;
In the invention, M is the number of communication ports (M is more than or equal to 2), and N is the number of monitoring ports (N is more than or equal to 2). Each monitoring lookup table is a RAM with a storage space of N multiplied by 64KB, namely, the data bit width is Nbit, the address bit width is 16 bits, and the depth is 64KB; the monitoring lookup table is a table pre-written by software, wherein the bit width of the 16-bit address corresponds to a VLID value from 0 to 65535; n-bit data bit width corresponds to a monitor port selection parameter monitor_sel [ N-1:0], the N-1 bit is 1 and represents that the current message frame is sent out from the monitor port N, and the N-1 bit is 0 and represents that the current message frame is not sent out from the monitor port N;
In the invention, N not only represents the number of monitoring ports, but also represents the number of monitoring priorities. Each monitoring port represents a priority, the level of which is determined by the user himself. For each frame of message received by the communication port, the monitoring lookup table is queried through the analyzed VLID value, and the obtained monitoring port selection parameter is monitor_sel [ N-1:0]. An N-1 bit of 1 indicates that a message frame containing the address is sent from the monitoring port N.
For convenience of description, the value of N is set to 4 in the embodiment, that is, the present invention is described by taking 4 monitor ports as an example.
And step 1_3, establishing monitoring port caches, wherein each communication port cache corresponds to N monitoring port caches, M multiplied by N monitoring port caches are all guaranteed, and the size of each monitoring port cache is 8KB.
For convenience of description, the value of N is 4 in the drawings other than fig. 1.
Step 1_4, the configuration CT flag register Reg_Cfg_ Ctmark is a 32-bit software readable/writable register, which is used to provide filtering comparison in step 2. The registers are typically configured by a software person via a bus, typically a PCIE bus, a PCI bus, or other type of bus, that operates the CPU to connect to the FPGA. The value of reg_cfg_ Ctmark is typically configured prior to use of the switch, which typically does not change during use.
Step 1 innovation point: as shown in fig. 1, the switch architecture is provided with M communication ports and N monitoring ports, each monitoring port represents a priority level, N monitoring priorities are set according to the number of monitoring ports, and the message frame received by each communication port queries the monitoring lookup table according to the parsed VLID field to determine from which priority monitoring port the current frame is output, so that prioritizing the monitoring content is a great advantage of the present invention. The N priorities are divided, so that a user can monitor the message frames received by the communication port according to the weight concerned by the user, the time and effort and personnel resources for analyzing the message frames by the user are greatly saved, and the accurate positioning of the monitoring function is realized.
Step 2: and setting a corresponding frame filtering module at each communication port, wherein the frame filtering module is used for filtering all message frames received from the corresponding communication ports and filtering out message frames which do not need to be monitored.
As shown in fig. 3, the operation of the frame filtering module specifically includes the following sub-steps:
Note that: this step is described by setting n=4, and 0x is a 16-ary representation.
Step 2_01, writing a frame of message received by each communication port into a corresponding communication port buffer; the message frame format received from the communication port is shown in fig. 4 and includes a destination MAC address (consisting of Ctmark and VLID), a source MAC address, a type, and frame content;
step 2_02, obtaining the value in the CT flag register reg_cfg_ Ctmark, and simultaneously detecting and recording Ctmark and VLID of the frame header of the message frame in the communication port buffer;
step 2_03, taking the VLID value detected in step 2_02 as a 16-bit address of a monitoring lookup table, and inquiring the monitoring lookup table to obtain a monitoring port selection parameter monitor_sel [ N-1:0]; the query process is as shown in FIG. 5 below, and the VLID value obtained in step 2_02 is 0xABCD, then the address 0xABCD of the monitoring lookup table is queried, and the value of the monitoring port selection parameter monitor_sel [ N-1:0] is 0xE.
The traditional lookup method needs to traverse all addresses of the monitoring lookup table for finding out the data content matched with the VLID, so that the query time is long and the efficiency is low. In contrast, step 2_03 proposes to look up the VLID value as the address of the monitoring lookup table to obtain the monitoring port selection parameter monitor_sel [ N-1:0], so that only one query is required to obtain the result, and the query time is greatly shortened.
Step 2_04, writing monitor_sel [ N-1:0] into the communication port cache;
step 2_05, writing the frame length byte number of the current message frame into a communication port cache, wherein the frame length does not contain monitoring port selection parameters and the byte length occupied by the frame length;
Step 2_06, judging whether the value of the configuration CT flag register reg_cfg_ Ctmark obtained in step 2_02 is equal to Ctmark, if so, executing step 2_07, otherwise, executing step 2_08;
Step 2_07, judging whether monitor_sel [ N-1:0] is equal to 0, if so, executing step 2_09, otherwise, executing step 2_08;
step 2_08, deleting the current message frame content from the communication port cache;
in step 2_09, the operation of the frame filtering module is finished, and the format of the message frame in the communication port buffer is shown in fig. 6, including the monitoring port selection parameter, the frame length, the destination MAC address (which is composed of Ctmark and VLID), the source MAC address, the type and the frame content.
The traditional switch monitoring function can only monitor the whole content of a single communication port and does not have a filtering function. In contrast, step 2 adds a filtering module to each communication port, filters the VLID field in the message frame, discards the message frame which does not need to be monitored, and outputs the message frame which needs to be monitored from the monitoring port.
Step 3: reading out and writing the message frames stored in each communication port cache into the corresponding 4 monitoring port caches of the communication port cache; because of the advantage of parallel operation of the FPGA, the process of reading and writing the message frames buffered by the M communication ports into the monitoring port buffer is performed simultaneously, and the flow is shown in fig. 7, and the specific operation steps are as follows:
note that: this step is described with n=4.
Step 3_01, when the communication port buffer is not empty, reading the frame header of a frame of message frame in the communication port buffer, and obtaining monitor_sel [ N-1:0] (taking n=4);
Step 3_02, judging whether monitor_sel [3:0] =0001 (2 scale) is true, executing step 3_05 if yes, otherwise executing step 3_03;
Step 3_03, judging whether monitor_sel [3:0] =0010 (2 scale) is true, executing step 3_06 if yes, otherwise executing step 3_04;
step 3_04, judging whether monitor_sel [3:0] =0100 (2 scale) is true, executing step 3_07 if yes, otherwise executing step 3_08;
Step 3_05, judging whether the monitoring port buffer 1 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_09, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
step 3_06, judging whether the monitoring port buffer memory 2 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_10, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_07, judging whether the monitoring port buffer memory 3 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_11, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_08, judging whether the monitoring port buffer 4 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_12, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_09, the message frame is read and written into the corresponding channel monitoring port buffer 1, and then the process is finished; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_10, reading the message frame, writing the message frame into the corresponding channel monitoring port cache 2, and ending; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
step 3_11, reading the message frame, writing the message frame into the corresponding channel monitoring port buffer 3, and ending; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_12, the read message frame is written into the corresponding channel monitoring port buffer 4, and then the process is finished. The channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_13, discard after reading the message frame, and then end.
Step 4: each monitoring port corresponds to M monitoring port caches, and when part or all of the M monitoring port caches store message frames, the stored message frames are read out through polling of a Round Robin algorithm and then sent to the monitoring ports. Due to the parallel running nature of the FPGA, N (n=4) monitor ports in the example are simultaneously sending polling message frames.
The flow chart of this step is shown in FIG. 9, annotating: this step is described with n=4.
The specific operation substeps are as follows:
Step 4_1, when traversing and judging whether the buffer non-empty of M monitoring ports corresponding to a certain monitoring port is established, executing step 4_2 if the buffer non-empty of M monitoring ports is established, otherwise executing step 4_1;
step 4_2, M monitoring port caches generate a polling request, and then step 4_3 is executed;
Step 4_3, polling and generating a sending request by a Round Robin algorithm, wherein the sending request corresponds to one of M monitoring port caches, and then executing step 4_4;
The principle of the Round Robin algorithm (i.e., the polling scheduling algorithm) is to distribute requests from users to servers in the interior in turn each time, starting with 1 until X (the number of internal servers, X > =1), and then restarting the cycle.
Step 4_3 decides which monitoring port buffer to read the message frame preferentially by polling through the Round Robin algorithm, and the message frame read preferentially will be sent out from the monitoring port preferentially. According to the Round Robin polling principle, which monitoring port buffer stores the message frame preferentially reads one frame of the message frame in which monitoring port buffer preferentially, which maintains the timing characteristic of the message frame to a certain extent, namely, first-come first-served monitoring. The Round Robin algorithm is not used in the conventional switch for the switch monitoring function.
And 4_4, reading a frame of message frame in the monitoring port cache corresponding to the sending request, and sending the message frame to the corresponding monitoring port.
The frame format sent to the monitor port is shown in fig. 10 and includes the destination MAC address (consisting of Ctmark and VLID), source MAC address, type, and frame content.
And 4_5, ending the transmission of the message frame of the round.
The traditional switch monitoring port can only monitor the message frame of one communication port; in the invention, each monitoring port corresponds to M monitoring port caches, and the M monitoring port caches correspond to M communication ports respectively. Each monitoring port is capable of monitoring M communication ports simultaneously.
And 4, distributing the transmission requests of the M monitoring port caches corresponding to the same monitoring port in turn, selecting one to be preferentially transmitted to the corresponding monitoring port, starting from 1 until the M monitoring port cache, and restarting the cycle. This ensures that the monitoring port cache that stores the message frames preferentially is read one frame of message frame preferentially, which maintains the timing characteristics of the message frames to some extent, i.e., first-come first-go monitoring.

Claims (8)

1. A switch multi-monitoring port method based on VLID monitoring, the processing chip of the switch is an FPGA chip, the method is characterized in that the method specifically comprises the following steps:
Step 1: according to the communication port, establishing a communication port cache, establishing a monitoring lookup table, establishing a monitoring port cache and configuring a CT (computed tomography) mark register; the method specifically comprises the following substeps:
step 1_1, establishing a corresponding communication port cache for each communication port, wherein M is more than or equal to 2;
Step 1_2, a monitoring lookup table is established, and a plurality of communication port caches share 1 monitoring lookup table; the VLID value and the monitoring port selection parameter monitor_sel [ N-1:0] are prestored in the monitoring lookup table, the N-1 bit is 1 and represents that a message frame containing an address corresponding to the VLID value is sent out from the monitoring port N, the current message frame is 0 and is not sent out from the monitoring port N, N is the number of the monitoring ports, and N is more than or equal to 2;
step 1_3, a monitoring port cache is established, each communication port cache is guaranteed to correspond to N monitoring port caches, and M multiplied by N monitoring port caches are shared;
step 1_4, configuring a CT flag register;
step 2: setting a corresponding frame filtering module at each communication port, wherein the frame filtering module is used for filtering all message frames received from the corresponding communication port;
Step 3: reading out and writing the message frame stored in each communication port cache into the corresponding monitoring port cache of the communication port cache;
Step 4: each monitoring port corresponds to M monitoring port caches, and when part or all of the M monitoring port caches store message frames, the stored message frames are read out through polling of a Round Robin algorithm and then sent to the monitoring ports.
2. The VLID monitoring-based switch multi-monitoring port method of claim 1, wherein each of the communication port caches is a RAM with a memory space of 8KB, and a data bit width of 64 bits and a depth of 1KB; 1 monitoring lookup table is shared by every 8 communication port caches; each monitoring port cache is 8KB in size; the configuration CT flag register is a 32-bit software readable and writable register.
3. The method of claim 1, wherein the monitoring lookup table is a RAM with a memory space of n×64KB, specifically a data bit width of Nbit, an address bit width of 16 bits, and a depth of 64KB; wherein the 16-bit address bit width corresponds to a VLID value from 0 to 65535; the N bits bit width corresponds to monitor_sel [ N-1:0].
4. The VLID monitoring-based switch multi-monitoring port method of claim 1, wherein the operation of the frame filtering module in step 2 comprises the steps of:
Step 2_01, writing a frame of message received by each communication port into a corresponding communication port buffer;
Step 2_02, obtaining the value in the CT flag register, and simultaneously detecting Ctmark and VLID of the frame header of the message frame in the communication port cache and recording;
Step 2_03, taking the VLID value detected in step 2_02 as a 16-bit address of a monitoring lookup table, and inquiring the monitoring lookup table to obtain a monitoring port selection parameter monitor_sel [ N-1:0];
Step 2_04, writing monitor_sel [ N-1:0] into the communication port cache;
step 2_05, writing the frame length byte number of the current message frame into a communication port cache, wherein the frame length does not contain monitoring port selection parameters and the byte length occupied by the frame length;
step 2_06, judging whether the value of the configuration CT flag register obtained in step 2_02 is equal to Ctmark, if so, executing step 2_07, otherwise, executing step 2_08;
Step 2_07, judging whether monitor_sel [ N-1:0] is equal to 0, if so, executing step 2_09, otherwise, executing step 2_08;
step 2_08, deleting the current message frame content from the communication port cache;
step 2_09, the operation execution of the frame filtering module ends.
5. The VLID monitoring-based switch multi-monitoring port method of claim 4, wherein the message frame received from the communication port comprises a destination MAC address, a source MAC address, a type, and a frame content; the destination MAC address consists of Ctmark and VLID;
the message frames in the communication port cache comprise monitoring port selection parameters, frame length, destination MAC address, source MAC address, type and frame content; the destination MAC address consists of Ctmark and VLID.
6. The VLID monitoring-based switch multi-monitoring port method of claim 1, wherein the step 3 comprises the sub-steps of:
Step 3_01, when the communication port buffer is not empty, reading the frame header of a frame of message frame in the communication port buffer, and obtaining monitor_sel [ N-1:0], wherein N=4;
Step 3_02, judging whether monitor_sel [3:0] =0001 is true, executing step 3_05 if yes, otherwise executing step 3_03;
Step 3_03, judging whether monitor_sel [3:0] =0010 is satisfied, if yes, executing step 3_06, otherwise, executing step 3_04;
Step 3_04, judging whether monitor_sel [3:0] =0100 is true, executing step 3_07 if yes, otherwise executing step 3_08;
Step 3_05, judging whether the monitoring port buffer 1 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_09, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
step 3_06, judging whether the monitoring port buffer memory 2 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_10, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_07, judging whether the monitoring port buffer memory 3 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_11, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_08, judging whether the monitoring port buffer 4 of the channel corresponding to the current read message frame is not full, if yes, executing step 3_12, otherwise, executing step 3_13; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_09, the message frame is read and written into the corresponding channel monitoring port buffer 1, and then the process is finished; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_10, reading the message frame, writing the message frame into the corresponding channel monitoring port cache 2, and ending; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
step 3_11, reading the message frame, writing the message frame into the corresponding channel monitoring port buffer 3, and ending; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_12, reading the message frame, writing the message frame into the corresponding channel monitoring port buffer 4, and ending; the channel refers to a path that the communication port of the read message frame is cached to the corresponding 4 monitoring port cache;
Step 3_13, discard after reading the message frame, and then end.
7. The VLID monitoring-based switch multi-monitoring port method of claim 1, wherein the step 4 specifically comprises the following sub-steps:
Step 4_1, when traversing and judging whether the buffer non-empty of M monitoring ports corresponding to a certain monitoring port is established, executing step 4_2 if the buffer non-empty of M monitoring ports is established, otherwise executing step 4_1;
step 4_2, M monitoring port caches generate a polling request, and then step 4_3 is executed;
Step 4_3, polling and generating a sending request by a Round Robin algorithm, wherein the sending request corresponds to one of M monitoring port caches, and then executing step 4_4;
Step 4_4, reading a frame of message frame in the monitoring port buffer memory corresponding to the sending request, and sending the message frame to the corresponding monitoring port;
and 4_5, ending the transmission of the message frame of the round.
8. The VLID monitoring-based switch multi-monitoring port method of claim 1, wherein the frame format sent to the monitoring port comprises a destination MAC address, a source MAC address, a type, and frame content, the destination MAC address consisting of Ctmark and VLID.
CN202111286030.XA 2021-11-02 2021-11-02 Switch multi-monitoring port method based on VLID monitoring Active CN114124848B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111286030.XA CN114124848B (en) 2021-11-02 2021-11-02 Switch multi-monitoring port method based on VLID monitoring

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111286030.XA CN114124848B (en) 2021-11-02 2021-11-02 Switch multi-monitoring port method based on VLID monitoring

Publications (2)

Publication Number Publication Date
CN114124848A CN114124848A (en) 2022-03-01
CN114124848B true CN114124848B (en) 2024-04-16

Family

ID=80379896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111286030.XA Active CN114124848B (en) 2021-11-02 2021-11-02 Switch multi-monitoring port method based on VLID monitoring

Country Status (1)

Country Link
CN (1) CN114124848B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938441B (en) * 2021-10-15 2022-07-12 南京金阵微电子技术有限公司 Data caching method, resource allocation method, cache, medium and electronic device
CN115208904B (en) * 2022-06-29 2024-06-04 深圳星云智联科技有限公司 Flow monitoring method and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204425370U (en) * 2014-12-09 2015-06-24 中国航空工业集团公司第六三一研究所 A kind of FC switch supervisory circuit
US10454656B1 (en) * 2017-07-21 2019-10-22 Rockwell Collins, Inc. AFDX switch supporting multiple types of data traffic
CN112995809A (en) * 2021-04-22 2021-06-18 北京国科天迅科技有限公司 Control method and device of FC switch, FC switch and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2924934B1 (en) * 2014-03-28 2018-09-26 Airbus Operations GmbH Ethernet switch and method for establishing forwarding patterns in an ethernet switch

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204425370U (en) * 2014-12-09 2015-06-24 中国航空工业集团公司第六三一研究所 A kind of FC switch supervisory circuit
US10454656B1 (en) * 2017-07-21 2019-10-22 Rockwell Collins, Inc. AFDX switch supporting multiple types of data traffic
CN112995809A (en) * 2021-04-22 2021-06-18 北京国科天迅科技有限公司 Control method and device of FC switch, FC switch and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
光纤通道(FC)交换机监控端口的设计实现及验证;卢钰林;中国优秀硕士学位论文全文数据库 信息科技辑(第03期);第I136-817页 *

Also Published As

Publication number Publication date
CN114124848A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
CN108809854B (en) Reconfigurable chip architecture for large-flow network processing
CN114124848B (en) Switch multi-monitoring port method based on VLID monitoring
US7787442B2 (en) Communication statistic information collection apparatus
US7281085B1 (en) Method and device for virtualization of multiple data sets on same associative memory
CN108833299B (en) Large-scale network data processing method based on reconfigurable switching chip architecture
JP3734704B2 (en) Packet classification engine
CN1593041B (en) Method, apparatus and computer program for the decapsulation and encapsulation of packets with multiple headers
US20130238792A1 (en) Apparatus and method for analyzing a network
US20050171937A1 (en) Memory efficient hashing algorithm
US8243745B2 (en) Buffer management method and packet communication apparatus
WO2021169256A1 (en) Method and device for network performance detection, and network device
CN110808854B (en) Message scheduling method and device and switch
WO2018192587A1 (en) Table lookup method and device, and computer storage medium
JP7074839B2 (en) Packet processing
US7293158B2 (en) Systems and methods for implementing counters in a network processor with cost effective memory
CN112866139A (en) Method, equipment and storage medium for realizing multi-rule flow classification
CN105516023A (en) Message forwarding method and apparatus
US7474662B2 (en) Systems and methods for rate-limited weighted best effort scheduling
CN111988158B (en) Chip-level OAM message sending method, device, system and storage medium
CN116955247A (en) Cache descriptor management device and method, medium and chip thereof
CN107438035A (en) A kind of network processing unit, network processing method and system, veneer
US20240056393A1 (en) Packet forwarding method and device, and computer readable storage medium
JP4209186B2 (en) A processor configured to reduce memory requirements for fast routing and switching of packets
CN117499351A (en) Message forwarding device and method, communication chip and network equipment
CN114338529A (en) Quintuple rule matching method and device

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