2009-11-08 15:58:07

by Ali Gholami Rudi

[permalink] [raw]
Subject: [PATCH] trivial: fix checking socket() in net tstamp example


Signed-off-by: Ali Gholami Rudi <[email protected]>
---
.../networking/timestamping/timestamping.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/networking/timestamping/timestamping.c b/Documentation/networking/timestamping/timestamping.c
index a7936fe..bab619a 100644
--- a/Documentation/networking/timestamping/timestamping.c
+++ b/Documentation/networking/timestamping/timestamping.c
@@ -370,7 +370,7 @@ int main(int argc, char **argv)
}

sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
- if (socket < 0)
+ if (sock < 0)
bail("socket");

memset(&device, 0, sizeof(device));


2009-11-08 17:24:05

by Patrick Ohly

[permalink] [raw]
Subject: Re: [PATCH] trivial: fix checking socket() in net tstamp example

On Sun, 2009-11-08 at 15:59 +0000, Ali Gholami Rudi wrote:
> Signed-off-by: Ali Gholami Rudi <[email protected]>
> ---
> .../networking/timestamping/timestamping.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/networking/timestamping/timestamping.c b/Documentation/networking/timestamping/timestamping.c
> index a7936fe..bab619a 100644
> --- a/Documentation/networking/timestamping/timestamping.c
> +++ b/Documentation/networking/timestamping/timestamping.c
> @@ -370,7 +370,7 @@ int main(int argc, char **argv)
> }
>
> sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
> - if (socket < 0)
> + if (sock < 0)

Argh, of course you are right. FWIW, acknowledged.

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

2009-11-08 17:55:42

by Ali Gholami Rudi

[permalink] [raw]
Subject: Re: [PATCH] trivial: fix checking socket() in net tstamp example

Hi Patrick,

Patrick Ohly <[email protected]> wrote:
> > --- a/Documentation/networking/timestamping/timestamping.c
> > +++ b/Documentation/networking/timestamping/timestamping.c
> > @@ -370,7 +370,7 @@ int main(int argc, char **argv)
> > }
> >
> > sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
> > - if (socket < 0)
> > + if (sock < 0)
>
> Argh, of course you are right. FWIW, acknowledged.

By the way, I tried igb hardware timestamp but HWTSTAMP_FILTER_ALL works
almost like HWTSTAMP_FILTER_PTP_*. Isn't it supposed to timestamp all
of the incoming packets? Maybe there is something wrong with my test
setup?

Thanks,
Ali

2009-11-08 20:59:54

by Emilio G. Cota

[permalink] [raw]
Subject: What's the state of the TX timestamping?

[dropped [email protected] since this is not relevant to them]

by the way Patrick,

A few months ago I tried to implement TX timestamping for a card
I was working on [1]. I wasn't quite successful (sorry can't be more
explicit, I haven't touched it since then) and thought the reason
was that the implementation was half-baked because David reverted
it--I got to that conclusion after reading this thread in
linux-net ("TX time stamping"):

http://thread.gmane.org/gmane.linux.network/121378/

Could you please tell me what the state of TX timestamping is?
Did David revert it or not? I can't find a revert commit.

Thanks,
Emilio

[1] http://www.ohwr.org/twiki/bin/view/OHR/WhiteRabbit/WhiteRabbit

2009-12-18 14:23:46

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH] trivial: fix checking socket() in net tstamp example

On Sun, 8 Nov 2009, Patrick Ohly wrote:

> > diff --git a/Documentation/networking/timestamping/timestamping.c b/Documentation/networking/timestamping/timestamping.c
> > index a7936fe..bab619a 100644
> > --- a/Documentation/networking/timestamping/timestamping.c
> > +++ b/Documentation/networking/timestamping/timestamping.c
> > @@ -370,7 +370,7 @@ int main(int argc, char **argv)
> > }
> >
> > sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
> > - if (socket < 0)
> > + if (sock < 0)
>
> Argh, of course you are right. FWIW, acknowledged.

Doesn't seem to be present in 2.6.33-rc1, I have applied it to my tree.

Thanks,

--
Jiri Kosina
SUSE Labs, Novell Inc.