Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/809164/?format=api
{ "id": 809164, "url": "http://patchwork.ozlabs.org/api/patches/809164/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170902214929.2890-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": "<20170902214929.2890-13-jiri@resnulli.us>", "list_archive_url": null, "date": "2017-09-02T21:49:20", "name": "[net-next,v2,12/21] mlxsw: spectrum_router: Extract mlxsw_sp_fi_is_gateway()", "commit_ref": null, "pull_url": null, "state": "accepted", "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/20170902214929.2890-13-jiri@resnulli.us/mbox/", "series": [ { "id": 1180, "url": "http://patchwork.ozlabs.org/api/series/1180/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1180", "date": "2017-09-02T21:49:08", "name": "mlxsw: Offloading GRE tunnels", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/1180/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/809164/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/809164/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=\"c0P50ifP\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xl8tM3rmcz9s8J\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun, 3 Sep 2017 07:50:35 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752847AbdIBVt4 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 2 Sep 2017 17:49:56 -0400", "from mail-wm0-f66.google.com ([74.125.82.66]:37232 \"EHLO\n\tmail-wm0-f66.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752834AbdIBVtw (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sat, 2 Sep 2017 17:49:52 -0400", "by mail-wm0-f66.google.com with SMTP id x189so3152576wmg.4\n\tfor <netdev@vger.kernel.org>; Sat, 02 Sep 2017 14:49:51 -0700 (PDT)", "from localhost (jirka.pirko.cz. [84.16.102.26])\n\tby smtp.gmail.com with ESMTPSA id\n\tu65sm1638072wrb.18.2017.09.02.14.49.49\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSat, 02 Sep 2017 14:49:49 -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=c0P50ifPLEtfji9dA/926aiQRv+OPjit99BtxOGQqMeLv3Bv+2BJ8wKw3al4L2SudO\n\th/XMFP3kZAx6nYYCBsbyfBg4GwsUQK5VEsjwvtHcKlctzlVlKEt4wy0OeVUSHHLHMppv\n\tfnqy34DaS/r/OPS7boz7iThBLjgS/fR6x9k6+m6xd7siBCNbDSE+sIr/C5ltYFw6c/1J\n\t4+OBG3j5CcGUjcJJXnX03S0Z2neu2Z2ybfrqIv6HDIHKXef9Z1vESqC6Y/2dYA9iGQLR\n\tP57pGAQi0vbA0juiC3ONBmVc6Gc46TCeJPIrlnv9eukUhgNmaK8pmTay6052U0p2e78n\n\tLTdg==", "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=djhoBDsnq5NEFPfclBk52yvbYdMfFuGriCrN4yy70oQ5UTF0h/9ttNxHUx9c7TvLBn\n\tr9sksipDBjbrmdvHKXilEpWK0UZWH+tgkTNTFHFZiycrHs6sJqezyp1WKyGvvTEj9ClF\n\tLJtY/3uV3A6GnsLhgvc/Q/ErwYh5sGHVbuDOgKmhoPHwRshZncmlZIpZrU3Gl36aA1sF\n\tSG4akCu4ZJbDUe5mzDGIBjikixBblcZ6QZrbmBi6iKWcZOnC2wFVnz/9xiNq2Fzl1yBF\n\tEGwKQdsu0uKDvtgDrIIQ5ECX+/KNPg/OlfIpWSrVNX6mshx6xfb9iisGU3JsqIIOnQ/C\n\taS7g==", "X-Gm-Message-State": "AHPjjUhwxE5MvhnajOmJ+KNsFV/XXZo0MZfk3VJQG0TUs5M2FuuaGJr+\n\t8nxz4nVEcIqtRRcItnM=", "X-Google-Smtp-Source": "ADKCNb56z2wwUvDjk8f24uM8X0NSqEsgOfVxgcBrOA07ZwQfXbxGCbJA8wZ56wvsPAkM/NbnpuDWhg==", "X-Received": "by 10.28.134.209 with SMTP id i200mr1306275wmd.118.1504388990605;\n\tSat, 02 Sep 2017 14:49:50 -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 v2 12/21] mlxsw: spectrum_router: Extract\n\tmlxsw_sp_fi_is_gateway()", "Date": "Sat, 2 Sep 2017 23:49:20 +0200", "Message-Id": "<20170902214929.2890-13-jiri@resnulli.us>", "X-Mailer": "git-send-email 2.9.3", "In-Reply-To": "<20170902214929.2890-1-jiri@resnulli.us>", "References": "<20170902214929.2890-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", "v2", "12/21" ] }