DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/qede: add flush support to rte flow ops
@ 2020-04-25  6:13 Rasesh Mody
  2020-04-25  6:13 ` [dpdk-dev] [PATCH 2/2] net/qede: add support for get FW version Rasesh Mody
  0 siblings, 1 reply; 3+ messages in thread
From: Rasesh Mody @ 2020-04-25  6:13 UTC (permalink / raw)
  To: dev, jerinj, ferruh.yigit; +Cc: Rasesh Mody, GR-Everest-DPDK-Dev, Igor Russkikh

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-03 16:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25  6:13 [dpdk-dev] [PATCH 1/2] net/qede: add flush support to rte flow ops Rasesh Mody
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

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).