Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/809094/?format=api
{ "id": 809094, "url": "http://patchwork.ozlabs.org/api/patches/809094/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170902152126.17286-12-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-12-jiri@resnulli.us>", "list_archive_url": null, "date": "2017-09-02T15:21:16", "name": "[net-next,11/21] mlxsw: spectrum_router: Extract mlxsw_sp_fi_is_gateway()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "60706395a5dfdc470cd829875a38f64a327cf2b9", "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-12-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/809094/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/809094/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=\"hkEZRJQi\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xl0Gv2VYbz9sRY\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun, 3 Sep 2017 01:22:47 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752824AbdIBPWf (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 2 Sep 2017 11:22:35 -0400", "from mail-wm0-f68.google.com ([74.125.82.68]:37533 \"EHLO\n\tmail-wm0-f68.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752749AbdIBPVr (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sat, 2 Sep 2017 11:21:47 -0400", "by mail-wm0-f68.google.com with SMTP id x189so2639465wmg.4\n\tfor <netdev@vger.kernel.org>; Sat, 02 Sep 2017 08:21:46 -0700 (PDT)", "from localhost (jirka.pirko.cz. [84.16.102.26])\n\tby smtp.gmail.com with ESMTPSA id\n\tw10sm2055960wra.47.2017.09.02.08.21.44\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSat, 02 Sep 2017 08:21:45 -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=eoOTpY5nNu3zuHesTqFez2uoPfBUGOkm1aMtYSorZmQ=;\n\tb=hkEZRJQiWvqAcBaZb1gDiQGWJCYAF0BmlKeetPwDEck28C4u01f87to7EQDw1IkSSx\n\twAmcdJQoq70ceosSxEVWSaon8nzaQsE6BRVf6EEzlYabq4h6UZ8eQaZ94tXfmhgWH11l\n\tWQkrDgBoCqFm3F0Se8klHptKoLs02xp3fre7xPHuFz6sjFZzCJePhFjsOJuZHWL1rwFj\n\tkpLZUpDToK7sbfBom7E0QKIwrY42o3uoeJM+/YtlFcsdUnFbeH7ogPOuIJWnV9ap+iuW\n\tDhKYCgmVireNal/+ZIBCPPmbVUw2F7/YTybZR9QRVQPpSiJV9ILGc8JjLttjBtR9sXVi\n\tINVw==", "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=eoOTpY5nNu3zuHesTqFez2uoPfBUGOkm1aMtYSorZmQ=;\n\tb=KepzmI5qJJ87HbOYpxn37CjVey06QVJt3hbIGi7p7LMxzr/NmjnXwYYUFEy6dzLG86\n\t+DQIbG23F6pF/VcXO68UL5Hm4sF2Beb8t7a+h2OOkewvOUv64TWBYifrIcmhgnYg+jFT\n\t1MbnOmhQR2F5hFPUY0CAg0HIbfYMD6jjDwyTzuy3hgptEPZdvbuc5Bo8UQ20VoZmsHfQ\n\tF5l+E00FM+f0u/7nyg9c35yOKrhK9PpGubO3rHAFpF8YVlE8sIxjfPJxo36nZ4TfsEV6\n\tbptkER6yM2cVOUnVdSsV09e8oYdsUEbYtgUgT0kT5HvU9fIgRqHF4OjLUpDQTCrKLjN0\n\tq10Q==", "X-Gm-Message-State": "AHPjjUj/66sbhTFgFeALXA/RoWbNaUXgcipuyEJHfsl82e2qVDde2ul/\n\tTgTi/opHHcMYWP5dMlU=", "X-Google-Smtp-Source": "ADKCNb5tmVTMS1b5O/ICITO7j4O+m7X/m76uMe5nstpKP5MlvhOnX2FljQqlgfD5QXl97g248I2S2w==", "X-Received": "by 10.28.145.200 with SMTP id t191mr953079wmd.195.1504365705723; \n\tSat, 02 Sep 2017 08:21:45 -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 11/21] mlxsw: spectrum_router: Extract\n\tmlxsw_sp_fi_is_gateway()", "Date": "Sat, 2 Sep 2017 17:21:16 +0200", "Message-Id": "<20170902152126.17286-12-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\nFor IPv4 IP-in-IP offload, routes that direct traffic to IP-in-IP\ndevices need to be considered gateway routes as well. That involves a\nbit more logic, so extract the current test to a separate function,\nwhere the logic can be later added.\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 | 14 ++++++++++----\n 1 file changed, 10 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 72e386b..04e1887 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n@@ -2382,6 +2382,12 @@ static void mlxsw_sp_nexthop_rif_gone_sync(struct mlxsw_sp *mlxsw_sp,\n \t}\n }\n \n+static bool mlxsw_sp_fi_is_gateway(const struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t const struct fib_info *fi)\n+{\n+\treturn fi->fib_nh->nh_scope == RT_SCOPE_LINK;\n+}\n+\n static struct mlxsw_sp_nexthop_group *\n mlxsw_sp_nexthop4_group_create(struct mlxsw_sp *mlxsw_sp, struct fib_info *fi)\n {\n@@ -2401,7 +2407,7 @@ mlxsw_sp_nexthop4_group_create(struct mlxsw_sp *mlxsw_sp, struct fib_info *fi)\n \tINIT_LIST_HEAD(&nh_grp->fib_list);\n \tnh_grp->neigh_tbl = &arp_tbl;\n \n-\tnh_grp->gateway = fi->fib_nh->nh_scope == RT_SCOPE_LINK;\n+\tnh_grp->gateway = mlxsw_sp_fi_is_gateway(mlxsw_sp, fi);\n \tnh_grp->count = fi->fib_nhs;\n \tfib_info_hold(fi);\n \tfor (i = 0; i < nh_grp->count; i++) {\n@@ -2801,10 +2807,10 @@ mlxsw_sp_fib4_entry_type_set(struct mlxsw_sp *mlxsw_sp,\n \t\tfib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_LOCAL;\n \t\treturn 0;\n \tcase RTN_UNICAST:\n-\t\tif (fi->fib_nh->nh_scope != RT_SCOPE_LINK)\n-\t\t\tfib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_LOCAL;\n-\t\telse\n+\t\tif (mlxsw_sp_fi_is_gateway(mlxsw_sp, fi))\n \t\t\tfib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_REMOTE;\n+\t\telse\n+\t\t\tfib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_LOCAL;\n \t\treturn 0;\n \tdefault:\n \t\treturn -EINVAL;\n", "prefixes": [ "net-next", "11/21" ] }