Skip to contentSkip to conversation

net/iavf: fix default state for Rx timestamp enabling

PATCH New Simei Su 2 participants 3 messages Oct 12, 2022 – Oct 13, 2022 Network drivers

lore
Share & tools
lore

Simei Su

author
#0 lore raw

PATCH 1/1 net/iavf: fix default state for Rx timestamp enabling

When starting testpmd without "--enable-rx-timestamp", found the issue that Rx timestamp on Flex descriptor is still enabled.

This patch adds per queue offload check to disable Rx timestamp support in default state.

Fixes b5cd735132f6 ("net/iavf: enable Rx timestamp on flex descriptor")
---
 drivers/net/iavf/iavf_vchnl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_vchnl.c +2 -1
index 4327c5a..729400c 100644
@@ -1070,7 +1070,8 @@ iavf_configure_queues(struct iavf_adapter *adapter,
 			}
 
 			if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_PTP &&
-			    vf->ptp_caps & VIRTCHNL_1588_PTP_CAP_RX_TSTAMP)
+			    vf->ptp_caps & VIRTCHNL_1588_PTP_CAP_RX_TSTAMP &&
+			    rxq[i]->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)
 				vc_qp->rxq.flags |= VIRTCHNL_PTP_RX_TSTAMP;
 		}
 #else
Signature · 1 line
2.9.5
author
#1 lore raw

PATCH 1/1 net/iavf: fix default state for Rx timestamp enabling

This patch adds per queue offload check to turn off Rx timestamp offload by default.

Fixes b5cd735132f6 ("net/iavf: enable Rx timestamp on flex descriptor")

v2:
* Refine commit log.

---
 drivers/net/iavf/iavf_vchnl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_vchnl.c +2 -1
index 4327c5a..729400c 100644
@@ -1070,7 +1070,8 @@ iavf_configure_queues(struct iavf_adapter *adapter,
 			}
 
 			if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_PTP &&
-			    vf->ptp_caps & VIRTCHNL_1588_PTP_CAP_RX_TSTAMP)
+			    vf->ptp_caps & VIRTCHNL_1588_PTP_CAP_RX_TSTAMP &&
+			    rxq[i]->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)
 				vc_qp->rxq.flags |= VIRTCHNL_PTP_RX_TSTAMP;
 		}
 #else
Signature · 1 line
2.9.5
Acked-by on v1 1/1 Applied
#2 lore raw
Quoted 11 lines

-----Original Message-----
From: Su, Simei <[email protected]>
Sent: Thursday, October 13, 2022 9:48 AM
To: Zhang, Qi Z <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Wu, Wenjun1 <[email protected]>; Su, Simei <[email protected]>; [email protected]
Subject: [PATCH] net/iavf: fix default state for Rx timestamp enabling

Quoted 7 lines

This patch adds per queue offload check to turn off Rx timestamp offload by default.

Fixes b5cd735132f6 ("net/iavf: enable Rx timestamp on flex descriptor")

Applied to dpdk-next-net-intel.

Thanks
Qi