struct hns3_hw *hw = &hns->hw;
int ret;
- if (!(conf->rxmode.offloads & DEV_RX_OFFLOAD_TIMESTAMP))
+ if (!(conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP))
return 0;
ret = rte_mbuf_dyn_rx_timestamp_register
{
int ret;
- if (!hns3_dev_ptp_supported(hw))
+ if (!hns3_dev_get_support(hw, PTP))
return 0;
ret = hns3_ptp_int_en(hw, true);
struct hns3_pf *pf = &hns->pf;
int ret;
- if (!hns3_dev_ptp_supported(hw))
+ if (!hns3_dev_get_support(hw, PTP))
return -ENOTSUP;
if (pf->ptp_enable)
return 0;
+ hns3_warn(hw, "note: please ensure Rx/Tx burst mode is simple or common when enabling PTP!");
rte_spinlock_lock(&hw->lock);
ret = hns3_timesync_configure(hns, true);
struct hns3_pf *pf = &hns->pf;
int ret;
- if (!hns3_dev_ptp_supported(hw))
+ if (!hns3_dev_get_support(hw, PTP))
return -ENOTSUP;
if (!pf->ptp_enable)
struct hns3_pf *pf = &hns->pf;
uint64_t ns, sec;
- if (!hns3_dev_ptp_supported(hw))
+ if (!hns3_dev_get_support(hw, PTP))
return -ENOTSUP;
ns = pf->rx_timestamp & TIME_RX_STAMP_NS_MASK;
uint64_t ns;
int ts_cnt;
- if (!hns3_dev_ptp_supported(hw))
+ if (!hns3_dev_get_support(hw, PTP))
return -ENOTSUP;
ts_cnt = hns3_read_dev(hw, HNS3_TX_1588_BACK_TSP_CNT) &
struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
uint64_t ns, sec;
- if (!hns3_dev_ptp_supported(hw))
+ if (!hns3_dev_get_support(hw, PTP))
return -ENOTSUP;
sec = hns3_read_dev(hw, HNS3_CURR_TIME_OUT_L);
uint64_t sec = ts->tv_sec;
uint64_t ns = ts->tv_nsec;
- if (!hns3_dev_ptp_supported(hw))
+ if (!hns3_dev_get_support(hw, PTP))
return -ENOTSUP;
/* Set the timecounters to a new value. */
struct timespec cur_time;
uint64_t ns;
- if (!hns3_dev_ptp_supported(hw))
+ if (!hns3_dev_get_support(hw, PTP))
return -ENOTSUP;
(void)hns3_timesync_read_time(dev, &cur_time);
bool en = pf->ptp_enable;
int ret;
- if (!hns3_dev_ptp_supported(hw))
+ if (!hns3_dev_get_support(hw, PTP))
return 0;
ret = hns3_timesync_configure(hns, en);