Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/809082/?format=api
{ "id": 809082, "url": "http://patchwork.ozlabs.org/api/patches/809082/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170902152126.17286-13-jiri@resnulli.us/", "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": "<20170902152126.17286-13-jiri@resnulli.us>", "list_archive_url": null, "date": "2017-09-02T15:21:17", "name": "[net-next,12/21] mlxsw: spectrum_router: Extract mlxsw_sp_rt6_is_gateway()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "14099b53e76ab9a2ffffbbe9f22b96aa51d012a7", "submitter": { "id": 15321, "url": "http://patchwork.ozlabs.org/api/people/15321/?format=api", "name": "Jiri Pirko", "email": "jiri@resnulli.us" }, "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/20170902152126.17286-13-jiri@resnulli.us/mbox/", "series": [ { "id": 1159, "url": "http://patchwork.ozlabs.org/api/series/1159/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1159", "date": "2017-09-02T15:21:05", "name": "mlxsw: Offloading GRE tunnels", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1159/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/809082/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/809082/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>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=resnulli-us.20150623.gappssmtp.com\n\theader.i=@resnulli-us.20150623.gappssmtp.com\n\theader.b=\"0ZQ0iIL2\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xl0Fs5vhVz9sQl\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun, 3 Sep 2017 01:21:53 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752762AbdIBPVv (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 2 Sep 2017 11:21:51 -0400", "from mail-wm0-f65.google.com ([74.125.82.65]:33372 \"EHLO\n\tmail-wm0-f65.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752753AbdIBPVt (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sat, 2 Sep 2017 11:21:49 -0400", "by mail-wm0-f65.google.com with SMTP id 187so2417009wmn.0\n\tfor <netdev@vger.kernel.org>; Sat, 02 Sep 2017 08:21:48 -0700 (PDT)", "from localhost (jirka.pirko.cz. [84.16.102.26])\n\tby smtp.gmail.com with ESMTPSA id\n\tt66sm3837631wme.13.2017.09.02.08.21.46\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSat, 02 Sep 2017 08:21:46 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=resnulli-us.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=ogidlot9KtbXqTpVSndwU+DxaC21s0gY3l/qzVOyys8=;\n\tb=0ZQ0iIL2xdPuihk+aso9ppfazf/o5v1gva7wkcldT6cDOtjucbMZWrNhUgLWOMJHpV\n\tm0J0DNCWRbZFY16EsDdscQpDYyoUje0DVdpPhxyXJL5Ou9GzubZo2ygQbx18OEoUD1o3\n\thAxFG0y5dmBMTV+bxPnx/N1Z4yzHTCycN8duFunaJ0cNtYRQ1R6ABDPbzJaooVIks/9S\n\tsxqqOgT5jtOoIpalaFUf2M5QHhDs5LchzF+cIJVMRdP9JvvU9v6gkVBZsVHm+/jbLq4Q\n\tIne0a81zeLUlm2+C71abbEzVlIeJTlrz5pTX6CRaPGz3qAfCAVtJUJGtaXRV+8bRb6/V\n\tUYYw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=ogidlot9KtbXqTpVSndwU+DxaC21s0gY3l/qzVOyys8=;\n\tb=MAvWxNVB5DTsIJNQZa7vfIvMNu86JHpnlNio+RshEeRc95La0xbo54VESN1Sp/yNGC\n\tW+FrRHZRbZz0tWL2qjVWFm04sFUGgUYqaYMNrGFuO6G9Hty3WacMA8fv/Ty1Uq30CyMM\n\t0uKUY+ubz13CLznHf9lF/cBmx5GomHyEMO1w2SmXjMmFGv6LYViEIvEfX0zrm6ggKUZ4\n\tNJctbAlrOUoEWgq4FiDgDAkaEAqBcFHoA4f+IU03jNyKmEl9D2Im8PWY7t/2aLnklYbs\n\tL7Rsqc9oRRFYALwjIamJnrfFuZzNg3uhQW38cSF+7OUjHmbs4mNEvgzOJGDFmzk7MLsj\n\t2Qtg==", "X-Gm-Message-State": "AHPjjUjmL/6ko6ls3Q6yB/LDkBVY4Rg5KEkuzj3UY17qydWWTPCnd/XH\n\tqTIzpvuNcxstBVzu+GQ=", "X-Google-Smtp-Source": "ADKCNb5ADNy6SyDjyEiV4TNILxW5DWfImaPbO0s3j5WIbfbkb0iBBYuo9bhrvDmH496t6ytE0CgLHw==", "X-Received": "by 10.28.151.85 with SMTP id z82mr841820wmd.67.1504365707130;\n\tSat, 02 Sep 2017 08:21:47 -0700 (PDT)", "From": "Jiri Pirko <jiri@resnulli.us>", "To": "netdev@vger.kernel.org", "Cc": "davem@davemloft.net, petrm@mellanox.com, idosch@mellanox.com,\n\tmlxsw@mellanox.com", "Subject": "[patch net-next 12/21] mlxsw: spectrum_router: Extract\n\tmlxsw_sp_rt6_is_gateway()", "Date": "Sat, 2 Sep 2017 17:21:17 +0200", "Message-Id": "<20170902152126.17286-13-jiri@resnulli.us>", "X-Mailer": "git-send-email 2.9.3", "In-Reply-To": "<20170902152126.17286-1-jiri@resnulli.us>", "References": "<20170902152126.17286-1-jiri@resnulli.us>", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "From: Petr Machata <petrm@mellanox.com>\n\nIPv6 counterpart of the previous patch: introduce a function to\ndetermine whether a given route is a gateway route.\n\nThe new function takes a mlxsw_sp argument which follow-up patches will\nuse. Thus mlxsw_sp_fib6_entry_type_set() got that argument as well.\n\nSigned-off-by: Petr Machata <petrm@mellanox.com>\nReviewed-by: Ido Schimmel <idosch@mellanox.com>\nSigned-off-by: Jiri Pirko <jiri@mellanox.com>\n---\n drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 15 +++++++++++----\n 1 file changed, 11 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\nindex 04e1887..563e803 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n@@ -3526,6 +3526,12 @@ static void mlxsw_sp_nexthop6_fini(struct mlxsw_sp *mlxsw_sp,\n \tmlxsw_sp_nexthop_rif_fini(nh);\n }\n \n+static bool mlxsw_sp_rt6_is_gateway(const struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t const struct rt6_info *rt)\n+{\n+\treturn rt->rt6i_flags & RTF_GATEWAY;\n+}\n+\n static struct mlxsw_sp_nexthop_group *\n mlxsw_sp_nexthop6_group_create(struct mlxsw_sp *mlxsw_sp,\n \t\t\t struct mlxsw_sp_fib6_entry *fib6_entry)\n@@ -3548,7 +3554,7 @@ mlxsw_sp_nexthop6_group_create(struct mlxsw_sp *mlxsw_sp,\n #endif\n \tmlxsw_sp_rt6 = list_first_entry(&fib6_entry->rt6_list,\n \t\t\t\t\tstruct mlxsw_sp_rt6, list);\n-\tnh_grp->gateway = !!(mlxsw_sp_rt6->rt->rt6i_flags & RTF_GATEWAY);\n+\tnh_grp->gateway = mlxsw_sp_rt6_is_gateway(mlxsw_sp, mlxsw_sp_rt6->rt);\n \tnh_grp->count = fib6_entry->nrt6;\n \tfor (i = 0; i < nh_grp->count; i++) {\n \t\tstruct rt6_info *rt = mlxsw_sp_rt6->rt;\n@@ -3705,7 +3711,8 @@ mlxsw_sp_fib6_entry_nexthop_del(struct mlxsw_sp *mlxsw_sp,\n \tmlxsw_sp_rt6_destroy(mlxsw_sp_rt6);\n }\n \n-static void mlxsw_sp_fib6_entry_type_set(struct mlxsw_sp_fib_entry *fib_entry,\n+static void mlxsw_sp_fib6_entry_type_set(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t\t struct mlxsw_sp_fib_entry *fib_entry,\n \t\t\t\t\t const struct rt6_info *rt)\n {\n \t/* Packets hitting RTF_REJECT routes need to be discarded by the\n@@ -3718,7 +3725,7 @@ static void mlxsw_sp_fib6_entry_type_set(struct mlxsw_sp_fib_entry *fib_entry,\n \t\tfib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_TRAP;\n \telse if (rt->rt6i_flags & RTF_REJECT)\n \t\tfib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_LOCAL;\n-\telse if (rt->rt6i_flags & RTF_GATEWAY)\n+\telse if (mlxsw_sp_rt6_is_gateway(mlxsw_sp, rt))\n \t\tfib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_REMOTE;\n \telse\n \t\tfib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_LOCAL;\n@@ -3758,7 +3765,7 @@ mlxsw_sp_fib6_entry_create(struct mlxsw_sp *mlxsw_sp,\n \t\tgoto err_rt6_create;\n \t}\n \n-\tmlxsw_sp_fib6_entry_type_set(fib_entry, mlxsw_sp_rt6->rt);\n+\tmlxsw_sp_fib6_entry_type_set(mlxsw_sp, fib_entry, mlxsw_sp_rt6->rt);\n \n \tINIT_LIST_HEAD(&fib6_entry->rt6_list);\n \tlist_add_tail(&mlxsw_sp_rt6->list, &fib6_entry->rt6_list);\n", "prefixes": [ "net-next", "12/21" ] }