# Patent

## Title
Enhancement of end-to-end network QoS

## Abstract

A network endpoint system and related method and computer program product for use in a network to support enhanced end-to-end QoS in the network. The network endpoint system is adapted to receive network data of varying priority on behalf of a data consumer operating at the application layer of a network protocol stack implemented by the network endpoint system. The network endpoint system includes a network interface controller adapted to receive network frames containing the network data, plural network data handling channels each having an associated priority, and priority processing logic adapted to transfer the network data from the network interface controller to the plural data handling channels on a prioritized basis according to the network data priority. Also disclosed are a network interface controller and a network node to support enhanced end-to-end QoS in a network.

## Background
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to digital networks and the handling of information traffic therein. More particularly, the invention concerns the provision of differentiated quality of service (QoS) levels for data exchanged between endpoints in an Internet Protocol (IP) network.
2. Description of the Prior Art
By way of background, various QoS mechanisms have been implemented to provide prioritized data transmission service in modern IP networks. Instead of using a “best effort” communication mode that treats all data the same, these QoS mechanisms prioritize network traffic into differentiated service categories. High priority traffic categories may thus be defined (e.g., voice communications, video/audio streams, etc.) and processed at a higher priority than other network data, thereby reducing undesirable network transmission problems such as dropped packets, latency, jitter, etc. Well known QoS mechanisms include the link level traffic prioritization scheme defined by the IEEE (Institute of Electrical and Electronics Engineers) 802.1p standard and the network level prioritization schemes implemented by RSVP (ReSource reserVation Procotol) and DiffServ (Differentiated Service).
Although the foregoing QoS mechanisms work well for transporting data across routing nodes within an IP network, bottlenecks can develop at network endpoints when the endpoint systems are unable to process the packets they receive in a timely fashion. This can occur, for example, when device/system queues are full, memory is low, processing resources are overburdened, etc. As a result, high priority packets can be dropped or blocked behind normal or low priority packets, thus defeating the purpose of the QoS scheme.
Accordingly, a need exists for an improvement in the provision of network QoS such that bottlenecks associated with network endpoints can be reduced or eliminated. What is required is a technique that allows incoming high priority packets to be handled efficiently and with due regard being given to their QoS priority level.
SUMMARY OF THE INVENTION
The foregoing problems are solved and an advance in the art is obtained by a network endpoint system and related method and computer program product for use in a network to support enhanced end-to-end QoS in the network. The network endpoint system is adapted to receive network data of varying priority on behalf of a data consumer operating at the application layer of a network protocol stack implemented by the network endpoint system. The network endpoint system includes a network interface controller adapted to receive network frames containing the network data, plural network data handling channels each having an associated priority, and priority processing logic adapted to transfer the network data from the network interface controller to the plural data handling channels on a prioritized basis according to the network data priority.
According to exemplary disclosed embodiments, the network data priority may be indicated by a priority indicator field in the network frames. The network interface controller or a network interface controller device driver in the system may implement the priority processing logic to inspect the priority indicator field as one of a link layer priority indicator in a link layer portion of the frame or a network layer priority indicator in a network packet portion of the frame. The plural network data handling channels may include plural ring buffers containing buffer descriptors corresponding to the network data. The priority processing logic may then be implemented by priority mapping logic in the network interface controller adapted to inspect the network frames and deliver the buffer descriptors to the plural ring buffers on a prioritized basis according to the network data priority. The priority processing logic may be further implemented by ring buffer selection logic in a network interface controller device driver in the system adapted to process the buffer descriptors in the plural ring buffers on a prioritized basis according to the network data priority. The plural network data handling channels may alternatively comprise plural kernel protocol stack channels adapted to process buffer descriptors corresponding to the network data. In that case, the priority processing logic may be implemented by channel selection logic in a network interface controller device driver in the system adapted to deliver the buffer descriptors to the kernel protocol stack channels on a prioritized basis according to the network data priority. The plural kernel protocol stack channels may comprise plural buffer descriptor queues adapted to enqueue the buffer descriptors on a prioritized basis according to the network data priority. Alternatively, the plural kernel protocol stack channels may comprise prioritized buffer descriptor processing threads. The system may further include buffer allocation logic adapted to allocate the buffer descriptors on a prioritized basis according to the network data priority and in accordance with memory availability. If the data consumer of the system also acts as a network data source, the priority processing logic may be further adapted to transfer the network data from the plural data handling channels to the network interface controller on a prioritized basis according to the network data priority.
In further aspects, a network interface controller and a network node are provided to support enhanced end-to-end QoS in a network. The network interface controller includes a frame receiver adapted to receive network frames containing the network data from a network link, a host input/output unit adapted to provide the network data to the host network endpoint system, and priority mapping logic in the network interface controller adapted to transfer the network data to plural data handling channels of the host network endpoint system according to the network data priority. The network node includes a first link interface adapted to receive network frames containing the network data from an edge of the network, a second link interface adapted to send the network frames to the network endpoint system, and priority insertion logic adapted to inspect a network layer portion of the network frames for a priority indicator corresponding to the network data priority and to insert a corresponding priority indicator in a link layer portion of the network frames.



