home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!das-news.harvard.edu!husc-news.harvard.edu!burrhus!ddl
- From: ddl@burrhus.harvard.edu (Dan Lanciani)
- Newsgroups: comp.protocols.tcp-ip.ibmpc
- Subject: new dis_pkt
- Message-ID: <1992Dec31.070922.19010@burrhus.harvard.edu>
- Date: 31 Dec 92 07:09:22 GMT
- Article-I.D.: burrhus.1992Dec31.070922.19010
- Organization: Harvard University, Cambridge, MA
- Lines: 43
-
- A new version of the NDIS/packet driver converter is now available for
- anonymous ftp from hsdndev.harvard.edu in pub/dis_pkt. It attempts to
- work around (but does not solve) the problem discussed below:
-
- The Packet Driver spec's send_pkt call requires that the driver be
- finished with the passed buffer when the send function completes. The
- NDIS Transmit function can return a status indicating that the request
- is queued, with the memory buffer still ``owned'' by the driver. An
- obvious solution is for dis_pkt's send_pkt routine to loop until the
- send operation is actually complete. Unfortunately, some NDIS drivers
- will queue but never complete a send request if called at certain ``bad''
- times. Looping would therefore cause deadlock.
-
- Until now, dis_pkt has simply returned from send_pkt even if the underlying
- driver indicates that the request is queued. Because of the structure of
- protocol stacks and the relative speed of the network and cpu, things have
- worked most of the time: the protocol stack does not scribble on the buffer
- before it gets sent on the network. Recently, though, I've been able
- to see the problem manifest itself (as expected) with duplicate/missing
- packet pairs.
-
- As a first step to reducing the impact of the problem, I added a loop
- with timeout to the send_pkt routine. This helps, but for certain
- drivers the loop fails too regularly because of an interaction with
- the IndicationComplete/chainvec logic. In particular, the WD/SMC
- driver never completes a send request from within an IndicationComplete
- routine. Any protocol that runs on the tail of the chainvec and tries
- to send multiple packets can therefore run into problems.
-
- The best work-around appears to be to avoid the IndicationComplete
- code and instead advertise the adapter's true interrupt vector
- to the packet driver application. To this end, the chainvec
- setting in protocol.ini now accepts arbitrary values. If the value
- is less than 16 it is assumed to be the true interrupt and dis_pkt
- never actually calls the vector. It is necessary to manually
- specify the correct vector (i.e., 8+irq) for chainvec. (Use with
- irqs 9-15 is not yet supported.) When more NDIS v2 drivers become
- available, this process may be automated since v2 provides the irq
- in a characteristics table. Extracting the information from protocol.ini
- is another possibility but it would require knowing all the defaults...
-
- Dan Lanciani
- ddl@harvard.*
-