From patchwork Wed Nov 4 14:24:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 318479 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7659C2D0A3 for ; Wed, 4 Nov 2020 14:31:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4325020735 for ; Wed, 4 Nov 2020 14:31:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QrI9H99C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727003AbgKDObf (ORCPT ); Wed, 4 Nov 2020 09:31:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726706AbgKDObe (ORCPT ); Wed, 4 Nov 2020 09:31:34 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97722C0613D3 for ; Wed, 4 Nov 2020 06:31:34 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id y12so22262865wrp.6 for ; Wed, 04 Nov 2020 06:31:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aw1qKrJDVTVGc9+faF8YMpoPIqDGI/C6NZGeaxcJruY=; b=QrI9H99CnOXLE9YZ52vL/jd7vSPJ7YbbQ+/GEz94K8jHJym6M/yW6n7dju4xj5lqvL 5hPJigkMUPqI6te9DzILj1mVuLFH+niifOTv0c2T6V0eTSsbPZcuiNSsCl3/ijjcClQu bUR/gdg03fgrzruEuihWf7Wk8TATNkMygT5n3WM59gUq7r1Z2t7apZLRn+WRi61CSFi8 5AjFr42vhN7BZhd53pz0xL5hkjD31ut3FEyPiTAD0EL9NukVbMfUQ0fxqExCPQwen50y iFVw20oY6bErmKuFp2yv1UG6O77jPSu5fgQ4+O73BmrronAtNcS3LCyis5A2LI2s62Zw C89Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aw1qKrJDVTVGc9+faF8YMpoPIqDGI/C6NZGeaxcJruY=; b=VXe68nvY6WJz1eRw5DV4xA5METCVMCKmQ8HG4+zgEXUu1TbTqRxIZjh2irGZd4RtsF U9oa9v/LuJ15McI8jM9TnmdAdzP1LnhWrN1fDEkSMjlQGeNsfUhMfkem5VH/ap8SKW3r lIiveUQvyjssHyAkPedIgIruBvYvYbnVLg44SCw8g1U1x+eHg05tNwzSfyDTr//byGs0 5iEqe9J/dcMfSwUgAUGUdKZvctq8qHskvdM8Z87FE1icAVKOyABpWVJNmT507DzRaHim lxDamc2t2vYI4HVgWpxj8O7c7KzTW9FTtCyARpiFkXhiiSfPLVBL/0/Ww7oUhL+t1XII GaDA== X-Gm-Message-State: AOAM533QqzOXc5+ctqbczAYyfizRsiIqc3Npa9acwNqAOn5M2GxeVG5R Z+EGVn9tB04W6KCMiu67Pbk= X-Google-Smtp-Source: ABdhPJz307ULmxdDn5V8kkb2G/YjE3mN/nyh2Kax26+h4TOoNX1k539hzKbqFhhOjkZL0yu4Tvw5cQ== X-Received: by 2002:adf:fe48:: with SMTP id m8mr32046522wrs.127.1604500293328; Wed, 04 Nov 2020 06:31:33 -0800 (PST) Received: from ?IPv6:2003:ea:8f23:2800:d177:63da:d01d:cf70? (p200300ea8f232800d17763dad01dcf70.dip0.t-ipconnect.de. [2003:ea:8f23:2800:d177:63da:d01d:cf70]) by smtp.googlemail.com with ESMTPSA id g17sm2849624wrw.37.2020.11.04.06.31.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Nov 2020 06:31:32 -0800 (PST) Subject: [PATCH net-next v2 01/10] net: core: add dev_get_tstats64 as a ndo_get_stats64 implementation From: Heiner Kallweit To: Jakub Kicinski , David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Russell King , Pablo Neira Ayuso , Harald Welte , "Jason A. Donenfeld" , Herbert Xu Cc: "netdev@vger.kernel.org" , osmocom-net-gprs@lists.osmocom.org, wireguard@lists.zx2c4.com, Steffen Klassert References: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Message-ID: <91133597-bd18-20ab-2a98-fd061ff90fed@gmail.com> Date: Wed, 4 Nov 2020 15:24:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org It's a frequent pattern to use netdev->stats for the less frequently accessed counters and per-cpu counters for the frequently accessed counters (rx/tx bytes/packets). Add a default ndo_get_stats64() implementation for this use case. Reviewed-by: Florian Fainelli Signed-off-by: Heiner Kallweit --- include/linux/netdevice.h | 1 + net/core/dev.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a53ed2d1e..7ce648a56 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4527,6 +4527,7 @@ void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64, const struct net_device_stats *netdev_stats); void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s, const struct pcpu_sw_netstats __percpu *netstats); +void dev_get_tstats64(struct net_device *dev, struct rtnl_link_stats64 *s); extern int netdev_max_backlog; extern int netdev_tstamp_prequeue; diff --git a/net/core/dev.c b/net/core/dev.c index 9e7f071b8..88acc03fa 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -10366,6 +10366,21 @@ void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s, } EXPORT_SYMBOL_GPL(dev_fetch_sw_netstats); +/** + * dev_get_tstats64 - ndo_get_stats64 implementation + * @dev: device to get statistics from + * @s: place to store stats + * + * Populate @s from dev->stats and dev->tstats. Can be used as + * ndo_get_stats64() callback. + */ +void dev_get_tstats64(struct net_device *dev, struct rtnl_link_stats64 *s) +{ + netdev_stats_to_stats64(s, &dev->stats); + dev_fetch_sw_netstats(s, dev->tstats); +} +EXPORT_SYMBOL_GPL(dev_get_tstats64); + struct netdev_queue *dev_ingress_queue_create(struct net_device *dev) { struct netdev_queue *queue = dev_ingress_queue(dev); From patchwork Wed Nov 4 14:26:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 318478 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E509C2D0A3 for ; Wed, 4 Nov 2020 14:31:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DEFDB2074B for ; Wed, 4 Nov 2020 14:31:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oqc3LELb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729944AbgKDObl (ORCPT ); Wed, 4 Nov 2020 09:31:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729484AbgKDObj (ORCPT ); Wed, 4 Nov 2020 09:31:39 -0500 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47268C061A4C for ; Wed, 4 Nov 2020 06:31:39 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id w14so22235969wrs.9 for ; Wed, 04 Nov 2020 06:31:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=qEB7Z1RjR0G+DQiP2hCHYNQbM1LDy8ydPvZ+5mT8PJY=; b=oqc3LELbOHqVlrEwxcr95Uzj3oPBsqK0Nak4vw7gcR4/dVI6RUxZUXW6f5i47wIvsS 8ArQM6PlzCm2AppC7MMF2DLcku+T4teyS7eGqkcwZS406IFUqnbcqvzlF2TZRgBLx06p 3HYc641WliszKdF0S62P1MqROLAJa3FB6pmc6Z6egnxCdFZoQ+gEJmkj+mF+t8YmRvhZ UfkATTDdmC+MNlVBNBD4awnkkoO726ky7JLrG5VJhFN0yhTTj5usRcgam6icQsKrKG64 ccw7SUtnjKE4WdBzCfxZAMK/j19148XNTbs/Vf3zjp3xxQlNuTeEQyxxag5Y+szOsP9a oByg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qEB7Z1RjR0G+DQiP2hCHYNQbM1LDy8ydPvZ+5mT8PJY=; b=Zimwx9zHHQO+YxQjWByJEEeOiuro5Z+9rm9vBsJyc5dRZBEnYQGgDyD2+/5eRPCt20 12JefloQ0d2QU/gtFk4XLlGr5+iQkOf1JYr6bTKvUHT6m6KmHiNvs6XNhfqj8a3W79gi I0dzuKGZUXUcN/sQfoT75GrpdQyMWFtN18Q5qsWEQu8iOZRzV47cuuPxGJcEKHCAicid mfZPnn+bIBHnlW7KOaszcNza4JCZxhgEyMkTO9e+dnZ53wp/1OO4yD+toBEy+BymTQrV idKgLpJjGOPmsKgMqwWKT3YzvTHYpoA/wV8HuqvBQwiInBTJ6gI3LMXzdo/lXKyYdor5 ArKw== X-Gm-Message-State: AOAM533c1bciy444GJAPOHaNVDZQq1TUVG9seC5MWsNM882/frUKvqNU A+X7wgTmuwsTfovKlZWSCPo= X-Google-Smtp-Source: ABdhPJzroOAM2nk7AMGE88U8txABdnW1WShg9Kwj96gyky21jL4XWyUtijC9VSYFoEfWdADhvSeNQw== X-Received: by 2002:a5d:5612:: with SMTP id l18mr34275754wrv.372.1604500298030; Wed, 04 Nov 2020 06:31:38 -0800 (PST) Received: from ?IPv6:2003:ea:8f23:2800:d177:63da:d01d:cf70? (p200300ea8f232800d17763dad01dcf70.dip0.t-ipconnect.de. [2003:ea:8f23:2800:d177:63da:d01d:cf70]) by smtp.googlemail.com with ESMTPSA id a185sm2595233wmf.24.2020.11.04.06.31.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Nov 2020 06:31:37 -0800 (PST) Subject: [PATCH net-next v2 04/10] ip6_tunnel: switch to dev_get_tstats64 From: Heiner Kallweit To: Jakub Kicinski , David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Russell King , Pablo Neira Ayuso , Harald Welte , "Jason A. Donenfeld" , Herbert Xu Cc: "netdev@vger.kernel.org" , osmocom-net-gprs@lists.osmocom.org, wireguard@lists.zx2c4.com, Steffen Klassert References: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Message-ID: <4dc3d9f1-bf5e-1f56-9810-7af29988a5f1@gmail.com> Date: Wed, 4 Nov 2020 15:26:11 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Switch ip6_tunnel to the standard statistics pattern: - use dev->stats for the less frequently accessed counters - use dev->tstats for the frequently accessed counters An additional benefit is that we now have 64bit statistics also on 32bit systems. Signed-off-by: Heiner Kallweit --- net/ipv6/ip6_tunnel.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 648db3fe5..321d057c5 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -94,36 +94,6 @@ static inline int ip6_tnl_mpls_supported(void) return IS_ENABLED(CONFIG_MPLS); } -static struct net_device_stats *ip6_get_stats(struct net_device *dev) -{ - struct pcpu_sw_netstats tmp, sum = { 0 }; - int i; - - for_each_possible_cpu(i) { - unsigned int start; - const struct pcpu_sw_netstats *tstats = - per_cpu_ptr(dev->tstats, i); - - do { - start = u64_stats_fetch_begin_irq(&tstats->syncp); - tmp.rx_packets = tstats->rx_packets; - tmp.rx_bytes = tstats->rx_bytes; - tmp.tx_packets = tstats->tx_packets; - tmp.tx_bytes = tstats->tx_bytes; - } while (u64_stats_fetch_retry_irq(&tstats->syncp, start)); - - sum.rx_packets += tmp.rx_packets; - sum.rx_bytes += tmp.rx_bytes; - sum.tx_packets += tmp.tx_packets; - sum.tx_bytes += tmp.tx_bytes; - } - dev->stats.rx_packets = sum.rx_packets; - dev->stats.rx_bytes = sum.rx_bytes; - dev->stats.tx_packets = sum.tx_packets; - dev->stats.tx_bytes = sum.tx_bytes; - return &dev->stats; -} - #define for_each_ip6_tunnel_rcu(start) \ for (t = rcu_dereference(start); t; t = rcu_dereference(t->next)) @@ -1835,7 +1805,7 @@ static const struct net_device_ops ip6_tnl_netdev_ops = { .ndo_start_xmit = ip6_tnl_start_xmit, .ndo_do_ioctl = ip6_tnl_ioctl, .ndo_change_mtu = ip6_tnl_change_mtu, - .ndo_get_stats = ip6_get_stats, + .ndo_get_stats64 = dev_get_tstats64, .ndo_get_iflink = ip6_tnl_get_iflink, }; From patchwork Wed Nov 4 14:27:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 318477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33E8CC388F9 for ; Wed, 4 Nov 2020 14:31:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C7DA62074B for ; Wed, 4 Nov 2020 14:31:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dDvTxo3+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730008AbgKDObo (ORCPT ); Wed, 4 Nov 2020 09:31:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729946AbgKDObl (ORCPT ); Wed, 4 Nov 2020 09:31:41 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFC9AC0613D3 for ; Wed, 4 Nov 2020 06:31:40 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id p22so2553894wmg.3 for ; Wed, 04 Nov 2020 06:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BnTgwBVz1ZO0k7LKVJSAZVBIqGzXjGz0VSRBSuIyloc=; b=dDvTxo3+AsEj/68Cdlgde2+BjLBZtLbTGzssWfAMt7CVcHxDGfCSYr2m2FXQ6zaHTJ Ue3bzwa8izCGvHqwNbZpDhBhhQ5w4+ENVUurLKAup8fKMuRCMqH2unqBZQ6774R7au3c 93AbS4hpboSpLVGPdiQJhi82QknvuotS2nohKFWGZ83ZB5owLORKtYSxLY7EbbOiclTH uF2jzRf6GLVyINzmhmHTjt831zyw00Djd6H5sMh76hpc0Vm+yXLkDOiF27nS9hixOPBb PSTbMImmgf07tW49LLP0SWTqtr+PZOUvA4XO5MKGeTvihcOP4VUNKJj5g5uoKH6jPA81 NUYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BnTgwBVz1ZO0k7LKVJSAZVBIqGzXjGz0VSRBSuIyloc=; b=k29wB3bXFCBPYclnlbVeW77U9mBz7aYt/CpPEaiHvoMNyNR+1xlH6jNaXNCSyoHfDp sbkImwbIOaNy7sVlKTfGexeNzfDgHkw4Pxr8asMhWzSa0cbO6jidUZE6mY0PSSsp/T2t uBs5KxEZ/wWQZKhHkiPiOv/FRd0aHLOEaR/YILPrl+Jr+Ye7Aj/8tVWqrAaKhdCgaM+v MTeF2k9Go+WXgjZTpeMMOdNXML5nWKQwIgfr0PkPAdmd7jpfwFvhDdiw7lcNHjqkTjAF ZNcgULhZEabn0LSF4l0nHnoZULETNnQHtCEmVLB4nkgsesd8/Rq1EA8yFzrgo9w81zgH Wdyw== X-Gm-Message-State: AOAM532FAMjX9MSP8BmDrX8hurSocUDA55yr/sdXMApbi62B1P8i/MCa NkLecfWPRPxyTqBkg40210o= X-Google-Smtp-Source: ABdhPJzPGzBMF8LcdUpb79YVk6qku4r3FsMQ57O6u0bisOkeVnWRROLBrmu7Qwyz8Odq+Ndv/P4vMw== X-Received: by 2002:a7b:c00b:: with SMTP id c11mr3544932wmb.175.1604500299569; Wed, 04 Nov 2020 06:31:39 -0800 (PST) Received: from ?IPv6:2003:ea:8f23:2800:d177:63da:d01d:cf70? (p200300ea8f232800d17763dad01dcf70.dip0.t-ipconnect.de. [2003:ea:8f23:2800:d177:63da:d01d:cf70]) by smtp.googlemail.com with ESMTPSA id t1sm2932329wrs.48.2020.11.04.06.31.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Nov 2020 06:31:39 -0800 (PST) Subject: [PATCH net-next v2 05/10] net: switch to dev_get_tstats64 From: Heiner Kallweit To: Jakub Kicinski , David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Russell King , Pablo Neira Ayuso , Harald Welte , "Jason A. Donenfeld" , Herbert Xu Cc: "netdev@vger.kernel.org" , osmocom-net-gprs@lists.osmocom.org, wireguard@lists.zx2c4.com, Steffen Klassert References: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Message-ID: Date: Wed, 4 Nov 2020 15:27:12 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Replace ip_tunnel_get_stats64() with the new identical core fucntion dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- drivers/net/bareudp.c | 2 +- drivers/net/geneve.c | 2 +- drivers/net/vxlan.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c index ff0bea155..28257bcce 100644 --- a/drivers/net/bareudp.c +++ b/drivers/net/bareudp.c @@ -510,7 +510,7 @@ static const struct net_device_ops bareudp_netdev_ops = { .ndo_open = bareudp_open, .ndo_stop = bareudp_stop, .ndo_start_xmit = bareudp_xmit, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_fill_metadata_dst = bareudp_fill_metadata_dst, }; diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index d07008a81..a3c8ce6de 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -1138,7 +1138,7 @@ static const struct net_device_ops geneve_netdev_ops = { .ndo_open = geneve_open, .ndo_stop = geneve_stop, .ndo_start_xmit = geneve_xmit, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_change_mtu = geneve_change_mtu, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = eth_mac_addr, diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 1a557aeba..cb9930595 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -3210,7 +3210,7 @@ static const struct net_device_ops vxlan_netdev_ether_ops = { .ndo_open = vxlan_open, .ndo_stop = vxlan_stop, .ndo_start_xmit = vxlan_xmit, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_set_rx_mode = vxlan_set_multicast_list, .ndo_change_mtu = vxlan_change_mtu, .ndo_validate_addr = eth_validate_addr, @@ -3229,7 +3229,7 @@ static const struct net_device_ops vxlan_netdev_raw_ops = { .ndo_open = vxlan_open, .ndo_stop = vxlan_stop, .ndo_start_xmit = vxlan_xmit, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_change_mtu = vxlan_change_mtu, .ndo_fill_metadata_dst = vxlan_fill_metadata_dst, }; From patchwork Wed Nov 4 14:28:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 318474 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C094C2D0A3 for ; Wed, 4 Nov 2020 14:32:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC14A20735 for ; Wed, 4 Nov 2020 14:32:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eE8ak1TB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730127AbgKDOcE (ORCPT ); Wed, 4 Nov 2020 09:32:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729990AbgKDObo (ORCPT ); Wed, 4 Nov 2020 09:31:44 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA85CC0613D3 for ; Wed, 4 Nov 2020 06:31:43 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id b8so22292659wrn.0 for ; Wed, 04 Nov 2020 06:31:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ISdFe78IibjR0mRAQ86gBh/OHzTQrxaMboYtkFYsqpE=; b=eE8ak1TBDVXreX9muVNGINPPTvKoQUGUD0knZOHr+4cKU7tAK22S3ATaMp2kFxsxRy iiMxKWeDrIIOa6dXxEZmheaPMa7hXUAh4/BjqpaQDfLRVHSgPI+YYSvcYhpHfTHoLA5P wg2kho8HjLlH0ER5waUhPXWL7UvsSE/j6+h1ICFXEvcwE6nHlhA71k0EPzEyI4BEh8fE D9/Dw9aV15WdZbgs+6dF6oHQjVZPrvMdmqR3hbfxTeupHkARuPGWI/STHjm52TLbn2A3 A3o4CVot3uA6ift59ypoE8kihX6cQlGv+OlXIPXLyF1MrYHykPZPGay7CfdBE1+FMAZc IRyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ISdFe78IibjR0mRAQ86gBh/OHzTQrxaMboYtkFYsqpE=; b=Jkc9axOGA1sf3rrP86ceB2bd9ilGZHdnJ3zX6/PqSGVeSOa30PBheGKWAHaE4tiFc5 YJ/JFBKg5ln94+MgYDoHg42842VlkpDENoTKAZiRJLQqVz1GLR3r6NOC98z2MXpbvF/d 6qQB9HsYzUasLyWT9oHSToW4w7ijdnWE2WM6z2iO9vqaAF1GBfE7tPfL4wSfyfq2d/NV gWBAFsPAmQ0+CmdY5wOd7ZnjPETZHNscqwcfyWmXURen6YpoYzl6J+B5khJ1rJZlRWm/ uqJ/FQnFPs6uVSPi9FRkVkFi9gYIwl+CLwfRO3ynwmOnvvZU4BdNnROFIZXC0pjrimR9 bFzA== X-Gm-Message-State: AOAM532K0pZOGIQIuk6DIU5FmTfR0Ou879UzjziCXSwxTMHPp6va97bI pdwKe9sjkDW2zD6Fi9++Y44= X-Google-Smtp-Source: ABdhPJyTmgp2E3e/UB8WuI4mAejZD7B4seUjChiV1gJQIko6Xt6GU+2OLu3kC+3iK9h4fWeGCnAcTA== X-Received: by 2002:adf:fa8a:: with SMTP id h10mr32097178wrr.336.1604500302448; Wed, 04 Nov 2020 06:31:42 -0800 (PST) Received: from ?IPv6:2003:ea:8f23:2800:d177:63da:d01d:cf70? (p200300ea8f232800d17763dad01dcf70.dip0.t-ipconnect.de. [2003:ea:8f23:2800:d177:63da:d01d:cf70]) by smtp.googlemail.com with ESMTPSA id f17sm2938117wrm.27.2020.11.04.06.31.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Nov 2020 06:31:42 -0800 (PST) Subject: [PATCH net-next v2 07/10] wireguard: switch to dev_get_tstats64 From: Heiner Kallweit To: Jakub Kicinski , David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Russell King , Pablo Neira Ayuso , Harald Welte , "Jason A. Donenfeld" , Herbert Xu Cc: "netdev@vger.kernel.org" , osmocom-net-gprs@lists.osmocom.org, wireguard@lists.zx2c4.com, Steffen Klassert References: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Message-ID: <4f731535-2a51-a673-5daf-d9ec2536a8f8@gmail.com> Date: Wed, 4 Nov 2020 15:28:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Replace ip_tunnel_get_stats64() with the new identical core fucntion dev_get_tstats64(). Signed-off-by: Heiner Kallweit Reviewed-by: Jason A. Donenfeld --- drivers/net/wireguard/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireguard/device.c b/drivers/net/wireguard/device.c index c9f65e96c..a3ed49cd9 100644 --- a/drivers/net/wireguard/device.c +++ b/drivers/net/wireguard/device.c @@ -215,7 +215,7 @@ static const struct net_device_ops netdev_ops = { .ndo_open = wg_open, .ndo_stop = wg_stop, .ndo_start_xmit = wg_xmit, - .ndo_get_stats64 = ip_tunnel_get_stats64 + .ndo_get_stats64 = dev_get_tstats64 }; static void wg_destruct(struct net_device *dev) From patchwork Wed Nov 4 14:28:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 318476 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E65DC2D0A3 for ; Wed, 4 Nov 2020 14:31:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1FB372074B for ; Wed, 4 Nov 2020 14:31:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sfcMSso4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730113AbgKDObz (ORCPT ); Wed, 4 Nov 2020 09:31:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729972AbgKDObu (ORCPT ); Wed, 4 Nov 2020 09:31:50 -0500 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA98DC040203 for ; Wed, 4 Nov 2020 06:31:45 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id k18so2504919wmj.5 for ; Wed, 04 Nov 2020 06:31:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=4rfiet18ZS0o4KG/dtF63+kbk0+HAV5dp9bIiGOx7/A=; b=sfcMSso4ZIjtzw+Jqb8eHi5oFWOCYuHZedzoLVlBFMW/sxgG00Nc+1+kdXJtQ1wFeK 5AZmIvNBcO6P68XQ9UvidKMYuZImUVIQTLZHHMsyaYUVJ1yikHF5Hd9x9yPrTZfffgTm XqLF3s03M6QC1cRYtX716btEvouYkcwrKZZhzTYAYNARPONfVdTiIirM0Gvcj0sdjOXF tQQ8Qr7Q/ktvp0DJY50hyPUyPFfa8Esgm9ZqFiVD7j1P69NgsJ7+xlsow/SiOhFmlzkM daPqYy5+nrlehTHr520j0YUbEll5KpaLxnjHNCV3AsoYlHpiNv/cHIaLVSmiunqQwDvY 5C7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4rfiet18ZS0o4KG/dtF63+kbk0+HAV5dp9bIiGOx7/A=; b=skx73XPLyumBCD8Q38IQLjknOCnEtNBL8WzeLHu/ATM/TzO3auMgwDIanVVusO0jJ0 YisSuq+Yswd8JirxkISNn7hL5Io7Z5F6kO0OkqOORsoxul/bDylUkZV5iiroyQaOF0VK bUWI9pWpl0yuXRQsNkGE5NyjxPz4N5UmYWz0blNTNtnFIyhq/M0FzsZtQjwWJ3Qw0J8q mnhW1PS3ZxChiewB7uMQoIwdSV67fQtwQbYGuil4rz/YaUUCorkChHPTRM0xR3BLNgO+ PLvoIGcFUEHvwQ4LumfcX8nfT/0Ukx5COGvW1pMFiVPoA4m7dvwJITdnOY+qcIy+0gql hSNg== X-Gm-Message-State: AOAM533hU+qx2cLfcaYcmj5dICI4DEvseNN27khzeywCpdtvcVyHQxsY Jk86Kc0sfU+jZrdTvp+t9xc= X-Google-Smtp-Source: ABdhPJxI7VpXKJmZPAAzWLeHi6wM4l7xKzxiHLBrCNzzFeW86JBey7HQ+giLzYO7y6Ko67W2NU36yQ== X-Received: by 2002:a1c:b387:: with SMTP id c129mr5161673wmf.66.1604500304441; Wed, 04 Nov 2020 06:31:44 -0800 (PST) Received: from ?IPv6:2003:ea:8f23:2800:d177:63da:d01d:cf70? (p200300ea8f232800d17763dad01dcf70.dip0.t-ipconnect.de. [2003:ea:8f23:2800:d177:63da:d01d:cf70]) by smtp.googlemail.com with ESMTPSA id 205sm2493118wme.38.2020.11.04.06.31.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Nov 2020 06:31:44 -0800 (PST) Subject: [PATCH net-next v2 08/10] vti: switch to dev_get_tstats64 From: Heiner Kallweit To: Jakub Kicinski , David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Russell King , Pablo Neira Ayuso , Harald Welte , "Jason A. Donenfeld" , Herbert Xu Cc: "netdev@vger.kernel.org" , osmocom-net-gprs@lists.osmocom.org, wireguard@lists.zx2c4.com, Steffen Klassert References: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Message-ID: Date: Wed, 4 Nov 2020 15:28:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Replace ip_tunnel_get_stats64() with the new identical core fucntion dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- net/ipv4/ip_vti.c | 2 +- net/ipv6/ip6_vti.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index b957cbee2..abc171e79 100644 --- a/net/ipv4/ip_vti.c +++ b/net/ipv4/ip_vti.c @@ -404,7 +404,7 @@ static const struct net_device_ops vti_netdev_ops = { .ndo_start_xmit = vti_tunnel_xmit, .ndo_do_ioctl = ip_tunnel_ioctl, .ndo_change_mtu = ip_tunnel_change_mtu, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_get_iflink = ip_tunnel_get_iflink, .ndo_tunnel_ctl = vti_tunnel_ctl, }; diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c index 5f9c4fdc1..b7b2bb27d 100644 --- a/net/ipv6/ip6_vti.c +++ b/net/ipv6/ip6_vti.c @@ -889,7 +889,7 @@ static const struct net_device_ops vti6_netdev_ops = { .ndo_uninit = vti6_dev_uninit, .ndo_start_xmit = vti6_tnl_xmit, .ndo_do_ioctl = vti6_ioctl, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_get_iflink = ip6_tnl_get_iflink, }; From patchwork Wed Nov 4 14:29:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 318475 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 343CFC2D0A3 for ; Wed, 4 Nov 2020 14:32:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4B0120735 for ; Wed, 4 Nov 2020 14:32:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UBktEN5F" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730107AbgKDObx (ORCPT ); Wed, 4 Nov 2020 09:31:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730030AbgKDObu (ORCPT ); Wed, 4 Nov 2020 09:31:50 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F788C0401C1 for ; Wed, 4 Nov 2020 06:31:47 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id c9so2538933wml.5 for ; Wed, 04 Nov 2020 06:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vff6yNcLVki99HBXZKVURhKPJZnmPneHA9KBTYAFVzs=; b=UBktEN5FFWzGcN/0dr4YKDfe1DmzUGMSWC0WJ2kbIDqpZCZWf/DZ5Ndq5EZ7Pl2F41 B3UQT6eKdT1KQgUAoglAHvIqc2o9oZqfTN9B5GURjMhOw1d4GQ0j4j8wkw8RN7KIGOGD 3DX8t5fgwcEb6E3+KlwaEZ2BaaO1M3mncFslT6rqlfqIR1+WMNW3PGrFfI1/0gC0ZqTP sMXKywSZW4x+Cay10MDEEKQGahsJRWowTvL0187JqA98jHyT6Z7wzW1hJ70eWuXwQ9Vw 8OjaD5nFLQ6GYKbsfNRDYHT3y5zT+/TtXyFi6JSMmiBFnkjUsIxxjcYnWV4MP+U4u8i7 lNTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vff6yNcLVki99HBXZKVURhKPJZnmPneHA9KBTYAFVzs=; b=kGFLwmkrexKMhlLJXjouky41pWIWS0cMENRdVNP2R6VQpx81Tt8YxkduqnoGKBmq2v TnfFzsi6Dst9eOQaxa0azEW0o6Dqk/GgUzdaHF0uVWcOTWyykJeEHlVfR5pAXjBL+LjL Ho2WUFzQ1gYO6HV1MYK0ck4EjZ4cIB5vZL0bUV9OvS7nqVnYcYyEckdlKHRMIWbLCjrl N3RVG3VvhwV/NKzQDAb/09Ir6LKs24DcKYHC24oJStczX0/LU8ptnGd6lbQL0t6LbdOq mYtIDSo4VeRtRATzKtrzSI7KPQNqdgQYt8kH3S8FZq205jTG6pWkzSY+AweDe+St47CZ U1ew== X-Gm-Message-State: AOAM531pYKbMPubhC7AXxRv6s3bQQNCdPtbxxlEiEW2VEXy1mkwfdb2q uO5/m3eJvVUYQVbs2iefuK8= X-Google-Smtp-Source: ABdhPJyuPb/O1vtK4Zhv26voXtkXkk4NNvFF1xRJ61h9iW1ULwMrqeM1nC5CNCuUIvPWej8nSAUxBg== X-Received: by 2002:a05:600c:2110:: with SMTP id u16mr4940556wml.4.1604500305924; Wed, 04 Nov 2020 06:31:45 -0800 (PST) Received: from ?IPv6:2003:ea:8f23:2800:d177:63da:d01d:cf70? (p200300ea8f232800d17763dad01dcf70.dip0.t-ipconnect.de. [2003:ea:8f23:2800:d177:63da:d01d:cf70]) by smtp.googlemail.com with ESMTPSA id g17sm2850560wrw.37.2020.11.04.06.31.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Nov 2020 06:31:45 -0800 (PST) Subject: [PATCH net-next v2 09/10] ipv4/ipv6: switch to dev_get_tstats64 From: Heiner Kallweit To: Jakub Kicinski , David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Russell King , Pablo Neira Ayuso , Harald Welte , "Jason A. Donenfeld" , Herbert Xu Cc: "netdev@vger.kernel.org" , osmocom-net-gprs@lists.osmocom.org, wireguard@lists.zx2c4.com, Steffen Klassert References: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Message-ID: Date: Wed, 4 Nov 2020 15:29:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <059fcb95-fba8-673e-0cd6-fb26e8ed4861@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Replace ip_tunnel_get_stats64() with the new identical core fucntion dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- net/ipv4/ip_gre.c | 6 +++--- net/ipv4/ipip.c | 2 +- net/ipv6/ip6_gre.c | 6 +++--- net/ipv6/sit.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index e70291748..a68bf4c6f 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -920,7 +920,7 @@ static const struct net_device_ops ipgre_netdev_ops = { .ndo_start_xmit = ipgre_xmit, .ndo_do_ioctl = ip_tunnel_ioctl, .ndo_change_mtu = ip_tunnel_change_mtu, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_get_iflink = ip_tunnel_get_iflink, .ndo_tunnel_ctl = ipgre_tunnel_ctl, }; @@ -1275,7 +1275,7 @@ static const struct net_device_ops gre_tap_netdev_ops = { .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, .ndo_change_mtu = ip_tunnel_change_mtu, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_get_iflink = ip_tunnel_get_iflink, .ndo_fill_metadata_dst = gre_fill_metadata_dst, }; @@ -1308,7 +1308,7 @@ static const struct net_device_ops erspan_netdev_ops = { .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, .ndo_change_mtu = ip_tunnel_change_mtu, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_get_iflink = ip_tunnel_get_iflink, .ndo_fill_metadata_dst = gre_fill_metadata_dst, }; diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 75d35e76b..d5bfa087c 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c @@ -347,7 +347,7 @@ static const struct net_device_ops ipip_netdev_ops = { .ndo_start_xmit = ipip_tunnel_xmit, .ndo_do_ioctl = ip_tunnel_ioctl, .ndo_change_mtu = ip_tunnel_change_mtu, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_get_iflink = ip_tunnel_get_iflink, .ndo_tunnel_ctl = ipip_tunnel_ctl, }; diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 931b186d2..8cf659994 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -1391,7 +1391,7 @@ static const struct net_device_ops ip6gre_netdev_ops = { .ndo_start_xmit = ip6gre_tunnel_xmit, .ndo_do_ioctl = ip6gre_tunnel_ioctl, .ndo_change_mtu = ip6_tnl_change_mtu, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_get_iflink = ip6_tnl_get_iflink, }; @@ -1828,7 +1828,7 @@ static const struct net_device_ops ip6gre_tap_netdev_ops = { .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, .ndo_change_mtu = ip6_tnl_change_mtu, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_get_iflink = ip6_tnl_get_iflink, }; @@ -1896,7 +1896,7 @@ static const struct net_device_ops ip6erspan_netdev_ops = { .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, .ndo_change_mtu = ip6_tnl_change_mtu, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_get_iflink = ip6_tnl_get_iflink, }; diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 5e2c34c0a..4dc5f9366 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -1396,7 +1396,7 @@ static const struct net_device_ops ipip6_netdev_ops = { .ndo_uninit = ipip6_tunnel_uninit, .ndo_start_xmit = sit_tunnel_xmit, .ndo_do_ioctl = ipip6_tunnel_ioctl, - .ndo_get_stats64 = ip_tunnel_get_stats64, + .ndo_get_stats64 = dev_get_tstats64, .ndo_get_iflink = ip_tunnel_get_iflink, .ndo_tunnel_ctl = ipip6_tunnel_ctl, };