Re: TX time stamping

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Patrick Ohly
Date: Wednesday, March 25, 2009 - 12:08 am

Hello Dave, Herbert!

On Fri, 2009-03-20 at 02:10 +0000, Herbert Xu wrote: 

Agreed. It never was the goal to somehow force this into the kernel
unless you are happy with it - not that this would have worked
anyway ;-) I'd be happy to discuss better ways of solving these issues;
the current patches work, but they have their shortcomings. There's no
point in including them when you don't deem them sufficient.

As I said in my initial email in this thread, I don't know a better
solution and depend on some guidance by experts in this area. When I
didn't get a reply to that email I thought that the current solution had
been accepted, but clearly that wasn't the case. I have had a patch
ready for the TX software time stamping for a while (the third point of
my email), but that doesn't address the main reason why you are unhappy
about the patches.


I suggest to make it so that the sender gets the packet back once per
interface, with different time stamps and information about the
interface.


Can you elaborate on that?

I still think we need to ensure that only the sender is told about the
send time stamp and the associated packet data. Is there perhaps a
unique integer ID for each socket, or is adding it acceptable (a running
count basically)?

In that case we could do something like this: 
      * when sending a packet with TX request, add the socket ID 
      * clear skb->sk 
      * after generating the TX time stamp, try to find the socket by
        ID 
              * if it is found, send packet back with additional info
                like it is done now
              * if not, discard information because the sender is gone 

The drawback is the more costly socket lookup. For PTP this isn't an
issue due to the low packet rate, so a very simple solution would be
good enough. But for other use cases it might be problematic. I also
have no idea how the locking for the socket lookup can be done safely.

-- 
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.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
TX time stamping, Patrick Ohly, (Tue Mar 3, 11:31 am)
Re: TX time stamping, David Miller, (Thu Mar 19, 2:05 pm)
Re: TX time stamping, Herbert Xu, (Thu Mar 19, 7:10 pm)
Re: TX time stamping, Patrick Ohly, (Wed Mar 25, 12:08 am)
Re: TX time stamping, Herbert Xu, (Thu Mar 26, 7:48 am)
Re: TX time stamping, Patrick Ohly, (Thu Mar 26, 8:30 am)
Re: TX time stamping, Oliver Hartkopp, (Mon Mar 30, 11:09 am)
Re: TX time stamping, Patrick Ohly, (Mon Mar 30, 11:53 pm)