DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: Shahaji Bhosle <shahaji.bhosle@broadcom.com>,
	Randy Schacher <stuart.schacher@broadcom.com>,
	Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>,
	Mike Baucom <michael.baucom@broadcom.com>
Subject: [dpdk-dev] [PATCH v2 4/4] net/bnxt: add truflow flush-timer to alloc table scope API
Date: Sat, 25 Apr 2020 07:01:41 -0700	[thread overview]
Message-ID: <20200425140141.27947-5-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20200425140141.27947-1-ajit.khaparde@broadcom.com>

From: Shahaji Bhosle <shahaji.bhosle@broadcom.com>

Updated the params list to include flush timer, this will
allow users to set the HW flush timer value in 10th of second.
Setting 0 will disable the pending cache flush feature.

Signed-off-by: Shahaji Bhosle <shahaji.bhosle@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_core.h | 6 ++++++
 drivers/net/bnxt/tf_core/tf_msg.c  | 3 +++
 drivers/net/bnxt/tf_core/tf_msg.h  | 1 +
 drivers/net/bnxt/tf_core/tf_tbl.c  | 1 +
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 6 ++++++
 5 files changed, 17 insertions(+)

diff --git a/drivers/net/bnxt/tf_core/tf_core.h b/drivers/net/bnxt/tf_core/tf_core.h
index 4b60973ee..1eedd80e7 100644
--- a/drivers/net/bnxt/tf_core/tf_core.h
+++ b/drivers/net/bnxt/tf_core/tf_core.h
@@ -560,6 +560,12 @@ struct tf_alloc_tbl_scope_parms {
 	 * [in] Brd4 only receive table access interface id
 	 */
 	uint32_t tx_tbl_if_id;
+	/**
+	 * [in] Flush pending HW cached flows every 1/10th of value
+	 * set in seconds, both idle and active flows are flushed
+	 * from the HW cache. If set to 0, this feature will be disabled.
+	 */
+	uint8_t hw_flow_cache_flush_timer;
 	/**
 	 * [out] table scope identifier
 	 */
diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c
index bdf8f155f..beecafdeb 100644
--- a/drivers/net/bnxt/tf_core/tf_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_msg.c
@@ -978,6 +978,7 @@ int tf_msg_em_cfg(struct tf *tfp,
 		  uint16_t   key1_ctx_id,
 		  uint16_t   record_ctx_id,
 		  uint16_t   efc_ctx_id,
+		  uint8_t    flush_interval,
 		  int        dir)
 {
 	int rc;
@@ -993,6 +994,8 @@ int tf_msg_em_cfg(struct tf *tfp,
 	req.flags = tfp_cpu_to_le_32(flags);
 	req.num_entries = tfp_cpu_to_le_32(num_entries);
 
+	req.flush_interval = flush_interval;
+
 	req.key0_ctx_id = tfp_cpu_to_le_16(key0_ctx_id);
 	req.key1_ctx_id = tfp_cpu_to_le_16(key1_ctx_id);
 	req.record_ctx_id = tfp_cpu_to_le_16(record_ctx_id);
diff --git a/drivers/net/bnxt/tf_core/tf_msg.h b/drivers/net/bnxt/tf_core/tf_msg.h
index b8d8c1ede..030d1881e 100644
--- a/drivers/net/bnxt/tf_core/tf_msg.h
+++ b/drivers/net/bnxt/tf_core/tf_msg.h
@@ -152,6 +152,7 @@ int tf_msg_em_cfg(struct tf *tfp,
 		  uint16_t      key1_ctx_id,
 		  uint16_t      record_ctx_id,
 		  uint16_t      efc_ctx_id,
+		  uint8_t       flush_interval,
 		  int           dir);
 
 /**
diff --git a/drivers/net/bnxt/tf_core/tf_tbl.c b/drivers/net/bnxt/tf_core/tf_tbl.c
index 236affe25..93f387e86 100644
--- a/drivers/net/bnxt/tf_core/tf_tbl.c
+++ b/drivers/net/bnxt/tf_core/tf_tbl.c
@@ -1500,6 +1500,7 @@ tf_alloc_eem_tbl_scope(struct tf *tfp,
 				   em_tables[KEY1_TABLE].ctx_id,
 				   em_tables[RECORD_TABLE].ctx_id,
 				   em_tables[EFC_TABLE].ctx_id,
+				   parms->hw_flow_cache_flush_timer,
 				   dir);
 		if (rc) {
 			PMD_DRV_LOG(ERR,
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index f8047f0d6..a9cc92d34 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -121,6 +121,12 @@ bnxt_init_tbl_scope_parms(struct bnxt *bp,
 	else
 		dparms = bnxt_ulp_device_params_get(dev_id);
 
+	/*
+	 * Set the flush timer for EEM entries. The value is in 100ms intervals,
+	 * so 100 is 10s.
+	 */
+	params->hw_flow_cache_flush_timer = 100;
+
 	if (!dparms) {
 		params->rx_max_key_sz_in_bits = BNXT_ULP_DFLT_RX_MAX_KEY;
 		params->rx_max_action_entry_sz_in_bits =
-- 
2.21.1 (Apple Git-122.3)


  parent reply	other threads:[~2020-04-25 14:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25  3:47 [dpdk-dev] [PATCH 0/5] introduce changes to support flow scaling Venkat Duvvuru
2020-04-25  3:47 ` [dpdk-dev] [PATCH 1/5] net/bnxt: reserve a flowdb resource function as invalid Venkat Duvvuru
2020-04-25  3:47 ` [dpdk-dev] [PATCH 2/5] net/bnxt: action record external pool updates Venkat Duvvuru
2020-04-25  3:47 ` [dpdk-dev] [PATCH 3/5] net/bnxt: ulp modifications for handling actions/index tables Venkat Duvvuru
2020-04-25  3:47 ` [dpdk-dev] [PATCH 4/5] net/bnxt: add truflow flush-timer to alloc table scope API Venkat Duvvuru
2020-04-25  3:47 ` [dpdk-dev] [PATCH 5/5] net/bnxt: ulp must set hw flow cache timer when allocating table scope Venkat Duvvuru
2020-04-25 14:01 ` [dpdk-dev] [PATCH v2 0/4] introduce changes to support flow scaling Ajit Khaparde
2020-04-25 14:01   ` [dpdk-dev] [PATCH v2 1/4] net/bnxt: reserve a flowdb resource function as invalid Ajit Khaparde
2020-04-25 14:01   ` [dpdk-dev] [PATCH v2 2/4] net/bnxt: update action record external pool Ajit Khaparde
2020-04-25 14:01   ` [dpdk-dev] [PATCH v2 3/4] net/bnxt: ulp changes to handle action/index tables Ajit Khaparde
2020-04-25 14:01   ` Ajit Khaparde [this message]
2020-04-25 17:36   ` [dpdk-dev] [PATCH v2 0/4] introduce changes to support flow scaling Ajit Khaparde

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=20200425140141.27947-5-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=michael.baucom@broadcom.com \
    --cc=shahaji.bhosle@broadcom.com \
    --cc=stuart.schacher@broadcom.com \
    --cc=venkatkumar.duvvuru@broadcom.com \
    /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).