Network adapter for interrupting host computer system in the event the host device driver is in both transmit and receive sleep states
First Claim
1. A network adapter to interface between a network and a host computer system, said host computer system having a host memory, one or more transmit buffers within said host memory, and one or more receive buffers within said host memory, said host computer system further having a device driver that enters a transmit sleep state when all said transmit buffers are full for transmitting packets, and that enters a receive sleep state when all said receive buffers are empty for receiving packets, said host memory further having a transmit ring and a receive ring, said transmit ring being a circular data structure having entries and each said entry having an ownership bit and an address pointing to a one of said one or more transmit buffers said receive ring being a circular data structure having entries and each said entry having an ownership bit and an address pointing to a one of said one or more receive buffers, comprising:
- means for detecting if said device driver is in said transmit sleep state;
means for detecting if said device driver is in said receive sleep state;
a transmit consumer means, having,a first register to receive one of said entries on said transmit ring, anda means for reading a transmit ring entry from said host memory into said first register and determining whether said transmit ring entry is owned by said network adapter;
a receive consumer means, having,a second register to receive a receive ring entry having an ownership bit, anda means for reading a receive ring entry from said host memory into said second register and determining whether said receive ring entry is owned by said network adapter; and
means for interrupting said host computer system in the event that said device driver is in both said transmit sleep state and said receive sleep state and a one of said one or more receive buffers is available for said device driver, said one or more receive buffers available for said device driver containing data received from said network by said network adapter.
2 Assignments
0 Petitions
Accused Products
Abstract
A network adapter with an interrupt generation circuit to minimize the number of host computer system interrupts needed to notify the host computer system that the network adapter has consumed one or more host memory buffers. The interrupt generation circuit issues an interrupt to the host computer system when the host computer system has entered both a transmit sleep state and a receive sleep state, and the network adapter has consumed a host memory buffer not processed by the host computer system. When the host computer system has no work to do with respect to transmit buffers in the host computer memory, it enters a transmit sleep state and indicates to the network adapter the last transmit buffer it processed. When the host computer system has no work to do with respect to receive buffers in the host computer memory, it enters a receive sleep state and indicates to the network adapter the last receive buffer it processed. If subsequent to both these indications, the network adapter consumes a host memory buffer that the host computer system has not processed, the interrupt generation circuit issues an interrupt to the host computer system. The network adapter further includes means for the host computer system to notify the network adapter that the host computer has produced multiple host memory buffers for the network adapter to consume.
61 Citations
18 Claims
-
1. A network adapter to interface between a network and a host computer system, said host computer system having a host memory, one or more transmit buffers within said host memory, and one or more receive buffers within said host memory, said host computer system further having a device driver that enters a transmit sleep state when all said transmit buffers are full for transmitting packets, and that enters a receive sleep state when all said receive buffers are empty for receiving packets, said host memory further having a transmit ring and a receive ring, said transmit ring being a circular data structure having entries and each said entry having an ownership bit and an address pointing to a one of said one or more transmit buffers said receive ring being a circular data structure having entries and each said entry having an ownership bit and an address pointing to a one of said one or more receive buffers, comprising:
-
means for detecting if said device driver is in said transmit sleep state; means for detecting if said device driver is in said receive sleep state; a transmit consumer means, having, a first register to receive one of said entries on said transmit ring, and a means for reading a transmit ring entry from said host memory into said first register and determining whether said transmit ring entry is owned by said network adapter; a receive consumer means, having, a second register to receive a receive ring entry having an ownership bit, and a means for reading a receive ring entry from said host memory into said second register and determining whether said receive ring entry is owned by said network adapter; and means for interrupting said host computer system in the event that said device driver is in both said transmit sleep state and said receive sleep state and a one of said one or more receive buffers is available for said device driver, said one or more receive buffers available for said device driver containing data received from said network by said network adapter. - View Dependent Claims (2, 3)
-
-
4. A station for a network comprising:
-
a) a host computer system, said host computer having a memory, one or more transmit buffers in said memory, one or more receive buffers within said memory, said host computer system further having a device driver that enters a transmit sleep state when all said transmit buffers are full for transmitting packets, and that enters a receive sleep state when all said receive buffers are empty for receiving packets, said device driver processing data in said receive buffers when said device driver is not in said receive sleep state, said host memory also having a transmit ring and a receive ring, said receive ring being a circular data structure having entries and each said entry having an address pointing to a one of said one or more receive buffers; b) an ownership bit in each said entry in said transmit ring; c) an ownership bit in each said entry in said receive ring; d) a network adapter to interface between said host computer system and a network, said network adapter transferring data received from said network into said receive buffers; e) means within said network adapter for detecting if said device driver is in said transmit sleep state; f) means within said network adapter for detecting if said device driver is in said receive sleep state; g) means within said network adapter for interrupting said host computer system in the event that said device driver is in both said transmit sleep state and said receive sleep state and one of said receive buffers contains data for said device driver; h) a first register within said network adapter to receive a transmit ring entry having an ownership bit; i) a means within said network adapter for reading a transmit ring entry from host memory into said first register and determining whether said transmit ring entry is owned by said network adapter; j) a second register within said network adapter to receive a receive ring entry having an ownership bit; k) a means within said network adapter for reading a receive ring entry from host memory into said second register and determining whether said receive ring entry is owned by said network adapter; l) means within said device driver for reading a transmit ring entry having a transmit ownership bit set to indicate host computer system ownership of said transmit ring entry; and m) means within said device driver for reading a receive ring entry having a receive ownership bit set to indicate host computer system ownership of said receive ring entry.
-
-
5. A network adapter for data transfer between a host computer system and a network, wherein said host computer system includes a host processor and a host memory, wherein said host memory includes a plurality of memory buffers, wherein said memory buffers include transmit buffers containing packets to be transmitted onto said network, wherein said host memory includes a transmit ring, wherein said transmit ring consists of a fixed number of transmit ring entries, wherein each said transmit ring entry includes an ownership bit, a transmit buffer pointer, and a transmit buffer length, wherein said memory buffers include receive buffers to hold packets received from said network adapter, wherein said host memory includes a receive ring, wherein said receive ring consists of a fixed number of receive ring entries, wherein each said receive ring entry includes an ownership bit, a receive buffer pointer, and a receive buffer length, wherein said host computer system operates said network adapter with a device driver, wherein said device driver has a sleep state and an active state, wherein said device driver enters said active state when said host computer system receives an interrupt from said network adapter, and wherein said device driver enters said sleep state when it has processed all entries owned by said host computer system in said transmit ring and in said receive ring, comprising:
-
A. a packet memory for storing packets received from and to be transmitted to said network; B. a transmit buffer consumer means, having, a next transmit pointer register, a transmit ring entry processing means, responsive to said next transmit pointer register, for reading a transmit ring entry whose address is contained in said next transmit pointer register, determining the ownership of said transmit ring entry, and if said transmit ring entry is owned by said network adapter, generating an output equal to the transmit buffer pointer and transmit buffer length from said transmit ring entry, a transmit buffer data mover means, responsive to said output generated by transmit ring entry processing means, for moving the packet contained in the transmit buffer indicated by said transmit buffer pointer and transmit buffer length from said host memory into said packet memory, and generating a completion status, and a transmit ring entry return means, responsive to said completion status generated by said transmit buffer data mover means, for writing said completion status to said transmit ring entry, changing the ownership of said transmit ring entry so that the host computer system owns said transmit ring entry, generating an output equal to the current value of the next transmit pointer, and incrementing said next transmit pointer register to contain the address of the next sequential transmit ring entry in the transmit ring; C. a receive buffer consumer means, having, a next receive pointer register, a receive ring entry processing means, responsive to said next receive pointer register, for reading a receive ring entry whose address is contained in said next receive pointer, determining the ownership of said receive ring entry, and if said receive ring entry is owned by said network adapter, generating an output equal to the receive buffer pointer and receive buffer length from said receive ring entry, a receive buffer data mover means, responsive to said output generated by said receive ring entry processing means, for moving a packet contained in packet memory to the receive buffer indicated by said receive buffer pointer and receive buffer length, and generating a completion status, and a receive ring entry return means, responsive to said completion status generated by said receive buffer data mover means, for writing said completion status to said receive ring entry, changing the ownership of said receive ring entry so that the host computer system owns said receive ring entry, generating an output equal to the current value of the next receive pointer, and incrementing said next receive pointer register to contain the address of the next sequential receive ring entry in the receive ring; and D. an interrupt generation means, responsive to said receive ring entry return means, said transmit ring entry return means, and said host computer system, for issuing interrupts to said host computer system only when said device driver is in said sleep state, said interrupt generation means further including a host last transmit ring entry processed register, writable by said host computer system, a host last receive ring entry processed register, writable by said host computer system, a transmit sleep bit, set responsive to said host last transmit ring entry processed register being written by said host computer system, and cleared by said network adapter, a receive sleep bit, set responsive to said host last receive ring entry processed register being written by said host computer system, and cleared by said network adapter, an adapter last transmit ring entry consumed register, responsive to said transmit ring entry return means, for holding an address of a last transmit ring entry consumed by said network adapter, an adapter last receive ring entry consumed register, responsive to said receive ring entry return means, for holding an address of a last receive ring entry consumed by said network adapter, and an interrupt logic means, responsive to said transmit sleep bit, said receive sleep bit, said host last receive ring entry processed register, said host last transmit ring entry processed register, said adapter last transmit ring entry processed address register, and said adapter last receive ring entry consumed register, for generating an interrupt to said host computer system when said host transmit sleep bit and said host receive sleep bit are both set, and either said host last transmit ring entry processed register does not equal said adapter last transmit ring entry consumed register or said host last receive ring entry processed register does not equal said adapter last receive ring entry consumed register, and for clearing said transmit sleep bit and said receive sleep bit when said interrupt is generated. - View Dependent Claims (6, 7, 8, 9, 10, 11)
-
-
12. A network adapter, for connecting a host computer system with a computer network, said host computer system having a host memory, one or more transmit buffers within said host memory, and one or more receive buffers within said host memory, said host computer system further having a device driver that enters a transmit sleep state when all said transmit buffers are full for transmitting packets, and that enters a receive sleep state when all said receive buffers are empty for receiving packets, comprising:
-
means for detecting if a device driver in said host computer system is in a transmit sleep state, said detecting means includes a transmit sleep bit, said device driver processing data transmitted onto said computer network when said device driver is not in said transmit sleep state; means for detecting if said device driver is in a receive sleep state, said detecting means includes a receive sleep bit, said device driver processing data received from said computer network when said device driver is not in said receive sleep state; and means for interrupting said host computer system in the event that said device driver is in both said transmit sleep state and said receive sleep state and said network adapter writes a packet received by said network adapter into a memory in said host computer system, wherein said means for interrupting said host computer system further comprises; a host last receive register, responsive to write operations generated by said host computer system, for holding a first host memory address representing a last receive buffer in said host memory processed by said host computer system; a network adapter last receive register, maintained by said network adapter, for holding a second host memory address representing a last receive buffer in said host memory processed by said network adapter; and means for generating an interrupt to said host computer system when both said transmit sleep bit and said receive sleep bit are set, and the contents of said host last receive register is not equal to the contents of said network adapter last receive register. - View Dependent Claims (13, 14, 15)
-
-
16. A system for generating interrupts to a host computer system from a network adapter, said network adapter coupled with said host computer system, wherein said host computer system includes a host processor and a host memory, wherein said host memory includes a plurality of memory buffers, wherein said memory buffers include transmit buffers containing packets to be transmitted onto said network, wherein said host memory includes a transmit ring, wherein said transmit ring consists of a fixed number of transmit ring entries, wherein each said transmit ring entry includes an ownership bit, a transmit buffer pointer, and a transmit buffer length, wherein said memory buffers include receive buffers to hold packets received from said network adapter, wherein said host memory includes a receive ring, wherein said receive ring consists of a fixed number of receive ring entries, wherein each said receive ring entry includes an ownership bit, a receive buffer pointer, and a receive buffer length, wherein said host computer system operates said network adapter with a device driver, wherein said device driver has a sleep state and an active state, wherein said device driver enters said active state when said host computer system receives an interrupt from said network adapter, and wherein said device driver enters said sleep state when it has processed all entries owned by said host computer system in said transmit ring and in said receive ring, comprising:
-
a host last transmit ring entry processed register, writable by said host computer system, for storing an address of a transmit ring entry most recently processed by said device driver; a host last receive ring entry processed register, writable by said host computer system, for storing an address of a receive ring entry most recently processed by said device driver; a transmit sleep bit, set responsive to said host last transmit ring entry processed register being written by said host computer system; a receive sleep bit, set responsive to said host last receive ring entry processed register being written by said host computer system; an adapter last transmit ring entry consumed register, for holding an address of a last transmit ring entry consumed by said network adapter; an adapter last receive ring entry consumed register, for holding an address of a last receive ring entry consumed by said network adapter; and an interrupt logic means, responsive to said transmit sleep bit, said receive sleep bit, said host last receive ring entry processed register, said host last transmit ring entry processed register, said adapter last transmit ring entry processed address register, and said adapter last receive ring entry consumed register, for generating an interrupt to said host computer system when both said host transmit sleep bit and said host receive sleep bit are set, and said host last transmit ring entry processed address register does not equal said adapter last transmit ring entry consumed address register. - View Dependent Claims (17, 18)
-
Specification