Re: [PATCH] igb: add a method to get the nic hw time stamping policy

From: Ben Hutchings
Date: Mon May 13 2013 - 12:11:01 EST


On Mon, 2013-05-13 at 15:48 +0000, Vick, Matthew wrote:
> On 5/13/13 3:07 AM, "Dong Zhu" <bluezhudong@xxxxxxxxx> wrote:
[...]
> >From 8a12932fd2a3bb5ca904bc72b20140247a5d81be Mon Sep 17 00:00:00 2001
> >From: Dong Zhu <bluezhudong@xxxxxxxxx>
> >Date: Mon, 13 May 2013 17:27:59 +0800
> >
> >Currently kernel only support setting the hw time stamping policy
> >through ioctl,now add a method to check which packets(Outgoing and
> >Incoming) are time stamped by nic.
> >
> >Add this to igb_get_ts_info, we can query this by using the GET_TS_INFO
> >ethtool command. Testing on I350 and 82576NS it seems work well.
> >
> >Signed-off-by: Dong Zhu <bluezhudong@xxxxxxxxx>
> >---
> > drivers/net/ethernet/intel/igb/igb_ethtool.c | 78
> >+++++++++++++++++++++++++++-
> > include/uapi/linux/ethtool.h | 3 ++
> > 2 files changed, 79 insertions(+), 2 deletions(-)
>
> [...]
>
> >diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
> >index 0c9b448..06cdbc0 100644
> >--- a/include/uapi/linux/ethtool.h
> >+++ b/include/uapi/linux/ethtool.h
> >@@ -772,7 +772,10 @@ struct ethtool_sfeatures {
> > * @so_timestamping: bit mask of the sum of the supported
> >SO_TIMESTAMPING flags
> > * @phc_index: device index of the associated PHC, or -1 if there is none
> > * @tx_types: bit mask of the supported hwtstamp_tx_types enumeration
> >values
> >+ * @tx_reserved[0]: bit mask of the in use hwtstamp_tx_types enumeration
> >values
> > * @rx_filters: bit mask of the supported hwtstamp_rx_filters
> >enumeration values
> >+ * @rx_reserved[0]: bit mask of the in use hwtstamp_rx_filters
> >enumeration
> >+ * values

Why would we keep calling a field 'reserved' once it's been given a
specific meaning?

> > * The bits in the 'tx_types' and 'rx_filters' fields correspond to
> > * the 'hwtstamp_tx_types' and 'hwtstamp_rx_filters' enumeration values,
> >--
> >1.7.11.7
> >
> >
> >--
> >Best Regards,
> >Dong Zhu
>
> CCing Ben Hutchings, since now your patch is affecting ethtool.
[...]

Thanks, Matthew.

Ben.

--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/