Thread (41 messages) flat view 41 messages, 6 authors, 2013-04-22

Re: [PATCH] net-packet: tx timestamping on tpacket ring

From: Daniel Borkmann <hidden>
Date: 2013-04-14 05:17:03

On 04/14/2013 02:49 AM, Willem de Bruijn wrote:
On Sat, Apr 13, 2013 at 8:16 PM, Willem de Bruijn [off-list ref] wrote:
quoted
On Sat, Apr 13, 2013 at 8:04 PM, Willem de Bruijn [off-list ref] wrote:
quoted
On Sat, Apr 13, 2013 at 6:47 PM, David Miller [off-list ref] wrote:
quoted
From: Daniel Borkmann <redacted>
Date: Sun, 14 Apr 2013 00:18:48 +0200
quoted
quoted
+            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. :-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help