All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Vadai <amirv@mellanox.com>
To: Richard Cochran <richardcochran@gmail.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:33:12 +0300	[thread overview]
Message-ID: <517CC2A8.5010303@mellanox.com> (raw)
In-Reply-To: <20130425192627.GA14429@netboy>

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.

> 
>> +
>> +	return hi | lo;
>> +}
> 
> Thanks,
> Richard
> 

Amir.

  reply	other threads:[~2013-04-28  6:33 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 [this message]
2013-04-28  7:46       ` Richard Cochran
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=517CC2A8.5010303@mellanox.com \
    --to=amirv@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=eugenia@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=richardcochran@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.