[16/21] net/cpfl: support timestamp offload
Checks
Commit Message
Add support for timestamp offload.
Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
---
doc/guides/nics/features/cpfl.ini | 1 +
drivers/net/cpfl/cpfl_ethdev.c | 3 ++-
drivers/net/cpfl/cpfl_rxtx.c | 7 +++++++
3 files changed, 10 insertions(+), 1 deletion(-)
@@ -11,6 +11,7 @@ MTU update = Y
TSO = P
L3 checksum offload = P
L4 checksum offload = P
+Timestamp offload = P
Linux = Y
x86-32 = Y
x86-64 = Y
@@ -103,7 +103,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_register_ts_mbuf(rxq);
+ if (err != 0) {
+ PMD_DRV_LOG(ERR, "fail to register timestamp mbuf %u",
+ rx_queue_id);
+ return -EIO;
+ }
+
if (rxq->bufq1 == NULL) {
/* Single queue */
err = idpf_alloc_single_rxq_mbufs(rxq);