From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4EAE2A00C2; Sat, 25 Apr 2020 08:14:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2DFDE1C1AB; Sat, 25 Apr 2020 08:14:07 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 02AE81C197 for ; Sat, 25 Apr 2020 08:14:04 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03P662GU012663; Fri, 24 Apr 2020 23:14:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=RgHDIpiGzeqhc/F3sHMtUjXmQVh/g/wsaLUUd5YAScE=; b=uvs3jNWxPk8u+0/6IGcAhCd708K5e32Aoo1rlystMP7Qii/E0VE4YW/0XyR2ds7jwEa0 TGocW7X1XWIImIp287woENThKoJP1LLu2b3Biuh3TOwS5jsQ3NYKWfry/ZYpyc7puhNe 8Z73BmSeHIMz9C+mW/AWKhPxkQ6VoLALjqWsgBTk+r78cQs1VUJ5aCNhRBJH4G+gH+S5 hrLgZaTcfIKsBUY1ebeO9UCsPxBmVPKkd253Br8T/rFQIzf1QXgFsrD48A92ptO2WYsi XY0if6RRlsEKiQqD3Nxmq1GVC+U8qOMHYj83ldsWEnEPDKEbtCtsUEOQjjlVlZ6qYGrb 6A== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 30kfdsfssb-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 24 Apr 2020 23:14:04 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 24 Apr 2020 23:14:02 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 24 Apr 2020 23:14:02 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 24 Apr 2020 23:14:02 -0700 Received: from irv1user08.caveonetworks.com (unknown [10.104.116.105]) by maili.marvell.com (Postfix) with ESMTP id 041583F703F; Fri, 24 Apr 2020 23:14:01 -0700 (PDT) Received: (from rmody@localhost) by irv1user08.caveonetworks.com (8.14.4/8.14.4/Submit) id 03P6E1sF018637; Fri, 24 Apr 2020 23:14:01 -0700 X-Authentication-Warning: irv1user08.caveonetworks.com: rmody set sender to rmody@marvell.com using -f From: Rasesh Mody To: , , CC: Rasesh Mody , , "Igor Russkikh" Date: Fri, 24 Apr 2020 23:13:46 -0700 Message-ID: <20200425061347.18217-1-rmody@marvell.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-25_01:2020-04-24, 2020-04-25 signatures=0 Subject: [dpdk-dev] [PATCH 1/2] net/qede: add flush support to rte flow ops X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch adds suppot to flush the RTE FLOWs. Signed-off-by: Rasesh Mody Signed-off-by: Igor Russkikh --- 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