[v8,16/21] net/cpfl: support timestamp offload
Checks
Commit Message
Add support for timestamp offload.
Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
---
drivers/net/cpfl/cpfl_ethdev.c | 3 ++-
drivers/net/cpfl/cpfl_rxtx.c | 7 +++++++
2 files changed, 9 insertions(+), 1 deletion(-)
@@ -100,7 +100,8 @@ cpfl_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
RTE_ETH_RX_OFFLOAD_IPV4_CKSUM |
RTE_ETH_RX_OFFLOAD_UDP_CKSUM |
RTE_ETH_RX_OFFLOAD_TCP_CKSUM |
- RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM;
+ RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM |
+ RTE_ETH_RX_OFFLOAD_TIMESTAMP;
dev_info->tx_offload_capa =
RTE_ETH_TX_OFFLOAD_IPV4_CKSUM |
@@ -516,6 +516,13 @@ cpfl_rx_queue_init(struct rte_eth_dev *dev, uint16_t rx_queue_id)
return -EINVAL;
}
+ err = idpf_qc_ts_mbuf_register(rxq);
+ if (err != 0) {
+ PMD_DRV_LOG(ERR, "fail to register timestamp mbuf %u",
+ rx_queue_id);
+ return -EIO;
+ }
+
if (rxq->adapter->is_rx_singleq) {
/* Single queue */
err = idpf_qc_single_rxq_mbufs_alloc(rxq);