Netdev List
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: Octavian Purdila <opurdila@ixiacom.com>
Cc: netdev@vger.kernel.org
Subject: Re: [RFC][PATCH 1/1] net: support for hardware timestamping
Date: Wed, 30 Jul 2008 16:00:28 +0200	[thread overview]
Message-ID: <1217426429.30512.195.camel@ecld0pohly> (raw)
In-Reply-To: <200807301638.54484.opurdila@ixiacom.com>

On Wed, 2008-07-30 at 16:38 +0300, Octavian Purdila wrote:
> On Wednesday 30 July 2008, Patrick Ohly wrote:
> 
> > It's the app which chooses when to enable the feature, so we need a way
> > to communicate that.
> 
> Ok, perhaps a new SIOCSHWTSTAMP ioctl? (or maybe we can piggy back on the 
> filter one with the HWTSTAMP_FILTER_NONE you proposed?)

I'm fine with just one ioctl and would prefer a generic SIOCSHWTSTAMP. I
would like to go even one step further than discussed so far and also
use it to enable TX time stamping. The reasoning is that the driver
might have to do some work (like initializing the NIC clock, setting up
NIC/system time comparison) both for TX and RX.

That means that we need two fields and defines for TX. Adding new fields
later on works, but having to support multiple different sizes in the
driver could get complicated, so I suggest to add at least a (currently
unused) flag field. Not sure what the usual convention is regarding the
type fields - char or int?

struct hwtstamp_config {
    char tx_type;
    char rx_filter_type;
    int flags;
};

/**
 * no outgoing packet will need hardware time stamping;
 * should a packet arrive which asks for it, no hardware
 * time stamping will be done
 */
#define HWTSTAMP_TX_OFF 0

/**
 * enables hardware time stamping for outgoing packets;
 * the sender of the packet decides which are to be 
 * time stamped
 */
#define HWSTAMP_TX_ON 1

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


  reply	other threads:[~2008-07-30 14:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-29  0:07 [RFC][PATCH 0/1] net: support for hardware timestamps Octavian Purdila
2008-07-29  0:08 ` [RFC][PATCH 1/1] net: support for hardware timestamping Octavian Purdila
2008-07-29 14:52   ` Patrick Ohly
2008-07-29 15:49     ` Octavian Purdila
2008-07-30  9:35       ` Patrick Ohly
2008-07-30 13:38         ` Octavian Purdila
2008-07-30 14:00           ` Patrick Ohly [this message]
2008-07-29 15:54     ` Stephen Hemminger
2008-07-29 16:11       ` Octavian Purdila
2008-07-29 17:30         ` Ingo Oeser
2008-07-29 18:10           ` Octavian Purdila
2008-07-29 18:27             ` Ingo Oeser
2008-07-30  8:51         ` Patrick Ohly
2008-07-30  9:34           ` Ingo Oeser

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=1217426429.30512.195.camel@ecld0pohly \
    --to=patrick.ohly@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=opurdila@ixiacom.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