In several places the same code is used to populate rtnl_link_stats64
fields with data from pcpu_sw_netstats. Therefore factor out this code
to a new function dev_fetch_sw_netstats().
v2:
- constify argument netstats
- don't ignore netstats being NULL or an ERRPTR
- switch to EXPORT_SYMBOL_GPL
Heiner Kallweit (12):
net: core: add function dev_fetch_sw_netstats for fetching
pcpu_sw_netstats
IB/hfi1: use new function dev_fetch_sw_netstats
net: macsec: use new function dev_fetch_sw_netstats
net: usb: qmi_wwan: use new function dev_fetch_sw_netstats
net: usbnet: use new function dev_fetch_sw_netstats
qtnfmac: use new function dev_fetch_sw_netstats
net: bridge: use new function dev_fetch_sw_netstats
net: dsa: use new function dev_fetch_sw_netstats
iptunnel: use new function dev_fetch_sw_netstats
mac80211: use new function dev_fetch_sw_netstats
net: openvswitch: use new function dev_fetch_sw_netstats
xfrm: use new function dev_fetch_sw_netstats
drivers/infiniband/hw/hfi1/ipoib_main.c | 34 +------------------
drivers/net/macsec.c | 22 +-----------
drivers/net/usb/qmi_wwan.c | 24 +------------
drivers/net/usb/usbnet.c | 24 +------------
drivers/net/wireless/quantenna/qtnfmac/core.c | 27 +--------------
include/linux/netdevice.h | 2 ++
net/bridge/br_device.c | 21 +-----------
net/core/dev.c | 34 +++++++++++++++++++
net/dsa/slave.c | 21 +-----------
net/ipv4/ip_tunnel_core.c | 23 +------------
net/mac80211/iface.c | 23 +------------
net/openvswitch/vport-internal_dev.c | 20 +----------
net/xfrm/xfrm_interface.c | 22 +-----------
13 files changed, 47 insertions(+), 250 deletions(-)
--
In several places the same code is used to populate rtnl_link_stats64
fields with data from pcpu_sw_netstats. Therefore factor out this code
to a new function dev_fetch_sw_netstats().
v2:
- constify argument netstats
- don't ignore netstats being NULL or an ERRPTR
- switch to EXPORT_SYMBOL_GPL
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
include/linux/netdevice.h | 2 ++
net/core/dev.c | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/macsec.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/usb/usbnet.c | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/infiniband/hw/hfi1/ipoib_main.c | 34 +------------------------
1 file changed, 1 insertion(+), 33 deletions(-)
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
net/bridge/br_device.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
net/xfrm/xfrm_interface.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Kalle Valo <redacted>
---
drivers/net/wireless/quantenna/qtnfmac/core.c | 23 +------------------
1 file changed, 1 insertion(+), 22 deletions(-)
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
net/ipv4/ip_tunnel_core.c | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
net/mac80211/iface.c | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
net/openvswitch/vport-internal_dev.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
From: Jakub Kicinski <kuba@kernel.org> Date: 2020-10-14 00:39:56
On Mon, 12 Oct 2020 10:00:11 +0200 Heiner Kallweit wrote:
In several places the same code is used to populate rtnl_link_stats64
fields with data from pcpu_sw_netstats. Therefore factor out this code
to a new function dev_fetch_sw_netstats().
v2:
- constify argument netstats
- don't ignore netstats being NULL or an ERRPTR
- switch to EXPORT_SYMBOL_GPL
From: Leon Romanovsky <leon@kernel.org> Date: 2020-10-14 05:42:58
On Tue, Oct 13, 2020 at 05:39:51PM -0700, Jakub Kicinski wrote:
On Mon, 12 Oct 2020 10:00:11 +0200 Heiner Kallweit wrote:
quoted
In several places the same code is used to populate rtnl_link_stats64
fields with data from pcpu_sw_netstats. Therefore factor out this code
to a new function dev_fetch_sw_netstats().
v2:
- constify argument netstats
- don't ignore netstats being NULL or an ERRPTR
- switch to EXPORT_SYMBOL_GPL
Applied, thank you!
Jakub,
Is it possible to make sure that changelogs are not part of the commit
messages? We don't store previous revisions in the git repo, so it doesn't
give too much to anyone who is looking on git log later. The lore link
to the patch is more than enough.
44fa32f008ab ("net: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats")
Thanks
From: Leon Romanovsky <leon@kernel.org> Date: 2020-10-14 07:53:19
On Wed, Oct 14, 2020 at 08:13:47AM +0200, Heiner Kallweit wrote:
On 14.10.2020 07:42, Leon Romanovsky wrote:
quoted
On Tue, Oct 13, 2020 at 05:39:51PM -0700, Jakub Kicinski wrote:
quoted
On Mon, 12 Oct 2020 10:00:11 +0200 Heiner Kallweit wrote:
quoted
In several places the same code is used to populate rtnl_link_stats64
fields with data from pcpu_sw_netstats. Therefore factor out this code
to a new function dev_fetch_sw_netstats().
v2:
- constify argument netstats
- don't ignore netstats being NULL or an ERRPTR
- switch to EXPORT_SYMBOL_GPL
Applied, thank you!
Jakub,
Is it possible to make sure that changelogs are not part of the commit
messages? We don't store previous revisions in the git repo, so it doesn't
give too much to anyone who is looking on git log later. The lore link
to the patch is more than enough.
I remember that once I did it the usual way (changelog below the ---) David
requested the changelog to be part of the commit message. So obviously he
sees some benefit in doing so.
Do you have a link? What is the benefit and how can we use it?
Usually such request comes to ensure that commit message is updated with
extra information (explanation) existed in changelog which is missing in
the patch.
Thanks
quoted
44fa32f008ab ("net: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats")
Thanks
On Wed, Oct 14, 2020 at 08:13:47AM +0200, Heiner Kallweit wrote:
quoted
On 14.10.2020 07:42, Leon Romanovsky wrote:
quoted
On Tue, Oct 13, 2020 at 05:39:51PM -0700, Jakub Kicinski wrote:
quoted
On Mon, 12 Oct 2020 10:00:11 +0200 Heiner Kallweit wrote:
quoted
In several places the same code is used to populate rtnl_link_stats64
fields with data from pcpu_sw_netstats. Therefore factor out this code
to a new function dev_fetch_sw_netstats().
v2:
- constify argument netstats
- don't ignore netstats being NULL or an ERRPTR
- switch to EXPORT_SYMBOL_GPL
Applied, thank you!
Jakub,
Is it possible to make sure that changelogs are not part of the commit
messages? We don't store previous revisions in the git repo, so it doesn't
give too much to anyone who is looking on git log later. The lore link
to the patch is more than enough.
I remember that once I did it the usual way (changelog below the ---) David
requested the changelog to be part of the commit message. So obviously he
sees some benefit in doing so.
Do you have a link? What is the benefit and how can we use it?
Usually such request comes to ensure that commit message is updated with
extra information (explanation) existed in changelog which is missing in
the patch.
Thanks
quoted
quoted
44fa32f008ab ("net: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats")
Thanks
On Tue, Oct 13, 2020 at 05:39:51PM -0700, Jakub Kicinski wrote:
quoted
On Mon, 12 Oct 2020 10:00:11 +0200 Heiner Kallweit wrote:
quoted
In several places the same code is used to populate rtnl_link_stats64
fields with data from pcpu_sw_netstats. Therefore factor out this code
to a new function dev_fetch_sw_netstats().
v2:
- constify argument netstats
- don't ignore netstats being NULL or an ERRPTR
- switch to EXPORT_SYMBOL_GPL
Applied, thank you!
Jakub,
Is it possible to make sure that changelogs are not part of the commit
messages? We don't store previous revisions in the git repo, so it doesn't
give too much to anyone who is looking on git log later. The lore link
to the patch is more than enough.
I remember that once I did it the usual way (changelog below the ---) David
requested the changelog to be part of the commit message. So obviously he
sees some benefit in doing so.
44fa32f008ab ("net: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats")
Thanks