f6b842edd3
BCMSAI 4.3.0.10, 6.5.21 SDK release with enhancements and fixes for vxlan, TD3 MMU, TD4-X9 EA support, etc.
112 lines
2.7 KiB
C
112 lines
2.7 KiB
C
/*! \file ngknet_ptp.h
|
|
*
|
|
* Definitions and APIs declaration for PTP.
|
|
*
|
|
*/
|
|
/*
|
|
* $Copyright: Copyright 2018-2020 Broadcom. All rights reserved.
|
|
* The term 'Broadcom' refers to Broadcom Inc. and/or its subsidiaries.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* A copy of the GNU General Public License version 2 (GPLv2) can
|
|
* be found in the LICENSES folder.$
|
|
*/
|
|
|
|
#ifndef NGKNET_PTP_H
|
|
#define NGKNET_PTP_H
|
|
|
|
#include <linux/skbuff.h>
|
|
#include "ngknet_main.h"
|
|
|
|
/*!
|
|
* \brief PTP Rx config set.
|
|
*
|
|
* \param [in] ndev Network device structure point.
|
|
* \param [in] filter Rx filter.
|
|
*
|
|
* \retval SHR_E_NONE No errors.
|
|
*/
|
|
extern int
|
|
ngknet_ptp_rx_config_set(struct net_device *ndev, int *filter);
|
|
|
|
/*!
|
|
* \brief PTP Tx config set.
|
|
*
|
|
* \param [in] ndev Network device structure point.
|
|
* \param [in] type Tx type.
|
|
*
|
|
* \retval SHR_E_NONE No errors.
|
|
*/
|
|
extern int
|
|
ngknet_ptp_tx_config_set(struct net_device *ndev, int type);
|
|
|
|
/*!
|
|
* \brief PTP Rx HW timestamping get.
|
|
*
|
|
* \param [in] ndev Network device structure point.
|
|
* \param [in] skb Rx packet SKB.
|
|
* \param [out] ts Timestamp value.
|
|
*
|
|
* \retval SHR_E_NONE No errors.
|
|
*/
|
|
extern int
|
|
ngknet_ptp_rx_hwts_get(struct net_device *ndev, struct sk_buff *skb, uint64_t *ts);
|
|
|
|
/*!
|
|
* \brief PTP Tx HW timestamping get.
|
|
*
|
|
* \param [in] ndev Network device structure point.
|
|
* \param [in] skb Tx packet SKB.
|
|
* \param [out] ts Timestamp value.
|
|
*
|
|
* \retval SHR_E_NONE No errors.
|
|
*/
|
|
extern int
|
|
ngknet_ptp_tx_hwts_get(struct net_device *ndev, struct sk_buff *skb, uint64_t *ts);
|
|
|
|
/*!
|
|
* \brief PTP Tx meta set.
|
|
*
|
|
* \param [in] ndev Network device structure point.
|
|
* \param [in] skb Tx packet SKB.
|
|
*
|
|
* \retval SHR_E_NONE No errors.
|
|
*/
|
|
extern int
|
|
ngknet_ptp_tx_meta_set(struct net_device *ndev, struct sk_buff *skb);
|
|
|
|
/*!
|
|
* \brief PTP PHC index get.
|
|
*
|
|
* \param [in] ndev Network device structure point.
|
|
* \param [out] index PHC index.
|
|
*
|
|
* \retval SHR_E_NONE No errors.
|
|
*/
|
|
extern int
|
|
ngknet_ptp_phc_index_get(struct net_device *ndev, int *index);
|
|
|
|
/*!
|
|
* \brief PTP device control.
|
|
*
|
|
* \param [in] dev NGKNET device structure point.
|
|
* \param [in] cmd Command.
|
|
* \param [in] data Data buffer.
|
|
* \param [in] len Data length.
|
|
*
|
|
* \retval SHR_E_NONE No errors.
|
|
*/
|
|
extern int
|
|
ngknet_ptp_dev_ctrl(struct ngknet_dev *dev, int cmd, char *data, int len);
|
|
|
|
#endif /* NGKNET_PTP_H */
|
|
|