* Storing hardware timestamps - how about using the new skb's control block?
@ 2008-11-11 20:53 Mark Smith
2008-11-12 8:27 ` Patrick Ohly
0 siblings, 1 reply; 3+ messages in thread
From: Mark Smith @ 2008-11-11 20:53 UTC (permalink / raw)
To: patrick.ohly; +Cc: netdev
Hi,
Just a quick suggestion for storing hardware timestamps, how about
storing them in the new skb's control block?
>From what I understand, any private users of the control block are
supposed to ignore the existing value, and if a protocol/tap is going
to be looking at the new skb, it should have done a skb_share_check()
first to grab it's own private copy if necessary, protecting the
control block stored timestamp value from any of the other skb
users who might change the control block value for their own purposes.
Regards,
Mark.
--
"Sheep are slow and tasty, and therefore must remain constantly
alert."
- Bruce Schneier, "Beyond Fear"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Storing hardware timestamps - how about using the new skb's control block?
2008-11-11 20:53 Storing hardware timestamps - how about using the new skb's control block? Mark Smith
@ 2008-11-12 8:27 ` Patrick Ohly
2008-11-12 8:39 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Patrick Ohly @ 2008-11-12 8:27 UTC (permalink / raw)
To: Mark Smith; +Cc: netdev@vger.kernel.org, Octavian Purdila
On Tue, 2008-11-11 at 20:53 +0000, Mark Smith wrote:
> Just a quick suggestion for storing hardware timestamps, how about
> storing them in the new skb's control block?
>
> From what I understand, any private users of the control block are
> supposed to ignore the existing value, and if a protocol/tap is going
> to be looking at the new skb, it should have done a skb_share_check()
> first to grab it's own private copy if necessary, protecting the
> control block stored timestamp value from any of the other skb
> users who might change the control block value for their own purposes.
My understanding of sk_buff->cb might be wrong, but isn't each layer
allowed to overwrite it as the packet traverses the different queues?
skb_share_check() is not mandatory: the owner of a packet has to call it
if he wants to preserve the control block, not the recipient of a
packet.
If that understanding is correct, then I don't see how the control block
can be used to communicate information across layers. Or do I miss
something fundamental?
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Storing hardware timestamps - how about using the new skb's control block?
2008-11-12 8:27 ` Patrick Ohly
@ 2008-11-12 8:39 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2008-11-12 8:39 UTC (permalink / raw)
To: patrick.ohly; +Cc: nanog, netdev, opurdila
From: Patrick Ohly <patrick.ohly@intel.com>
Date: Wed, 12 Nov 2008 09:27:18 +0100
> My understanding of sk_buff->cb might be wrong, but isn't each layer
> allowed to overwrite it as the packet traverses the different queues?
Right.
> skb_share_check() is not mandatory:
And besides, skb_share_check() doesn't check if somebody "owns" the
skb->cb[]
And if you bump the reference count or something silly like that to
get skb_share_check() to copy the packet, every single locally
destined TCP packet will be copied. That will effectively kill
performance.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-12 8:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-11 20:53 Storing hardware timestamps - how about using the new skb's control block? Mark Smith
2008-11-12 8:27 ` Patrick Ohly
2008-11-12 8:39 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox