Packet scheduling system with required physical transmission times for packets
By introducing transmission time descriptors and clock correction mechanisms into the packet transmission system, the problem of unpredictable packet transmission time is solved, accurate control of packet transmission time is achieved, and the accuracy and predictability of transmission are improved. It is suitable for high-speed bandwidth wireless communications and video feed applications.
Patent Information
- Application Number
- CN202110684990.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-06-24
- Filing Date
- 2021-06-21
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-06-21
AI Technical Summary
Existing packet transmission systems cannot accurately predict the transmission time of packets on the physical layer, which makes it difficult to achieve precise control of packet transmission time in some applications, affecting the performance of areas such as IEEE Precision Time Protocol and high-resolution video feeds. .
A switching device is designed, including an input interface, an output interface and a packet processing circuit. By receiving the transmission time descriptor and clock time indication in the packet processing circuit, it ensures that the packet is sent accurately at the expected physical transmission time and passes through the clock circuit. Perform time correction with the main clock circuit to ensure that packets are transmitted in accurate time slots.
Achieve accurate control of packet transmission time, improve the accuracy and predictability of packet transmission, meet the needs of applications such as high-bandwidth wireless communication and video feed, and avoid the problem of performance degradation when providing accurate transmission time for all packets .
Smart Images

Figure CN113839731B_ABST
Abstract
Description
Technical Field
[0001] The present invention, in certain embodiments thereof, relates to a packet scheduling system and, more particularly but not exclusively, to a system for scheduling packet transmission times. Background Art
[0002] In the opinion of the inventors of the present invention, today's packet transmission systems often rely on packet transmission methods in which packets are transmitted "as soon as possible" once they are ready to be transmitted (delivered to the physical layer for transmission as described herein). Other systems exist, such as the system described in U.S. Patent Application S / N 16 / 782,075 to Levi et al., filed on February 5, 2020. Summary of the invention
[0003] The present invention, in certain exemplary embodiments thereof, seeks to provide an improved packet scheduling system.
[0004] The inventors of the present invention believe that it is desirable to provide a system in which the time at which a packet is transmitted (delivered to the physical layer, sometimes referred to collectively as the "wire" for transmission) is known. This helps to know when a packet will be delivered because, in some cases, the time of propagation on the wire is known. Knowing the time of transmission on the physical layer in advance may help; having the time of transmission shown inside the transmitted packet may also help. Showing the time of transmission inside a packet is very difficult (in the inventors' opinion, in systems that existed prior to the present invention) because once a packet approaches / arrives at the physical layer, it is generally no longer allowed to change the contents of the packet, so it is not possible to change the packet "at the last minute" to include the time of delivery to the physical layer.
[0005] In certain exemplary embodiments of the invention, it may be desirable to show the transmission time in only some packets rather than in all packets; by way of non-limiting example, for performance reasons, it may be desirable to show the transmission time in fewer than all packets. However, in certain exemplary embodiments of the invention, it may be desirable to show the transmission time in only one packet, in all packets, or in any suitable number of packets.
[0006] Such scheduling as described above and herein may be very helpful in various networking areas. As a non-limiting example, the IEEE Precision Time Protocol requires that outgoing packets be accurately timestamped. As another non-limiting example, a high-resolution video feed requires very accurate packet transmission times for outgoing packets; sending the first packet in each video frame with a very accurate transmission time is considered sufficient. It is generally noted that a video frame may include a large number of packets, such as 1,000 or 10,000 packets. Sending video frames as described in this paragraph may also be helpful in implementing a system that complies with the SMPTE 2110-21 standard.
[0007] The inventors of the present invention believe that it is impractical to provide such an accurate transmission time for each of (for example) millions of packets, as this would degrade performance in the case of other packets. In addition, the inventors of the present invention believe that good results can be obtained by providing accurate transmission times for fewer than all packets; and also by in advance Predetermining when a packet will be shipped out can also achieve good results, and by delaying the shipping of the packet until that determined time, a high degree of accuracy can be achieved. In addition, the inventors of the present invention believe that there may be a tradeoff between transmitting packets as quickly as possible and the desire or requirement to accurately time-stamp packets. The exemplary embodiments of the present invention describe a way of dealing with this tradeoff that is believed to be different and unique from previous systems.
[0008] In addition, similar to high-speed video interfaces, high-bandwidth wireless communications in 5G networks will send many packets to each of many phones; the packets sent to a given phone will be sent at a very specific time, after which the packets will be sent to another given phone; if the first such packet for a given phone is sent at a very specific time, then the remaining packets for this phone will be sent shortly thereafter.
[0009] In addition, high-bandwidth wireless communications in 5G networks typically require backend units to send information to the wireless network in very accurate time slots. In order to send packets in very accurate time slots, in an exemplary embodiment of the present invention, a clock (such as, as a non-limiting example, a UTC (Universal Coordinated Time) clock or a TAI (International Atomic Time) clock) is introduced into the packet forwarding system.
[0010] In general, the inventors of the present invention believe that the closer the clock is to the physical interface that sends the packet, the more accurate the timing of packet egress will be.
[0011] Therefore, according to an exemplary embodiment of the present invention, a switching device is provided, which includes: an input interface configured to communicate with a packet source, an output interface configured to communicate with a packet destination, and a packet processing circuit, which is configured to: receive a plurality of packets from the packet source via the input interface, each of the plurality of packets being associated with a packet descriptor, at least one of the packet descriptors being a transmission time packet descriptor, the transmission time packet descriptor including an expected physical transmission time for the packet associated with the transmission time packet descriptor; receive an indication of a clock time; and for each packet related to the transmission time packet descriptor, physically transmit the packet associated with the transmission time packet descriptor through the output interface at a clock time corresponding to the expected physical transmission time.
[0012] Further in accordance with an exemplary embodiment of the present invention, the input interface comprises a host interface, and the packet source comprises a host, and the output interface comprises a network interface.
[0013] Still according to an exemplary embodiment of the present invention, the input interface comprises a first network interface, the packet source comprises a network source remote from the switching device, and the output interface comprises a second network interface.
[0014] In addition, according to an exemplary embodiment of the present invention, the packet processing circuit is also configured to retain one or more packets before transmission until the clock time corresponds to the expected physical transmission time, and the one or more packets retained include at least one packet associated with a transmission time packet descriptor.
[0015] Furthermore, according to an exemplary embodiment of the present invention, the switching device includes a clock circuit and a master clock circuit, and the clock circuit is configured to provide one or more indications of clock time to the packet processing circuit, and the master clock circuit is configured to periodically correct the time provided by the clock circuit.
[0016] Further in accordance with an exemplary embodiment of the present invention, the master clock circuit includes a PTP clock.
[0017] Still further in accordance with an exemplary embodiment of the present invention, the indication of the clock time provided by the clock circuit is provided in a PTP time format.
[0018] In addition, according to an exemplary embodiment of the present invention, the packet processing circuit is also configured to hold one or more packets before transmission until the clock time corrected by the master clock circuit corresponds to the expected physical transmission time, and the one or more packets held include at least one packet associated with a transmission time packet descriptor.
[0019] Furthermore, according to an exemplary embodiment of the present invention, at least an input interface, an output interface, and a packet processing circuit are included in a switch.
[0020] Further in accordance with an exemplary embodiment of the present invention, at least the input interface, the output interface, and the packet processing circuitry are included in a network adapter.
[0021] Still further in accordance with an exemplary embodiment of the present invention, at least the input interface, the output interface and the packet processing circuit are included in a graphics processing unit.
[0022] According to another exemplary embodiment of the present invention, a method for packet scheduling is also provided, the method including performing the following operations in a packet processing circuit: receiving a plurality of packets from a packet source via an input interface, the packet source being external to the packet processing circuit, each of the plurality of packets being associated with a packet descriptor, at least one of the packet descriptors being a transmission time packet descriptor, the transmission time packet descriptor including an expected physical transmission time for the packet associated with the transmission time packet descriptor; receiving an indication of a clock time; and for each packet associated with the transmission time packet descriptor, physically transmitting the packet associated with the transmission time packet descriptor via an output interface at a clock time corresponding to the expected physical transmission time.
[0023] Further in accordance with an exemplary embodiment of the present invention, the method further comprises: retaining one or more packets prior to transmission until the clock time corresponds to an expected physical transmission time, the retained one or more packets comprising at least one packet associated with a transmission time packet descriptor.
[0024] Still further in accordance with an exemplary embodiment of the present invention, the method further includes receiving one or more indications of clock time from a clock circuit external to the packet processing circuit, and the clock circuit periodically receives time corrections from a master clock circuit external to the packet processing circuit.
[0025] In addition, according to an exemplary embodiment of the present invention, the master clock circuit includes a PTP clock.
[0026] Furthermore, according to an exemplary embodiment of the present invention, the indication of the time received from the clock circuit is provided in a PTP time format.
[0027] Further in accordance with an exemplary embodiment of the present invention, holding the one or more packets prior to transmission includes holding the one or more packets prior to transmission until a clock time corrected by the master clock circuit corresponds to an expected physical time.
[0028] Further in accordance with an exemplary embodiment of the present invention, the method also includes: retaining one or more packets before transmission until the clock time corrected by the master clock circuit corresponds to the expected physical transmission time, the one or more packets retained including at least one packet associated with the transmission time packet descriptor.
[0029] In addition, according to the exemplary embodiment of the present invention, the main clock circuit is external to the clock circuit.
[0030] According to another exemplary embodiment of the present invention, a device is also provided, including: a packet processing circuit, which is configured to: receive a packet from a packet source via an input interface, the packet being associated with a transmission time packet descriptor, the transmission time packet descriptor including an expected physical transmission time for the packet associated with the transmission time packet descriptor; receive an indication of a clock time; and for the packet associated with the transmission time packet descriptor, physically transmit the packet associated with the transmission time packet descriptor via an output interface at a clock time corresponding to the expected physical transmission time. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The present invention will be more fully understood and appreciated from the following detailed description taken in conjunction with the accompanying drawings, in which:
[0032] Figure 1 is a simplified illustration of a packet scheduling system operable and constructed in accordance with an exemplary embodiment of the present invention;
[0033] Figure 2 and Figure 3 It is used to understand Figure 1 A simplified graphical representation of a system;
[0034] Figure 4 and Figure 5 It is used to understand Figure 1 A simplified block diagram of an exemplary embodiment of a circuit for clock adjustment as part of a system of; and
[0035] Figure 6 yes Figure 1 A simplified flowchart illustration of an exemplary method of operation of a system. DETAILED DESCRIPTION
[0036] Now to Figure 1 For reference, Figure 1 is a simplified pictorial representation of a packet scheduling system that may be operated and constructed in accordance with an exemplary embodiment of the present invention.
[0037] Figure 1 The system (generally designated as 100) includes the following:
[0038] a host processor 105 , which may include any suitable processor, such as, for example, the processor of a general purpose computer; and
[0039] Switching equipment, which Figure 1 For simplicity of description, it is represented as a switch or NIC (network interface controller) 110. It can be understood that in addition to the switch or NIC, another switching device (such as, as a non-limiting example, a dedicated processing device or a graphics processing unit (GPU)) can be used instead of the switch or NIC 110, provided that the other switching device performs or is configured to perform the operations described herein with reference to the switch or NIC 110.
[0040] A subset of the various elements included in the switch or NIC 110, excluding the portions used (as described below) to input packets to or output packets from the switch or NIC 110, is also referred to herein as "packet processing circuitry." Such packet processing circuitry may include exemplary embodiments of the present invention in the absence of any other components of the switch or NIC 110.
[0041] Without limiting the generality of the exemplary embodiments of the invention, examples of NIC 110 will be generally described herein. A NIC may also be referred to herein as a "network adapter."
[0042] Without limiting the generality of the exemplary embodiments of the present invention, host processor 105 is depicted and described by way of example only. Functionality related to packet processing described below with reference to NIC 110 may occur on packets received from outside of host processor 105, such as, by way of non-limiting example, packets received from a network.
[0043] Additional exemplary details of the structure and operation of system 100 are now briefly described.
[0044] As in a conventional packet processing / scheduling system, packets originating in the host processor 105 and stored in its off-chip (host) memory 107 may be sent to a destination via the NIC 110; and packets originating at a destination may be sent to the host processor 105 via the NIC 110. The following will describe in more detail the features beyond the conventional packet processing / scheduling system. Figure 1 In general, the packet processing can be performed according to many well-known packet processing specifications (such as, as a non-limiting example, Ethernet; and PCIx or PCIe) for packet processing.
[0045] Host processor 105 may include any suitable processor, such as a processor included in a general purpose or other computer system (not shown). It will be appreciated that a sub-combination including NIC 110 (without host processor 105) may include alternative exemplary embodiments of the present invention.
[0046] In an exemplary embodiment, reference Figure 1 Most or all of the elements of the NIC 110 shown and described are implemented on a single IC chip, but this is not necessarily the case, as multiple IC chips and other components may be used. For simplicity of depiction and description, such elements are described as "on-chip"; such depiction and description are not meant to be limiting.
[0047] Figure 1 The host processor 105 is connected to and communicates with the NIC 110 via a bus 115. The bus 115 may include any suitable bus that provides communication between the host processor 105 and the NIC 110, such as, by way of non-limiting example, a PCIe bus.
[0048] Without limiting the generality of the exemplary embodiments of the present invention, bus 115 is shown and described by way of example only. In general, any suitable input interface may be used in place of bus 115. As a non-limiting example, in an embodiment that uses a network (as described below and above as a source of packets) rather than host 105, the input interface would include any suitable network interface.
[0049] Host processor 105 sends packet 116 and accompanying descriptor 118 (as As a non-limiting example in a system, the accompanying descriptor 118 would be a work queue entry (WQE) sent from the off-chip memory 107 to the NIC 110 , where the packet 116 and accompanying descriptor 118 are stored in the on-chip memory 125 .
[0050] Packet 116 and accompanying descriptor 118 are also in Figure 1 They are collectively shown and given the reference numeral 120 .
[0051] It will be appreciated that in some exemplary embodiments, the descriptor 116 is first sent to the NIC 110 and stored in the on-chip memory 125. Only later, when the packet associated with the descriptor 116 is to be sent, the packet 118 is fetched by or sent to the NIC 110. In this case, the scheduling module 130 within the NIC 110 is responsible for causing the fetching or pre-fetching of the packet 118 to the NIC 110. In an exemplary embodiment, the scheduling module 130 may be housed in the control plane 140, which will be described immediately below; in some exemplary embodiments, the scheduling module 130 may be referred to as or may include a "WQE arbiter." Further, in some exemplary embodiments, the WQE arbiter as described may be included in the arbitration of the transmission module 145, as described below. In other exemplary embodiments, the WQE arbiter may be included in the queuing module 135, as described below.
[0052] A given packet descriptor 116 is passed to the control plane 140 and then queued in the queuing module 135. In an exemplary embodiment, the queuing module 135 supports multiple queues. One advantage of supporting multiple queues (e.g., as is well known in the case of InfiniBand) is that WQE prefetch operations are not strictly ordered, since it is not known whether packets will arrive for transmission in the same order as they were queued for the WQEs. For example, multiple WQE queues may be arranged by applications running on the host processor 105, one WQE queue for each application; a WQE arbiter may select a WQE from a given queue for transmission based on the availability of the corresponding packet.
[0053] The control plane 140 is configured to perform various operations, which may include, but are not limited to: address fix-up of addresses in the packet descriptor 116; encrypting all or part of the packet data in the packet 118 pointed to by the packet descriptor 116 before sending; truncating the data in the packet 118 pointed to by the packet descriptor 116 before sending; and steering operations. Such operations are known in the art. The inventors of the present invention have appreciated that such operations (each of which may or may not occur in the case of a given packet) increase the number of packets that a given packet traverses on its way to being sent. Figure 1 The unpredictability of the amount of time it takes for the system 100 to operate; in an exemplary embodiment of the present invention, this unpredictability can motivate the use of the present invention. Figure 1 As shown in , the packet descriptor 116 is sent (whether modified or not, as part of the operation of the control plane 140) to the queuing module 135.
[0054] In addition to the operations just described, control plane 140 is also configured to select specific packets to be sent at exact times (described below), and typically mark the packets in their descriptors, as described herein.
[0055] As a non-limiting example, the following is a description of a situation where control plane 140 may select a particular packet to send at a precise time:
[0056] 1. The IEEE Precision Time Protocol requires that outgoing packets be accurately time-stamped; such outgoing packets sent according to the IEEE Precision Time Protocol will be selected to be sent at the exact time.
[0057] 2. High resolution video sources require very accurate packet transmission time for shipping out packets. Generally speaking, the first packet in a video frame will be selected for sending at an exact time.
[0058] 3. In addition, similar to high-speed video interfaces, high-bandwidth wireless communications in 5G networks will send many packets to each of multiple phones; packets sent to a given phone will be sent at a very specific time, after which the packets will be sent to another given phone; if the first such packet for a given phone is sent at a very specific time, then the remaining packets for this phone will be sent shortly thereafter.
[0059] 4. In addition, high-bandwidth wireless communications in 5G networks generally require backend units to send information to the wireless network in very accurate time slots. In order to send packets in very accurate time slots, in an exemplary embodiment of the present invention, a clock (such as, as a non-limiting example, a UTC clock or a TAI clock) is introduced into the packet forwarding system.
[0060] In general, the inventors of the present invention believe that the closer the clock is (physically) to the physical interface that sends the packet, the more accurate the timing of packet egress will be.
[0061] The inventors of the present invention believe that it is impractical to provide such an accurate transmission time for each of (for example) millions of packets, as this would degrade performance in the case of other packets. In addition, the inventors of the present invention believe that good results can be obtained by providing accurate transmission times for fewer than all packets; and also by in advance Good results can also be obtained by predetermining when the packet will be shipped out, and by delaying the shipping of the packet until this determined time, a high degree of accuracy can be obtained.
[0062] It should be appreciated that in an exemplary embodiment, the off-chip memory 107 may be asynchronous and may participate in various operations of the host processor 105 in addition to the operations described herein. For at least these reasons, the queuing functionality provided by the queuing module 135 helps provide smooth functionality of the NIC 110, reducing any likelihood that starvation or overruns will occur.
[0063] As described in more detail below, the queuing module 135 determines when a given packet will be sent. Those skilled in the art will appreciate that once the packet and associated descriptor are in the on-chip memory 125, the time that elapses between the queuing module 135 making such a determination and the packet being sent out of the NIC 110 is somewhat predictable, as also described in more detail below.
[0064] When the queuing module determines that a given packet is to be sent, a descriptor associated with the given packet (such as, as a non-limiting example, a WQE) is passed to the arbitration of the transmission module 145, which arbitrates when the given packet is actually sent. Figure 1 The basis for sending packets (shown as element 150 in FIG. 1 ) may be based on: ASAP (send packets as soon as possible) by priority (higher priority packets are sent before lower priority packets); or coarse time scheduling (packets will be sent at approximately a given time). The basis just mentioned is usually indicated in the descriptor and arbitrated by arbitration 145 of the transmission module. For example, high priority packets may be sent earlier than low priority packets; packets to be sent based on the coarse time schedule may be sent around the indicated time; and (high priority) ASAP packets may be sent as soon as possible.
[0065] It should be appreciated that, according to the foregoing, some packets (such as those with lower priority) may never be sent in some cases, because higher priority packets and / or packets to be sent based on rough time scheduling may use all available transmission capacity. In this case, as known in the art, some packets can be discarded.
[0066] Generally speaking, the arbitration 145 of the transmission module is operable to select packets to be transmitted from a plurality of queues; therefore, in the case of ASAP by priority, packets are selected from a plurality of queues based on priority and the selected packets are transmitted ASAP. As a non-limiting example, priority queues may be maintained corresponding to a plurality of applications running on the host processor 105, respectively.
[0067] As a non-limiting example, the arbitration module may implement VL arbitration, such as in As is known in the Enhanced Transmission Selection (ETS) in Ethernet systems, for example in IEEE Std 802.1QazTM -described in 2011.
[0068] When a given packet is to be sent, the packet is sent from the on-chip memory 125 to the media access control (MAC) module 155. The MAC module 155 ensures (among other tasks) that the packet has the correct start and end times, is addressed to the correct address, appears to be of a legal format, etc., and adds a checksum to the packet. Such functions are well known in the art.
[0069] The MAC module 155 sends the packet onward to the physical layer 160, which may also be referred to as an "output interface" or "network interface."
[0070] The physical layer 160 includes:
[0071] a first-in, first-out (FIFO) memory 162 configured to receive and store incoming packets and output those packets in a FIFO fashion;
[0072] an arbitration module 165 configured to extract packets from the FIFO memory 162 and implement an arbitration strategy 170 with respect to received packets as described below;
[0073] an idle data module 175 that generates idle data (bits) for transmission when no actual packet data is to be transmitted, when required by applicable specifications related to the physical medium (as described below);
[0074] PHY module 180, which is configured to: a) place the outgoing bits of the packet (or the idle bits received by the idle data module 175) on a physical medium (not shown) such as a wire or any other suitable physical medium known in the art for transmission; and b) receive the incoming bits of the packet from the physical medium and send the incoming bits onward in the form of packets to the on-chip memory 125; and
[0075] Real-time hardware clock 185 (typically a Coordinated Universal Time (UTC) clock) is synchronized with UTC using mechanisms known in the art of time synchronization (such as, as a non-limiting example, the Precision Time Protocol (PTP)). Figure 4 and Figure 5 An exemplary circuit for keeping the real-time hardware clock 185 synchronized with UTC using PTP is described. It will be appreciated that another suitable clock, such as a TAI clock, may be used; the example of a UTC clock is not meant to be limiting.
[0076] The real-time hardware clock 185 supplies a time signal to the arbitration module 165 .
[0077] Arbitration module 165 arbitrates when a given packet in FIFO memory 162 is sent forward to PHY module 180. Such arbitration may be based on: always preferring a given packet (sending it when it arrives); always preferring a given packet in accordance with an applicable specification (such as, for example, in the case of an Ethernet physical medium, the applicable Ethernet specification, which includes rules about when packets may be sent); or sending the packet at an exact time.
[0078] In the case of sending a packet at an exact time, a request to send a packet at an exact time is sent via the appropriate connection (in Figure 1 160) arrives from the arbitration 145 of the transmission module. The arbitration module 165 then waits to extract the packet (when the packet is the next available packet in the FIFO memory 162) based on the time signal provided by the real-time hardware clock 185 until the exact time when the packet should be sent, and then extracts the packet from the FIFO memory 162 and transmits the packet via the PHY module 180. It can be appreciated that, in general, if the arbitration module waits to extract the packet from the FIFO memory 162, the idle data generated by the idle data module 175 will be sent during this waiting time, resulting in lower utilization of the physical medium. In other words, the packet to be sent at the exact time will be "stalled" until that time is reached.
[0079] If a given packet intended to be sent at an exact time arrives at the head of the FIFO memory 162 at or after the exact time, then the arbitration module 165 immediately extracts the packet from the FIFO memory 162 and sends it (as explained above, according to the "always prefer packets" policy, or according to the "always prefer packets according to applicable specifications" policy).
[0080] It should be appreciated that, in general, the arbitration 145 of the transmission module may be able to estimate the number of packets waiting to be transmitted from the MAC unit 155, because the information of the rate of packets leaving the on-chip memory 125 and the rate of packets leaving the arbitration module 165 are both known, so that the number of packets "in process" after the on-chip memory 125 and starting at the MAC unit 155 can be calculated. Therefore, for packets with an exact time to be sent, the approximate time that the arbitration 145 of the transmission module should schedule the packet for transmission can be determined. By sending such packets at the determined approximate time (and before the exact time), the problem of packets arriving at the arbitration unit 165 too early (and therefore not being held in the FIFO memory 162 long enough to be sent at the exact time) or arriving at the head of the FIFO memory 162 too late (and therefore will be sent after the exact time) can be reduced.
[0081] In addition Figure 2 and Figure 3 For reference, it is used to understand Figure 1 A simplified graphical illustration of a system.
[0082] Usually indicated by 200 Figure 2 A graphical depiction of a master clock time 220 for a horizontal channel and a slave clock time 230 for a vertical channel is included. In the case of an ideal clock 235, the slave clock time 230 will always be equal to the master clock time 220. In the case of a free running clock 240 (a clock that is not corrected from a master clock), there is considerable drift from the ideal clock time 220 over time. In the case of a trained slave clock time 245, where the slave clock is periodically corrected from a master clock (such as, Figure 1 The real-time hardware clock 185 is typically the case), where the slave clock time 245 is an approximation of the time of the ideal clock 235.
[0083] At master time X 250 , it will be appreciated that slave time 260 at X is very close to ideal time 235 at X.
[0084] Except as now described, the Figure 3 and Figure 2 are similar and include similar reference numerals.
[0085] At a first time 305, a packet and a packet descriptor are created for transmission, wherein the packet descriptor indicates that the packet should be transmitted at time X. Figure 1 If the mechanism described above is used, the packet will be sent at the pre-calculated time 310. As indicated by the trained value for time X 320, the above reference Figure 1 The described mechanism allows packets to be sent more accurately. Therefore, it should be understood that Figure 1 The mechanism enables packets to be sent with more precise timing.
[0086] It should be understood that for the purpose of simplifying the description, Figure 2 and Figure 3 The various times depicted in FIG. 2 are not necessarily shown to scale, so, for example, the differences depicted between the various clocks (such as, for example, the difference between the trained slave clock 245 and the ideal clock 235) may in practice be less than Figure 2 and Figure 3 Appeared in.
[0087] Now to Figure 4 and Figure 5 For reference, Figure 4 and Figure 5 It is used to understand Figure 10026] A simplified block diagram of an exemplary implementation of a circuit for clock adjustment as part of a system.
[0088] Figure 4 is a block diagram of an exemplary embodiment of a circuit for clock adjustment suitable for adjusting Figure 1 The real-time hardware clock 185 and shows Figure 1 The real-time hardware clock 185 is connected to the input and output Figure 1 The interaction of groupings of systems.
[0089] Usually indicated by 400 Figure 4 The circuit includes a PTP hardware clock module 410, which includes:
[0090] Phase locked loop (PLL) unit 415;
[0091] and the adjusted time unit 420 .
[0092] The PLL unit 415 operates in a generally similar manner to PLL units known in the art, including:
[0093] Molecular unit 425; and
[0094] Denominator unit 430.
[0095] The PLL unit 415 (specifically, the numerator unit 425) receives the free running core clock signal 435, which indicates the value of the free running clock (not shown). The PLL unit 415 performs frequency multiplication and division as necessary to correct the free running clock time as described below. If the free running clock is not corrected, the free running clock will produce fluctuations over time such as Figure 2 The free running clock time is 240 or something like that.
[0096] Figure 4 The circuitry also includes a PTP daemon 450 (which may operate in a generally similar manner to PTP daemons known in the art) that is corrected via a servo loop from a master clock 455. In certain exemplary embodiments, the PTP daemon 450 is implemented in software.
[0097] The PTP daemon 450 sends the frequency adjustment signal 460 to the PLL unit 415 so that the time at the PLL unit 415 remains strictly aligned with the time of the PTP daemon 450, and therefore with the time of the master clock 455. The PTP daemon 450 may send the frequency adjustment signal 460 at any suitable sending rate, which generally depends on the specific implementation of the PTP daemon 450. Without limiting the generality of the foregoing, the sending rate may range between once per second and 128 times per second. Those skilled in the art will appreciate that the frequency adjustment signal discussed above may be used to adjust the PLL unit 415 to adjust the PLL unit 415. Figure 2 and Figure 3 The illustrative graphical depiction of will appear different based on the sending rate of the frequency adjustment signal 460 by the PTP daemon 450 .
[0098] It will be appreciated that the servo loop control between the master clock 455 and the PTP daemon 450 may be performed in accordance with the well-known IEEE 1588 PTP standard or in any other suitable manner. As non-limiting examples, such other suitable manners may include: IPPS; NPPS; and suitable proprietary algorithms. It will also be appreciated that Figure 4 A sub-combination of the circuits without the PTP daemon 450 and without the master clock 455 includes Figure 4 An alternative exemplary embodiment of a circuit of .
[0099] Returning to the functionality of the PLL unit 415, the PLL unit 415 sends the adjusted clock 440 (generally indicated as clock ticks) to the time register 445. It will be appreciated that, as described, the time register 445 holds the adjusted time corresponding to Figure 2 The trained slave clock 245.
[0100] The clock ticks described above may occur at any suitable rate, which will depend on the Figure 4 Without limiting the generality of the foregoing, a suitable rate may be, for example, 250 million or 500 million ticks per second.
[0101] Generally speaking, packets are transported from source 470 to Figure 1 Each packet 465 of the switch / NIC 110 receives a timestamp from the time unit 445. Similarly, Figure 1 Each packet 475 that is sent out by the switch / NIC 110 to the packet destination 480 receives a timestamp from the time unit 445. It should be understood that, in general, the packet source 470 and the packet destination 480 are in Figure 4 The circuit and Figure 1 of the system both externally.
[0102] In view of the above discussion, it will be understood that Figure 1 In an exemplary embodiment, Figure 4 Circuitry is used to help send packets at specific times that closely match the timestamps in the packets.
[0103] Except as described here, the Figure 5 and Figure 4 are similar and include similar reference numerals.
[0104] exist Figure 5 In the circuit of , the adjusted PTP time unit 520 includes a second register 545 and a nanosecond register 550; therefore, the adjusted PTP time unit 520 is configured to maintain time in the PTP format and use the time in the format. As a result, work can be offloaded from the PTP daemon 450 because incoming packets may be provided with PTP timestamps when they are provided, thereby avoiding the need to request assistance (e.g., by an application running on the host processor 105) to convert another time format to PTP time.
[0105] Furthermore, (outgoing) packets, such as packets 465 and 475, are timestamped by the adjusted PTP time unit 520 in the PTP time format, thereby enabling better scheduling according to a specific time.
[0106] Now to Figure 6 For reference, Figure 6 yes Figure 1 A simplified flowchart illustration of an exemplary method of operation of a system. Figure 6 An exemplary method (generally designated 600) includes the following steps, which are performed in a packet processing circuit as described above:
[0107] In step 610, a plurality of packets are received from a packet source via an input interface. The packet source is external to the packet processing circuit (although in some exemplary embodiments, the packet source may not be external). Each of the plurality of packets is associated with a packet descriptor; at least one of the packet descriptors is a transmission time packet descriptor that includes an expected physical transmission time for the packet associated with the transmission time packet descriptor.
[0108] In step 620, an indication of the clock time is received. As described above, it should be appreciated that in certain exemplary embodiments, the indication of the clock time may be received from a clock external to the packet processing circuitry, and the clock external to the packet processing circuitry may be corrected by a master clock (which, as a non-limiting example, may be a PTP clock as described in more detail above).
[0109] In step 630, for each packet associated with the transmission time packet descriptor, the packet is physically transmitted via the output interface at a clock time corresponding to the expected physical transmission time. The details of how such transmission at the expected physical transmission time can be achieved in an exemplary embodiment are described above.
[0110] It should be appreciated that, if desired, the software components of the present invention may be implemented in the form of a ROM (read-only memory). If desired, the software components may generally be implemented in hardware using conventional techniques. It should also be appreciated that the software components may, for example, be instantiated as a computer program product or instantiated on a tangible medium. In some cases, the software components may be instantiated as signals that may be interpreted by an appropriate computer, but such instantiation may not be included in certain embodiments of the present invention.
[0111] It should be appreciated that, for clarity, various features of the invention described in the context of separate embodiments may also be provided in combination in a single embodiment. Conversely, for brevity, various features of the invention described in the context of a single embodiment may also be provided separately or in any suitable sub-combination.
[0112] Those skilled in the art will appreciate that the present invention is not limited to what has been specifically shown and described above. Instead, the scope of the present invention is defined by the appended claims and their equivalents:
Claims
1. A switching device, comprising: an input interface configured to communicate with a packet source; an output interface configured to communicate with a packet destination; and A packet processing circuit, the packet processing circuit comprising a packet storage memory for storing packets received from the packet source and an arbitration module physically located near the packet storage memory and the output interface, the packet processing circuit: receiving, via the input interface, a plurality of packets from the packet source, each of the plurality of packets being associated with one of a plurality of packet descriptors, at least one of the plurality of packet descriptors being a transmission time packet descriptor, the transmission time packet descriptor comprising an expected physical transmission time for the packet associated with the transmission time packet descriptor; receiving an indication of a clock time; as well as for each packet associated with said at least one transmission time packet descriptor, after each said packet has previously been received from said input interface, stored in said packet storage memory and designated for transmission, retaining each packet having said at least one transmission time packet descriptor including an expected physical transmission time until said arbitration module receives an indication of a clock time corresponding to said expected physical transmission time, whereupon said arbitration module extracts from said packet storage memory each said packet having an expected physical transmission time corresponding to said clock time indication and passes each said extracted packet for physical transmission via said output interface at a clock time corresponding to said expected physical transmission time, The switching device further includes a clock circuit and a main clock circuit, and: The clock circuit is configured to provide one or more indications of clock time to the packet processing circuit, and The master clock circuit is configured to periodically correct the time provided by the clock circuit.
2. The switching device according to claim 1, wherein: The input interface includes a host interface, and The packet source includes a host, and The output interface includes a network interface.
3. The switching device according to claim 1, wherein: The input interface includes a first network interface, and The packet source comprises a network source remote from the switching device, and The output interface includes a second network interface. 4 . The switching device of claim 1 , wherein the master clock circuit comprises a Precision Time Protocol (PTP) clock.
5. A switching device according to claim 4, wherein the indication of the clock time provided by the clock circuit is provided in a PTP time format.
6. The switching device according to claim 1, wherein at least the input interface, the output interface and the packet processing circuit are included in a switch.
7. The switching device of claim 1, wherein at least the input interface, the output interface, and the packet processing circuit are included in a network adapter.
8. The switching device of claim 1, wherein at least the input interface, the output interface, and the packet processing circuit are included in a graphics processing unit.
9. A method for packet scheduling, the method comprising performing the following steps in a packet processing circuit comprising a packet storage memory for storing packets received from a packet source and an arbitration module physically located near the packet storage memory and an output interface: receiving, via an input interface, a plurality of packets from the packet source, the packet source being external to the packet processing circuit, each of the plurality of packets being associated with one of a plurality of packet descriptors, at least one of the plurality of packet descriptors being a transmission time packet descriptor, the transmission time packet descriptor comprising an expected physical transmission time for the packet associated with the transmission time packet descriptor; receiving an indication of a clock time; as well as for each packet associated with said at least one transmission time packet descriptor, after each said packet has previously been received from said input interface, stored in said packet storage memory and designated for transmission, retaining each packet having a transmission time packet descriptor including an expected physical transmission time until said arbitration module receives a clock time indication corresponding to said expected physical transmission time, then said arbitration module extracts from said packet storage memory each said packet having an expected physical transmission time corresponding to said clock time indication and passes each said extracted packet for physical transmission, then physically transmitting via said output interface said packet associated with said transmission time packet descriptor at a transmission clock time corresponding to said expected physical transmission time, The method further comprises: receiving one or more indications of clock time from a clock circuit external to the packet processing circuit, And, the clock circuit periodically receives time corrections from a master clock circuit external to the packet processing circuit.
10. The method of claim 9, wherein the master clock circuit comprises a Precision Time Protocol (PTP) clock.
11. The method of claim 10, wherein the indication of the time received from the clock circuit is provided in a PTP time format.
12. The method of claim 9, wherein the master clock circuit is external to the clock circuit.
13. A packet scheduling device, comprising: A packet processing circuit, the packet processing circuit comprising a packet storage memory for storing packets received from a packet source and an arbitration module physically located near the packet storage memory and an output interface, the packet processing circuit: receiving, via an input interface, a packet from the packet source, the packet being associated with a transmission time packet descriptor, the transmission time packet descriptor comprising an expected physical transmission time for the packet associated with the transmission time packet descriptor; receiving an indication of a clock time; as well as for a packet associated with the transmission time packet descriptor, after the packet has previously been received from the input interface, stored in the packet storage memory and designated for transmission, retaining the packet having the transmission time packet descriptor including the expected physical transmission time until the arbitration module receives a clock time indication corresponding to the expected physical transmission time, and then the arbitration module extracts the packet having the expected physical transmission time corresponding to the clock time indication from the packet storage memory and passes the extracted packet for physical transmission via the output interface, thereby physically transmitting the packet associated with the transmission time packet descriptor at the transmission clock time corresponding to the expected physical transmission time, The device further comprises a clock circuit and a master clock circuit, and: The clock circuit is configured to provide one or more indications of clock time to the packet processing circuit, and The master clock circuit is configured to periodically correct the time provided by the clock circuit.
