diff options
author | Amir Vadai <amirv@mellanox.com> | 2013-04-23 06:06:49 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-24 16:30:14 -0400 |
commit | ec693d47010e8302e61e0bdf3f47496c5610641a (patch) | |
tree | 8fbcfe632cb618318dcb1c9a9050afd025462b0a /include/linux/mlx4/cq.h | |
parent | ddd8a6c12d7e494902a9435a9a7a543ef730b2d8 (diff) | |
download | lwn-ec693d47010e8302e61e0bdf3f47496c5610641a.tar.gz lwn-ec693d47010e8302e61e0bdf3f47496c5610641a.zip |
net/mlx4_en: Add HW timestamping (TS) support
The patch allows to enable/disable HW timestamping for incoming and/or
outgoing packets. It adds and initializes all structs and callbacks
needed by kernel TS API.
To enable/disable HW timestamping appropriate ioctl should be used.
Currently HWTSTAMP_FILTER_ALL/NONE and HWTSAMP_TX_ON/OFF only are
supported.
When enabling TS on receive flow - VLAN stripping will be disabled.
Also were made all relevant changes in RX/TX flows to consider TS request
and plant HW timestamps into relevant structures.
mlx4_ib was fixed to compile with new mlx4_cq_alloc() signature.
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4/cq.h')
-rw-r--r-- | include/linux/mlx4/cq.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/mlx4/cq.h b/include/linux/mlx4/cq.h index 6f65b2c8bb89..98fa492cf406 100644 --- a/include/linux/mlx4/cq.h +++ b/include/linux/mlx4/cq.h @@ -64,6 +64,22 @@ struct mlx4_err_cqe { u8 owner_sr_opcode; }; +struct mlx4_ts_cqe { + __be32 vlan_my_qpn; + __be32 immed_rss_invalid; + __be32 g_mlpath_rqpn; + __be32 timestamp_hi; + __be16 status; + u8 ipv6_ext_mask; + u8 badfcs_enc; + __be32 byte_cnt; + __be16 wqe_index; + __be16 checksum; + u8 reserved; + __be16 timestamp_lo; + u8 owner_sr_opcode; +} __packed; + enum { MLX4_CQE_VLAN_PRESENT_MASK = 1 << 29, MLX4_CQE_QPN_MASK = 0xffffff, |