BRIEF DESCRIPTION OF THE DRAWINGS
The foregoing and other features and advantages of the invention will be apparent in the from the following more particular description of exemplary embodiments of the invention, as illustrated accompanying Drawings, in which:
FIG. 1 is a functional block diagram showing an exemplary IP network;
FIG. 2 is a functional block diagram showing exemplary network data processing in a prior art IP network host;
FIG. 3 is a functional block diagram showing a further view of the network data processing performed by the prior art IP network host of FIG. 2;
FIG. 4 is a functional block diagram showing a still further view of the network data processing performed by the prior art IP network host of FIG. 2;
FIG. 5 is a functional block diagram showing exemplary network data processing performed by a first exemplary improved IP network host;
FIG. 5A is a flow diagram showing exemplary frame reception processing performed by the IP network host of FIG. 5;
FIG. 5B is a flow diagram showing exemplary frame transmission processing performed by the IP network host of FIG. 5;
FIG. 6 is a functional block diagram showing exemplary network data processing performed by a second exemplary improved IP network host;
FIG. 6A is a flow diagram showing exemplary frame reception processing performed by the IP network host of FIG. 6;
FIG. 6B is a flow diagram showing exemplary frame transmission processing performed by the IP network host of FIG. 6;
FIG. 7 is a functional block diagram showing exemplary network data processing performed by a third exemplary improved IP network host;
FIG. 7A is a flow diagram showing exemplary frame reception processing performed by the IP network host of FIG. 7;
FIG. 7B is a flow diagram showing exemplary frame transmission processing performed by the IP network host of FIG. 7;
FIG. 8 is a diagrammatic illustration of a link layer Ethernet frame encapsulating an IPv4 network layer packet.
FIG. 9 is a functional block diagram showing a first alternative implementation of the second exemplary improved IP network host of FIG. 6;
FIG. 10 is a functional block diagram showing a second alternative implementation of the second exemplary improved IP network host of FIG. 6;
FIG. 11 is a functional block diagram showing exemplary data processing hardware that may be used to provide a system for implementing the improved IP network hosts of FIGS. 5-7; and
FIG. 12 is a diagrammatic representation of exemplary storage media that may be used in a computer program product implementation of software and/or firmware logic of the network hosts of FIGS. 5-7.



DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS
Turning now to drawing figures, wherein like reference numerals indicate like elements in all of the several views, FIG. 1 illustrates a network endpoint system 2 disposed within an IP network 4. The IP network 4 is shown by way of example only to include one or more internal routing nodes 6, together with an edge node 8. The routing nodes can be implemented as routers, switches, hubs or any other network device capable of forwarding packets bound for network endpoints. The edge node 8 is similar in most respects to the internal routing nodes 6, but is adapted to act as an interface between the network 4 and one or more other networks, shown by reference numeral 10. The networks 10 provide pathways from the network 4 to one or more remote endpoint systems 12 that are assumed to be capable of sending data packets of varying priority to the endpoint system 2. The edge node 8 includes a first link interface 8A adapted to receive network frames containing network data from an edge of the network 4, and a second link interface 8B adapted to send the network frames to the network endpoint system 2.
The network 4 can be implemented using any of a variety of connectionless (or connection-oriented) networking technologies that support the IP network layer protocol. At the physical level, the interconnections between the various elements that comprise the network 4 may be provided by electrical wiring, fiber optic cabling, wireless links or any combination thereof. At the data link level, the network 4 may implement Media Access Control (MAC) framing or any other suitable data link level protocol. IP networks of this type include those built according to the IEEE 802.x family of standards, such as Ethernet (802.3) and Wireless Protocol (802.11). The network 4 is further assumed to implement a QoS mechanism such as one of those described by way of background above.
Unlike conventional IP network endpoints, the endpoint 2 is adapted to handle packets having different priorities in a manner that preserves the QoS scheme implemented in the network 4. Before describing how this is achieved, it will be helpful to review network packet processing as performed by a conventional IP network host. Such a host is shown by reference numeral 20 in FIG. 2. The host 20 includes a network interface card (NIC) 22 that is connected to a network link 24. The network link 24, which may be wire-based or wireless, carries link-layer frames (e.g., Ethernet frames) that encapsulate IP packets. The NIC 22 is managed by an operating system NIC device driver 26 that is responsible for transferring frame data between the NIC and an operating system kernel protocol stack 28. The kernel protocol stack 28 is responsible for transferring the data to and from one or more applications, such as applications 301, 302 and 303, each of which may act as a data source or a data sink. As shown, the applications 301, 302 and 303 may have different priorities relative to the network traffic they handle. For example, application 301 could be a high priority delay sensitive application engaged in interactive video conferencing or voice communication, application 302 could be a medium priority controlled load application engaged in streaming multimedia or business-critical traffic handling, and application 303 could be a low priority best efforts application engaged in file transfer, web browsing, etc.
Within the memory of the host 20 are a pair of ring buffers that assist in transferring frame data between the NIC 24 and the kernel protocol stack 28. One ring buffer 32 is used for frame transmission (TX) and the other ring buffer 34 is used for frame reception (RX). Each ring buffer represents a circular FIFO (first in, first out) queue of buffer descriptors containing pointers to frame-containing buffers in the host memory. Transmit buffers containing data that are associated with frame transmission are referenced on the transmit ring buffer 32. Receive buffers containing data that are associated with frame reception are referenced on the receive ring buffer 34. Each ring buffer 32 and 34 has a pair of pointers for reading and writing the enqueued buffer descriptors. The transmit ring buffer 32 has a host write pointer (“HOST WRITE”) that identifies the current queue slot for writing transmit buffer descriptors and a NIC read pointer (“NIC READ”) that identifies the current queue slot for reading transmit buffer descriptors. The receive ring buffer 34 has a NIC write pointer (“NIC WRITE”) that identifies the current queue slot for writing receive buffer descriptors and a host read pointer (“HOST READ”) that identifies the current queue slot for reading receive buffer descriptors.
During packet reception, the network interface card (NIC) 22 receives a link layer frame that contains an IP packet from the network link 24. It is assumed for purposes of discussion only that the NIC 22 is a modern interface card that is capable of performing bus mastering DMA (direct memory access) data transfers with the network host on which it resides. Other types of NIC could also be used. For NICs that do not have bus mastering capability, the NIC device driver will need to support the data transfer. The NIC 22 may include a transceiver 221 for accessing the network link medium, a host input/output (I/O) unit 222, a packet receive memory 223, a packet transmit memory 224, and a frame processor 225. With additional reference now to FIG. 3, the incoming frame is placed in a local receive buffer (located in the NIC's receive memory 223), and the NIC processor 225 initiates a DMA transfer to the host 20 (via the NIC I/O unit 222). The frame contents are transferred over a host bus 36 and written into a buffer within the host memory 38. The NIC processor 225 determines the memory address for the start of the frame by examining a next free buffer descriptor that the NIC processor 225 will have previously fetched from the host 20. The NIC 22 modifies the previously fetched buffer descriptor to add information about the new frame, such as its length, checksum information, etc., then initiates a DMA transfer of the modified buffer descriptor to the host memory 38. In particular, as additionally shown in FIG. 4, the modified buffer descriptor is placed in the host receive ring buffer 34 using the current value of that ring buffer's NIC write pointer. Depending on how the NIC 22 is configured to interact with the host operating system, the NIC may then raise a hardware interrupt that will invoke the NIC device driver 26 to read the modified buffer descriptor on the receive ring buffer 34 in order to retrieve the new frame and process it into the host's kernel protocol stack. For efficiency reasons, such an interrupt is normally raised after some number of incoming frames have been processed by the NIC 22 and their buffer descriptors have been DMA burst-transferred onto the receive ring buffer 34. In servicing the interrupt, the NIC device driver 26 uses the receive ring buffer's host read pointer to locate all modified buffer descriptors placed in the receive ring buffer 34 by the NIC 22 since the last interrupt. The device driver 26 then passes the modified buffer descriptors to the kernel protocol stack 28 for further processing and returns from the interrupt. Note that polling could be used in lieu of a hardware interrupt in order to invoke the NIC device driver 26 to service the receive ring buffer 34.
The foregoing process is essentially reversed during packet transmission. The host operating system is informed that new frame data to be transmitted is in a buffer of the host memory 38. The operating system builds a buffer descriptor for the frame and places it in the transmit ring buffer 32, using the host write pointer to do so. The NIC device driver 26 notifies the NIC 22 that the new buffer descriptor is ready to be fetched and processed. For efficiency reasons, the NIC 22 is normally notified after some number of frames are ready to be processed for transmission. The NIC processor 225 initiates a DMA burst transfer of the new buffer descriptors from the transmit ring buffer 32 and processes them. After determining the memory addresses of the buffers holding the new frames, the NIC processor 225 initiates a DMA transfer of the frame contents across the host bus 36. The frame contents are received via the NIC I/O unit 222 and placed in a local transmit buffer in the NIC's transmit memory 224. When all segments of a given frame have arrived, the NIC 22 transmits that frame onto the network link 24. Depending on how the NIC 22 is configured to interact with the host operating system, the NIC may raise an interrupt to the host 20 to indicate that the frame transmission has completed.
As described by way of background above, a deficiency of the foregoing frame processing procedure is that QoS priorities cannot be handled satisfactorily. During frame reception, incoming frames are enqueued (by reference) on the receive ring buffer 32 in the order in which they are received from the NIC 22. This means that high priority frames whose data is destined for the high priority application 301 may be interspersed with lower priority frames destined for the medium priority application 302 or the low priority application 303. Given the often bursty nature of network traffic, a high priority frame might be enqueued on the receive ring buffer 32, followed by a burst of several low priority frames, and followed again by another high priority frame. Because, the NIC device driver 26 processes the buffer descriptors on the receive ring buffer 32 in sequence (by incrementing the host read pointer), the high priority application 301 can suffer undesirable communication latency while the device driver processes the low priority frames. During frame transmission, outgoing frames are enqueued on the transmit ring buffer 34 in the order in which they are received from the kernel protocol stack 28. This means that high priority frames emanating from the high priority application 301 may be interspersed with lower priority frames from the medium priority application 302 or the low priority application 303. Again, given the often bursty nature of network traffic, a high priority frame might be enqueued on the transmit ring buffer 34, followed by a burst of several low priority frames, and followed again by another high priority frame. Because, the NIC processor 225 processes the buffer descriptors on the transmit ring buffer 34 in sequence (by incrementing the NIC read pointer), the high priority application 301 can suffer undesirable communication latency while the NIC processes the low priority frames.
The present disclosure illustrates several ways that the network endpoint system 2 of FIG. 1 can be improved in order to overcome the foregoing problem and provide support enhanced end-to-end network QoS. Each technique involves the use of multiple network data handling channels to separately handle frames with different QoS priorities, such that higher priority frames will not be blocked behind lower priority frames. In one implementation, shown in FIG. 5, the network endpoint system 2 is embodied as an improved IP network host 20A that is identical in most respects to the network host 20 of FIG. 2 (as shown by the use of substantially corresponding reference numerals). However, instead of just a single pair of send/receive buffers 32/34 as shown in FIG. 2, the network host 20A and the NIC 22A support multiple pairs of send/receive ring buffers 32A1/34A1, 32A2/34A2 and 32A3/34A3. Each ring buffer pair represents a driver-level frame processing channel that can be associated with a given QoS priority. In FIG. 5, the ring buffer pair 32A1/34A1 (with each ring buffer respectively labeled HTX and HRX) corresponds to a high priority level, the ring buffer pair 32A2/34A2 (with each ring buffer respectively labeled MTX and MRX) corresponds to a medium priority level, and the ring buffer pair 32A3/34A3 (with each ring buffer respectively labeled LTX and LRX) corresponds to a low priority level. It will be appreciated that additional ring buffer pairs may be added if more priority levels are needed, the depiction of three ring buffer pairs herein being arbitrary and for purposes of illustration only. The NIC processor 22A5 of FIG. 5 is different from the conventional NIC processor 225 of FIG. 2 in that it includes priority mapping logic 22A6 that associates the send/receive buffers 32A1/34A1, 32A2/34A2 and 32A3/34A3 with different QoS priorities.
With additional reference now to the flow diagram of FIG. 5A, when receiving frames (step 5A-1), the NIC priority mapping logic 22A6 reads QoS information in each incoming frame (step 5A-2) and places the frame (by reference) in the correct receive ring buffer 34A1, 34A2 or 34A3 for processing (step 5A-3). The NIC device driver 26A is also modified to include ring buffer selection logic 26A1. When the NIC device driver 26A is invoked following frame reception, the ring buffer selection logic 26A1 processes the receive ring buffers 34A1, 34A2 and 34A3 in the order of their respective priorities (step 5A-4). In particular, each time the NIC device driver 26A is invoked in response to a NIC hardware interrupt or a NIC polling operation, it processes the high priority receive ring buffer 34A1 first, passing all high priority buffer descriptors thereon to the kernel protocol stack 28A for delivery to the high priority application 30A1. Similar processing is then performed on the medium priority receive ring buffer 34A2, followed by the low priority receive ring buffer 34A3. This removes the device bottleneck resulting from the interleaved processing of different priority frames and enables such frames to be processed by the kernel protocol stack according to their relative QoS priorities.
With additional reference now to the flow diagram of FIG. 5B, when sending packets, the NIC device driver's ring buffer selection logic 26A evaluates the priority of the buffer descriptors received from the kernel protocol stack 28A (step 5B-1) and places them on the corresponding transmit ring buffers 32A1, 32A2 or 32A3 (step 5B-2). In step 5B-3, after the NIC 22A is notified that the new frames are ready for transmission, the NIC's priority mapping logic 22A6 processes the high priority transmit ring buffer 32A1 first so that high priority frames are transmitted ahead of medium priority and low priority frames. Similar processing is then performed on the medium priority transmit ring buffer 32A2, followed by the low priority transmit ring buffer 32A3. This removes the device bottleneck resulting from the interleaved processing of different priority frames and enables such frames to be transmitted onto the network link 24A according to their relative QoS priorities, thus resulting in QoS enhanced transmission (step 5B-4).
FIG. 6 illustrates an alternative implementation in which the network endpoint system 2 is embodied in an improved IP network host 20B that is identical in most respects to the network host 20A of FIG. 5 (as shown by the use of substantially corresponding reference numerals). However, in the FIG. 6 implementation each of the receive/transmit ring buffers 32B1/34B1, 32B2/34B2 and 32B3/34B3 is associated with a protocol stack-level frame priority channel within the kernel protocol stack 28B. The NIC device driver 26B further includes channel selection logic 26B2 for implementing the foregoing associations. The receive ring buffers 34B1, 34B2 and 34B3 are respectively associated with kernel protocol receive channels 28B1, 28B2 and 28B3. The transmit ring buffers 32B1, 32B2 and 32B3 are respectively associated with kernel protocol transmit channels 28B4, 28B5 and 28B6.
With additional reference now to the flow diagram of FIG. 6A, during frame reception (step 6A-1), the NIC priority mapping logic 22B6 reads QoS information in each incoming frame (step 6A-2) and places the frame (by reference) in the correct receive ring buffer 34B1, 34B2 or 34B3 for processing (step 6A-3). Each time the NIC device driver 26B is invoked in response to a NIC hardware interrupt or a NIC polling operation, the ring buffer selection logic 26B1 processes the receive ring buffers 34B1, 34B2 and 34B3 in the order of their respective priorities (step 6A-4). The NIC device driver 26B then transfers the buffer descriptors from the prioritized receive ring buffers 34A1, 34A2 and 34A3 to the prioritized receive channels 28B1, 28B2 and 28B3 according their respective priorities (step 6A-5). In particular, the NIC device driver's channel selection logic 26B2 transfers buffer descriptors from the high priority receive ring buffer 34B1 to the high priority receive channel 28B1. Similarly, medium priority buffer descriptors are transferred from the medium priority receive ring buffer 34B2 to the medium priority receive channel 28B2, and low priority buffer descriptors are transferred from the low priority receive ring buffer 34B3 to the low priority receive channel 28B3.
With additional reference now to the flow diagram of FIG. 6B, during frame transmission, buffer descriptors are received from the transmit channels 28B4, 28B5 and 28B6 (step 6B-1) and placed on the corresponding transmit ring buffers 32B1, 32B2 or 32B3 (step 6B-2) on a prioritized basis. In particular, the NIC device driver's ring buffer selection logic 26B1 and channel selection logic 26B2 identify and transfer buffer descriptors from the high priority transmit channel 28B4 to the high priority transmit ring buffer 32B1. Similarly, medium priority buffer descriptors are identified and transferred from the medium priority transmit channel 28B5 to the medium priority transmit ring buffer 32B2, and low priority buffer descriptors are identified and transferred from the low priority transmit channel 28B6 to the low priority transmit ring buffer 32B3. In step 6B-3, after the NIC 22B is notified that the new frames are ready for transmission, the NIC's priority mapping logic 22B6 processes the high priority transmit ring buffer 32B1 first so that high priority frames are transmitted ahead of medium priority and low priority frames. Similar processing is then performed on the medium priority transmit ring buffer 32B2, followed by the low priority transmit ring buffer 32B3. This removes the device bottleneck resulting from the interleaved processing of different priority frames and enables such frames to be transmitted onto the network link 24B according to their relative QoS priorities, thus resulting in QoS enhanced transmission (step 6B-4).
The kernel protocol channels 28B1, 28B2, 28B3, 28B4, 28B5 and 28B6 might themselves be given a weight that causes them to run with a preference. For example, the channel processing for the channels 28B1, 28B2, 28B3, 28B4, 28B5 and 28B6 could be implemented in separate execution threads, and channel weighting could be achieved using thread priority indicators that cause the threads to execute at different priority levels (e.g., as prioritized execution threads). Similarly, the priority might also inform data buffer allocation requests such that when the memory is low the requests associated with the lower priority task/packet are dropped. For example, the NIC device driver 22B may be responsible for allocating new buffer descriptors after it processes the receive ring buffers 34B1, 34B2, and 34B3. A buffer allocation mechanism 41 in the host operating system (e.g., as part of the kernel protocol stack 28B) could be implemented so that, when a low memory condition is present, only buffer allocation requests for the high priority receive ring buffer 34B1 will be granted while buffer allocation requests for the medium and low priority receive ring buffers 34B2 and 34B3 will be dropped until more memory becomes available. Similar buffer allocation processing may be performed on the transmit side. Thus, using the implementation of FIG. 6, high priority data will benefit from increased QoS due to a combination of the dedicated high priority ring buffers 32B1 and 34B1, high priority thread processing in the kernel protocol channels 28B1 and 28B4, and a memory allocation preference during low memory conditions. Exemplary implementations of kernel protocol channel processing are described in more detail below in connection with FIGS. 9 and 10.
FIG. 7 illustrates an alternative implementation in which the network endpoint system 2 is embodied in an improved IP network host 20C that is identical in most respects to the network host 20B of FIG. 6 (as shown by the use of substantially corresponding reference numerals). However, in the FIG. 7 implementation a standard NIC 22C uses a single set of send/receive ring buffers 32C/34C (as described above per FIGS. 2-4). The NIC device driver 26C does not require ring buffer selection logic, but instead has priority mapping logic 26C1 for determining the QoS priority of buffer descriptors in the send/receive ring buffers 32C/34C. The NIC device driver 26 also includes channel selection logic 26C2 for associating the prioritized buffer descriptors with different kernel protocol channels, namely, kernel protocol receive channels 28C1, 28C2 and 28C3, and kernel protocol transmit channels 28C4, 28C5 and 28C6.
With additional reference now to the flow diagram of FIG. 7A, during frame reception (step 7A-1), the NIC 22 places the frame (by reference) in the receive ring buffer 34C for processing (step 7A-2). Note that the frame referenced by the buffer descriptor will include a QoS indicator that indicates frame priority. Each time the NIC device driver 26C is invoked in response to a NIC hardware interrupt or a NIC polling operation, the buffer descriptors are processed on the receive ring buffer 34C to determine their respective priorities (step 7A-3) and are delivered to the prioritized receive channels 28C1, 28C2 and 28C3 based on the priorities (step 7A-4). In particular, the NIC device driver's priority mapping logic 26C1 and channel selection logic 26C2 respectively identify and transfer the buffer descriptors on the receive ring buffer 34C according to their priority. High priority buffer descriptors are identified and transferred to the high priority receive channel 28C1. Similarly, medium priority buffer descriptors are identified and transferred from the receive ring buffer 34C to the medium priority receive channel 28C3, and low priority buffer descriptors are identified and transferred from the receive ring buffer 34C to the low priority receive channel 28C3. The NIC device driver 26 will thus associate incoming frames with kernel protocol channels of the correct priority. As described above in connection with FIG. 6, these kernel protocol channels can run in different execution threads having differing priorities.
With additional reference now to the flow diagram of FIG. 7B, during frame transmission, buffer descriptors are received from the transmit channels 28C4, 2C5 and 28C6 (step 7B-1) and placed on the transmit ring buffer 32C (step 7B-2) in order of frame priority. In particular, the NIC device driver's priority mapping logic 26C1 and channel selection logic 26C2 first identify and transfers buffer descriptors from the high priority transmit channel 28C4 to the transmit ring buffer 32C. Similarly, medium priority buffer descriptors are then identified and transferred from the medium priority transmit channel 28C5 to the transmit ring buffer 32C, and low priority buffer descriptors are identified and transferred from the low priority transmit channel 28C6 to the transmit ring buffer 32C. Outbound frames will thus be provided to the NIC 22C for transmission by kernel protocol channels having varying priority. In particular, in step 7B-3, after the NIC 22C is notified that the new frames are ready for transmission, the NIC 22 processes the priority-ordered buffer descriptors on the transmit ring buffer 32C. Due to the priority ordering, high priority frames are transmitted ahead of medium priority and low priority frames. This removes the device bottleneck resulting from the interleaved processing of different priority frames and enables such frames to be transmitted onto the network link 24C according to their relative QoS priorities, thus resulting in QoS enhanced transmission (step 7B-4).
In any of the implementations shown in FIGS. 5, 6 and 7, the edge router 8 shown in FIG. 1 that is situated at the ingress of the network 4 can be implemented with priority insertion logic 42 that inserts a priority indicator in link layer frames if this information is not already present. This would be the case where a network level QoS mechanism such as DiffServ is used in the network 4. The link layer priority indicator is needed because NICs conventionally inspect link layer frame information but only the IP address portion of the frame-encapsulated IP network layer packet. As shown in the exemplary Ethernet frame 44 of FIG. 8, the link layer priority indicator may be inserted in accordance with the IEEE 802.1Q/802.1P standards. In particular, IEEE 802.1P user priority bits may be inserted in an IEEE 802.1Q TCI (Tag Control Information) field of the Ethernet frame 44 (labeled “TCI-USER PRIORITY”). Other link layer priority indicators may also be used. The priority insertion logic 42 inspects the IP packet portion of the frame 44 to determine the value of the network level QoS priority indicator therein. In FIG. 8, the frame 44 is shown to encapsulate an IPv4 (Internet Protocol version 4) network layer packet 46. The TOS (Type of Service) field of the packet 46 is used for DiffServ-style QoS management. After determining the value of the QoS information in the TOS field of the packet 46, the priority insertion logic 42 maps it to a corresponding link layer QoS value and inserts this value in the TCI-USER PRIORITY field of the frame 44.
Alternatively, in lieu of having the edge router insert link layer priority indicators, any of the NICs 22A, 22B and 22C could be adapted to inspect the encapsulated IP packet 46 for its network level priority indicator. If the NICs 22A, 22B and 22C are not adapted to support this inspection, the priority classification could be performed by the respective NIC device drivers 26A, 26B and 26C.
Turning now to FIGS. 9 and 10, two alternative techniques for implementing the kernel protocol channels used by the IP network host 20B of FIG. 6 are shown. By way of example only, FIGS. 9 and 10 illustrate how multi-channel frame processing may be performed in the IP network host 20B, which uses plural ring buffers and plural kernel protocol channels. Note that the same kernel protocol processing techniques could be used in the IP network host 20C of FIG. 7, except that only a single ring buffer pair would be present.
In FIG. 9, the three receive ring buffers 34B1, 34B2 and 34B3 are shown receiving buffer descriptors from the NIC 22B following frame reception on the network link 24B. As described above, after NIC 22B writes buffer descriptors of varying priority to the ring buffers 34B1, 34B2 and 34B3, the NIC device driver 26B is invoked (typically via a hardware interrupt) to retrieve the buffer descriptors and forward them to the kernel protocol stack 28B. In some operating systems, such as Linux® kernel version 2.6, a NIC device driver running in hardware interrupt context transfers buffer descriptors on the receive ring buffer to a per-cpu backlog queue. Following the enqueue operation, the device driver schedules a software interrupt (softirq) to process the backlog queue, then exits the hardware interrupt. When the software interrupt is invoked, it processes the buffer descriptors on the backlog queue, causing them to be passed up the kernel protocol stack to a receive queue.
In the implementation of FIG. 9, the kernel protocol channels 28B1, 28B2 and 28B3 are implemented as a set of prioritized backlog queues 48 and a corresponding set of receive queues 50. In particular, for the high priority kernel protocol channel 28B1, there is a high priority backlog queue 481 and a high priority receive queue 501. Similarly, for the high medium priority kernel protocol channel 28B2 there is a medium priority backlog queue 482 and a medium priority receive queue 502, and for the low priority protocol channel 28B3 there is a low priority backlog queue 483 and a low priority receive queue 503. Software interrupt logic 52 is used to process the backlog queues 481, 482 and 483. Instead of performing conventional buffer descriptor processing on a single backlog queue, the software interrupt logic 52 in FIG. 9 may be adapted to process the backlog queues 481, 482 and 483 in sequential fashion, beginning with the high priority backlog queue 481, followed by the medium priority backlog queue 482, and ending with the low priority backlog queue 483. In this way, the buffer descriptors in the respective queues will be processed by the software interrupt 52 in prioritized fashion. Other queue processing algorithms could also be used, such as a weighted round robin algorithm that causes the software interrupt 52 to favor processing of the high priority backlog queue 48 over the other queues. Time limits could be placed on the processing of each backlog queue 481, 482 and 483 to ensure that each queue receives attention before the software interrupt 52 relinquishes the host processor. Higher layer processing logic 54 may be used to process the varying priority buffer descriptors on the receive queues 501, 502 and 503 in analogous fashion. If desired, the higher layer processing logic 54 could be multithreaded so that each receive queue 501, 502 and 503 is processed by an execution thread of corresponding priority.
In FIG. 10, the kernel protocol channels 281, 282 and 283 are handled somewhat differently. Only a single backlog queue 48 and receive queue 50 are used. Prioritized buffer descriptor handling during packet reception may then be provided by multiple levels of software interrupt logic 52 so as to provide multi-threaded buffer descriptor processing. In particular, the IP network host 20B of FIG. 10 may implement a high priority software interrupt 521, a medium priority software interrupt 522 and, if necessary, a low priority software interrupt 523. These interrupts may run at corresponding high, medium and low thread priority levels. After the NIC device driver 26B sequentially places high priority, medium priority and low priority buffer descriptors on the backlog queue 48, it can separately schedule the software interrupts 521, 522, and 523 for execution. The high priority software interrupt 521 will execute first due to its high priority and process high priority buffer descriptors. The high priority software interrupt 522 may also continue to process medium and low priority buffer descriptors, if it has time. Otherwise, these buffer descriptors may be handled by the medium priority software interrupt 522, followed by the low priority software interrupt 523, if necessary. The higher layer processing 54 of FIG. 10 is the same as in FIG. 9.
Accordingly, a technique for enhancing end-to-end network QoS has been disclosed. It will be appreciated that the foregoing concepts may be variously embodied in any of a data processing system, a machine implemented method, and a computer program product in which programming logic is provided by one or more machine-useable media for use in controlling a data processing system to perform the required functions. Relative to a data processing system and machine implemented method, FIG. 11 illustrates an exemplary hardware environment 100 that may be used to implement the network endpoint system 2. The hardware environment 100 includes a CPU or other data processing resource 102 and a main memory 104 that provide a data processing core, a graphics card 106 for generating visual output information to a display monitor 107, a peripheral storage device 108, other peripheral devices 110, and a bus infrastructure 112 interconnecting the foregoing elements. The software components of the network endpoint system 2 may be loaded in the main memory 104. Various I/O (Input/Output) resources may be provided by the peripheral devices 110, which may include a USB bus controller, a SCSI disk controller, and a NIC. The monitor 107 may be implemented as part of a user interface.
Relative to a computer program product having a machine-readable media and programming logic, exemplary data storage media for storing the programming logic are shown by reference numeral 200 in FIG. 12. The media 200 are shown as being portable optical storage disks of the type that are conventionally used for commercial software sales, such as compact disk-read only memory (CD-ROM) disks, compact disk-read/write (CD-R/W) disks, and digital versatile disks (DVDs). Such media can store the programming logic of the network endpoint system 2, either alone or in conjunction with another software product that incorporates the required functionality. The programming logic could also be provided by portable magnetic media (such as floppy disks, flash memory sticks, etc.), or magnetic media combined with drive systems (e.g. disk drives), or media incorporated in data processing platforms, such as random access memory (RAM), read-only memory (ROM) or other semiconductor or solid state memory. More broadly, the media could comprise any electronic, magnetic, optical, electromagnetic, infrared, semiconductor system or apparatus or device, transmission or propagation medium (such as a network), or other entity (including a signal) that can contain, store, communicate, propagate or transport the programming logic for use by or in connection with a data processing system, computer or other instruction execution system, apparatus or device. It will also be appreciated that the invention may be embodied in a combination of hardware logic and software elements, and that the software elements may include but are not limited to firmware, resident software, microcode, etc.
While various embodiments of the invention have been described, it should be apparent that many variations and alternative embodiments could be implemented in accordance with the invention. It is understood, therefore, that the invention is not to be in any way limited except in accordance with the spirit of the appended claims and their equivalents.

## Claims

1. A network endpoint system for receiving and sending network data of varying priority on behalf of a data consumer operating at the application layer of a network protocol stack implemented by said network endpoint system, comprising:
a network interface controller operable to receive network frames containing inbound network data;
plural network data handling channels each having an associated priority;
priority processing logic operable to transfer said inbound network data from said network interface controller to said plural data handling channels on a prioritized basis according to said network data priority;
said data consumer also acting as a network data source and said priority processing logic being further operable to transfer outbound network data from said plural data handling channels to said network interface controller on a prioritized basis according to said network data priority;
said network interface controller being operable to send on a prioritized basis network frames containing said prioritized outbound network data;
said plural network data handling channels comprising plural ring buffers containing buffer descriptors corresponding to said inbound and outbound network data;
said plural ring buffers including plural receive ring buffers for said buffer descriptors corresponding to said inbound network data and plural transmit ring buffers for said buffer descriptors corresponding to said outbound network data;
said priority processing logic being implemented by priority mapping logic in said network interface controller operable to inspect said network frames and deliver said buffer descriptors corresponding to said inbound network data to said plural receive ring buffers on a prioritized basis according to said network data priority;
said priority processing logic being further implemented by ring buffer selection logic in a network interface controller device driver in said system operable to process said buffer descriptors in said plural receive ring buffers on a prioritized basis according to said network data priority; and
said priority processing logic being further implemented by said priority mapping logic in said network interface controller being operable to process said buffer descriptors corresponding to said outbound network data that are in said plural transmit ring buffers on a prioritized basis according to said network data priority.

2. A system in accordance with claim 1, further including buffer allocation logic operable to allocate said buffer descriptors on a prioritized basis according to said network data priority and in accordance with memory availability to provide a prioritized allocation of memory resources for handling said network data based on said associated priority.

3. A network endpoint system for receiving and sending network data of varying priority on behalf of a data consumer operating at the application layer of a network protocol stack implemented by said network endpoint system, comprising:
a network interface controller operable to receive network frames containing inbound network data;
plural network data handling channels each having an associated priority;
priority processing logic operable to transfer said inbound network data from said network interface controller to said plural data handling channels on a prioritized basis according to said network data priority;
said data consumer also acting as a network data source and said priority processing logic being further operable to transfer outbound network data from said plural data handling channels to said network interface controller on a prioritized basis according to said network data priority;
said network interface controller being operable to send on a prioritized basis network frames containing said prioritized outbound network data;
said plural network data handling channels comprising plural comprise plural ring buffers containing buffer descriptors corresponding to said inbound and outbound network data;
said plural ring buffers including plural receive ring buffers for said buffer descriptors corresponding to said inbound network data and plural transmit ring buffers for said buffer descriptors corresponding to said outbound network data;
said plural network data handling channels further comprising plural kernel protocol stack channels operable to process buffer descriptors corresponding to said inbound and outbound network data;
said priority processing logic being implemented by priority mapping logic in said network interface controller operable to inspect said received network frames and deliver said buffer descriptors corresponding to said inbound network data to said plural receive ring buffers on a prioritized basis according to said network data priority;
said priority processing logic being further implemented by ring buffer selection logic in a network interface controller device driver in said system operable to process said buffer descriptors in said plural receive ring buffers on a prioritized basis according to said network data priority;
said priority processing logic being further implemented by channel selection logic in said network interface controller device driver operable to deliver said buffer descriptors on said plural receive ring buffers to said kernel protocol stack channels on a prioritized basis according to said network data priority;
said ring buffer selection logic and said channel selection logic being further operable to deliver said buffer descriptors corresponding to said outbound network data that are in said kernel protocol stack channels to said plural transmit ring buffers on a prioritized basis according to said network data priority; and
said priority mapping logic in said network interface controller being further operable to read said buffer descriptors in said plural transmit ring buffers on a prioritized basis according to said network data priority.

4. A method for receiving and sending network data of varying priority on behalf of a data consumer operating at the application layer of a network protocol stack, comprising:
receiving network frames containing inbound network data at a network interface controller;
providing plural network data handling channels each having an associated priority;
performing priority processing to transfer said inbound network data from said network interface controller to said plural network data handling channels on a prioritized basis according to said network priority;
performing priority processing to transfer outbound network data from said plural network data handling channels on a prioritized basis according to said network priority;
sending on a prioritized basis network frames containing said prioritized outbound network data from said network interface controller;
said plural network data handling channels comprising plural ring buffers containing buffer descriptors corresponding to said inbound and outbound network data;
said plural ring buffers including plural receive ring buffers for said buffer descriptors corresponding to said inbound network data and plural transmit ring buffers for said buffer descriptors corresponding to said outbound network data;
said priority processing being implemented by priority mapping logic in said network interface controller operable to inspect said network frames and deliver said buffer descriptors corresponding to said inbound network data to said plural receive ring buffers on a prioritized basis according to said network data priority;
said priority processing being further implemented by ring buffer selection logic in a network interface controller device driver in said system operable to process said buffer descriptors in said plural receive ring buffers on a prioritized basis according to said network data priority; and
said priority processing being further implemented by said priority mapping logic in said network interface controller being operable to process said buffer descriptors corresponding to said outbound network data that are in said plural transmit ring buffers on a prioritized basis according to said network data priority.

5. A method in accordance with claim 4, further including allocating said buffer descriptors on a prioritized basis according to said network data priority and in accordance with memory availability to provide a prioritized allocation of memory resources for handling said network data based on said associated priority.

6. A method for receiving and sending network data of varying priority on behalf of a data consumer operating at the application layer of a network protocol stack, comprising:
receiving network frames containing inbound network data at a network interface controller;
providing plural network data handling channels each having an associated priority;
performing priority processing to transfer said inbound network data from said network interface controller to said plural network data handling channels on a prioritized basis according to said network priority;
performing priority processing to transfer outbound network data from said plural network data handling channels on a prioritized basis according to said network priority;
sending on a prioritized basis network frames containing said prioritized outbound network data from said network interface controller;
said plural network data handling channels comprising plural comprise plural ring buffers containing buffer descriptors corresponding to said inbound and outbound network data;
said plural ring buffers including plural receive ring buffers for said buffer descriptors corresponding to said inbound network data and plural transmit ring buffers for said buffer descriptors corresponding to said outbound network data;
said plural network data handling channels further comprising plural kernel protocol stack channels operable to process buffer descriptors corresponding to said inbound and outbound network data;
said priority processing being implemented by priority mapping logic in said network interface controller operable to inspect said received network frames and deliver said buffer descriptors corresponding to said inbound network data to said plural receive ring buffers on a prioritized basis according to said network data priority;
said priority processing being further implemented by ring buffer selection logic in a network interface controller device driver in said system operable to process said buffer descriptors in said plural receive ring buffers on a prioritized basis according to said network data priority;
said priority processing being further implemented by channel selection logic in said network interface controller device driver operable to deliver said buffer descriptors on said plural receive ring buffers to said kernel protocol stack channels on a prioritized basis according to said network data priority;
said ring buffer selection logic and said channel selection logic being further operable to deliver said buffer descriptors corresponding to said outbound network data that are in said kernel protocol stack channels to said plural transmit ring buffers on a prioritized basis according to said network data priority; and
said priority mapping logic in said network interface controller being further operable to read said buffer descriptors in said plural transmit ring buffers on a prioritized basis according to said network data priority.

7. A computer program product, comprising:
one or more non-transitory computer useable media;
means associated with said computer useable media for programming a data processing platform to receive and send network data of varying priority on behalf of a data consumer operating at the application layer of a network protocol stack, as by:
receiving network frames containing inbound network data at a network interface controller;
providing plural network data handling channels each having an associated priority;
performing priority processing to transfer said inbound network data from said network interface controller to said plural network data handling channels on a prioritized basis according to said network priority;
performing priority processing to transfer outbound network data from said plural network data handling channels on a prioritized basis according to said network priority;
sending on a prioritized basis network frames containing said prioritized outbound network data from said network interface controller;
said plural network data handling channels comprising plural ring buffers containing buffer descriptors corresponding to said inbound and outbound network data;
said plural ring buffers including plural receive ring buffers for said buffer descriptors corresponding to said inbound network data and plural transmit ring buffers for said buffer descriptors corresponding to said outbound network data;
said priority processing being implemented by priority mapping logic in said network interface controller operable to inspect said network frames and deliver said buffer descriptors corresponding to said inbound network data to said plural ring buffers on a prioritized basis according to said network data priority;
said priority processing being further implemented by ring buffer selection logic in a network interface controller device driver in said system operable to process said buffer descriptors in said plural receive ring buffers on a prioritized basis according to said network data priority; and
said priority processing being further implemented by said priority mapping logic in said network interface controller being operable to process said buffer descriptors corresponding to said outbound network data that are in said plural transmit ring buffers on a prioritized basis according to said network data priority.

8. A computer program product in accordance with claim 7, further including allocating said buffer descriptors on a prioritized basis according to said network data priority and in accordance with memory availability to provide a prioritized allocation of memory resources for handling said network data based on said associated priority.

9. A computer program product, comprising:
one or more non-transitory computer useable media;
means associated with said computer useable media for programming a data processing platform to receive and send network data of varying priority on behalf of a data consumer operating at the application layer of a network protocol stack, as by:
receiving network frames containing inbound network data at a network interface controller;
providing plural network data handling channels each having an associated priority;
performing priority processing to transfer said inbound network data from said network interface controller to said plural network data handling channels on a prioritized basis according to said network priority;
performing priority processing to transfer outbound network data from said plural network data handling channels on a prioritized basis according to said network priority;
sending on a prioritized basis network frames containing said prioritized outbound network data from said network interface controller;
said plural network data handling channels comprising plural ring buffers containing buffer descriptors corresponding to said inbound and outbound network data;
said plural ring buffers including plural receive ring buffers for said buffer descriptors corresponding to said inbound network data and plural transmit ring buffers for said buffer descriptors corresponding to said outbound network data;
said plural network data handling channels further comprising plural kernel protocol stack channels operable to process buffer descriptors corresponding to said inbound and outbound network data;
said priority processing being implemented by priority mapping logic in said network interface controller operable to inspect said received network frames and deliver said buffer descriptors corresponding to said inbound network data to said plural receive ring buffers on a prioritized basis according to said network data priority;
said priority processing being further implemented by ring buffer selection logic in a network interface controller device driver in said system operable to process said buffer descriptors in said plural receive ring buffers on a prioritized basis according to said network data priority;
said priority processing being further implemented by channel selection logic in said network interface controller device driver operable to deliver said buffer descriptors on said plural receive ring buffers to said kernel protocol stack channels on a prioritized basis according to said network data priority;
said ring buffer selection logic and said channel selection logic being further operable to deliver said buffer descriptors corresponding to said outbound network data that are in said kernel protocol stack channels to said plural transmit ring buffers on a prioritized basis according to said network data priority; and
said priority mapping logic in said network interface controller being further operable to read said buffer descriptors in said plural transmit ring buffers on a prioritized basis according to said network data priority.