`
`United States Patent
`Luhmann et al.
`
`(10) Patent N0.:
`(45) Date of Patent:
`
`US 6,865,152 B2
`Mar. 8, 2005
`
`US006865152B2
`
`(54) METHOD AND APPARATUS FOR
`TRANSMITTING PACKETS ONTO A
`NETWORK
`
`.
`-
`-
`(75) Inventors‘ P5316511???“ Hlnsgmg’ (ZROR
`(
`)> a “c '
`onnor’ or an ’
`(Us)
`
`(73) Assignee:
`
`Corporation, Santa Clara, CA
`
`(
`
`( * ) Notice:
`
`Subject to any disclaimer, the term of this
`patent is extended or adjusted under 35
`U.S.C. 154(b) by 802 days.
`
`(21) Appl. No.: 09/738,110
`_
`(22) F1169?
`(65)
`
`Dec- 15! 2000
`Prior Publication Data
`
`"""""""""""" "
`
`Us 2002/0075801 A1 Jun‘ 20’ 2002
`(51) Int. Cl.7 ................................................ .. H04L 1/00
`(52) us CL
`370/230. 370/236 1
`(58) Field of
`376/230 236
`412 7’10/63’
`’
`
`’
`’
`'
`References Cited
`
`’
`
`’
`
`(56)
`
`U.S. PATENT DOCUMENTS
`
`5,784,358 A * 7/1998 Smith et a1. ........... .. 370/236.1
`
`
`
`5,978,359 A * 11/1999 Caldara et al. 6,185,229 B1 * 2/2001 Obikane et a1. .......... .. 370/537
`
`N PACKETS
`FROM 0s
`
`70
`
`v /
`
`72
`
`/
`
`74
`
`/
`
`RESETX
`
`PREPARE
`> NEXT
`PACKET
`
`> 'Nfz?'é'im
`
`1
`
`m
`
`6,301,258 B1 * 10/2001 Katseff et al. ............ .. 370/412
`6,349,097 B1 * 2/2002 Smith ............. ..
`370/390
`6,381,661 B1 * 4/2002 Messerly et a1. ........... .. 710/63
`6,430,628 B1
`8/2002 Connor
`6,510,145 B1 * 1/2003 Kim et al. ................ .. 370/329
`6,597,662 B1 * 7/2003 Kumar et a1. ............. .. 370/236
`6,614,756 B1 * 9/2003 Morgenstern et a1. .... .. 370/230
`6,647,438 B1
`11/2003 McVay et 81.
`6,721,835 B1
`4/2004 (3
`2002/0083189 A1
`6/2002 C2222;
`2002/0144004 A1 10/2002 Gaur et al.
`2002/0194332 A1 12/2002 Connor
`2003/0058852 A1
`3/2003 Luhmann et al.
`2003/0065735 A1
`4/2003 Connor
`
`* cited by examiner
`
`_
`_
`Primary Examiner—Salvatore Cang1alos1
`(74) Attorney, Agent, or Firm—Libby H. Hope
`(57)
`ABSTRACT
`
`A network driver for transmitting packets. For a particular
`embodiment the driver receives an indication that a Packet
`is available for transmission and monitors a packet pending
`transmission status of a netWork controller. The driver then
`indicates to the netWork controller that the packet is avail
`able for transmission only When the pending transmission
`status in one particular embodiment reaches a threshold
`value. Thus the driver determines hoW many packets to
`provide a netWork controller based on the amount of packets
`still Waiting to be transmitted by the controller.
`
`36 Claims, 6 Drawing Sheets
`
`80
`
`YES
`
`INFORM
`CONTROLLER OF
`PREPARED
`PACKET FRAMES
`
`82
`
`84
`
`RESETI
`
`YES
`
`D-Link-1017
`Page 1 (of 12)
`
`
`
`U.S. Patent
`
`Mar. 8,2005
`
`Sheet 1 6f 6
`
`US 6,865,152 B2
`
`I
`I
`I
`:
`
`l
`
`I
`I
`I
`|
`I
`
`PC
`
`16
`/ v
`
`ROUTER
`
`14
`
`/
`
`: **************** I‘;
`I
`1
`:
`NETWORK ;
`I CONTROLLER 1
`I
`i
`
`i i i i i i i i i i i i i i i i EEI
`
`I
`
`I,
`
`I
`
`22 (a-n)
`/
`ROUTER
`
`l
`I
`-
`I
`I
`rum-J
`V
`PC jMa'mI
`:
`I
`I
`:
`|
`I
`:
`
`|
`
`10
`
`:
`
`I
`J
`I
`
`12
`
`I
`I
`I
`:
`
`I
`
`I
`
`l
`
`I
`|
`I
`|
`I
`I
`I
`'
`I
`I
`I
`38
`:
`/
`F——___I I
`MEMORY I
`I
`:
`‘N‘E'TWORR‘I
`|
`'
`l
`DRIVER I
`l
`I
`—————— I
`I
`:
`|
`I
`
`.
`
`Flg. 6
`/
`28
`
`41
`
`r— — — — —
`
`“I
`I
`CONTROLLER
`/\/
`410
`I
`L——~—I
`I
`|
`R
`PR
`M OCESSO I
`32
`
`L _ _ _ _ J
`
`“I 5
`
`I I
`:
`I
`
`Fig. 1
`
`D-Link-1017
`Page 2 (of 12)
`
`
`
`U.S. Patent
`
`Mar. 8,2005
`
`Sheet 2 6f 6
`
`US 6,865,152 B2
`
`APPLICATION SENDS
`DATA TO OS
`
`/ 6O
`
`62
`OS BREAKS DATA
`INTO PACKETS AND /
`FORMATS
`
`I
`
`0s PROVIDES
`PACKETS TO / 64
`NETWORK DRIVER
`
`I
`
`DRIVER NOTIFIES / 66
`CONTROLLER ABOUT
`PACKET AVAILABILITY
`OR WAITS
`
`I
`
`HARDWARE
`TRANSMITS PACKETS / 68
`TO NETWORK
`
`Fig. 2
`
`D-Link-1017
`Page 3 (of 12)
`
`
`
`U.S. Patent
`
`Mar.8, 2005
`
`Sheet 3 of 6
`
`US 6,865,152 B2
`
`4OYSTIONLNOO
`
`08
`
`WHO4NI777i
`
`
`
`rlZLOL
`
`SLaNOWdN
`
`SOWOU
`
`
`
`GayvdaudauWdaud
`
`LNAWAYONI
`
`1anovd
`SSWLaNovdxCNV|1X4NXLasay
`
`08
`
`18
`
`|}Lasagd
`
`SSA
`
`95
`
`D-Link-1017
`D-Link-1017
`Page 4 (of 12)
`Page 4 (of 12)
`
`
`
`
`
`
`U.S. Patent
`
`Mar. 8,2005
`
`Sheet 4 6f 6
`
`US 6,865,152 B2
`
`INTERRUPT
`
`90
`
`RESET Y
`
`More
`Transmits
`To Clean
`U ,7
`"-
`NO
`
`98
`\ P = P _ Y *
`
`92
`
`94
`
`Up _
`Transmlt
`
`QJ
`Increment Y
`
`1 2
`
`100
`
`YES
`
`INFORM
`CONTROLLER
`OF PREPARED ’
`
`PACKETS J
`NO ‘?u
`
`RES ET I
`
`Fig. 4
`
`D-Link-1017
`Page 5 (of 12)
`
`
`
`U.S. Patent
`
`Mar. 8,2005
`
`Sheet 5 6f 6
`
`US 6,865,152 B2
`
`12
`\
`
`413
`
`32
`
`PROCESSOR
`408
`@w
`I
`
`II
`PROCESSOR BUS
`II
`
`410
`
`"
`
`404
`
`38
`/
`MEMORY
`
`‘
`GRAPHICS
`CONTROLLER ‘
`
`‘BRIDGE/MEMORY
`' CONTROLLER ~
`
`_
`
`INSTRUCTIONS
`
`I
`
`@
`
`‘
`
`28
`
`I/
`
`42 NETWORK
`CONTROLLER
`MODULE
`Fig. 6
`
`C
`
`v
`FIRST l/O BUS
`
`412
`/
`
`\
`
`416
`
`I/
`
`DISPLAY DEVICE
`CONTROLLER
`
`420
`
`SECON D I/O BUS
`
`II
`
`V
`
`J28
`
`BUS
`BRIDGE
`
`II
`
`422
`
`M
`
`V
`
`A‘
`
`V
`
`424
`
`k
`
`425
`
`V
`
`DATA
`STORAGE
`
`KEYBOARD
`INTERFACE
`
`USER INPUT
`INTERFACE
`
`Fig. 5
`
`D-Link-1017
`Page 6 (of 12)
`
`
`
`U.S. Patent
`
`Mar. 8,2005
`
`Sheet 6 6f 6
`
`US 6,865,152 B2
`
`44
`/
`
`14
`/
`
`A
`
`46
`
`48
`
`a F; FLASH
`EEPROM
`ROM ‘
`+
`
`42
`/
`
`NETWORK
`
`CONNECTOR H CONTROLLER +--‘_
`
`28
`
`v
`TO PROCESSOR
`(Fig. 5)
`
`Fig. 6
`
`D-Link-1017
`Page 7 (of 12)
`
`
`
`US 6,865,152 B2
`
`1
`METHOD AND APPARATUS FOR
`TRANSMITTING PACKETS ONTO A
`NETWORK
`
`BACKGROUND OF THE INVENTION
`
`1. Field
`The embodiments of the present invention relates gener
`ally to communication and more speci?cally to a driver for
`transmitting packets onto a high speed Ethernet netWork.
`2. Background
`NetWork controllers are used to transmit and receive
`Ethernet packets from a netWork media. Ethernet speeds
`typically include 10 Megabit, 100 Megabit, 1 Gigabit or 10
`Gbit per second technologies as described in the AN SI/IEEE
`802.3 speci?cations, published Oct. 2000. The netWork
`controller is typically coupled into the bus of a computer.
`The computer has a processor and host memory. The com
`puter has an operating system that communicates using a
`softWare driver to the netWork card When an application in
`the computer needs to transfer information onto the netWork
`media for distribution to the Internet or other computers.
`Operating systems provide indications to a softWare
`driver that one or more packets are available for transmis
`sion onto a netWork media. Drivers respond to the operating
`system by processing each packet by creating a table that
`contains a location in memory Where the packets are stored,
`as Well as the length of the packet. The driver then informs
`the netWork controller that the packet is available for fetch
`ing and transmission onto the netWork media. The netWork
`controller receives packets from memory and stores the
`packet in an internal cache. The netWork controller then
`transmits the cached packet onto the netWork media.
`The driver typically receives multiple packets from the
`operating system. In one method, the driver then processes
`one packet at a time, and then immediately informs the
`netWork controller after each packet is processed, that a
`processed packet is available for transmission. Alternatively
`in a second method, the driver may process all the packets
`it has been given, and then informs the controller that all
`packets are available for transmission.
`The ?rst method improves packet latency because the
`netWork controller learns about each packet as soon as it is
`available for transmission. HoWever, this ?rst method has
`the draWback of reduced bus ef?ciency, since a bus trans
`action is required to process each individual packet.
`The second method increases bus ef?ciency because the
`entire table of packets only requires a single bus transaction
`to inform the netWork controller that the packets are avail
`able for transmission. HoWever, this method has the draW
`back of reduced packet latency because the ?rst packet sits
`idle and is not handled by the netWork controller until the
`driver processes the subsequent packets.
`
`BRIEF DESCRIPTION OF THE DRAWINGS
`
`The invention Will be understood more fully from the
`detailed description given beloW and from the accompany
`ing draWings of embodiments of the invention Which,
`hoWever, should not be taken to limit the invention to the
`speci?c embodiments described, but are for explanation and
`understanding only.
`FIG. 1 is a diagram of a netWork having a host computer
`and router connected to other netWork devices;
`FIG. 2 is How diagram of a packet transmit path in
`accordance With an embodiment of the present invention;
`
`10
`
`15
`
`20
`
`25
`
`30
`
`35
`
`40
`
`45
`
`50
`
`55
`
`60
`
`65
`
`2
`FIG. 3 is a How diagram of the process executed by the
`netWork driver shoWn in FIG. 2 When transmitting packets
`in accordance With an embodiment the present invention;
`FIG. 4 is a How diagram of the interrupt path in accor
`dance With an embodiment of the present invention;
`FIG. 5 is a diagram of a computer system shoWn in FIG.
`1 having a netWork controller in accordance With an embodi
`ment the present invention; and
`FIG. 6 is a diagram of the netWork controller module
`shoWn in FIGS. 1 & 5.
`
`DETAILED DESCRIPTION
`
`Referring to FIG. 1, there is shoWn an Ethernet netWork
`10 having a personal computer (PC) 12 connected through
`netWork media 14 to a netWork infrastructure device such as
`a Router, sWitch or hub 16 and PCs 18(a—n). NetWork
`media 14 may be an optical ?ber or cable media, but may
`include other media such as Wireless, optical or other
`medias. PC 12 may be coupled through Router 16 to PCs
`20(a—n) or other netWork infrastructure devices such as a
`Routers or sWitches 22(a—n). PC 12 includes a netWork
`controller module 28 having a netWork controller 42 coupled
`through controller 410 to processor 32 and host memory 38.
`Processor 32 executes a netWork driver 61 for controller
`module 28 that is stored in memory 38. Further details of
`controller 42, controller 410 and processor 32 Will be
`discussed later in connection With FIGS. 5 and 6.
`Referring to FIG. 2, there is shoWn an embodiment of the
`How diagram shoWing the process for transmitting a data
`packet. In accordance With the embodiments of invention, an
`application program provides data to be transmitted to a PC
`operating system in block 60. Exemplary operating systems
`include WindoWsTM OS distributed Microsoft Corporation
`of Redmond, Wash., or Linux OS. The operating system
`then in block 62 breaks up data into packets to be transmitted
`and stores these packets in host memory 38. The operating
`system also formats the packets by attaching headers and
`media access control information to the packets. OS formats
`the packets prior to passing them to the netWork driver.
`These packets or buffers, as knoWn in the art typically
`contain an Ethernet packet having a Media Access Control
`(MAC) header, a Transmit Control Protocol/Internet Proto
`col (TCP/IP) header and application data.
`Next in block 64 the netWork driver 41 may be called by
`the operating system. The operating system then passes one
`or more packets to the netWork driver 41 and indicates a
`packet is available for transmission. The netWork driver 41
`then in block 66 prepares the packets for transmission by
`creating a data structure containing the location and length
`of the packets provided by the operating system in host
`memory 38. In one embodiment, the data structure may be
`a table. The driver 41 then determines, by checking the
`status of the netWork controller 42 and using the process
`described in more detail in FIG. 4, Whether to indicate to the
`netWork controller 42 to transmit packets or Whether to
`prepare more packets for transmission. Once the status of the
`netWork controller 42 indicates that the number of pending
`transmissions of packets in its buffers has reaches a prede
`termined threshold value, the driver 41 provides an
`indication, including the location and length of the packets,
`to the netWork controller 42 to transmit all the prepared
`packets. The number of pending transmission could be said
`to reach this predetermined level When the number of
`pending transmission is beloW a predetermined value or if an
`up-counter is used to track the pending transmissions, When
`the up-counter reaches the predetermined value. The net
`
`D-Link-1017
`Page 8 (of 12)
`
`
`
`US 6,865,152 B2
`
`3
`Work controller 42 in block 68 transfers the prepared packets
`from host memory 38 into its internal First In First Out
`register (FIFO) 51 (FIG. 6) for transmission on the netWork
`media 14.
`Referring to FIG. 3, there is shoWn the process in block
`66 used by the netWork driver 41 to determine Which packets
`controller 42 should transmit. The process 66 starts in block
`70 With a call by the operating system providing an indica
`tion that a number (N) of packet frames are to be transmitted.
`When driver 41 is ?rst loaded (for example, as part of the
`boot process of the operating system), the Indexes P, T and
`I are set to Zero. Index I corresponds to the number of
`packets prepared since the last time the driver informed the
`netWork controller 42 that prepared packets are ready to be
`transmitted. The netWork driver in block 70 sets a local
`variable X to Zero.
`Then in block 72 the next packet may be prepared for
`transmission as described previously in connection With
`FIG. 2. Then in block 74, the value of Index I and X are
`incremented. In block 76 the driver determines Whether
`value P, representing the current number of packets provided
`to the controller 42 for transmission and not yet transmitted,
`is less than a predetermined threshold value T. Value P is
`also referred to herein as the packet pending transmission
`status. Value P is preferably stored in host memory 38 and
`may be updated on an interrupt from netWork controller 42.
`The threshold value T typically ranges from 1 to 4 but does
`not require a bounded upper limit. Value T may be set to a
`value that promotes maximum performance of netWork
`controller 42. Value T Would be set based on the time
`netWork controller 42 can handle an interrupt and to ensure
`that there are alWays packets pending in the FIFO 51 and
`available for transmission. i.e. T may be set to be a loW value
`so that the netWork driver updates the netWork controller 42
`as infrequently as possible, but preferably T is not set to such
`a loW value that the netWork controller 42 runs out of
`packets in FIFO 51 before provided more packets.
`If Value P is not less than value T, then the driver executes
`block 78. This typically occurs if the netWork is congested
`or a large number of packets are provided to the netWork
`controller 42. If Value P is less than value T, then the
`netWork driver in block 80 provides an indication to con
`troller 42 that prepared packet frames are available for
`transmission, including the location and siZe of the packet
`frames in host memory 38.
`In block 78, the driver determines if the value of variable
`X is equal to the number N frames to be transmitted. If it is
`not, the driver prepares the next packet frame in block 72. If
`X=N, the process ends. At a later time, either during the
`interrupt handler or during a subsequent send handler all the
`packets prepared by the driver may be sent to controller 42
`for transmission.
`After block 80, the driver in block 82 increments the value
`of Index P by the value of Index I. The driver then in block
`84 resets the value of Index I and then executes block 78.
`In FIG. 4, there is shoWn a process executing an interrupt
`from controller 42 in response to a packet being fetched for
`transmission, When a packet is received or When packets in
`Controller’s 42 FIFO 51 have been transmitted. On an
`interrupt, the process in block 90 handles a receive packet
`using knoWn techniques and Resets a local variable Y. Then
`in block 92, the process determines by reading a status bit in
`memory 38 Whether there is more packets in to be trans
`mitted by controller 42, eg Whether all the data and
`information in FIFO 51 been transmitted. If the information
`has been transmitted, in block 94 transmit process is
`
`10
`
`15
`
`25
`
`35
`
`45
`
`55
`
`65
`
`4
`“cleaned up” by indicating to driver 41 that the information
`in FIFO has been transmitted and the transmit resources in
`controller 38 are made available. Then in block 96, variable
`Y is incremented.
`If there are not any transmits to be cleaned up, then in
`block 98 Index P is decremented by the value of variable Y.
`Then in step 100 the value of Index P is compared to the
`value of Index Y. If Index P is less than T, the controller 42
`is informed that prepared packets are available for transmis
`sion in block 102. Then in block 104 Index P is incremented
`by the value of Index I and the value of Index I is reset in
`block 106.
`If index P is not less than Index T in block 100 or after
`block 106 the routine in block 108 terminates by providing
`an indication to the operating system of the memory loca
`tions of the sent packets that have been released.
`In the preceding description, various aspects of the
`present invention have been described. For purposes of
`explanation, speci?c numbers, systems and con?gurations
`Were set forth in order to provide a thorough understanding
`of the present invention. HoWever, it is apparent to one
`skilled in the art having the bene?t of this disclosure that the
`present invention may be practiced Without the speci?c
`details. In other instances, Well-knoWn features Were omitted
`or simpli?ed in order not to obscure the present invention.
`Embodiments of the present invention may be imple
`mented in hardWare or softWare, or a combination of both.
`HoWever, embodiments of the invention may be imple
`mented as computer programs executing on programmable
`systems comprising at least one processor, a data storage
`system (including volatile and non-volatile memory and/or
`storage elements), at least one input device, and at least one
`output device. Program code may be applied to input data to
`perform the functions described herein and generate output
`information. The output information may be applied to one
`or more output devices, in knoWn fashion. For purposes of
`this application, a processing system includes any system
`that has a processor, such as, for example, a digital signal
`processor (DSP), a microcontroller, an application speci?c
`integrated circuit (ASIC), or a microprocessor.
`The programs may be implemented in a high level pro
`cedural or object oriented programming language to com
`municate With a processing system. The programs may also
`be implemented in assembly or machine language, if
`desired. In fact, the invention is not limited in scope to any
`particular programming language. In any case, the language
`may be a compiled or interpreted language.
`The programs may be stored on a storage media or device
`(e.g., hard disk drive, ?oppy disk drive, read only memory
`(ROM), CD-ROM device, ?ash memory device, digital
`versatile disk (DVD), or other storage device) readable by a
`general or special purpose programmable processing
`system, for con?guring and operating the processing system
`When the storage media or device is read by the processing
`system to perform the procedures described herein. Embodi
`ments of the invention may also be considered to be imple
`mented as a machine-readable storage medium, con?gured
`for use With a processing system, Where the storage medium
`so con?gured causes the processing system to operate in a
`speci?c and prede?ned manner to perform the functions
`described herein.
`Another example of such type of processing system is
`shoWn in FIG. 5, hoWever, other systems may also be used
`and not all components of the system shoWn are required for
`the present invention. Sample system 12 may be used, for
`example, to execute the processing for embodiments of the
`
`D-Link-1017
`Page 9 (of 12)
`
`
`
`US 6,865,152 B2
`
`10
`
`15
`
`5
`network driver system, in accordance With the present
`invention, such as the embodiment described herein. Sample
`system 12 is representative of processing systems based on
`the PENTIUM®III, PENTIUM® IV and CELERONTM
`microprocessors available from Intel Corporation, although
`other systems (including personal computers (PCs) having
`other microprocessors, engineering Workstations, other set
`top boxes, and the like) and architectures may also be used.
`PENTIUM®III, PENTIUM® IV and CELERONTM are
`trademarks of Intel Corporation.
`FIG. 5 is a block diagram of a system 12 of an embodi
`ment of the present invention. The system 12 includes a
`processor 32 that processes data signals. Processor 32 may
`be coupled to a processor bus 404 that transmits data signals
`betWeen processor 32 and other components in the system
`12.
`System 12 includes a memory 38. Memory 38 may store
`instructions and/or data represented by data signals that may
`be executed by processor 32. The instructions and/or data
`may comprise code for performing any and/or all of the
`techniques of the present invention. Memory 38 may also
`contain additional softWare and/or data (not shoWn). Acache
`memory 408 may reside inside processor 32 that stores data
`signals stored in memory 38.
`A bridge/memory controller 410 may be coupled to the
`processor bus 404 and memory 406. The bridge/memory
`controller 410 directs data signals betWeen processor 32,
`memory 38, and other components in the system 12 and
`bridges the data signals betWeen processor bus 404, memory
`38, and a ?rst input/output (I/O) bus 412.
`In this embodiment, graphics controller 413 interfaces to
`a display device (not shoWn) for displaying images rendered
`or otherWise processed by the graphics controller 413 to a
`user.
`First I/O bus 412 may comprise a single bus or a com
`bination of multiple buses. First I/O bus 412 provides
`communication links betWeen components in system 12. A
`netWork controller module 28 may be coupled to the ?rst I/O
`bus 412. In some embodiments, a display device controller
`416 may be coupled to the ?rst I/O bus 412. The display
`device controller 416 alloWs coupling of a display device to
`system 12 and acts as an interface betWeen a display device
`(not shoWn) and the system. The display device receives
`data signals from processor 32 through display device
`controller 416 and displays information contained in the data
`signals to a user of system 12.
`Referring to FIG. 6, Controller module 28 includes a
`netWork controller 42 coupled through a media connector 44
`to netWork 14. In one embodiment exemplary netWork
`controller 42 may be model number 82559 manufactured by
`Intel Corporation. NetWork controller 42, is preferably
`coupled on module 28 to a non-volatile memory such as an
`EEPROM 46 and electrically programmable memory 48.
`EEPROM 46 holds static con?gurations of netWork control
`ler 42. Flash ROM 48 alloWs netWork controller 42 to
`operate independently of control circuit 30. NetWork 14 is
`typically a physical netWork medium such as a CAT5 or ?ber
`cable that handles 10 or 100 or 1000 Base TX signals.
`NetWork controller 42 is preferably an Ethernet netWork
`controller With an integrated physical interface.
`NetWork controller 42 preferably contains an internal
`memory element, or external memory element hereafter
`referred to as cache 50 and a Direct Memory Access (DMA)
`controller 36. Module 42 also has an internal memory such
`as a FIFO 51 to store incoming and outgoing packets or
`alternately may use cache 50 to function as a FIFO. DMA
`
`6
`controller 36 can perform direct memory access function
`ality to transfer multiple fragments of a packet from host
`memory 38 into its internal cache prior to transmission.
`Referring to FIG. 5, NetWork controller 42 receives
`commands and data from processor 32 through bus 412. Bus
`412 is preferably a PCI bus, but could be any bus that
`permits address and data to be transferred betWeen module
`42 and controller 410. Data in host memory 38 is typically
`transferred to controller 42 using a DMA controller 36 or
`read/Write instructions of microprocessor 42. Referring to
`FIG. 6, netWork controller 42 transmits and receives packet
`information 53 on line 14 through media connector 44.
`NetWork controller 42 on receipt of a packet or upon
`transmission of all packets in its FIFO 51 provides an
`interrupt to microprocessor 32.
`Referring to FIG. 5, a second I/O bus 420 may comprise
`a single bus or a combination of multiple buses. The second
`I/O bus 420 provides communication links betWeen com
`ponents in system 12. A data storage device 422 may be
`coupled to the second I/ O bus 420. Akeyboard interface 424
`may be coupled to the second I/O bus 420. A user input
`interface 425 may be coupled to the second I/ O bus 420. The
`user input interface may be coupled to a user input device,
`such as a remote control, mouse, joystick, or trackball, for
`example, to provide input data to the computer system. Abus
`bridge 428 couples ?rst I/O bridge 412 to second I/O bridge
`420.
`Embodiments of the present invention are related to the
`use of the system 12 as a netWork driver. According to one
`embodiment, such processing may be performed by the
`system 12 in response to processor 32 executing sequences
`of instructions in memory 404. Such instructions may be
`read into memory 404 from another computer-readable
`medium, such as data storage device 422, or from another
`source via the netWork controller 414, for example. Execu
`tion of the sequences of instructions causes processor 32 to
`execute the netWork driver according to embodiments of the
`present invention. In an alternative embodiment, hardWare
`circuitry may be used in place of or in combination With
`softWare instructions to implement embodiments of the
`present invention. Thus, the present invention is not limited
`to any speci?c combination of hardWare circuitry and soft
`Ware.
`The elements of system 12 perform their conventional
`functions in a manner Well-knoWn in the art. In particular,
`data storage device 422 may be used to provide long-term
`storage for the executable instructions and data structures for
`embodiments of the netWork driver system in accordance
`With the present invention, Whereas memory 406 is used to
`store on a shorter term basis the executable instructions of
`embodiments of the netWork driver system in accordance
`With the present invention during execution by processor 32.
`Reference in the speci?cation to “an embodiment,” “one
`embodiment,” “some embodiments,” or “other embodi
`ments” means that a particular feature, structure, or charac
`teristic described in connection With the embodiments is
`included in at least some embodiments, but not necessarily
`all embodiments, of the invention. The various appearances
`“an embodiment,” “one embodiment,” or “some embodi
`ments” are not necessarily all referring to the same embodi
`ments.
`If the speci?cation states a component, feature, structure,
`or characteristic “may”, “might”, or “could” be included,
`that particular component, feature, structure, or characteris
`tic is not required to be included. If the speci?cation or claim
`refers to “a” or “an” element, that does not mean there is
`
`D-Link-1017
`Page 10 (of 12)
`
`20
`
`25
`
`30
`
`35
`
`40
`
`45
`
`55
`
`60
`
`65
`
`
`
`US 6,865,152 B2
`
`10
`
`15
`
`25
`
`35
`
`7
`only one of the element. If the speci?cation or claims refer
`to “an additional” element, that does not preclude there
`being more than one of the additional element.
`Those skilled in the art having the bene?t of this disclo
`sure Will appreciate that many other variations from the
`foregoing description and draWings may be made Within the
`scope of the present invention. Indeed, the invention is not
`limited to the details described above. Rather, it is the
`folloWing claims including any amendments thereto that
`de?ne the scope of the invention.
`What is claimed is:
`1. A method for transmitting packets in a netWork driver
`comprising:
`receiving an indication that a packet is available for
`transmission;
`monitoring a packet pending transmission status of a
`netWork controller; and
`indicating to the netWork controller that the packet is
`available for transmission When the pending transmis
`sion status reaches a threshold value.
`2. The method as recited in claim 1 Wherein the threshold
`value is a predetermined threshold value, and transmitting
`the packet onto a netWork When the indication is provided to
`netWork controller that the packet is available for transmis
`sion.
`3. The method as recited in claim 2 further comprising
`storing in a host memory the current number of packets
`pending for transmission by the netWork controller; and
`monitoring the packet pending transmission status by read
`ing from host memory said current number of packets
`pending.
`4. The method as recited in claim 3 further comprising:
`receiving a packet With the netWork controller from the
`netWork; and
`monitoring the packet pending transmission status of the
`netWork controller in host memory When the netWork
`controller receives a packet from the netWork.
`5. The method as recited in claim 2 further comprising
`preparing packets for transmission by storing in a host
`memory the location and length of the packet to be trans
`mitted.
`6. The method as recited in claim 2 further comprising
`delaying indicating to the netWork controller that the packet
`is available for transmission until the pending transmission
`status falls beloW the predetermined threshold value.
`7. The method as recited in claim 1 further comprising
`receiving the indication that the packet is available from an
`operating system.
`8. The method as recited in claim 1 further comprising
`providing the packet as an Ethernet packet having a MAC
`header, a TCP/IP header and application data.
`9. An apparatus for transmitting packets comprising:
`AnetWork controller to receive an indication that a packet
`is available for transmission; and
`A processor to monitor a packet pending transmission
`status of the netWork controller, Wherein said processor
`provides an indication to the netWork controller that the
`packet is available for transmission in response to the
`pending transmission status reaching a threshold value.
`10. The apparatus as recited in claim 9 Wherein said
`processor indicates to the netWork controller When the
`number of packets remaining to be transmitted by the
`netWork controller is beloW a predetermined threshold, and
`Wherein said netWork controller transmits the packet onto a
`netWork When the indication is provided to netWork con
`troller that the packet is available for transmission.
`
`40
`
`45
`
`55
`
`65
`
`8
`11. The apparatus as recited in claim 9 further comprising
`a memory in communication With the processor for storing
`the packet pending transmission status of the netWork con
`troller and for storing the packet.
`12. The apparatus as recited in claim 11 further compris
`ing a memory element disposed Within the netWork control
`ler to store the packet prior to transmission; and a DMA
`controller to transfer packets from the memory element to
`the netWork controller.
`13. The apparatus as recited in claim 12 Wherein the
`processor is operative to monitor the packet pending trans
`mission status of the netWork controller When a packet is
`received from the netWork media.
`14. The apparatus as recited in claim 12 Wherein the
`processor is operative to cause the netWork controller to
`store in a buffer, packets to be transmitted and to read the
`transmission status of the netWork controller after the net
`Work controller has transmitted all its packets.
`15. The apparatus as recited in claim 9 Wherein the
`threshold values range from 1 to 4.
`16. An apparatus for transmitting packets comprising:
`Means for receiving an indication that a packet is avail
`able for transmission;
`Means for monitoring a packet pending transmission
`status of a netWork controller; and
`Means for indicating to the netWork controller that the
`packet is available for transmission in response to the
`pending transmission status falling beloW a predeter
`mined threshold value.
`17. The apparatus as recited in claim 16 further compris
`ing means for transmitting the packet onto a netWork When
`the indication is provided to netWork controller that the
`packet is available for transmission.
`18. The apparatus as recited in claim 17 further compris
`ing means for storing the packet prior to transmission, and
`means for transferring packets form the storage means to the
`netWork controller.
`19. A system for transferring packets comprising:
`a. a computer having
`i. a processor coupled to a host memory and a bus;
`ii. a netWork controller coupled to the bus, said con
`troller having a driver operative to receive an indi
`cation that a packet is available for transmission; said
`processor operative to monitor a packet pending
`transmission status of a netWork