From: Wenjing Qiao <wenjing.qiao@intel.com>
To: jingjing.wu@intel.com, beilei.xing@intel.com, qi.z.zhang@intel.com
Cc: dev@dpdk.org, Wenjing Qiao <wenjing.qiao@intel.com>, stable@dpdk.org
Subject: [PATCH 5/7] common/idpf: add timestamp enable flag for rxq
Date: Thu, 20 Apr 2023 05:19:33 -0400 [thread overview]
Message-ID: <20230420091935.43116-6-wenjing.qiao@intel.com> (raw)
In-Reply-To: <20230420091935.43116-1-wenjing.qiao@intel.com>
A rxq can be configured with timestamp offload.
So, add timestamp enable flag for rxq.
Fixes: 8c6098afa075 ("common/idpf: add Rx/Tx data path")
Cc: stable@dpdk.org
Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
Suggested-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/common/idpf/idpf_common_rxtx.c | 3 ++-
drivers/common/idpf/idpf_common_rxtx.h | 2 ++
drivers/common/idpf/version.map | 3 +++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/common/idpf/idpf_common_rxtx.c b/drivers/common/idpf/idpf_common_rxtx.c
index 9c58f3fb11..7afe7afe3f 100644
--- a/drivers/common/idpf/idpf_common_rxtx.c
+++ b/drivers/common/idpf/idpf_common_rxtx.c
@@ -354,7 +354,7 @@ int
idpf_qc_ts_mbuf_register(struct idpf_rx_queue *rxq)
{
int err;
- if ((rxq->offloads & IDPF_RX_OFFLOAD_TIMESTAMP) != 0) {
+ if (!rxq->ts_enable && (rxq->offloads & IDPF_RX_OFFLOAD_TIMESTAMP)) {
/* Register mbuf field and flag for Rx timestamp */
err = rte_mbuf_dyn_rx_timestamp_register(&idpf_timestamp_dynfield_offset,
&idpf_timestamp_dynflag);
@@ -363,6 +363,7 @@ idpf_qc_ts_mbuf_register(struct idpf_rx_queue *rxq)
"Cannot register mbuf field/flag for timestamp");
return -EINVAL;
}
+ rxq->ts_enable = TRUE;
}
return 0;
}
diff --git a/drivers/common/idpf/idpf_common_rxtx.h b/drivers/common/idpf/idpf_common_rxtx.h
index af1425eb3f..cb7f5a3ba8 100644
--- a/drivers/common/idpf/idpf_common_rxtx.h
+++ b/drivers/common/idpf/idpf_common_rxtx.h
@@ -142,6 +142,8 @@ struct idpf_rx_queue {
struct idpf_rx_queue *bufq2;
uint64_t offloads;
+
+ bool ts_enable; /* if timestamp is enabled */
};
struct idpf_tx_entry {
diff --git a/drivers/common/idpf/version.map b/drivers/common/idpf/version.map
index c67c554911..15b42b4d2e 100644
--- a/drivers/common/idpf/version.map
+++ b/drivers/common/idpf/version.map
@@ -69,5 +69,8 @@ INTERNAL {
idpf_vport_rss_config;
idpf_vport_stats_update;
+ idpf_timestamp_dynfield_offset;
+ idpf_timestamp_dynflag;
+
local: *;
};
--
2.25.1
next prev parent reply other threads:[~2023-04-20 9:26 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 9:19 [PATCH 0/7] update idpf and cpfl timestamp Wenjing Qiao
2023-04-20 9:19 ` [PATCH 1/7] common/idpf: fix 64b timestamp roll over issue Wenjing Qiao
2023-04-21 7:15 ` [PATCH v2 0/7] update idpf and cpfl timestamp Wenjing Qiao
2023-04-21 7:15 ` [PATCH v2 1/7] common/idpf: fix 64b timestamp roll over issue Wenjing Qiao
2023-04-24 9:17 ` [PATCH v3 0/7] fix and enhance idpf and cpfl timestamp Wenjing Qiao
2023-04-24 9:17 ` [PATCH v3 1/7] common/idpf: fix 64b timestamp roll over issue Wenjing Qiao
2023-05-19 8:31 ` [PATCH v4 0/7] fix idpf and cpfl timestamp Wenjing Qiao
2023-05-19 8:31 ` [PATCH v4 1/7] common/idpf: fix 64b timestamp roll over issue Wenjing Qiao
2023-05-24 8:36 ` Liu, Mingxia
2023-05-19 8:31 ` [PATCH v4 2/7] net/idpf: save main time by alarm Wenjing Qiao
2023-05-19 8:31 ` [PATCH v4 3/7] net/cpfl: " Wenjing Qiao
2023-05-19 8:31 ` [PATCH v4 4/7] common/idpf: enhance timestamp offload feature for ACC Wenjing Qiao
2023-05-19 8:31 ` [PATCH v4 5/7] common/idpf: add timestamp enable flag for rxq Wenjing Qiao
2023-05-19 8:31 ` [PATCH v4 6/7] net/cpfl: adjust timestamp mbuf register Wenjing Qiao
2023-05-19 8:31 ` [PATCH v4 7/7] net/idpf: " Wenjing Qiao
2023-04-24 9:17 ` [PATCH v3 2/7] net/idpf: save main time by alarm Wenjing Qiao
2023-04-24 9:17 ` [PATCH v3 3/7] net/cpfl: " Wenjing Qiao
2023-04-24 9:17 ` [PATCH v3 4/7] common/idpf: enhance timestamp offload feature for ACC Wenjing Qiao
2023-04-24 9:17 ` [PATCH v3 5/7] common/idpf: add timestamp enable flag for rxq Wenjing Qiao
2023-04-24 9:17 ` [PATCH v3 6/7] net/cpfl: register timestamp mbuf when starting dev Wenjing Qiao
2023-04-28 3:24 ` Zhang, Qi Z
2023-04-24 9:17 ` [PATCH v3 7/7] net/idpf: " Wenjing Qiao
2023-04-21 7:15 ` [PATCH v2 2/7] net/idpf: save main time by alarm Wenjing Qiao
2023-04-28 2:46 ` Zhang, Qi Z
2023-04-21 7:15 ` [PATCH v2 3/7] net/cpfl: " Wenjing Qiao
2023-04-21 7:16 ` [PATCH v2 4/7] common/idpf: support timestamp offload feature for ACC Wenjing Qiao
2023-04-21 7:16 ` [PATCH v2 5/7] common/idpf: add timestamp enable flag for rxq Wenjing Qiao
2023-04-21 7:16 ` [PATCH v2 6/7] net/cpfl: register timestamp mbuf when starting dev Wenjing Qiao
2023-04-21 7:16 ` [PATCH v2 7/7] net/idpf: " Wenjing Qiao
2023-04-20 9:19 ` [PATCH 2/7] net/idpf: save master time by alarm Wenjing Qiao
2023-04-20 9:19 ` [PATCH 3/7] net/cpfl: " Wenjing Qiao
2023-04-20 9:19 ` [PATCH 4/7] common/idpf: support timestamp offload feature for ACC Wenjing Qiao
2023-04-20 9:19 ` Wenjing Qiao [this message]
2023-04-20 9:19 ` [PATCH 6/7] net/cpfl: register timestamp mbuf when starting dev Wenjing Qiao
2023-04-20 9:19 ` [PATCH 7/7] net/idpf: " Wenjing Qiao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230420091935.43116-6-wenjing.qiao@intel.com \
--to=wenjing.qiao@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).