@@ -637,6 +637,7 @@ static int igc_ptp_set_timestamp_mode(struct igc_adapter *adapter,
case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
case HWTSTAMP_FILTER_NTP_ALL:
+ case HWTSTAMP_FILTER_DMA_TIMESTAMP:
case HWTSTAMP_FILTER_ALL:
igc_ptp_enable_rx_timestamp(adapter);
config->rx_filter = HWTSTAMP_FILTER_ALL;
@@ -177,6 +177,9 @@ enum hwtstamp_rx_filters {
/* NTP, UDP, all versions and packet modes */
HWTSTAMP_FILTER_NTP_ALL,
+ /* DMA time stamp packet */
+ HWTSTAMP_FILTER_DMA_TIMESTAMP,
+
/* add new constants above here */
__HWTSTAMP_FILTER_CNT
};
@@ -229,6 +229,7 @@ static int net_hwtstamp_validate(struct ifreq *ifr)
case HWTSTAMP_FILTER_PTP_V2_SYNC:
case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
case HWTSTAMP_FILTER_NTP_ALL:
+ case HWTSTAMP_FILTER_DMA_TIMESTAMP:
rx_filter_valid = 1;
break;
case __HWTSTAMP_FILTER_CNT:
@@ -438,6 +438,7 @@ const char ts_rx_filter_names[][ETH_GSTRING_LEN] = {
[HWTSTAMP_FILTER_PTP_V2_SYNC] = "ptpv2-sync",
[HWTSTAMP_FILTER_PTP_V2_DELAY_REQ] = "ptpv2-delay-req",
[HWTSTAMP_FILTER_NTP_ALL] = "ntp-all",
+ [HWTSTAMP_FILTER_DMA_TIMESTAMP] = "dma-timestamp",
};
static_assert(ARRAY_SIZE(ts_rx_filter_names) == __HWTSTAMP_FILTER_CNT);
Add new HWTSTAMP_FILTER_DMA_TIMESTAMP receive filters. This filter can be configured for devices that support/allow the DMA timestamp retrieval on receive side. Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com> --- drivers/net/ethernet/intel/igc/igc_ptp.c | 1 + include/uapi/linux/net_tstamp.h | 3 +++ net/core/dev_ioctl.c | 1 + net/ethtool/common.c | 1 + 4 files changed, 6 insertions(+)