Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/816730/?format=api
{ "id": 816730, "url": "http://patchwork.ozlabs.org/api/patches/816730/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/016c3bf21a7bfe45e73275d3191cf61cceffd362.1505977744.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": "<016c3bf21a7bfe45e73275d3191cf61cceffd362.1505977744.git.rahul.lakkireddy@chelsio.com>", "list_archive_url": null, "date": "2017-09-21T07:33:36", "name": "[net-next,3/4] cxgb4: add support to offload action vlan", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "4087b772bd949db954d2e7a804e9c24061db8371", "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/016c3bf21a7bfe45e73275d3191cf61cceffd362.1505977744.git.rahul.lakkireddy@chelsio.com/mbox/", "series": [ { "id": 4320, "url": "http://patchwork.ozlabs.org/api/series/4320/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=4320", "date": "2017-09-21T07:33:33", "name": "cxgb4: add support to offload tc flower", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/4320/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/816730/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/816730/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 3xyT074sG8z9sNc\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 17:34:47 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751907AbdIUHep (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 21 Sep 2017 03:34:45 -0400", "from stargate.chelsio.com ([12.32.117.8]:48781 \"EHLO\n\tstargate.chelsio.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751588AbdIUHeo (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 21 Sep 2017 03:34:44 -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 v8L7Yfsw005044; \n\tThu, 21 Sep 2017 00:34:42 -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 3/4] cxgb4: add support to offload action vlan", "Date": "Thu, 21 Sep 2017 13:03:36 +0530", "Message-Id": "<016c3bf21a7bfe45e73275d3191cf61cceffd362.1505977744.git.rahul.lakkireddy@chelsio.com>", "X-Mailer": "git-send-email 2.5.3", "In-Reply-To": [ "<cover.1505977744.git.rahul.lakkireddy@chelsio.com>", "<cover.1505977744.git.rahul.lakkireddy@chelsio.com>" ], "References": [ "<cover.1505977744.git.rahul.lakkireddy@chelsio.com>", "<cover.1505977744.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 support for offloading tc-flower flows having\nvlan actions: pop, push and modify.\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---\n .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 43 ++++++++++++++++++++++\n 1 file changed, 43 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c\nindex 1af01101faaf..fddb0c419edc 100644\n--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c\n+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c\n@@ -34,6 +34,7 @@\n \n #include <net/tc_act/tc_gact.h>\n #include <net/tc_act/tc_mirred.h>\n+#include <net/tc_act/tc_vlan.h>\n \n #include \"cxgb4.h\"\n #include \"cxgb4_tc_flower.h\"\n@@ -185,6 +186,27 @@ static void cxgb4_process_flow_actions(struct net_device *in,\n \n \t\t\tfs->action = FILTER_SWITCH;\n \t\t\tfs->eport = pi->port_id;\n+\t\t} else if (is_tcf_vlan(a)) {\n+\t\t\tu32 vlan_action = tcf_vlan_action(a);\n+\t\t\tu8 prio = tcf_vlan_push_prio(a);\n+\t\t\tu16 vid = tcf_vlan_push_vid(a);\n+\t\t\tu16 vlan_tci = (prio << VLAN_PRIO_SHIFT) | vid;\n+\n+\t\t\tswitch (vlan_action) {\n+\t\t\tcase TCA_VLAN_ACT_POP:\n+\t\t\t\tfs->newvlan |= VLAN_REMOVE;\n+\t\t\t\tbreak;\n+\t\t\tcase TCA_VLAN_ACT_PUSH:\n+\t\t\t\tfs->newvlan |= VLAN_INSERT;\n+\t\t\t\tfs->vlan = vlan_tci;\n+\t\t\t\tbreak;\n+\t\t\tcase TCA_VLAN_ACT_MODIFY:\n+\t\t\t\tfs->newvlan |= VLAN_REWRITE;\n+\t\t\t\tfs->vlan = vlan_tci;\n+\t\t\t\tbreak;\n+\t\t\tdefault:\n+\t\t\t\tbreak;\n+\t\t\t}\n \t\t}\n \t}\n }\n@@ -222,6 +244,27 @@ static int cxgb4_validate_flow_actions(struct net_device *dev,\n \t\t\t\t\t __func__);\n \t\t\t\treturn -EINVAL;\n \t\t\t}\n+\t\t} else if (is_tcf_vlan(a)) {\n+\t\t\tu16 proto = be16_to_cpu(tcf_vlan_push_proto(a));\n+\t\t\tu32 vlan_action = tcf_vlan_action(a);\n+\n+\t\t\tswitch (vlan_action) {\n+\t\t\tcase TCA_VLAN_ACT_POP:\n+\t\t\t\tbreak;\n+\t\t\tcase TCA_VLAN_ACT_PUSH:\n+\t\t\tcase TCA_VLAN_ACT_MODIFY:\n+\t\t\t\tif (proto != ETH_P_8021Q) {\n+\t\t\t\t\tnetdev_err(dev,\n+\t\t\t\t\t\t \"%s: Unsupp. vlan proto\\n\",\n+\t\t\t\t\t\t __func__);\n+\t\t\t\t\treturn -EOPNOTSUPP;\n+\t\t\t\t}\n+\t\t\t\tbreak;\n+\t\t\tdefault:\n+\t\t\t\tnetdev_err(dev, \"%s: Unsupported vlan action\\n\",\n+\t\t\t\t\t __func__);\n+\t\t\t\treturn -EOPNOTSUPP;\n+\t\t\t}\n \t\t} else {\n \t\t\tnetdev_err(dev, \"%s: Unsupported action\\n\", __func__);\n \t\t\treturn -EOPNOTSUPP;\n", "prefixes": [ "net-next", "3/4" ] }