The present invention relates to apparatus and methods for transmission and reception of packet streams across a network with high speed and reliability.
High-speed packet streaming schemes are commonly used in transmitting real-time video and other digital media across a network. Because of the real-time nature of the data, the packet transmissions typically use a non-reliable protocol, without acknowledgment from the destination or retransmission by the source when packets are lost or corrupted. Therefore, in applications requiring high data availability, a source host may transmit multiple parallel, redundant streams of the data to the destination. Each packet is thus transmitted multiple times—once in each stream—over multiple different paths through the network—in order to increase the likelihood that at least one copy of each packet will be received intact at the destination.
In this sort of scheme, there is still no guarantee that all the packets in any given stream will reach the destination, nor can it be ensured that the packets will arrive at the destination in the order in which they were transmitted. Therefore, in many applications (such as broadcast or storage of the video data), the destination computer must store, reorder and interleave packets from the two (or more) received streams in order to reconstruct the data. This solution enables reliable video reconstruction, but at the cost of a substantial memory footprint and a heavy processing burden on the host processor, which increases data latency and can limit the data throughput.
Various schemes for handling data from redundant transmissions are known in the art. For example, U.S. Patent Application Publication 2009/0034633 describes a method for simultaneous processing of media and redundancy streams for mitigating impairments. The method comprises receiving a primary stream of encoded frames and a separate stream of redundant frames. The method further comprises decoding and reconstructing in parallel the frames in the primary stream and the separate stream of redundant frames, on a real-time basis, in accordance with a specified common clock reference. The method further comprises, upon determining that a frame in the primary stream exhibits an error or impairment, determining a decoded redundant frame in the separate stream that corresponds to the impaired frame, and substituting at least a portion of the information in the decoded redundant frame for a corresponding decoded version of the impaired frame.
Embodiments of the present invention that are described herein provide efficient apparatus and methods for receiving and handling redundant data streams from a network.
There is therefore provided, in accordance with an embodiment of the invention, communication apparatus, including a host interface, which is configured to be connected to a bus of a host computer having a processor and a memory, in which a buffer is allocated for receiving a data segment. A network interface is configured to receive from a packet communication network at least first and second redundant packet streams. Each packet stream includes a sequence of data packets, which include headers containing respective packet sequence numbers and data payloads of a predefined, fixed size containing respective slices of the data segment, such that redundant first and second copies of each slice are transmitted respectively in at least a first data packet in the first packet stream and a second data packet in the second packet stream. Packet processing circuitry is configured to receive the data packets from the network interface, to map the data packets in both the first and second packet streams, using the packet sequence numbers, to respective addresses in the buffer, and to write the data payloads to the respective addresses via the host interface while eliminating redundant data so that the buffer contains exactly one copy of each slice of the data segment, ordered in accordance with the packet sequence numbers.
In some embodiments, the packet processing circuitry is configured to map the packet sequence numbers to the respective addresses, using a linear mapping defined so that the first and second copies of any given data slice are both mapped to a common address in the buffer. In a disclosed embodiment, the mapping is defined such that each packet sequence number PSN is mapped to an address equal to A+(PSN−X)×B, wherein X is an initial sequence number, B is the fixed size of the data payloads, and A is a base address of the buffer.
In some embodiments, the data payloads include video data, including multiple data segments corresponding to frames of the video data. In one embodiment, the headers contain an indication of a start and end of each frame, and the packet processing circuitry is configured to identify the indication in the headers and to select the buffer to which the data payloads are to be written responsively to the identified indication.
In a disclosed embodiment, the packet processing circuitry is configured to maintain a record of the packet sequence numbers for which the data payloads have been written to the buffer, and responsively to the record, to discard redundant copies of the data payloads so that each slice is transmitted over the bus via the host interface no more than once. Alternatively, the packet processing circuitry is configured to transmit all of the copies of each slice over the bus so that the redundant data in the buffer are overwritten.
In a disclosed embodiment, the packet processing circuitry is configured to receive a work item from the processor indicating, for each data segment, an address of the buffer and the size of the slices, and to submit a completion report to the processor when all slices of the data segment have been written to the buffer.
In one embodiment, the first and second packet streams are transmitted in accordance with a Real-time Transport Protocol (RTP), and the headers include an RTP header, which contains the packet sequence numbers.
There is also provided, in accordance with an embodiment of the invention, a method for data communication, including allocating a buffer in a memory of a host computer for receiving a data segment. At least first and second redundant packet streams are received in a network interface controller (NIC) of the host computer from a packet communication network. Each packet stream includes a sequence of data packets, which include headers containing respective packet sequence numbers and data payloads of a predefined, fixed size containing respective slices of the data segment, such that redundant first and second copies of each slice are transmitted respectively in at least a first data packet in the first packet stream and a second data packet in the second packet stream. The data packets in both the first and second packet streams are mapped, using the packet sequence numbers, to respective addresses in the buffer. The data payloads are written to the respective addresses in the buffer while eliminating redundant data so that the buffer contains exactly one copy of each slice of the data segment, ordered in accordance with the packet sequence numbers.
There is additionally provided, in accordance with an embodiment of the invention, a method for data communication, which includes allocating a buffer in a memory of a host computer for receiving a data segment. A packet stream including a sequence of data packets, which include headers containing respective packet sequence numbers and data payloads of a predefined, fixed size containing respective slices of the data segment, is received in a network interface controller (NIC) of the host computer from a packet communication network. The data packets in the packet stream are mapped to respective addresses in the buffer using a linear mapping of the packet sequence numbers to the addresses. The data payloads are written to the respective addresses in the buffer, ordered in accordance with the packet sequence numbers.
The present invention will be more fully understood from the following detailed description of the embodiments thereof, taken together with the drawings in which:
In many real time streaming protocols, such as the Real-time Transport Protocol (RTP), each of the packets in each transmitted stream contains a respective packet sequence number (PSN), which can be used at the destination in detecting missing packets and restoring the packet data to the transmit order. In the present embodiments, as explained in detail hereinbelow, these reordering and reconstruction functions are carried out by hardware logic in the network interface controller (NIC) of the destination computer, thus offloading these tasks from the host processor. Although the disclosed embodiments relate to a single stream of video data (which is typically duplicated in at least one redundant stream), in general the destination computer may receive and process many such streams concurrently from different sources.
In the disclosed embodiments, the destination host processor allocates a single buffer to receive the reconstructed video data in each segment of an incoming data stream, for example, in each video frame, based on the expected segment size and data rate. These stream parameters may be preset or negotiated in each instance by exchange of control messages over the network between the source and destination hosts. The packet sizes can thus be assumed to be fixed and known to the host processors. Each transmitted packet is labeled with a successive PSN, as provided by RTP or another suitable protocol.
The receiving NIC performs the functions of data integrity checking, packet reordering, and elimination of redundant data, using the known packet sizes and PSNs. Thus the receiving NIC writes the data payloads to the proper locations in the allocated buffer, in accordance with the transmit order (and irrespective of the receive order), while discarding or overwriting the data from redundant packets. The receiving NIC notifies the destination host processor only when the data segment in memory is complete. The process of packet reception and reordering is thus entirely transparent to the destination host processor, which deals only with complete data segments. Assuming the receiving NIC is able to receive data from the network at wire speed, the latency and throughput of video data transfer at the destination are limited only by the processing and bus access rates of the receiving NIC. This solution not only maximizes data bandwidth, but also substantially reduces the processing load, memory footprint, and power consumption of the host processor.
Although the disclosed embodiments relate specifically to scenarios in which the source host transmits multiple redundant streams of packets to the destination, the principles of the present invention may similarly be applied to single streams of packets (transmitted without redundancy), as well as to schemes with higher degrees of redundancy.
A NIC 32 in each host computer 24, 26, 28, . . . , transmits the data packets over network 22 in two redundant packet streams 34 and 36, as indicated by the dashed arrows in
Streams 34 and 36, as well as the packet streams transmitted by hosts 26, 28, . . . , are addressed to a receiving (Rx) host computer 40, which is connected to network 22 by a NIC 42. Upon receiving the data packets from network 22, NIC 42 maps the packets in both of packet streams 34 and 36, using the packet sequence numbers, to respective addresses in a buffer in a memory 44 of host computer 40. NIC 42 writes the data payloads to the respective addresses while eliminating redundant data so that the buffer contains exactly one copy of each slice of the data segment, ordered in accordance with the packet sequence numbers. The video frames are thus immediately available in memory for retransmission (over a television network, for example) or other access.
In the pictured scenario, certain packets are lost or corrupted in transmission through network 22, and others reach NIC 42 out of order. NIC 42 detects and discards corrupted packets, for example by computing and checking packet checksums or other error detection codes, as provided by the applicable protocols. In the pictured example, NIC 42 has received only packets 54, 58 and 56 (in that order) from stream 34 and packets 52, 56 and 58 from stream 36. Using packet serial numbers 62, however, NIC is able to directly place data from the appropriate payloads 64 in the designated buffer in memory 44, and thus reconstruct a complete image frame 66 in memory 44. As noted earlier, NIC 42 eliminates redundant data so that the buffer contains exactly one copy of each slice of the frame, ordered in accordance with the packet sequence numbers. The process of reconstruction is transparent to software running on host computer 40 and requires no involvement by the software in data reordering or eliminating redundancies.
Driver 75 creates a respective work queue 76 (conventionally referred to as a queue pair, or QP) for each incoming stream of video packets that NIC 42 is to receive. For each segment in the incoming stream (such as a video frame) that NIC 42 is to receive, driver 75 posts a corresponding work item (referred to as a work queue element, or WQE) in the appropriate work queue 76 pointing to a buffer 78 that is to receive the data in the segment. In some embodiments, this functionality is implemented as follows:
The result will be that both copies of any given data slice are mapped to a common slice address in buffer 78, and thus the corresponding, redundant data will be written to the same place in the host memory, regardless of the arrival order.
NIC 42 comprises a host interface 82, connected to bus 72, and a network interface 84, which connects to network 22. Network interface 84 in this example comprises two ports 88 with different addresses, serving as the respective destination addresses for streams 34 and 36. Alternatively, both streams may be received through the same port.
Packet processing circuitry 86 is coupled between host interface 82 and network interface 84. For the sake of simplicity,
Network interface 84 passes incoming packets in streams 34 and 36 to packet parsing logic 90. To process these packets, packet processing circuitry 86 reads and makes use of the information posted in the appropriate work queue 76 in memory 44 by driver 75. This information enables packet parsing logic 90 to locate and extract PSN 62 and payload 64 from each packet. Scatter engine 92 uses PSN 62, together with the base address of buffer 78, to map each slice 80 to the respective address in the buffer, and thus to write the data payloads to the appropriate addresses via host interface 82.
The packet illustrated in
In other words, for a packet stream beginning from an initial sequence number X, with a data payload of size B in each packet, and a buffer base address A, scatter engine 92 will write the payload of each packet to an address:
Payload address=A+(PSN−X)×B.
When the payloads of two valid packets from different, respective streams in a redundant transmission scheme map to the same address (whether they have the same or different PSNs), only one of them will ultimately be written to the buffer. Scatter engine 92 may overwrite the payload of the packet that arrives first with that of the second copy of the packet, or it may write only one of the payloads to the buffer and discard the other.
For some protocols, the segment definition is also indicated in the packet headers, thus enabling alternative implementations that reduce the involvement of driver software even further. For example:
For a NIC operating at very high speed (for example, receiving incoming video data at 400 Gbps), access from NIC 42 to memory 44 over bus 72 can become a bottleneck. To reduce the bus pressure, packet processing circuitry 86 can monitor PSNs and, when the payload from a given packet having a given PSN in one of the streams has already been written to the buffer, simply discard the corresponding packet from the other stream, rather than overwriting the data already in the buffer. For this purpose, processing circuitry 86 may maintain a record, such as a PSN vector and a rolling PSN window, for each flow. Each packet arriving causes processing circuitry 86 to flip a bit in the PSN vector. When the bit for a given PSN is set when corresponding packet from the other stream arrives, packet parsing logic 90 drops this latter packet without further processing.
It will be appreciated that the embodiments described above are cited by way of example, and that the present invention is not limited to what has been particularly shown and described hereinabove. Rather, the scope of the present invention includes both combinations and subcombinations of the various features described hereinabove, as well as variations and modifications thereof which would occur to persons skilled in the art upon reading the foregoing description and which are not disclosed in the prior art.
This application claims the benefit of U.S. Provisional Patent Application 62/457,919, filed Feb. 12, 2017, which is incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
4783698 | Harney | Nov 1988 | A |
5668809 | Rostoker et al. | Sep 1997 | A |
5949441 | Ristau | Sep 1999 | A |
6097734 | Gotesman et al. | Aug 2000 | A |
6157955 | Narad | Dec 2000 | A |
6321276 | Forin | Nov 2001 | B1 |
6766467 | Neal et al. | Jul 2004 | B1 |
6789143 | Craddock | Sep 2004 | B2 |
6981027 | Gallo et al. | Dec 2005 | B1 |
7171484 | Krause et al. | Jan 2007 | B1 |
7263103 | Kagan et al. | Aug 2007 | B2 |
7298746 | De La Iglesia | Nov 2007 | B1 |
7299266 | Boyd et al. | Nov 2007 | B2 |
7464198 | Martinez et al. | Dec 2008 | B2 |
7522606 | Sendrovitz | Apr 2009 | B1 |
7930422 | Freimuth et al. | Apr 2011 | B2 |
8051212 | Kagan et al. | Nov 2011 | B2 |
8176252 | Alexander et al. | May 2012 | B1 |
8495301 | Alexander et al. | Jul 2013 | B1 |
8638796 | Dan | Jan 2014 | B2 |
8682108 | Tian et al. | Mar 2014 | B2 |
8751701 | Shahar et al. | Jun 2014 | B2 |
9143467 | Kagan et al. | Sep 2015 | B2 |
9270299 | Luby | Feb 2016 | B2 |
9367746 | Ishihara | Jun 2016 | B2 |
9767529 | Liu et al. | Sep 2017 | B1 |
20020152327 | Kagan et al. | Oct 2002 | A1 |
20030005164 | Trainin | Jan 2003 | A1 |
20030046530 | Poznanovic | Mar 2003 | A1 |
20040013117 | Hendel | Jan 2004 | A1 |
20040042483 | Elzur | Mar 2004 | A1 |
20040156379 | Walls et al. | Aug 2004 | A1 |
20040221128 | Beecroft et al. | Nov 2004 | A1 |
20040230979 | Beecroft et al. | Nov 2004 | A1 |
20050135395 | Fan et al. | Jun 2005 | A1 |
20060075119 | Hussain | Apr 2006 | A1 |
20070124378 | Elzur | May 2007 | A1 |
20070162619 | Aloni et al. | Jul 2007 | A1 |
20080109562 | Ramakrishnan et al. | May 2008 | A1 |
20090034633 | Rodirguez | Feb 2009 | A1 |
20090083517 | Riddle | Mar 2009 | A1 |
20100121971 | Shao et al. | May 2010 | A1 |
20100262973 | Ernst et al. | Oct 2010 | A1 |
20100274876 | Kagan et al. | Oct 2010 | A1 |
20110268194 | Nagano | Nov 2011 | A1 |
20120020413 | Chen et al. | Jan 2012 | A1 |
20120033039 | Sasaki et al. | Feb 2012 | A1 |
20130322753 | Lim et al. | Dec 2013 | A1 |
20140269893 | Parikh | Sep 2014 | A1 |
20150063358 | Wu | Mar 2015 | A1 |
20150181211 | He | Jun 2015 | A1 |
20150373075 | Perlman et al. | Dec 2015 | A1 |
20160277473 | Botsford | Sep 2016 | A1 |
20160337426 | Shribman | Nov 2016 | A1 |
Entry |
---|
Infiniband Trade Association, “InfiniBandTM Architecture Specification”, vol. 1, Release 1.2.1, 1727 pages, Nov. 2007. |
“MPI: A Message-Passing Interface Standard”, Version 2.2, Message Passing Interface Forum, 647 pages, Sep. 4, 2009. |
Shah et al., “Direct Data Placement over Reliable Transports”, IETF Network Working Group, RFC 5041, 38 pages, Oct. 2007. |
Culley et al., “Marker PDU Aligned Framing for TCP Specification”, IETF Network Working Group, RFC 5044, 74 pages, Oct. 2007. |
“Linux kernel enable the IOMMU—input/output memory management unit support”,2 pages, Oct. 15, 2007 http://www.cyberciti.biz/tips/howto-turn-on-linux-software-iommu-support.html. |
Burstein et al., U.S. Appl. No. 15/460,251, filed Mar. 16, 2017. |
SMPTE Standard 2110-20:2017, “Professional Media Over Managed IP Networks: Uncompressed Active Video”, The Society of Motion Picture and Television Engineers, 23 pages, Aug. 10, 2017. |
SMPTE Standard 2110-30:201y, “Professional Media over IP Networks—PCM Digital Audio”, The Society of Motion Picture and Television Engineers, 7 pages, Jan. 26, 2017. |
SMPTE Standard 2110-21:201y, “Professional Media Over IP Networks: Timing Model for Uncompressed Active Video”, The Society of Motion Picture and Television Engineers, 15 pages, Jan. 18, 2017. |
SMPTE Standard 2110-10:201y, “Professional Media over IP Networks: System Timing and Definitions”, The Society of Motion Picture and Television Engineers, 12 pages, Jan. 26, 2017. |
SMPTE Standard—“Transport of High Bit Rate Media Signals over IP Networks (HBRMT)”, The Society of Motion Picture and Television Engineers, 16 pages, Oct. 9, 2012. |
International Application # PCT/IB2018/054350 search report dated Oct. 4, 2018. |
U.S. Appl. No. 15/622,094 office action dated Dec. 27, 2018. |
U.S. Appl. No. 15/790,075 office action dated Dec. 27, 2018. |
Sjoberg et al., “RTP Payload Format and File Storage Format for the Adaptive Multi-Rate (AMR) and Adaptive Multi-Rate Wideband (AMR-WB) Audio Codecs”, Request for Comments: 4867, pp. 1-59, Apr. 2007. |
U.S. Appl. No. 15/622,094 office action dated May 10, 2019. |
Number | Date | Country | |
---|---|---|---|
20180234473 A1 | Aug 2018 | US |
Number | Date | Country | |
---|---|---|---|
62457919 | Feb 2017 | US |