Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/40932/?format=api
https://patches.dpdk.org/api/patches/40932/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/93202e988fd013bb7410ea1226c11c73b86a556a.1528469677.git.rahul.lakkireddy@chelsio.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<93202e988fd013bb7410ea1226c11c73b86a556a.1528469677.git.rahul.lakkireddy@chelsio.com>", "list_archive_url": "https://inbox.dpdk.org/dev/93202e988fd013bb7410ea1226c11c73b86a556a.1528469677.git.rahul.lakkireddy@chelsio.com", "date": "2018-06-08T17:58:17", "name": "[dpdk-dev,7/7] net/cxgbe: implement flow flush operation", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "343fa6cb9483fac61fb1a3e642d809b11765e526", "submitter": { "id": 241, "url": "https://patches.dpdk.org/api/people/241/?format=api", "name": "Rahul Lakkireddy", "email": "rahul.lakkireddy@chelsio.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/93202e988fd013bb7410ea1226c11c73b86a556a.1528469677.git.rahul.lakkireddy@chelsio.com/mbox/", "series": [ { "id": 63, "url": "https://patches.dpdk.org/api/series/63/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=63", "date": "2018-06-08T17:58:10", "name": "cxgbe: add support to offload flows via rte_flow", "version": 1, "mbox": "https://patches.dpdk.org/series/63/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/40932/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/40932/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B60E71D003;\n\tFri, 8 Jun 2018 19:59:40 +0200 (CEST)", "from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8])\n\tby dpdk.org (Postfix) with ESMTP id 2AF5D1D010\n\tfor <dev@dpdk.org>; Fri, 8 Jun 2018 19:59:39 +0200 (CEST)", "from localhost (scalar.blr.asicdesigners.com [10.193.185.94])\n\tby stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id w58HxavR017306; \n\tFri, 8 Jun 2018 10:59:36 -0700" ], "From": "Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>", "To": "dev@dpdk.org", "Cc": "shaguna@chelsio.com, kumaras@chelsio.com, indranil@chelsio.com,\n\tnirranjan@chelsio.com", "Date": "Fri, 8 Jun 2018 23:28:17 +0530", "Message-Id": "<93202e988fd013bb7410ea1226c11c73b86a556a.1528469677.git.rahul.lakkireddy@chelsio.com>", "X-Mailer": "git-send-email 2.5.3", "In-Reply-To": [ "<cover.1528469677.git.rahul.lakkireddy@chelsio.com>", "<cover.1528469677.git.rahul.lakkireddy@chelsio.com>" ], "References": [ "<cover.1528469677.git.rahul.lakkireddy@chelsio.com>", "<cover.1528469677.git.rahul.lakkireddy@chelsio.com>" ], "Subject": "[dpdk-dev] [PATCH 7/7] net/cxgbe: implement flow flush operation", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Shagun Agrawal <shaguna@chelsio.com>\n\nAdd API to flush all the filters under specified port.\n\nSigned-off-by: Shagun Agrawal <shaguna@chelsio.com>\nSigned-off-by: Kumar Sanghvi <kumaras@chelsio.com>\nSigned-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>\n---\n drivers/net/cxgbe/cxgbe_filter.h | 1 +\n drivers/net/cxgbe/cxgbe_flow.c | 40 +++++++++++++++++++++++++++++++++++++++-\n 2 files changed, 40 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/cxgbe/cxgbe_filter.h b/drivers/net/cxgbe/cxgbe_filter.h\nindex 3c81c1a64..70443df4c 100644\n--- a/drivers/net/cxgbe/cxgbe_filter.h\n+++ b/drivers/net/cxgbe/cxgbe_filter.h\n@@ -141,6 +141,7 @@ struct filter_entry {\n \tu32 pending:1; /* filter action is pending FW reply */\n \tstruct filter_ctx *ctx; /* caller's completion hook */\n \tstruct rte_eth_dev *dev; /* Port's rte eth device */\n+\tvoid *private; /* For use by apps using filter_entry */\n \n \t/* This will store the actual tid */\n \tu32 tid;\ndiff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c\nindex 89490ecc2..061947dae 100644\n--- a/drivers/net/cxgbe/cxgbe_flow.c\n+++ b/drivers/net/cxgbe/cxgbe_flow.c\n@@ -468,6 +468,8 @@ cxgbe_flow_create(struct rte_eth_dev *dev,\n \t\treturn NULL;\n \t}\n \n+\tflow->f->private = flow; /* Will be used during flush */\n+\n \treturn flow;\n }\n \n@@ -632,11 +634,47 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+/*\n+ * @ret : > 0 filter destroyed succsesfully\n+ * < 0 error destroying filter\n+ * == 1 filter not active / not found\n+ */\n+static int\n+cxgbe_check_n_destroy(struct filter_entry *f, struct rte_eth_dev *dev,\n+\t\t struct rte_flow_error *e)\n+{\n+\tif (f && (f->valid || f->pending) &&\n+\t f->dev == dev && /* Only if user has asked for this port */\n+\t f->private) /* We (rte_flow) created this filter */\n+\t\treturn cxgbe_flow_destroy(dev, (struct rte_flow *)f->private,\n+\t\t\t\t\t e);\n+\treturn 1;\n+}\n+\n+static int cxgbe_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *e)\n+{\n+\tstruct adapter *adap = ethdev2adap(dev);\n+\tunsigned int i;\n+\tint ret = 0;\n+\n+\tif (adap->tids.ftid_tab) {\n+\t\tstruct filter_entry *f = &adap->tids.ftid_tab[0];\n+\n+\t\tfor (i = 0; i < adap->tids.nftids; i++, f++) {\n+\t\t\tret = cxgbe_check_n_destroy(f, dev, e);\n+\t\t\tif (ret < 0)\n+\t\t\t\tgoto out;\n+\t\t}\n+\t}\n+out:\n+\treturn ret >= 0 ? 0 : ret;\n+}\n+\n static const struct rte_flow_ops cxgbe_flow_ops = {\n \t.validate\t= cxgbe_flow_validate,\n \t.create\t\t= cxgbe_flow_create,\n \t.destroy\t= cxgbe_flow_destroy,\n-\t.flush\t\t= NULL,\n+\t.flush\t\t= cxgbe_flow_flush,\n \t.query\t\t= cxgbe_flow_query,\n \t.isolate\t= NULL,\n };\n", "prefixes": [ "dpdk-dev", "7/7" ] }{ "id": 40932, "url": "