From: Richard Cochran <richardcochran@gmail.com>
To: Amir Vadai <amirv@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
Eugenia Emantayev <eugenia@mellanox.com>
Subject: Re: [PATCH net-next V3 3/5] net/mlx4_en: Add HW timestamping (TS) support
Date: Sun, 28 Apr 2013 09:46:29 +0200 [thread overview]
Message-ID: <20130428074624.GA5324@netboy> (raw)
In-Reply-To: <517CC2A8.5010303@mellanox.com>
On Sun, Apr 28, 2013 at 09:33:12AM +0300, Amir Vadai wrote:
> On 25/04/2013 22:26, Richard Cochran wrote:
> > On Tue, Apr 23, 2013 at 07:06:49PM +0300, Amir Vadai wrote:
> >
> >> +u64 mlx4_en_get_cqe_ts(struct mlx4_cqe *cqe)
> >> +{
> >> + u64 hi, lo;
> >> + struct mlx4_ts_cqe *ts_cqe = (struct mlx4_ts_cqe *)cqe;
> >> +
> >> + lo = (u64)be16_to_cpu(ts_cqe->timestamp_lo);
> >> + hi = ((u64)be32_to_cpu(ts_cqe->timestamp_hi) + !lo) << 16;
> > ^^^^^
> > That looks a bit strange. Can you explain?
>
> We need to increment the high order 32bit by one when the low order
> 16bit value is zero, due to HW limitation.
So 'hi' increases by one, when 'lo' goes from 0x0000 to 0x0001?
Thanks,
Richard
next prev parent reply other threads:[~2013-04-28 7:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 16:06 [PATCH net-next V3 0/5] net/mlx4: HW timestamping support Amir Vadai
2013-04-23 16:06 ` [PATCH net-next V3 1/5] net/mlx4_core: Add timestamping device capability Amir Vadai
2013-04-23 16:06 ` [PATCH net-next V3 2/5] net/mlx4_core: Read HCA frequency and map internal clock Amir Vadai
2013-04-23 16:06 ` [PATCH net-next V3 3/5] net/mlx4_en: Add HW timestamping (TS) support Amir Vadai
2013-04-25 19:26 ` Richard Cochran
2013-04-28 6:33 ` Amir Vadai
2013-04-28 7:46 ` Richard Cochran [this message]
2013-04-28 8:00 ` Amir Vadai
2013-04-23 16:06 ` [PATCH net-next V3 4/5] net/mlx4_en: Support software timestamping Amir Vadai
2013-04-23 16:06 ` [PATCH net-next V3 5/5] net/mlx4_en: Add a service task Amir Vadai
2013-04-26 0:13 ` Eric Dumazet
2013-04-26 2:24 ` Or Gerlitz
2013-04-26 2:39 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130428074624.GA5324@netboy \
--to=richardcochran@gmail.com \
--cc=amirv@mellanox.com \
--cc=davem@davemloft.net \
--cc=eugenia@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).