@@ -923,6 +923,27 @@ static int gve_set_rxfh(struct net_device *netdev, struct ethtool_rxfh_param *rx
923
923
return 0 ;
924
924
}
925
925
926
+ static int gve_get_ts_info (struct net_device * netdev ,
927
+ struct kernel_ethtool_ts_info * info )
928
+ {
929
+ struct gve_priv * priv = netdev_priv (netdev );
930
+
931
+ ethtool_op_get_ts_info (netdev , info );
932
+
933
+ if (priv -> nic_timestamp_supported ) {
934
+ info -> so_timestamping |= SOF_TIMESTAMPING_RX_HARDWARE |
935
+ SOF_TIMESTAMPING_RAW_HARDWARE ;
936
+
937
+ info -> rx_filters |= BIT (HWTSTAMP_FILTER_NONE ) |
938
+ BIT (HWTSTAMP_FILTER_ALL );
939
+
940
+ if (priv -> ptp )
941
+ info -> phc_index = ptp_clock_index (priv -> ptp -> clock );
942
+ }
943
+
944
+ return 0 ;
945
+ }
946
+
926
947
const struct ethtool_ops gve_ethtool_ops = {
927
948
.supported_coalesce_params = ETHTOOL_COALESCE_USECS ,
928
949
.supported_ring_params = ETHTOOL_RING_USE_TCP_DATA_SPLIT ,
@@ -951,5 +972,5 @@ const struct ethtool_ops gve_ethtool_ops = {
951
972
.get_priv_flags = gve_get_priv_flags ,
952
973
.set_priv_flags = gve_set_priv_flags ,
953
974
.get_link_ksettings = gve_get_link_ksettings ,
954
- .get_ts_info = ethtool_op_get_ts_info ,
975
+ .get_ts_info = gve_get_ts_info ,
955
976
};
0 commit comments