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

Simei Su simei.su at intel.com
Wed Oct 12 04:53:04 CEST 2022


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")
Cc: stable at dpdk.org

Signed-off-by: Simei Su <simei.su at intel.com>
---
 drivers/net/iavf/iavf_vchnl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 4327c5a..729400c 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -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
-- 
2.9.5



More information about the stable mailing list