DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rmody@marvell.com>
To: <dev@dpdk.org>, <jerinj@marvell.com>, <ferruh.yigit@intel.com>
Cc: Rasesh Mody <rmody@marvell.com>,
	<GR-Everest-DPDK-Dev@marvell.com>,
	"Igor Russkikh" <irusskikh@marvell.com>
Subject: [dpdk-dev] [PATCH 1/2] net/qede: add flush support to rte flow ops
Date: Fri, 24 Apr 2020 23:13:46 -0700	[thread overview]
Message-ID: <20200425061347.18217-1-rmody@marvell.com> (raw)

This patch adds suppot to flush the RTE FLOWs.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
---
 drivers/net/qede/qede_filter.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index b7ad59ad6..da8cac1c5 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -1486,10 +1486,32 @@ qede_flow_destroy(struct rte_eth_dev *eth_dev,
 	return rc;
 }
 
+static int
+qede_flow_flush(struct rte_eth_dev *eth_dev,
+		struct rte_flow_error *error)
+{
+	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
+	struct qede_arfs_entry *tmp = NULL;
+	int rc = 0;
+
+	while (!SLIST_EMPTY(&qdev->arfs_info.arfs_list_head)) {
+		tmp = SLIST_FIRST(&qdev->arfs_info.arfs_list_head);
+
+		rc = qede_config_arfs_filter(eth_dev, tmp, false);
+		if (rc < 0)
+			rte_flow_error_set(error, rc,
+					   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+					   "Failed to flush flow filter");
+	}
+
+	return rc;
+}
+
 const struct rte_flow_ops qede_flow_ops = {
 	.validate = qede_flow_validate,
 	.create = qede_flow_create,
 	.destroy = qede_flow_destroy,
+	.flush = qede_flow_flush,
 };
 
 int qede_dev_filter_ctrl(struct rte_eth_dev *eth_dev,
-- 
2.18.0


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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25  6:13 Rasesh Mody [this message]
2020-04-25  6:13 ` [dpdk-dev] [PATCH 2/2] net/qede: add support for get FW version Rasesh Mody
2020-05-03 16:30   ` Jerin Jacob

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=20200425061347.18217-1-rmody@marvell.com \
    --to=rmody@marvell.com \
    --cc=GR-Everest-DPDK-Dev@marvell.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=irusskikh@marvell.com \
    --cc=jerinj@marvell.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).