Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2001 13:17:53 -0600 (CST)
From:      Jonathan Lemon <jlemon@flugsvamp.com>
To:        knmurthy30@hotmail.com, net@freebsd.org
Subject:   Re: Understanding fxp driver
Message-ID:  <200111261917.fAQJHrx94789@prism.flugsvamp.com>
In-Reply-To: <local.mail.freebsd-net/F149XOLyWeSH6nk4r7d0000af5a@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <local.mail.freebsd-net/F149XOLyWeSH6nk4r7d0000af5a@hotmail.com> you write:
>Hello,
>
>Am trying to playaround and understand the Intel NIC fxp driver and it would 
>be of help if you driver-gurus can please clarify a couple of points.
>
>I understand that Tx DMA size is 128.

The number of control blocks is 128; this is not the same as the DMA size.


>1. what parameter exactly determines how many packets the NIC
>sends before interrupting the Host Cpu after transmit (assuming
>no packet is received).

	/*
	 * Number of completed TX commands at which point an interrupt
	 * will be generated to garbage collect the attached buffers.
	 * Must be at least one less than FXP_NTXCB, and should be
	 * enough less so that the transmitter doesn't becomes idle
	 * during the buffer rundown (which would reduce performance).
	 */
	#define FXP_CXINT_THRESH 120


>2. Does the NIC interrupt the Host cpu on each packet reception?

Yes, unless the receive interrupt migitation code is enabled.  But note
that this does not necessarily translate into "one interrupt per packet",
as multiple packets may be processed under the same interrupt.


>If so, how are packets that are put into the RFA (while the
>CPU is busy processing the current interrupt) notified -
>(my understanding is the "rcvloop" in fxp_intr will automatically
>take care of this - is it correct?).

Packets are added at the tail end of the RFA while the cpu processes
the head.  The code processes all completed entries, then loops again
to check for new interrupts before exiting the interrupt handler.


>3. What is the exact role of tx_threshold

Indicates the # of bytes that should be present on-chip before a
transmit starts; if an underrun occurrs (cpu can't provide data to
the chip in time to complete a frame), this is increased.


>4. Suppose I want to make the NIC interrupt the cpu for each packet,
>if I just reduce the Tx DMA length to 2-power-0, i.e,1, will it work?

No, that won't work, but why would you want to do that? 
-- 
Jonathan

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111261917.fAQJHrx94789>