Dell Mellanox Family of Adapters User Manual

Page 34

Advertising
background image

Driver Installation and Configuration

Rev 1.1

Mellanox Technologies

34

To enable time stamping for a net device:

Admin privileged user can enable/disable time stamping through calling ioctl(sock, SIOCSHWT-
STAMP, &ifreq) with following values:

Send side time sampling:

Enabled by ifreq.hwtstamp_config.tx_type when

/* possible values for hwtstamp_config->tx_type */

enum hwtstamp_tx_types {

/*

* No outgoing packet will need hardware time stamping;

* should a packet arrive which asks for it, no hardware

* time stamping will be done.

*/

HWTSTAMP_TX_OFF,

/*

* Enables hardware time stamping for outgoing packets;

* the sender of the packet decides which are to be

* time stamped by setting %SOF_TIMESTAMPING_TX_SOFTWARE

* before sending the packet.

*/

HWTSTAMP_TX_ON,

/*

* Enables time stamping for outgoing packets just as

* HWTSTAMP_TX_ON does, but also enables time stamp insertion

* directly into Sync packets. In this case, transmitted Sync

* packets will not received a time stamp via the socket error

* queue.

*/

HWTSTAMP_TX_ONESTEP_SYNC,

};

Note: for send side time stamping currently only HWTSTAMP_TX_OFF and

HWTSTAMP_TX_ON are supported.

Advertising