netdev
[Top] [All Lists]

Re: e1000 question

To: "Ihar 'Philips' Filipau" <ifilipau@xxxxxxxxxxxxxx>
Subject: Re: e1000 question
From: Mitchell Blank Jr <mitch@xxxxxxxxxx>
Date: Wed, 2 Jun 2004 03:30:27 -0700
Cc: netdev@xxxxxxxxxxx, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>
In-reply-to: <40BD8E49.3070605@giga-stream.de>
References: <40BD8E49.3070605@giga-stream.de>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
Ihar 'Philips' Filipau wrote:
>    Functions e1000_clean_{t,r}x_irq are very similar: both of them are 
> checking descriptor flag updated by nic.
>    Host CPU, obviously, to perform this check, will cache descriptor.
>    If, say e1000_clean_rx_irq() will be called twice in short time 
> range, I expect that it can miss change of the flag, since old flag may 
> still sit in host CPU cache.

Please see Documentation/DMA-mapping.txt; especially the part starting
at "There are two types of DMA mappings..."  Ring buffers are allocated
as "consistent" DMA memory.

For most architectures this will mean that the cache hardware snoops the
PCI bus and automatically invalidates cache lines as they are written to.
For architectures that can't do that then Linux will mark those memory
regions uncacheable.

-Mitch

<Prev in Thread] Current Thread [Next in Thread>