Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/817143/?format=api
{ "id": 817143, "url": "http://patchwork.ozlabs.org/api/patches/817143/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/0d3a619769caa7e9775179daee529c74f4b77b5e.1506015856.git.rahul.lakkireddy@chelsio.com/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<0d3a619769caa7e9775179daee529c74f4b77b5e.1506015856.git.rahul.lakkireddy@chelsio.com>", "list_archive_url": null, "date": "2017-09-21T18:11:13", "name": "[net-next,v2,1/4] cxgb4: add tc flower offload skeleton", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "de647ae40626c955a33469ecaa165a9fe572dff0", "submitter": { "id": 69728, "url": "http://patchwork.ozlabs.org/api/people/69728/?format=api", "name": "Rahul Lakkireddy", "email": "rahul.lakkireddy@chelsio.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/0d3a619769caa7e9775179daee529c74f4b77b5e.1506015856.git.rahul.lakkireddy@chelsio.com/mbox/", "series": [ { "id": 4462, "url": "http://patchwork.ozlabs.org/api/series/4462/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=4462", "date": "2017-09-21T18:11:12", "name": "cxgb4: add support to offload tc flower", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/4462/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/817143/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/817143/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyl7b1HHYz9s7g\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 22 Sep 2017 04:12:11 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751722AbdIUSMJ (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 21 Sep 2017 14:12:09 -0400", "from stargate.chelsio.com ([12.32.117.8]:5781 \"EHLO\n\tstargate.chelsio.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751605AbdIUSMG (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 21 Sep 2017 14:12:06 -0400", "from localhost (scalar.blr.asicdesigners.com [10.193.185.94])\n\tby stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id v8LIC3Z3006885; \n\tThu, 21 Sep 2017 11:12:03 -0700" ], "From": "Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>", "To": "netdev@vger.kernel.org", "Cc": "davem@davemloft.net, kumaras@chelsio.com, ganeshgr@chelsio.com,\n\tnirranjan@chelsio.com, indranil@chelsio.com,\n\tRahul Lakkireddy <rahul.lakkireddy@chelsio.com>", "Subject": "[PATCH net-next v2 1/4] cxgb4: add tc flower offload skeleton", "Date": "Thu, 21 Sep 2017 23:41:13 +0530", "Message-Id": "<0d3a619769caa7e9775179daee529c74f4b77b5e.1506015856.git.rahul.lakkireddy@chelsio.com>", "X-Mailer": "git-send-email 2.5.3", "In-Reply-To": [ "<cover.1506015856.git.rahul.lakkireddy@chelsio.com>", "<cover.1506015856.git.rahul.lakkireddy@chelsio.com>" ], "References": [ "<cover.1506015856.git.rahul.lakkireddy@chelsio.com>", "<cover.1506015856.git.rahul.lakkireddy@chelsio.com>" ], "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "From: Kumar Sanghvi <kumaras@chelsio.com>\n\nAdd basic skeleton to prepare for offloading tc-flower flows.\n\nSigned-off-by: Kumar Sanghvi <kumaras@chelsio.com>\nSigned-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>\nSigned-off-by: Ganesh Goudar <ganeshgr@chelsio.com>\n---\nv2:\n- No changes.\n\n drivers/net/ethernet/chelsio/cxgb4/Makefile | 4 +-\n drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 22 +++++++++\n .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 57 ++++++++++++++++++++++\n .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h | 46 +++++++++++++++++\n 4 files changed, 128 insertions(+), 1 deletion(-)\n create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c\n create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h", "diff": "diff --git a/drivers/net/ethernet/chelsio/cxgb4/Makefile b/drivers/net/ethernet/chelsio/cxgb4/Makefile\nindex 817212702f0a..fecd7aab673b 100644\n--- a/drivers/net/ethernet/chelsio/cxgb4/Makefile\n+++ b/drivers/net/ethernet/chelsio/cxgb4/Makefile\n@@ -4,7 +4,9 @@\n \n obj-$(CONFIG_CHELSIO_T4) += cxgb4.o\n \n-cxgb4-objs := cxgb4_main.o l2t.o t4_hw.o sge.o clip_tbl.o cxgb4_ethtool.o cxgb4_uld.o sched.o cxgb4_filter.o cxgb4_tc_u32.o cxgb4_ptp.o\n+cxgb4-objs := cxgb4_main.o l2t.o t4_hw.o sge.o clip_tbl.o cxgb4_ethtool.o \\\n+\t cxgb4_uld.o sched.o cxgb4_filter.o cxgb4_tc_u32.o \\\n+\t cxgb4_ptp.o cxgb4_tc_flower.o\n cxgb4-$(CONFIG_CHELSIO_T4_DCB) += cxgb4_dcb.o\n cxgb4-$(CONFIG_CHELSIO_T4_FCOE) += cxgb4_fcoe.o\n cxgb4-$(CONFIG_DEBUG_FS) += cxgb4_debugfs.o\ndiff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c\nindex 92d9d795d874..8923affbdaf8 100644\n--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c\n+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c\n@@ -79,6 +79,7 @@\n #include \"l2t.h\"\n #include \"sched.h\"\n #include \"cxgb4_tc_u32.h\"\n+#include \"cxgb4_tc_flower.h\"\n #include \"cxgb4_ptp.h\"\n \n char cxgb4_driver_name[] = KBUILD_MODNAME;\n@@ -2873,6 +2874,25 @@ static int cxgb_set_tx_maxrate(struct net_device *dev, int index, u32 rate)\n \treturn err;\n }\n \n+static int cxgb_setup_tc_flower(struct net_device *dev,\n+\t\t\t\tstruct tc_cls_flower_offload *cls_flower)\n+{\n+\tif (!is_classid_clsact_ingress(cls_flower->common.classid) ||\n+\t cls_flower->common.chain_index)\n+\t\treturn -EOPNOTSUPP;\n+\n+\tswitch (cls_flower->command) {\n+\tcase TC_CLSFLOWER_REPLACE:\n+\t\treturn cxgb4_tc_flower_replace(dev, cls_flower);\n+\tcase TC_CLSFLOWER_DESTROY:\n+\t\treturn cxgb4_tc_flower_destroy(dev, cls_flower);\n+\tcase TC_CLSFLOWER_STATS:\n+\t\treturn cxgb4_tc_flower_stats(dev, cls_flower);\n+\tdefault:\n+\t\treturn -EOPNOTSUPP;\n+\t}\n+}\n+\n static int cxgb_setup_tc_cls_u32(struct net_device *dev,\n \t\t\t\t struct tc_cls_u32_offload *cls_u32)\n {\n@@ -2907,6 +2927,8 @@ static int cxgb_setup_tc(struct net_device *dev, enum tc_setup_type type,\n \tswitch (type) {\n \tcase TC_SETUP_CLSU32:\n \t\treturn cxgb_setup_tc_cls_u32(dev, type_data);\n+\tcase TC_SETUP_CLSFLOWER:\n+\t\treturn cxgb_setup_tc_flower(dev, type_data);\n \tdefault:\n \t\treturn -EOPNOTSUPP;\n \t}\ndiff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c\nnew file mode 100644\nindex 000000000000..16dff71e4d02\n--- /dev/null\n+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c\n@@ -0,0 +1,57 @@\n+/*\n+ * This file is part of the Chelsio T4/T5/T6 Ethernet driver for Linux.\n+ *\n+ * Copyright (c) 2017 Chelsio Communications, Inc. All rights reserved.\n+ *\n+ * This software is available to you under a choice of one of two\n+ * licenses. You may choose to be licensed under the terms of the GNU\n+ * General Public License (GPL) Version 2, available from the file\n+ * COPYING in the main directory of this source tree, or the\n+ * OpenIB.org BSD license below:\n+ *\n+ * Redistribution and use in source and binary forms, with or\n+ * without modification, are permitted provided that the following\n+ * conditions are met:\n+ *\n+ * - Redistributions of source code must retain the above\n+ * copyright notice, this list of conditions and the following\n+ * disclaimer.\n+ *\n+ * - Redistributions in binary form must reproduce the above\n+ * copyright notice, this list of conditions and the following\n+ * disclaimer in the documentation and/or other materials\n+ * provided with the distribution.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+ * SOFTWARE.\n+ */\n+\n+#include <net/tc_act/tc_gact.h>\n+#include <net/tc_act/tc_mirred.h>\n+\n+#include \"cxgb4.h\"\n+#include \"cxgb4_tc_flower.h\"\n+\n+int cxgb4_tc_flower_replace(struct net_device *dev,\n+\t\t\t struct tc_cls_flower_offload *cls)\n+{\n+\treturn -EOPNOTSUPP;\n+}\n+\n+int cxgb4_tc_flower_destroy(struct net_device *dev,\n+\t\t\t struct tc_cls_flower_offload *cls)\n+{\n+\treturn -EOPNOTSUPP;\n+}\n+\n+int cxgb4_tc_flower_stats(struct net_device *dev,\n+\t\t\t struct tc_cls_flower_offload *cls)\n+{\n+\treturn -EOPNOTSUPP;\n+}\ndiff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h\nnew file mode 100644\nindex 000000000000..b321fc205b5a\n--- /dev/null\n+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h\n@@ -0,0 +1,46 @@\n+/*\n+ * This file is part of the Chelsio T4/T5/T6 Ethernet driver for Linux.\n+ *\n+ * Copyright (c) 2017 Chelsio Communications, Inc. All rights reserved.\n+ *\n+ * This software is available to you under a choice of one of two\n+ * licenses. You may choose to be licensed under the terms of the GNU\n+ * General Public License (GPL) Version 2, available from the file\n+ * COPYING in the main directory of this source tree, or the\n+ * OpenIB.org BSD license below:\n+ *\n+ * Redistribution and use in source and binary forms, with or\n+ * without modification, are permitted provided that the following\n+ * conditions are met:\n+ *\n+ * - Redistributions of source code must retain the above\n+ * copyright notice, this list of conditions and the following\n+ * disclaimer.\n+ *\n+ * - Redistributions in binary form must reproduce the above\n+ * copyright notice, this list of conditions and the following\n+ * disclaimer in the documentation and/or other materials\n+ * provided with the distribution.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+ * SOFTWARE.\n+ */\n+\n+#ifndef __CXGB4_TC_FLOWER_H\n+#define __CXGB4_TC_FLOWER_H\n+\n+#include <net/pkt_cls.h>\n+\n+int cxgb4_tc_flower_replace(struct net_device *dev,\n+\t\t\t struct tc_cls_flower_offload *cls);\n+int cxgb4_tc_flower_destroy(struct net_device *dev,\n+\t\t\t struct tc_cls_flower_offload *cls);\n+int cxgb4_tc_flower_stats(struct net_device *dev,\n+\t\t\t struct tc_cls_flower_offload *cls);\n+#endif /* __CXGB4_TC_FLOWER_H */\n", "prefixes": [ "net-next", "v2", "1/4" ] }