{"id":833734,"url":"http://patchwork.ozlabs.org/api/1.2/patches/833734/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/patch/20171103090344.19444-2-jiri@resnulli.us/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/1.2/projects/7/?format=json","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":"<20171103090344.19444-2-jiri@resnulli.us>","list_archive_url":null,"date":"2017-11-03T09:03:29","name":"[net-next,01/16] mlxsw: spectrum: Rename IPIP-related netdevice handlers","commit_ref":null,"pull_url":null,"state":"accepted","archived":true,"hash":"a0ed19120c87254380c03615323b9574a4158d79","submitter":{"id":15321,"url":"http://patchwork.ozlabs.org/api/1.2/people/15321/?format=json","name":"Jiri Pirko","email":"jiri@resnulli.us"},"delegate":{"id":34,"url":"http://patchwork.ozlabs.org/api/1.2/users/34/?format=json","username":"davem","first_name":"David","last_name":"Miller","email":"davem@davemloft.net"},"mbox":"http://patchwork.ozlabs.org/project/netdev/patch/20171103090344.19444-2-jiri@resnulli.us/mbox/","series":[{"id":11677,"url":"http://patchwork.ozlabs.org/api/1.2/series/11677/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=11677","date":"2017-11-03T09:03:28","name":"mlxsw: Handle changes in GRE configuration","version":1,"mbox":"http://patchwork.ozlabs.org/series/11677/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/833734/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/833734/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=\"TtYEQ2D8\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3ySwyv25Q1z9sNV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  3 Nov 2017 20:05:27 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1755558AbdKCJFY (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 3 Nov 2017 05:05:24 -0400","from mail-wr0-f194.google.com ([209.85.128.194]:53877 \"EHLO\n\tmail-wr0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752309AbdKCJDr (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 3 Nov 2017 05:03:47 -0400","by mail-wr0-f194.google.com with SMTP id u40so1851293wrf.10\n\tfor <netdev@vger.kernel.org>; Fri, 03 Nov 2017 02:03:46 -0700 (PDT)","from localhost (ip-94-113-127-32.net.upcbroadband.cz.\n\t[94.113.127.32]) by smtp.gmail.com with ESMTPSA id\n\tb9sm7226099wrf.59.2017.11.03.02.03.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tFri, 03 Nov 2017 02:03: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=te4jN0HyrTWgcf0TGL8mdRoMjRMgcwvtoxutpcZ3dOE=;\n\tb=TtYEQ2D8MeVxfvJydlQEV71WD+xiHh6GO8PK0vt0xln1iKpTVEmrFDSaV14Y1K2CTi\n\tfOR1i5kCjJgm36uB8UqQVR1b8WncrqJfZW39d3rqb/CF3Hw/caSkRu6kr8MXddWkgZEI\n\t/5tteNDudQD8HUYtPjODBNPTsPirKHUZiN4glGn587/WRzi3z6A2bhCwwv69fTwW6cA1\n\tqeSFugiViGvvtKalWriW0KoouftJ6/66DuNT1vQMMcw5JoWWMmyya5Bsw6xpGKVmncsG\n\tjB1dIQ4Y2bPAM46Sw9+TRtNisrG6u61ZoXp/2To7Opqxpn/uY1f70lo55ei9N3IawkYn\n\t2w6g==","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=te4jN0HyrTWgcf0TGL8mdRoMjRMgcwvtoxutpcZ3dOE=;\n\tb=UpcuTOG/XhEpzrcfWfLzhGvetgtNGdttaJmN28//j7XGAPblVD545SISsA9cn2xgqk\n\t7ayr4M9uq+53vC2Bc9Voazlj170EVVm26H5tFLRSikTrKRA63/rvkokqbtJiSgevio53\n\tOuJG4goy+oIBS0164EDL24LxZ4O43iIwhTdDlx7IynRFmUqmzn/UMZPawNlX/1hLIjE9\n\tFZiuVmXoqvddIIlUzWeGsr5hRiK3zrAnySXdOtmtMrapUpQIZ/tXjlMxaJzsFeA1ZSut\n\t95UlBZJ3os4ZrB/Dr5s5O40fCoLgEM78FHqU24/jjhyeaQYY5e8OGQjYbdf/HdAeGD7W\n\tawTQ==","X-Gm-Message-State":"AMCzsaXIGm1q7yqNUSt3L0bLpOBDUEFFecpOAF5xqeDC6kUBKDqgFX4F\n\taFEUPyFhg4bAVI9kRhG74J7qTOlY","X-Google-Smtp-Source":"ABhQp+QPucxgGs4FnY0ZiDIOJyAf3u8E9cCSKA1vyMDOCi+b8rRt0c1fTLa73hZGxdmeC46UeGT0+g==","X-Received":"by 10.223.186.201 with SMTP id w9mr5171894wrg.230.1509699825909; \n\tFri, 03 Nov 2017 02:03: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 01/16] mlxsw: spectrum: Rename IPIP-related\n\tnetdevice handlers","Date":"Fri,  3 Nov 2017 10:03:29 +0100","Message-Id":"<20171103090344.19444-2-jiri@resnulli.us>","X-Mailer":"git-send-email 2.9.5","In-Reply-To":"<20171103090344.19444-1-jiri@resnulli.us>","References":"<20171103090344.19444-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\nTo distinguish between events related to tunnel device itself and its\nbound device, rename a number of functions related to handling tunneling\nnetdevice events to include _ol_ (for \"overlay\") in the name. That\nleaves room in the namespace for underlay-related functions, which would\nhave _ul_ in the name.\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.c     |  5 ++-\n drivers/net/ethernet/mellanox/mlxsw/spectrum.h     | 12 +++---\n .../net/ethernet/mellanox/mlxsw/spectrum_router.c  | 45 +++++++++++-----------\n 3 files changed, 32 insertions(+), 30 deletions(-)","diff":"diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c\nindex 52f38b4..55bb366 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c\n@@ -4542,8 +4542,9 @@ static int mlxsw_sp_netdevice_event(struct notifier_block *nb,\n \tint err = 0;\n \n \tmlxsw_sp = container_of(nb, struct mlxsw_sp, netdevice_nb);\n-\tif (mlxsw_sp_netdev_is_ipip(mlxsw_sp, dev))\n-\t\terr = mlxsw_sp_netdevice_ipip_event(mlxsw_sp, dev, event, ptr);\n+\tif (mlxsw_sp_netdev_is_ipip_ol(mlxsw_sp, dev))\n+\t\terr = mlxsw_sp_netdevice_ipip_ol_event(mlxsw_sp, dev,\n+\t\t\t\t\t\t       event, ptr);\n \telse if (event == NETDEV_CHANGEADDR || event == NETDEV_CHANGEMTU)\n \t\terr = mlxsw_sp_netdevice_router_port_event(dev);\n \telse if (mlxsw_sp_is_vrf_event(event, ptr))\ndiff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h\nindex b2393bb8..f01b5cb 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h\n@@ -396,13 +396,13 @@ int mlxsw_sp_inet6addr_valid_event(struct notifier_block *unused,\n \t\t\t\t   unsigned long event, void *ptr);\n int mlxsw_sp_netdevice_vrf_event(struct net_device *l3_dev, unsigned long event,\n \t\t\t\t struct netdev_notifier_changeupper_info *info);\n-bool mlxsw_sp_netdev_is_ipip(const struct mlxsw_sp *mlxsw_sp,\n-\t\t\t     const struct net_device *dev);\n+bool mlxsw_sp_netdev_is_ipip_ol(const struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\tconst struct net_device *dev);\n int\n-mlxsw_sp_netdevice_ipip_event(struct mlxsw_sp *mlxsw_sp,\n-\t\t\t      struct net_device *l3_dev,\n-\t\t\t      unsigned long event,\n-\t\t\t      struct netdev_notifier_changeupper_info *info);\n+mlxsw_sp_netdevice_ipip_ol_event(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t struct net_device *l3_dev,\n+\t\t\t\t unsigned long event,\n+\t\t\t\t struct netdev_notifier_changeupper_info *info);\n void\n mlxsw_sp_port_vlan_router_leave(struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan);\n void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif);\ndiff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\nindex d657f01..9672933 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c\n@@ -1306,8 +1306,8 @@ static bool mlxsw_sp_netdev_ipip_type(const struct mlxsw_sp *mlxsw_sp,\n \treturn false;\n }\n \n-bool mlxsw_sp_netdev_is_ipip(const struct mlxsw_sp *mlxsw_sp,\n-\t\t\t     const struct net_device *dev)\n+bool mlxsw_sp_netdev_is_ipip_ol(const struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\tconst struct net_device *dev)\n {\n \treturn mlxsw_sp_netdev_ipip_type(mlxsw_sp, dev, NULL);\n }\n@@ -1326,8 +1326,8 @@ mlxsw_sp_ipip_entry_find_by_ol_dev(struct mlxsw_sp *mlxsw_sp,\n \treturn NULL;\n }\n \n-static int mlxsw_sp_netdevice_ipip_reg_event(struct mlxsw_sp *mlxsw_sp,\n-\t\t\t\t\t     struct net_device *ol_dev)\n+static int mlxsw_sp_netdevice_ipip_ol_reg_event(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t\t\tstruct net_device *ol_dev)\n {\n \tstruct mlxsw_sp_router *router = mlxsw_sp->router;\n \tstruct mlxsw_sp_ipip_entry *ipip_entry;\n@@ -1347,8 +1347,8 @@ static int mlxsw_sp_netdevice_ipip_reg_event(struct mlxsw_sp *mlxsw_sp,\n \treturn 0;\n }\n \n-static void mlxsw_sp_netdevice_ipip_unreg_event(struct mlxsw_sp *mlxsw_sp,\n-\t\t\t\t\t\tstruct net_device *ol_dev)\n+static void mlxsw_sp_netdevice_ipip_ol_unreg_event(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t\t\t   struct net_device *ol_dev)\n {\n \tstruct mlxsw_sp_ipip_entry *ipip_entry;\n \n@@ -1357,8 +1357,8 @@ static void mlxsw_sp_netdevice_ipip_unreg_event(struct mlxsw_sp *mlxsw_sp,\n \t\tmlxsw_sp_ipip_entry_destroy(mlxsw_sp, ipip_entry);\n }\n \n-static int mlxsw_sp_netdevice_ipip_up_event(struct mlxsw_sp *mlxsw_sp,\n-\t\t\t\t\t    struct net_device *ol_dev)\n+static int mlxsw_sp_netdevice_ipip_ol_up_event(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t\t       struct net_device *ol_dev)\n {\n \tstruct mlxsw_sp_fib_entry *decap_fib_entry;\n \tstruct mlxsw_sp_ipip_entry *ipip_entry;\n@@ -1375,8 +1375,8 @@ static int mlxsw_sp_netdevice_ipip_up_event(struct mlxsw_sp *mlxsw_sp,\n \treturn 0;\n }\n \n-static void mlxsw_sp_netdevice_ipip_down_event(struct mlxsw_sp *mlxsw_sp,\n-\t\t\t\t\t       struct net_device *ol_dev)\n+static void mlxsw_sp_netdevice_ipip_ol_down_event(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t\t\t  struct net_device *ol_dev)\n {\n \tstruct mlxsw_sp_ipip_entry *ipip_entry;\n \n@@ -1385,8 +1385,8 @@ static void mlxsw_sp_netdevice_ipip_down_event(struct mlxsw_sp *mlxsw_sp,\n \t\tmlxsw_sp_ipip_entry_demote_decap(mlxsw_sp, ipip_entry);\n }\n \n-static int mlxsw_sp_netdevice_ipip_vrf_event(struct mlxsw_sp *mlxsw_sp,\n-\t\t\t\t\t     struct net_device *ol_dev)\n+static int mlxsw_sp_netdevice_ipip_ol_vrf_event(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t\t\tstruct net_device *ol_dev)\n {\n \tstruct mlxsw_sp_fib_entry *decap_fib_entry;\n \tstruct mlxsw_sp_ipip_entry *ipip_entry;\n@@ -1424,26 +1424,27 @@ static int mlxsw_sp_netdevice_ipip_vrf_event(struct mlxsw_sp *mlxsw_sp,\n \treturn 0;\n }\n \n-int mlxsw_sp_netdevice_ipip_event(struct mlxsw_sp *mlxsw_sp,\n-\t\t\t\t  struct net_device *ol_dev,\n-\t\t\t\t  unsigned long event,\n-\t\t\t\t  struct netdev_notifier_changeupper_info *info)\n+int\n+mlxsw_sp_netdevice_ipip_ol_event(struct mlxsw_sp *mlxsw_sp,\n+\t\t\t\t struct net_device *ol_dev,\n+\t\t\t\t unsigned long event,\n+\t\t\t\t struct netdev_notifier_changeupper_info *info)\n {\n \tswitch (event) {\n \tcase NETDEV_REGISTER:\n-\t\treturn mlxsw_sp_netdevice_ipip_reg_event(mlxsw_sp, ol_dev);\n+\t\treturn mlxsw_sp_netdevice_ipip_ol_reg_event(mlxsw_sp, ol_dev);\n \tcase NETDEV_UNREGISTER:\n-\t\tmlxsw_sp_netdevice_ipip_unreg_event(mlxsw_sp, ol_dev);\n+\t\tmlxsw_sp_netdevice_ipip_ol_unreg_event(mlxsw_sp, ol_dev);\n \t\treturn 0;\n \tcase NETDEV_UP:\n-\t\treturn mlxsw_sp_netdevice_ipip_up_event(mlxsw_sp, ol_dev);\n+\t\treturn mlxsw_sp_netdevice_ipip_ol_up_event(mlxsw_sp, ol_dev);\n \tcase NETDEV_DOWN:\n-\t\tmlxsw_sp_netdevice_ipip_down_event(mlxsw_sp, ol_dev);\n+\t\tmlxsw_sp_netdevice_ipip_ol_down_event(mlxsw_sp, ol_dev);\n \t\treturn 0;\n \tcase NETDEV_CHANGEUPPER:\n \t\tif (netif_is_l3_master(info->upper_dev))\n-\t\t\treturn mlxsw_sp_netdevice_ipip_vrf_event(mlxsw_sp,\n-\t\t\t\t\t\t\t\t ol_dev);\n+\t\t\treturn mlxsw_sp_netdevice_ipip_ol_vrf_event(mlxsw_sp,\n+\t\t\t\t\t\t\t\t    ol_dev);\n \t\treturn 0;\n \t}\n \treturn 0;\n","prefixes":["net-next","01/16"]}