Abstract:
Transfer of data over UDP is facilitated between at least one application and at least one peer via a network. Data destined for the at least one peer is provided from the at least one application for transmission to the peer via the network. The data is encapsulated into UDP segments, which may further be fragmented according to packet size or application level framing constraints. Modulation event tokens are managed, and protocol processing of the data with the at least one peer is based in part on a result of the modulation event tokens managing such that data is caused to be transmitted to the at least one peer via the network nominally with desired data transmission rate characteristics. A result of the modulation event processing step is fed back to the to the modulation event tokens managing.

Description:
PRIORITY CLAIM 
     This application is related to U.S. patent application Ser. No. 11/217,661, filed Aug. 31, 2005 and entitled “Protocol offload transmit traffic management,” which is incorporated herein by reference in its entirety. 
     TECHNICAL FIELD 
     The present invention relates to the offload processing for User Datagram Protocol (UDP) and for other “connectionless” protocols and, in particular, relates to subdividing data for transmission over a network as well as transmit traffic management. 
     BACKGROUND 
     Popular Internet transport protocols include the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). The Transmission Control Protocol specifies multiplexing, checksum, and in-order reliable delivery with congestion and flow control. In contrast, UDP is a simpler protocol, which specifies multiplexing and checksum, but not congestion and flow control. Thus, UDP uses fewer processing resources in implementation than does TCP. 
     Given its relative complexity, protocol offload processing is commonly applied to TCP. Checksum offload for UDP is common, too. For example, many modern network interface cards (NIC&#39;s) provide checksum computation and insertion on the transmitting side for UDP, and checksum checking on the receiving side for UDP. 
     SUMMARY 
     Transfer of data is facilitated between at least one application and at least one peer via a network according to UDP or other connectionless protocol. Application payload data destined for the peer is provided from the at least one application, executing on a host computer, to intelligent network interface circuitry for transmission to the at least one peer via the network. 
     Processing of the application payload data by the intelligent network interface circuitry includes subdividing the application data based on packet size criteria with respect to the network. Modulation event tokens are managed, and protocol processing of the data is based in part on a result of the modulation event tokens managing such that protocol processed data is caused to be transmitted to the peer via the network nominally with desired data transmission rate characteristics. 
    
    
     
       BRIEF DESCRIPTION OF FIGURES 
         FIG. 1  illustrates an architecture in which payload subdivision of UDP application payload is performed by an intelligent offload device. 
         FIG. 2   a  illustrates the payload subdivision in the form of segmentation, whereas  FIG. 2   b  illustrates the payload subdivision in the form of fragmentation. 
         FIG. 3  broadly illustrates an architecture for modulating data transmission in protocol offload processing. 
         FIG. 4  illustrates an architecture of a flow processor to handle protocol offload processing and including data transmission modulation (traffic management) capability. 
         FIG. 5  illustrates a more detailed example of the traffic management portion of the  FIG. 4  architecture. 
     
    
    
     DETAILED DESCRIPTION 
     There is benefit to improve offload support to enhance the UDP protocol and other “connectionless” protocols, preferably without interfering with transmission of data according to the protocol. (While the discussion herein is heavily directed to UDP, many or all of the aspects may also be applied more generically to “connectionless” protocols.) 
     In accordance with one aspect, support is provided for segmentation offload processing in a network adapter (e.g., a network interface card, or NIC). This includes processing for the network adaptor to receive from the host an amount of data to be sent from the host to a peer via a network, and segmenting the data into a desired network frame size. 
     UDP messages (segments) are conventionally encapsulated in one or more Internet Protocol datagrams. Each datagram may contain a complete UDP segment or part thereof. In the case where an IP datagram contains only a part of a complete UDP segment, the IP datagram is considered a fragment of the whole message. 
     UDP processing conventionally does not consider (or is not affected by) network and/or peer characteristics. For example, UDP does not conventionally specify rate control, flow control or congestion control mechanisms. The lack of such mechanisms can lead to UDP transmit traffic exceeding the resources of the network or of the receiving end, which may lead to congestion, packet loss, and performance degradation. 
     Methods and apparatus are described to manage UDP data traffic at the sending end to address these issues. Network adapters are available to provide UDP support in the form of computing and inserting payload and header checksums. However, UDP processing can benefit from additional offload processing by an intelligent network adapter. 
     We first describe an aspect relating to segmentation and fragmentation, with reference to  FIGS. 1 ,  2   a  and  2   b . In particular, as broadly shown in  FIG. 1 , a host  102  is in communication with a peer  104  via a network  106 . An intelligent network adaptor  108  provides an interface between the host  102  and the network  106 . The intelligent network adaptor  108  provides payload subdivision functionality  110  for UDP protocol data transmission. 
     Payload subdivision functionality includes accepting “large” UDP payload from an application executing on a host and subdividing the large UDP payload into parts, prior to sending UDP information over the network to a peer. Offload processing may also include encapsulating each part into a transport layer packet by, for example, encapsulating each part, with or without the transport header, into a network layer packet before transmitting the part to the network. (It is noted that a payload may be common to multiple streams. Therefore, the same payload may be subdivided and transmitted multiple times or sent to a multicast network address. This may occur, for example, when the application is serving media content, and the media content is common for different users.) 
     As shown, for example, in  FIG. 2   a , an application payload  202  may be subdivided into a number of UDP segments  204 , each UDP segment  204  encapsulated in an IP datagram  206 . As shown in  FIG. 2   b , it is also possible that an application payload  252  results in just one UDP segment  254  and a number of IP datagrams  256 , each IP datagram  256  carrying a fragment of the segment, including one IP datagram  258  that carries the UDP header. 
     Referring specifically to  FIG. 2   a , the subdivision of application payload  202  into UDP segments  204  may correspond to application layer framing boundaries. The application layer framing may be implicit such as, for example, contained in the application payload  202 . On the other hand, application layer framing may be explicit, as an example, with framing headers inserted in the application payload  202  and removed by the network adapter  108  before transmission over the network  106 . In addition, the segmentation may be according to a desired maximum packet size. 
     With regard to application layer framing, packets are typically queued for transmission in a memory on the NIC. In order to recover application layer framing information, it may be necessary to read the framing information from the memory before transmitting each packet. As an example, the framing information associated with each packet may include a number of bytes that indicate the size of the packet. These bytes could be appended or pre-pended to the packet. In another example, the framing information is provided out of band, in a manner that allows the NIC to match the information with the associated packet. As an example, if the framing information and the packets are processed in two different First In First Out (FIFO) queues, it is possible to associate the framing information at the head of the framing FIFO to the corresponding packet at the head of the packet FIFO. 
     When UDP payload is segmented (i.e., it results in multiple UDP segments), it may be desirable to minimize the delay before the first segment is sent out on the network. Cut-through processing can be employed to generate and send out the first segment on the fly as the payload is streamed to the network adapter. The payload remainder may be stored in memory on the adapter, and subsequently sent out in other segments. 
     Now discussing fragmentation, as opposed to segmentation, the fragmentation of the UDP segment may be performed according to the Internet Protocol. The Internet Protocol specifies that each fragment carries a pointer to the offset in the transport layer segment at which the fragment starts, and that it is indicated if there are more fragments expected. 
     The payload subdivision functionality  110  may be according to a desired maximum packet size. It is possible to combine the two criteria for payload subdivision, whereby a UDP packet that exceeds the desired maximum packet size is fragmented into multiple parts, none of which exceeds the maximum packet size. 
     When a UDP segment is fragmented, it may be desirable to minimize the delay before the first IP datagram for the UDP segment appears on the network. Since the transport layer checksum is computed over the whole of the UDP payload and since the transport layer checksum appears in the UDP header, in some examples, the UDP header is sent last. Otherwise, if the UDP header is sent in the first IP datagram packet, a large delay may be incurred before the first packet can be sent. 
       FIGS. 2   a  and  2   b  illustrate the two cases ( FIG. 2   a , segmentation;  FIG. 2   b , fragmentation) and illustrates how the offload processing can retain the UDP header and send the UDP header after the last payload byte is processed. The fragment containing the header naturally occurs at offset zero into the UDP segment, and indicates that more fragments are expected. The fragment containing the UDP header may carry payload data, although it may be preferable not to do so. 
     Having discussed segmentation and fragmentation we now discuss UDP protocol offload processing to modulate the transmission of the IP datagrams across the network, to have particular desired data rate characteristics. As an example, data transmission may be modulated based on a desired peak transmission rate to, for example, operate to defined quality of service transmission characteristics for particular customers, smooth out (i.e., not propagate) jitter from a data source, and/or attempt to match the receive capabilities of receiving peer devices. A similar concept has been described in U.S. patent application Ser. No. 11/217,661, filed Aug. 31, 2005 and entitled “Protocol offload transmit traffic management” (and incorporated herein by reference in its entirety). 
       FIG. 3  broadly illustrates modulating data transmission from protocol offload processing. A data source  350  is a source of data to be transmitted. For example, the data source  50  may be a host computer. A protocol offload processing device  352  (such as a network interface controller, or NIC) handles transmission of data, according to the protocol (such as, for example, UDP) to a peer  354  over a network. A data transmission modulator  356  controls the protocol offload processing (which, in this case, is traffic management) according to desired data transmission characteristics and based on feedback  358  (e.g., modulation event tokens) from the protocol offload processing device  352  to the data transmission modulator  356 . 
     Broadly speaking, the traffic management controls the delivery of data across the network to nominally have desired characteristics, and a transmission traffic management capability may be provided for protocol offload processing accomplished using various architectures. Typically, the desired characteristics for data delivery are provided from a host computer. In some cases, processing more closely associated with the protocol processing determines the desired characteristics, typically based at least partly on characteristics of the network. 
     We now describe a specific example of protocol offload processing and modulating the transmission of data across the network. In the specific example, a flow processor architecture for protocol offload processing is employed, and a traffic management capability manages the operation of the flow processor (or, at least, portions of the flow processor) to control the flow of data communication via the network between the protocol offload processing and peer devices. While the processor architecture in the described example is a flow processor architecture, other architectures (perhaps not even processors) may be employed. 
     Turning now to  FIG. 4 , the flow processor architecture of the interface device  400 , having transmission traffic management capability, is described. An arbiter  402  arbitrates among various signals such as headers of control messages from a host ( 404   a ), and transmission modulation event tokens ( 404   c ). Before proceeding to describe the remainder of the  FIG. 3  flow processor architecture, it is noted by way of introduction that the transmission modulation event tokens  404   c , provided to the arbiter  402  via a transmission event modulator  406 , are employed to modulate the transmission of data across the network from the protocol offload interface device. It is noted that the arbiter  402  is a feature of the particular flow processor architecture of the  FIG. 2  device and would typically have only an indirect effect on the transmission traffic management capability. 
     When the arbiter  402  operates to allow a transmission modulation event through (the source of the transmission modulation event tokens, and including the transmission event modulator  406 , is discussed in detail later), the transmission modulation event includes a stream state identifier (tid). 
     In particular, the stream manager  412  provides the tid to a transmission control block (TCB)  414 . The TCB  414  provides the current state and attributes for the stream. As discussed in greater detail later, the stream may correspond to a 4-tuple, for example, or to any other granularity of operation. Different streams may have different granularities. Based on the current stream state and attributes provided from the TCB  414 , the stream manager  412  determines how to appropriately modify the stream state. The stream manager  412  provides the payload command manager  416  an indication of the modification to the stream state, as well as providing the indication of the modification back to the TCB  414 . The read, modify and write of the stream state and attributes is done in an atomic operation 
     Based on the indication of the modification, the payload command manager  416  issues one or more appropriate payload commands to the payload manager block  418 . Furthermore, as appropriate based on the modified stream state and the availability of additional data to send for the stream, the payload command manager  416  provides transmission modulation event tokens to the transmission event modulator  406 . 
     In addition to providing the indication of the modification to the payload command manager  416 , the stream manager  412  provides an appropriate packet header for data transmission to a form packet block  420 . Meanwhile, the payload manager block  418  provides the corresponding payload to the form packet block  420  (as discussed above, based on payload commands from the payload command manager  416 ). The form packet block  420  combines the packet header and corresponding payload into a packet for transmission across the network. A network protocol block  422  forms appropriate units of data for transmission across the network. In the  FIG. 4  example, packet data is transmitted across the network in an Ethernet-encapsulated manner, so the network protocol block  412  issues Ethernet frames for transmission across the network to a peer device. 
     As discussed above, the transmission modulation event tokens originate in the payload command manager  416  and are provided to the transmission event modulator  406 . In the example discussed above, a transmission modulation event is provided to the transmission event modulator  406  as the ultimate result of the arbiter  402  operating to allow a transmission modulation event through. 
     We now discuss the operation of a detailed example of the transmission event modulator  406 , with specific reference to the  FIG. 5  transmission event modulator  501  (an example of the transmission event modulator  406  in  FIG. 4 ) and also with reference to  FIG. 4 . Before describing  FIG. 5  in detail, however, we first discuss some general aspects of data transmission modulation. In general, the data transmission modulation discussed here relates to scheduling packet transmissions according to one or more desired data rate characteristics. 
     Shaping limits the peak rate at which data is transmitted over the network for a particular stream or class of streams. This capability has potentially many uses. For example, shaping can be used to provide different quality of service for different customers, based on an amount the customers pay, for example. 
     Shaping can also be useful when data coming from a source is inherently jittery. For example, an application reading data from disk storage may provide data with jitter (e.g., there may be bursts in the data when a read head has been moved over the data to be read). As another example, when a server is connected to a very high speed link (e.g., 10 Gbps) serving clients connected to 10/100 Mbps or even 1 Gbps links, data may be sent from the server to the clients up to 1,000 times faster than the client links can handle. In such a case, congestion and packet loss can result. 
     Yet another example area where shaping can be useful is when a media server streams video or audio data which is encoded at a certain rate. By shaping the sending rate to be close to the stream encoding rate, it is possible to implement receiving devices with limited buffering resources and therefore reduce their cost. 
     Thus, in general, shaping can be used to limit the maximum data transmission rate to accommodate characteristics of the path (including endpoints) or to impose characteristics on the transmissions, even if not to accommodate characteristics of the path. 
     We now discuss  FIG. 5  in some detail. Referring to  FIG. 5 , a transmission event modulator  501  (as discussed above, a specific example of the  FIG. 4  transmission event modulator  406 ) includes a data structure  502  provided to hold transmission modulation event tokens sent by the payload command manager  416  to the transmission event modulator  501 . 
     In the  FIG. 5  example, the FIFO&#39;s  504   a  through  504   h  (generally,  504 ) are usable for providing a shaping function. In general, then, modulation event tokens are stored into the appropriate portion of the data structure based on desired data transmission characteristics for the stream to which the modulation event token corresponds. For example, each FIFO  504  may correspond to a different Quality of Service promise. 
     We now discuss shaping. In one example, there are two types of shaping FIFO&#39;s. One type of shaping FIFO provides control over the inter-packet delay for a group (class) of streams, while the second type provides control over the inter-packet delay within a single stream. In one example, all event tokens for a particular FIFO cause the same inter-packet delay (i.e., out of that FIFO), so only one inter-packet delay is supported by each FIFO. 
     The mapping of streams to FIFO&#39;s determines the shaping type (per-class or per-stream). The first type of shaping (per class) may be accomplished by having a single FIFO (modulation queue) being configured to graduate modulation event tokens based on the time elapsed since the last token was graduated. The determination of the delay between graduations may be based on an indication of the size of each packet. The second type of shaping (per stream) may be accomplished by having a single FIFO configured to graduate timers based on a deadline carried by each timer. Whenever a timer is inserted in the FIFO, its graduation time is set to a fixed delay from the current time. The overall effect is that data for each stream is transmitted at the same fixed rate, whereas the first type of shaping realizes a fixed rate on a per-class basis. 
     A third type of shaping is provided by the use of a timer heap  503 . A heap graduates modulation timers based on an indication of the delay desired for each timer. This characteristic allows the heap to provide different shaping rates to different streams. 
     In some examples, triggering of a timer associated with the heap  503  or a FIFO  514  means only that a modulation event in the heap  503  or the FIFO  514  is ready to graduate out of the heap  503  or the FIFO  514  and into the arbiter  402  ( FIG. 4 ), not that the modulation event actually does so graduate. That is, as mentioned above, in some examples, an arbiter/selector  516  is provided at the output of the heap  503  and the FIFO&#39;s  514  to arbitrate among those modulation event tokens that are ready to graduate. The arbiter  516  may be configured according to, for example, a priority scheme, round robin scheme, or other arbitration scheme. 
     For example, a weighted round robin scheme may be employed, where the weight for a modulation event varies according to how much data there is to send for the stream or group of streams corresponding to that modulation event. 
     As mentioned above, although not part of the UDP protocol (or of other “connectionless” protocols), it may be desirable to control the flow of data, generated by an application, over the network according to a flow control scheme. The flow control may be handled entirely in an offload manner, such that it is transparent to the application. In addition, because the flow control scheme is not part of the UDP protocol, control information is communicated “out of band.” 
     The flow control scheme may, for example, limit the flow of data based on a window size, similar to the TCP protocol. For example, the window size may be communicated from the receiving peer(s). In one example, the window size corresponds to an amount of buffering available at the receiver(s), again similar to the TCP protocol. In another example, the window size is based in part on the state of the network, again similar to the TCP protocol. 
     The window size may place a limit on the number of bytes that can be sent, or a limit on the number of packets that may be sent, or both. For example, the intelligent network interface circuitry transmits a packet and subtracts the size of the packet in bytes from the window. If the window size is not large enough to accommodate sending a new packet, then the intelligent network interface circuitry suspends further transmission until the window is increased again. For example, the window increase may correspond to receiving credits from the receiving peer. Maintenance of the window size is accomplished by the stream manager  412 , for example, in the  FIG. 4  configuration. 
     As mentioned above, the flow control scheme may operate according to various different granularities. One may describe the packet group corresponding to the granularity chosen as belonging to a single UDP stream. In some examples, flow control is implemented on a per 4-tuple basis where, for UDP, the 4-tuple includes the source host IP address, the destination host IP address, the source host UDP port number and destination host UDP port number. In other examples, the flow control is implemented on a 2-tuple basis (source host IP address and destination host IP address). In other examples, the flow control is implemented for other granularities. 
     Unlike TCP, which uses a field in the TCP header, the UDP protocol does not directly accommodate the communication of flow control information. Rather, the flow control scheme for UDP uses “out of band” communication for flow control. Furthermore, the application and host need not have knowledge of or deal with the flow control, as the flow control scheme may terminate in the NIC card.