This application claims the priority benefit of Romanian Patent Application No. (not yet assigned), entitled METHODS, SYSTEMS, AND COMPUTER READABLE MEDIA FOR DETERMINING AN INTERNAL TIME OF A TIME-SENSITIVE NETWORKING (TSN) NETWORK CARD, filed on Apr. 27, 2023, the disclosure of which is incorporated herein by reference in its entirety.
The subject matter described herein relates to determining current times for network cards. More specifically, the subject matter relates to methods, systems, and computer readable media for determining an internal time of a time-sensitive networking (TSN) network card.
A network card receives packets from a computer to transmit to a connected network. A time-sensitive networking (TSN) network card can transmit the received packets at a set transmit launch time received from the computer. However, in a high performance networking setup when the TSN network card sends a high volume of packets, system timers are often overloaded and become inaccurate. If overloaded, expiry notifications received might have a delay that is unacceptable for some applications. Further, requesting the current time of the TSN network card's internal clock is disruptive and inconvenient for a computer in a high performance network. There is a need for determining an internal time of a TSN network card that does not require requesting the time from the TSN network card.
Methods, systems, and computer readable media for determining an internal time of a time-sensitive networking (TSN) network card are disclosed. An example method for determining an internal time of a TSN network card includes generating, at a computing device, at least one initial packet with a launch time parameter. The method further includes sending, by the computing device, the at least one initial packet to a TSN network card for transmission. The method further includes receiving, by the computing device, a transmit completion signal from the TSN network card confirming that the TSN network card transmitted the at least one initial packet. The method further includes determining, by the computing device, an approximate current internal time of the TSN network card using the launch time parameter and the received transmit completion signal.
An example system for determining an internal time of a TSN network card includes a processor, a memory communicatively connected to the processor, and a computing device implemented using the processor and the memory. The computing device is configured for generating at least one initial packet with a launch time parameter. The computing device is further configured for sending the at least one initial packet to a TSN network card for transmission. The computing device is further configured for receiving a transmit completion signal from the TSN network card confirming that the TSN network card transmitted the at least one initial packet. The computing device is further configured for determining an approximate current internal time of the TSN network card using the launch time parameter and the received transmit completion signal.
The subject matter described herein may be implemented in software in combination with hardware and/or firmware. For example, the subject matter described herein may be implemented in software executed by a processor. In one example implementation, the subject matter described herein may be implemented using a non-transitory computer readable medium having stored therein computer executable instructions that when executed by the processor of a computer control the computer to perform steps. Example computer readable media suitable for implementing the subject matter described herein include non-transitory devices, such as disk memory devices, chip memory devices, programmable logic devices, field-programmable gate arrays, and application specific integrated circuits. In addition, a computer readable medium that implements the subject matter described herein may be located on a single device or computer platform or may be distributed across multiple devices or computer platforms.
The term “network card” as used herein may be interchangeable with network interface card, network interface controller, and NIC.
The subject matter described herein will now be explained with reference to the accompanying drawings of which:
The subject matter described herein includes methods, systems, and computer readable media for determining an internal time of a time-sensitive networking (TSN) network card. A computing device may queue packets for a TSN network card to transmit at a specified time according to a launch time parameter. The computing device may base the launch time parameter on an internal clock in the computing device, which may not be synchronized with the internal time of the TSN network card. To ensure that the computing device is determining launch time parameters according to a time that corresponds with the internal time of the TSN network card, the computing device determines the internal time of the TSN network card as described herein.
The computing device generates one or more packets with a launch time parameter and queues the packets for the TSN network card to transmit. Each of the packets includes metadata with the launch time parameter and information identifying the packet, which the computing device stores. The computing device sends the one or more packets to the TSN network card and receives a transmit completion signal from the TSN network card once the packets have been transmitted. The computing device then determines an approximate current internal time of the TSN network card using the launch time parameter and the received transmit completion signal. The computing device identifies in memory the stored packet that was transmitted and the corresponding launch time parameter. The computing device then determines the current approximate internal time of the TSN network card based on the launch time parameter of the packet that the TSN network card transmitted.
In some embodiments, the computing device may disable the transmit completion signal and polling the TSN network card to determine when the packet is transmitted and determine the internal time of the TSN network card once the packet is transmitted based on the packet's launch time parameter. The computing device may synchronize clocks with the TSN network card, such as a system clock, a CPU clock, etc. Launch time parameters of subsequent packets for transmission may be based on the determined internal time of the TSN network card.
Computing device 102 may include a driver 108 configured to communicate with a network card 110. Computing device 102 generates one or more packets and sends the packets to network card 110 via driver 108. Network card 110 receives the packets and transmits them to a connected network. In system 100, network card 110 can send a transmit completion signal to computing device 102, specifically driver 108, when the network card 110 has transmitted the packets. The transmit completion signal may include an interrupt to processor 104, which computing device 102 may acknowledge and signal to network card 110 to stop the interrupt.
Driver 108 may disable transmit completion signals and implement polling to periodically check network card 110 transmit completion status. Network card 110 may expose one or more registers, which may be read/write registers, to driver 108. Using the one or more registers, driver 108 can determine the number of packets that have been enqueued with network card 110 for transmission and the number of packets that have already been sent. From this determination, computing device 102 can determine whether a transmit completion event has occurred, i.e., whether network card 110 has transmitted packets.
Computing device 102, specifically driver 302, sends the packets to TSN network card 304 for transmission. TSN network card 304 is configured to receive one or more packets from computing device 102 and transmit the packets to a connected computer network. TSN network card 304 is a network card that supports a TSN mode configured to transmit one or more packets received from computing device 102 at a specified transmission time, such as a time identified by the launch time parameter. The launch time parameter may include a specific time and/or a time in relation to the current time, such as 50 microseconds from now. TSN network card 304 may include an internal clock to measure a current time for the TSN network card 304. The internal clock may include a physical hardware clock (PHC), for example without limitation a physical hardware clock precision time protocol (PHC-PTP) clock. The internal clock may be incremented by a local oscillator to maintain a time proximate to an external time source. In one example, the internal clock of TSN network card 304 may be synchronized with a precision time protocol (PTP) grandmaster clock. In some embodiments, the internal clock of TSN network card 304 may be synchronized with internal clocks of other network cards.
Computing device 102 receives a transmit completion signal from TSN network card 304 confirming that the TSN network card 304 transmitted the packets. The transmit completion signal may include an interrupt to processor 104. Computing device 102 may acknowledge the interrupt and signal to TSN network card 304 to stop the interrupt. Computing device 102 may determine an approximate current internal time of TSN network card 304 using the launch time parameter of the transmitted packet and the received transmit completion signal indicating that the TSN network card 304 transmitted the packet. Upon receiving the transmit completion signal, the computing device 102 may review the stored packets in memory 106 and identify the packet that was transmitted. Computing device 102 may identify the transmitted packet by maintaining a record in memory 106 of which packets have been sent to TSN network card 304 and which packets have already been transmitted based on previously received transmit completion signals. Computing device 102 may identify the transmitted packet as the packet to follows the last transmitted packet.
In some embodiments, the transmit completion signal may include an identifier of the packet that was transmitted. Computing device 102 may determine which packet was transmitted by matching the identifier in the transmit completion signal with a packet stored in memory 106. Computing device 102 may use the metadata of stored packets in memory 106 to identify the packet that TSN network card 304 transmitted.
After determining which packet was transmitted, computing device 102 may determine the internal time of TSN network card 304 by using the launch time parameter of the packet. For example, if a launch time parameter of a packet that was transmitted directed TSN network card 304 to transmit the packet at 50 microseconds after 9:45:00 am, then computing device 102 may determine that the internal time of the TSN network card 304 when the computing device 102 received the transmit completion signal was approximately the time indicated by the launch time parameter, i.e., 50 microseconds after 9:45:00 am. In some embodiments, computing device 102 may at least determine that the current internal time of TSN network card 304 is the transmission time indicated in the launch time parameter of the transmitted packet or later than the transmission time but not earlier than the transmission time. In instances where computing device 102 queues a group of packets with the same launch time parameter, TSN network card 304 may send a transmit completion signal once the first packet of the group has been transmitted. Computing device 102 may use the transmit completion signal of the first packet to determine the internal time of TSN network card 304 because the transmission of the first packet in the group will be closest in time to the launch time parameter. In some embodiments, computing device 102 may determine the time that lapsed from the moment the computing device 102 received the transmit completion signal to the moment the computing device 102 determined the launch time parameter of the transmitted packet and determine the current internal time of TSN network card 304 based on the lapsed time.
Driver 302 may disable transmit completion signals and implement polling to periodically check TSN network card 304 for transmit completion status. In some circumstances, polling TSN network card 304 to determine whether a packet has been transmitted may be faster than otherwise receiving a transmit completion signal, such as an interrupt, from the TSN network card 304, especially when the packet is expected to be transmitted within a relatively short time, for example 10 microseconds. TSN network card 304 may expose one or more registers, which may be read/write registers, to driver 302. Using the one or more registers, driver 302 can determine the number of packets that have been enqueued with TSN network card 304 for transmission and the number of packets that have already been sent. From this determination, computing device 102 can determine whether a transmit completion event has occurred, i.e., whether TSN network card 304 has transmitted packets. Computing device 102 may detect a transmission time for the at least one packet by polling TSN network card 304 for a transmit completion status that includes a transmission time of the packet. In some embodiments, computing device 102 may poll TSN network card 304 continuously. Computing device 102 may determine an approximate current internal time of TSN network card 304 using the transmission time in the transmit completion status. In some embodiments, driver 302 may automatically disable transmit completion signals and implement polling to determine a transmission time of one or more packets when the launch time parameter of the one or more packets is lower than a threshold, for example 10 microseconds.
Computing device 102 may include an internal clock that the computing device 102 sets based on the determined internal time of TSN network card 304. Computing device 102 may synchronize a system time and/or a CPU time with the determined internal time of TSN network card 304. In some embodiments, TSN network card 304 may have a plurality of internal clocks and computing device 102 may synchronize the internal clocks according to the determined internal time of TSN network card 304 so that all the clocks are synchronized with each other. System 300 may include a plurality of TSN network cards within a network and computing device 102 may be configured to synchronize all the TSN network cards according to the determined internal time of TSN network card 304. Computing device 102 may delete from memory 106 the stored launch time parameter of a packet, metadata of the packet, and/or the entire packet after determining the approximate current internal time of TSN network card 304 based on the completed transmission of the corresponding packet.
Once computing device 102 receives an interrupt for a packet or a group of packets transmitted, computing device 102 may then queue a next group of packets for TSN network card 304 to transmit. Computing device 102 may generate at least one subsequent packet with a launch time parameter, wherein the launch time parameter of the subsequent packet is based on the determined approximate internal time of TSN network card 304. Scheduling subsequent packets and groups of packets for transmission based on the determined approximate internal time of TSN network card 304 can improve packet transmission efficiency by avoiding unnecessary delays that could be caused if the internal clock of computing device 102 ran fast compared to the internal time of TSN network card 304 and the computing device 102 set launch time parameters with a longer delay than necessary. Scheduling subsequent packets based on the determined internal time of TSN network card 304 can also avoid delays and packet loss caused by congestion if the internal clock of computing device 102 ran slow compared to the internal time of TSN network card 304 and the computing device 102 set launch time parameters too early to provide sufficient time for the TSN network card 304 to transmit the packets. Computing device 102 may also determine when to queue subsequent packets for transmission based on the determined internal time of TSN network card 304. In some embodiments, system 300 may include a plurality of computing devices 102 connected to TSN network card 304, wherein each of the computing devices 102 may determine an approximate current internal time of the TSN network card 304 and queue packets with launch time parameters that are based on the determined time.
At step 404, the computing device sends the at least one initial packet to a TSN network card for transmission. The computing device may store in a memory the launch time parameter before sending the at least one initial packet to the TSN network card. The computing device may include a virtual machine configured for peripheral component interconnect (PCI) passthrough of the TSN network card.
At step 406, the computing device receives a transmit completion signal from the TSN network card confirming that the TSN network card transmitted the at least one initial packet. The transmit completion signal may include an interrupt.
At step 408, the computing device determines an approximate current internal time of the TSN network card using the launch time parameter and the received transmit completion signal. The computing device may delete the stored launch time parameter of the at least one initial packet after determining the approximate current internal time of the TSN network card. The at least one initial packet may include a plurality of initial packets, wherein determining an approximate current internal time of the TSN network card may include using the received transmit completion signal of a first initial packet of the plurality of initial packets. The internal clock of the TSN network card may be synchronized with a precision time protocol (PTP) grandmaster clock. In some embodiments, the internal clock of the TSN network card may be synchronized with other network card internal clocks.
The computing device may set its internal clock based on the determined approximate current internal time of the TSN network card. The computing device may generate at least one subsequent packet with a launch time parameter, wherein the launch time parameter of the at least one subsequent packet is based on the determined approximate current internal time. The computing device may detect a transmission time for the at least one packet by polling the TSN network card for a transmit completion status that includes a transmission time of the at least one packet. The computing device may determine an approximate current internal time of the TSN network card using the transmission time in the transmit completion status.
It will be appreciated that method 400 is for illustrative purposes and that different and/or additional actions may be used. It will also be appreciated that various actions described herein may occur in a different order or sequence. It will be understood that various details of the subject matter described herein may be changed without departing from the scope of the subject matter described herein. Furthermore, the foregoing description is for the purpose of illustration only, and not for the purpose of limitation, as the subject matter described herein is defined by the claims as set forth hereinafter.
Number | Date | Country | Kind |
---|---|---|---|
a 2023 00212 | Apr 2023 | RO | national |
Number | Name | Date | Kind |
---|---|---|---|
9288777 | Hollabaugh et al. | Mar 2016 | B2 |
10425321 | Joseph et al. | Sep 2019 | B2 |
20140304505 | Dawson | Oct 2014 | A1 |
20150103828 | Chandhoke et al. | Apr 2015 | A1 |
20150103832 | Chandhoke et al. | Apr 2015 | A1 |
20150103836 | Chandhoke et al. | Apr 2015 | A1 |
20150103848 | Chandhoke et al. | Apr 2015 | A1 |
20150245306 | Boehlke | Aug 2015 | A1 |
20170331748 | Mangin | Nov 2017 | A1 |
20180070373 | Muench | Mar 2018 | A1 |
20180160424 | Cavalcanti et al. | Jun 2018 | A1 |
20180184438 | Cavalcanti et al. | Jun 2018 | A1 |
20180191642 | Biederman et al. | Jul 2018 | A1 |
20180212885 | Contavalli et al. | Jul 2018 | A1 |
20180227067 | Hu et al. | Aug 2018 | A1 |
20180237039 | Mong et al. | Aug 2018 | A1 |
20180302330 | Bush | Oct 2018 | A1 |
20180302331 | Bush | Oct 2018 | A1 |
20180309655 | Joseph | Oct 2018 | A1 |
20190045475 | Kasichainula | Feb 2019 | A1 |
20190087245 | Yamaura | Mar 2019 | A1 |
20200287803 | Sedarat | Sep 2020 | A1 |
20210014177 | Kasichainula | Jan 2021 | A1 |
20210117353 | Kasichainula | Apr 2021 | A1 |
20210303021 | Cui | Sep 2021 | A1 |
Number | Date | Country |
---|---|---|
101631080 | Jan 2010 | CN |
101854268 | Oct 2010 | CN |
108737003 | Oct 2021 | CN |
Entry |
---|
ETF—Earliest TxTime First (ETF), https://man7.org/linux/man-pages/man8/tc-etf.8.html, Jul. 5, 2018. |
Chinese Office Action for CN 201810373217-5 dated Feb. 2, 2021. |
Corrected Notice of Allowability for U.S. Appl. No. 15/498,452 dated Jul. 16, 2019. |
Notice of Allowance and Fees Due for U.S. Appl. No. 15/498,452 dated May 10, 2019. |
Non-Final Office Action for U.S. Appl. No. 15/498,452 dated Nov. 5, 2018. |