[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <516A3BAD.40201@redhat.com>
Date: Sun, 14 Apr 2013 07:16:29 +0200
From: Daniel Borkmann <dborkman@...hat.com>
To: Willem de Bruijn <willemb@...gle.com>
CC: David Miller <davem@...emloft.net>,
Daniel Borkmann <dborkman@...hat.com>,
Paul Chavent <paul.chavent@...ra.fr>,
Richard Cochran <richardcochran@...il.com>,
Eric Dumazet <edumazet@...gle.com>,
daniel.borkmann@...mni.ethz.ch, xemul@...allels.com,
ebiederm@...ssion.com, netdev@...r.kernel.org
Subject: Re: [PATCH] net-packet: tx timestamping on tpacket ring
On 04/14/2013 02:49 AM, Willem de Bruijn wrote:
> On Sat, Apr 13, 2013 at 8:16 PM, Willem de Bruijn <willemb@...gle.com> wrote:
>> On Sat, Apr 13, 2013 at 8:04 PM, Willem de Bruijn <willemb@...gle.com> wrote:
>>> On Sat, Apr 13, 2013 at 6:47 PM, David Miller <davem@...emloft.net> wrote:
>>>> From: Daniel Borkmann <dborkman@...hat.com>
>>>> Date: Sun, 14 Apr 2013 00:18:48 +0200
>>>>
>>>>>> + flush_dcache_page(pgv_to_page(&h1->tp_sec));
>>>>>> + flush_dcache_page(pgv_to_page(&h1->tp_usec));
>>>>>
>>>>> Hmm, not sure, but could we also flush the dcache only once?
>>>>
>>>> Indeed, I truly hope that headers never straddle pages.
>>>
>>> I should have checked the alignment restrictions on frames. Frames
>>> must be a multiple of 16 B as well as larger than the header (obviously),
>>> so this can indeed never happen.
>>
>> Actually, 48 B is a multiple of 16, so should be accepted, and 85
>> frames on a page leaves half a frame for the next. I'll check whether
>> this is right. Even if so, it would still not matter for these time
>> offsets, as they start at 16 or 20 B offset from the start of the
>> frame.
>
> 48 B is too small (Because less than TPACKET_HDRLEN), but it can
> be triggered with 80 B frames. Daniel, thanks for submitting the
> selftest: both the timestamp and this alignment question were now very
> easy to test by just changing a few lines in your code.
Feel free to further extend it. :-)
--
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