[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090429091803.GA23463@ioremap.net>
Date: Wed, 29 Apr 2009 13:18:03 +0400
From: Evgeniy Polyakov <zbr@...emap.net>
To: Johann Baudy <johann.baudy@...-log.net>
Cc: netdev@...r.kernel.org, Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Patrick McHardy <kaber@...sh.net>, jamal <hadi@...erus.ca>,
Christoph Lameter <cl@...ux.com>
Subject: Re: [PATCH] TX_RING and packet mmap
On Sun, Apr 26, 2009 at 03:06:29PM +0200, Johann Baudy (johann.baudy@...-log.net) wrote:
> +++ Transmission process
> +Those defines are also used for transmission:
> +
> + #define TP_STATUS_AVAILABLE 0 // Frame is available
> + #define TP_STATUS_SEND_REQUEST 1 // Frame will be sent on next send()
> + #define TP_STATUS_SENDING 2 // Frame is currently in transmission
> + #define TP_STATUS_WRONG_FORMAT 4 // Frame format is not correct
> +
> +First, the kernel initializes all frames to TP_STATUS_AVAILABLE. To send a
> +packet, the user fills a data buffer of an available frame, sets tp_len to
> +current data buffer size and sets its status field to TP_STATUS_SEND_REQUEST.
> +This can be done on multiple frames. Once the user is ready to transmit, it
> +calls send(). Then all buffers with status equal to TP_STATUS_AVAILABLE are
I suppose kernel sends packets with the status field equal to
TP_STATUS_SEND_REQUEST not TP_STATUS_AVAILABLE.
Besides several codying style issues, like placing { on the new line
from the same one, missing space near the operator like if(smth),
switch(smth), things look good.
--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists