On 06.11.2020 08:48, Heiner Kallweit wrote:
> On 06.11.2020 02:14, Jakub Kicinski wrote:
>> On Wed, 4 Nov 2020 15:25:24 +0100 Heiner Kallweit wrote:
>>> @@ -1066,7 +1054,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb,
>>> struct net_device *dev)
On 06.11.2020 02:14, Jakub Kicinski wrote:
> On Wed, 4 Nov 2020 15:25:24 +0100 Heiner Kallweit wrote:
>> @@ -1066,7 +1054,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb,
>> struct net_device *dev)
>> return NETDEV_TX_OK;
>>
>> drop:
>
le hw checksumming for short packets in general.
v2:
- remove the version checks and disable short packet hw csum in general
- reflect this in commit title and message
Fixes: 0439297be951 ("r8169: add support for RTL8125B")
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8
On 05.11.2020 15:20, David Laight wrote:
> From: Heiner Kallweit
>> Sent: 05 November 2020 13:58
>>
>> RTL8125B has same or similar short packet hw padding bug as RTL8168evl.
>> The main workaround has been extended accordingly, however we have to
>> disable also
.c to r8169_main.c")
Reported-by: Jakub Kicinski
Signed-off-by: Heiner Kallweit
---
The Fixes tag refers to the change from which on the patch applies.
However it will apply with a little fuzz only on versions up to 5.9.
---
drivers/net/ethernet/realtek/r8169_main.c | 3 ++-
1 file changed, 2
have to add them in one place only.
Fixes: 0439297be951 ("r8169: add support for RTL8125B")
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c
b/d
On 05.11.2020 02:45, Jakub Kicinski wrote:
> On Tue, 3 Nov 2020 18:52:18 +0100 Heiner Kallweit wrote:
>> Network problems with RTL8125B have been reported [0] and with help
>> from Realtek it turned out that this chip version has a hw problem
>> with short packets (similar t
On 05.11.2020 08:42, Qu Wenruo wrote:
>
>
> On 2020/11/5 下午3:01, Heiner Kallweit wrote:
>> On 05.11.2020 03:48, Qu Wenruo wrote:
>>> Hi,
>>>
>>> Not sure if this is a regression or not, but just find out that after
>>> upgrading to v5.9 kernel
On 05.11.2020 03:48, Qu Wenruo wrote:
> Hi,
>
> Not sure if this is a regression or not, but just find out that after
> upgrading to v5.9 kernel, one of my ethernet port on my ThinkPad T14 (ryzen
> version) becomes very slow.
>
> Only *2~3* Mbps.
>
> The laptop has two ethernet interfaces, one
After having migrated all users remove ip_tunnel_get_stats64().
Signed-off-by: Heiner Kallweit
---
include/net/ip_tunnels.h | 2 --
net/ipv4/ip_tunnel_core.c | 9 -
2 files changed, 11 deletions(-)
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h
index 02ccd3254
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
Replace ip_tunnel_get_stats64() with the new identical core fucntion
dev_get_tstats64().
Signed-off-by: Heiner Kallweit
---
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
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
Switch tun to the standard statistics pattern:
- use netdev->stats for the less frequently accessed counters
- use netdev->tstats for the frequently accessed per-cpu counters
Signed-off-by: Heiner Kallweit
---
drivers/net/tun.c | 127 +++---
Use netdev->tstats instead of a member of dsa_slave_priv for storing
a pointer to the per-cpu counters. This allows us to use core
functionality for statistics handling.
Reviewed-by: Florian Fainelli
Tested-by: Vladimir Oltean
Signed-off-by: Heiner Kallweit
---
net/dsa/dsa.c |
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
Replace ip_tunnel_get_stats64() with the new identical core fucntion
dev_get_tstats64().
Signed-off-by: Heiner Kallweit
---
drivers/net/gtp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index dc668ed28..4c04e271f 100644
--- a/drivers
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
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
---
ne
2:
- add patches for replacing ip_tunnel_get_stats64
Requested additional migrations will come in a separate series.
Heiner Kallweit (10):
net: core: add dev_get_tstats64 as a ndo_get_stats64 implementation
net: dsa: use net core stats64 handling
tun: switch to net core provided statistics
RTL8125A too, even
though they're not 100% sure yet which RTL8125 versions are affected.
[0] https://bugzilla.kernel.org/show_bug.cgi?id=209839
Fixes: 0439297be951 ("r8169: add support for RTL8125B")
Reported-by: Maxim Plotnikov
Tested-by: Maxim Plotnikov
Signed-off-by: Heiner Kallwei
On 02.11.2020 23:36, Saeed Mahameed wrote:
> On Sun, 2020-11-01 at 13:33 +0100, Heiner Kallweit wrote:
>> 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
0xF8: Func Preset State 0x0003
> 0xFC: Func Force Event 0x
>
>
> I also noticed this message when ran update-initramfs -k all -u when
> installed kernel 5.9.3.
> I had made a git clone from linux-firmware and copied this missed
&g
On 02.11.2020 13:41, Vladimir Oltean wrote:
> On Mon, Nov 02, 2020 at 09:01:00AM +0100, Heiner Kallweit wrote:
>> As mentioned by Eric it doesn't make sense to make the minimal hard irq
>> handlers used with NAPI a thread. This more contributes to the problem
>> than t
On 02.11.2020 14:20, Gilberto Nunes wrote:
> Hi
>
> ethtool using 5.4
>
ethtool doesn't know about the actual speed, because the downshift
occurs PHY-internally. Please test actual the speed.
Alternatively provide the output of ethtool -d , the RTL8169
chip family has an internal register refkect
On 02.11.2020 04:36, Gilberto Nunes wrote:
> Hi there
>
> I am in trouble when using newer kernels than 5.4.x regarding Realtek NIC
> r8169
>
> Kernel 5.9.2-050902-lowlatency (from
> https://kernel.ubuntu.com/~kernel-ppa/mainline/ and also compiled from
> kernel.org)
>
> Generic FE-GE Realtek P
On 02.11.2020 01:06, Vladimir Oltean wrote:
> On Sun, Nov 01, 2020 at 11:30:44PM +0100, Heiner Kallweit wrote:
>> We had to remove flag IRQF_NO_THREAD because it conflicts with shared
>> interrupts in case legacy interrupts are used. Following up on the
>> linked discussion
We had to remove flag IRQF_NO_THREAD because it conflicts with shared
interrupts in case legacy interrupts are used. Following up on the
linked discussion set IRQF_NO_THREAD if MSI or MSI-X is used, because
both guarantee that interrupt won't be shared.
Signed-off-by: Heiner Kallweit
Link:
Lowest number of tx descriptors used in the vendor drivers is 256 in
r8169. r8101/r8168/r8125 use 1024 what seems to be the hw limit. Stay
on the safe side and go with 256, same as number of rx descriptors.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169_main.c | 2 +-
1
I was wondering whether we have any policy on using EXPORT_SYMBOL or
EXPORT_SYMBOL_GPL for newly exported functions. I've seen both options
being used.
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
---
ne
Switch tun to the standard statistics pattern:
- use netdev->stats for the less frequently accessed counters
- use netdev->tstats for the frequently accessed per-cpu counters
Signed-off-by: Heiner Kallweit
---
drivers/net/tun.c | 127 +++---
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.
Signed-off-by: Heiner Kallweit
---
include/linux/net
Use netdev->tstats instead of a member of dsa_slave_priv for storing
a pointer to the per-cpu counters. This allows us to use core
functionality for statistics handling.
Signed-off-by: Heiner Kallweit
---
net/dsa/dsa.c | 7 +--
net/dsa/dsa_priv.h | 2 --
net/dsa/slave.c|
ip_tunnel_get_stats64() now is a duplicate of dev_get_tstats64().
Make it an alias so that we don't have to change all users of
ip_tunnel_get_stats64().
Signed-off-by: Heiner Kallweit
---
include/net/ip_tunnels.h | 4 ++--
net/ipv4/ip_tunnel_core.c | 9 -
2 files changed, 2 inser
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. Subsequently switch more drivers
to use this pattern.
On 31.10.2020 00:36, Andrew Lunn wrote:
>>> - Every PHY driver gains a .handle_interrupt() implementation that, for
>>> the most part, would look like below:
>>>
>>> irq_status = phy_read(phydev, INTR_STATUS);
>>> if (irq_status < 0) {
>>> phy_error(phydev);
>>> re
On 30.10.2020 23:06, Vladimir Oltean wrote:
> On Fri, Oct 30, 2020 at 10:56:24PM +0100, Heiner Kallweit wrote:
>> I'd just like to avoid the term "shared interrupt", because it has
>> a well-defined meaning. Our major concern isn't shared interrupts
>> b
-
> drivers/net/phy/davicom.c| 59 ++
> drivers/net/phy/mscc/mscc_main.c | 70 +
> drivers/net/phy/phy.c| 6 +-
> drivers/net/phy/phy_device.c | 23 +-
> drivers/net/phy/realtek.c| 128 +++
>
s/net/phy/mscc/mscc_main.c | 70 +
> drivers/net/phy/phy.c| 6 +-
> drivers/net/phy/phy_device.c | 23 +-
> drivers/net/phy/realtek.c| 128 +++
> include/linux/phy.h | 3 +
> 16 files changed, 4
We can safely runtime-suspend the chip if rtl_open() fails. Therefore
switch the error path to use pm_runtime_put_sync() as well.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169_main.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net
rtl_tx().
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c
b/drivers/net/ethernet/realtek/r8169_main.c
index b6c11aaa5..75df476c6 100644
--- a/drivers/net
Switch to the net core rx/tx byte/packet counter infrastructure.
This simplifies the code, only small drawback is some memory overhead
because we use just one queue, but allocate the counters per cpu.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169_main.c | 11
After switching to the net core rx/tx byte/packet counters we can
remove the now unused private version.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169_main.c | 34 ---
1 file changed, 34 deletions(-)
diff --git a/drivers/net/ethernet/realtek
Add dev_sw_netstats_tx_add(), complementing already existing
dev_sw_netstats_rx_add(). Other than dev_sw_netstats_rx_add allow to
pass the number of packets as function argument.
Signed-off-by: Heiner Kallweit
---
include/linux/netdevice.h | 12
1 file changed, 12 insertions
We have netdev_alloc_pcpu_stats(), and we have devm_alloc_percpu().
Add a managed version of netdev_alloc_pcpu_stats, e.g. for allocating
the per-cpu stats in the probe() callback of a driver. It needs to be
a macro for dealing properly with the type argument.
Signed-off-by: Heiner Kallweit
This series adds missing functionality to the net core handling of
byte/packet counters and statistics. The extensions are then used
to remove private rx/tx byte/packet counters in r8169 driver.
Heiner Kallweit (4):
net: core: add dev_sw_netstats_tx_add
net: core: add
On 29.10.2020 14:37, Andrew Lunn wrote:
> On Thu, Oct 29, 2020 at 08:07:57PM +0800, Willy Liu wrote:
>> Realtek single-port 2.5Gbps Ethernet PHY ids as below:
>> RTL8226-CG: 0x001cc800(ES)/0x001cc838(MP)
>> RTL8226B-CG/RTL8221B-CG: 0x001cc840(ES)/0x001cc848(MP)
>> ES: engineer sample
>> MP: mass pr
On 29.10.2020 10:42, Thomas Gleixner wrote:
> On Thu, Oct 29 2020 at 09:42, Heiner Kallweit wrote:
>> On 29.10.2020 00:29, Jakub Kicinski wrote:
>>> Other handles may take spin_locks, which will sleep on RT.
>>>
>>> I guess we may need to switch away from the _i
yshev
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c
b/drivers/net/ethernet/realtek/r8169_main.c
index 3b6ddc706..00f13805c 100644
--- a/drivers/
On 29.10.2020 00:29, Jakub Kicinski wrote:
> On Wed, 28 Oct 2020 13:17:58 +0100 Heiner Kallweit wrote:
>> On 28.10.2020 12:43, Serge Belyshev wrote:
>>>> For several network drivers it was reported that using
>>>> __napi_schedule_irqoff() is unsafe with forced th
napi_schedule_irqoff")
>> Link: https://lkml.org/lkml/2020/10/18/19
>> Signed-off-by: Heiner Kallweit
>> ---
>> drivers/net/ethernet/realtek/r8169_main.c | 8
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/
napi_schedule_irqoff")
>> Link: https://lkml.org/lkml/2020/10/18/19
>> Signed-off-by: Heiner Kallweit
>> ---
>> drivers/net/ethernet/realtek/r8169_main.c | 8
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/
On 18.10.2020 19:19, Jakub Kicinski wrote:
> On Sun, 18 Oct 2020 10:20:41 +0200 Heiner Kallweit wrote:
>>>> Otherwise a non-solution could be to make IRQ_FORCED_THREADING
>>>> configurable.
>>>
>>> I have to say I do not understand why we want to defe
hard irq handlers in drivers using NAPI
a thread. Therefore ensure that the hard irq handler is never
thread-ified.
Fixes: 9a899a35b0d6 ("r8169: switch to napi_schedule_irqoff")
Link: https://lkml.org/lkml/2020/10/18/19
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r
On 18.10.2020 15:48, Vladimir Oltean wrote:
> On Sun, Oct 18, 2020 at 03:09:32PM +0200, Heiner Kallweit wrote:
>> On 18.10.2020 14:16, Vladimir Oltean wrote:
>>> On Sun, Oct 18, 2020 at 02:02:46PM +0200, Heiner Kallweit wrote:
>>>> Wouldn't a simple unsigned lo
On 18.10.2020 14:16, Vladimir Oltean wrote:
> On Sun, Oct 18, 2020 at 02:02:46PM +0200, Heiner Kallweit wrote:
>> Wouldn't a simple unsigned long (like in struct net_device_stats) be
>> sufficient here? This would make handling the counter much simpler.
>> And as far as
On 17.10.2020 23:35, Vladimir Oltean wrote:
> DSA needs to push a header onto every packet on TX, and this might cause
> reallocation under certain scenarios, which might affect, for example,
> performance.
>
> But reallocated packets are not standardized in struct pcpu_sw_netstats,
> struct net_d
On 18.10.2020 11:55, Thomas Gleixner wrote:
> Jakub,
>
> On Sat, Oct 17 2020 at 16:29, Jakub Kicinski wrote:
>> On Sat, 17 Oct 2020 15:45:57 +0200 Heiner Kallweit wrote:
>>> It turned out that this most of the time isn't safe in certain
>>> configurati
On 18.10.2020 10:02, Eric Dumazet wrote:
> On Sun, Oct 18, 2020 at 1:29 AM Jakub Kicinski wrote:
>>
>> On Sat, 17 Oct 2020 15:45:57 +0200 Heiner Kallweit wrote:
>>> When __napi_schedule_irqoff was added with bc9ad166e38a
>>> ("net: introduce napi_schedul
When __napi_schedule_irqoff was added with bc9ad166e38a
("net: introduce napi_schedule_irqoff()") the commit message stated:
"Many NIC drivers can use it from their hard IRQ handler instead of
generic variant."
It turned out that this most of the time isn't safe in certain
configurations:
- if CONF
On 16.10.2020 19:11, Mike Galbraith wrote:
> On Fri, 2020-10-16 at 17:26 +0300, Vladimir Oltean wrote:
>> On Fri, Oct 16, 2020 at 01:34:55PM +0200, Heiner Kallweit wrote:
>>> I'm aware of the topic, but missing the benefits of the irqoff version
>>> uncondition
On 16.10.2020 16:26, Vladimir Oltean wrote:
> On Fri, Oct 16, 2020 at 01:34:55PM +0200, Heiner Kallweit wrote:
>> I'm aware of the topic, but missing the benefits of the irqoff version
>> unconditionally doesn't seem to be the best option.
>
> What are the benefit
On 16.10.2020 13:26, Mike Galbraith wrote:
>
> When the kernel is built with PREEMPT_RT or booted with threadirqs,
> irqs are not disabled when rtl8169_interrupt() is called, inspiring
> __raise_softirq_irqoff() to gripe. Use plain napi_schedule().
>
I'm aware of the topic, but missing the bene
Add dev_sw_netstats_tx_add(), complementing already existing
dev_sw_netstats_rx_add(). Other than dev_sw_netstats_rx_add allow to
pass the number of packets as function argument.
Signed-off-by: Heiner Kallweit
---
include/linux/netdevice.h | 12
1 file changed, 12 insertions
Add a managed version of netdev_alloc_pcpu_stats, e.g. for allocating
the per-cpu stats in the probe() callback of a driver. It needs to be
a macro for dealing properly with the type argument.
Signed-off-by: Heiner Kallweit
---
include/linux/netdevice.h | 15 +++
net/devres.c
Switch to the net core rx/tx byte/packet counter infrastructure.
This simplifies the code, only small drawback is some memory overhead
because we use just one queue, but allocate the counters per cpu.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169_main.c | 11
After switching to the net core rx/tx byte/packet counters we can
remove the now unused private version.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169_main.c | 34 ---
1 file changed, 34 deletions(-)
diff --git a/drivers/net/ethernet/realtek
This series adds missing functionality to the net core handling of
byte/packet counters and statistics. The extensions are used then
to remove private rx/tx byte/packet counters in r8169 driver.
Heiner Kallweit (4):
net: core: add dev_sw_netstats_tx_add
net: core: add
On 14.10.2020 07:42, Leon Romanovsky wrote:
> 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:
>>> In several places the same code is used to populate rtnl_link_stats64
>>> fields with data from
On 14.10.2020 09:53, Leon Romanovsky wrote:
> On Wed, Oct 14, 2020 at 08:13:47AM +0200, Heiner Kallweit wrote:
>> On 14.10.2020 07:42, Leon Romanovsky wrote:
>>> On Tue, Oct 13, 2020 at 05:39:51PM -0700, Jakub Kicinski wrote:
>>>> On Mon, 12 Oct 2020 10:00:11 +0200 H
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
net/openvswitch/vport-internal_dev.c | 20 +---
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/net/openvswitch/vport-internal_dev.c
b/net/openvswitch/vport
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
Tested-by: Vladimir Oltean
Reviewed-by: Florian Fainelli
---
net/dsa/slave.c | 21 +
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
Acked-by: Bjørn Mork
---
drivers/net/usb/qmi_wwan.c | 24 +---
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
net/mac80211/iface.c | 23 +--
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 240862a74..1be775979 100644
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
net/ipv4/ip_tunnel_core.c | 23 +--
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index b2ea1a8c5
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
drivers/infiniband/hw/hfi1/ipoib_main.c | 34 +
1 file changed, 1 insertion(+), 33 deletions(-)
diff --git a/drivers/infiniband/hw/hfi1/ipoib_main.c
b/drivers/infiniband
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
drivers/net/macsec.c | 22 +-
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 2b0c8f01d..11ca5fa90 100644
--- a
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
Acked-by: Kalle Valo
---
drivers/net/wireless/quantenna/qtnfmac/core.c | 23 +--
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/drivers/net/wireless/quantenna/qtnfmac
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
net/bridge/br_device.c | 21 +
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 9a2fb4aa1..6f742fee8 100644
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
net/xfrm/xfrm_interface.c | 22 +-
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c
index 5b120936d
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
drivers/net/usb/usbnet.c | 24 +---
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 963d260d1
L_GPL
Signed-off-by: Heiner Kallweit
---
include/linux/netdevice.h | 2 ++
net/core/dev.c| 34 ++
2 files changed, 36 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index a0df43b13..fa1d8d624 100644
--- a/include/
L_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 fun
On 12.10.2020 00:10, Jakub Kicinski wrote:
> On Sun, 11 Oct 2020 21:34:58 +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
On 12.10.2020 00:13, Jakub Kicinski wrote:
> On Tue, 6 Oct 2020 22:10:00 +0200 Heiner Kallweit wrote:
>> In all cases I've seen eth_type_trans() is used as in the new helper.
>> Biggest benefit is improved readability when replacing statements like
>> the followi
On 11.10.2020 21:54, Stephen Hemminger wrote:
> On Sun, 11 Oct 2020 21:36:43 +0200
> Heiner Kallweit wrote:
>
>> +void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s,
>> + struct pcpu_sw_netstats __percpu *netstats)
>
> netstats is unm
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
drivers/net/macsec.c | 25 +
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 2b0c8f01d..e74483279 100644
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
net/mac80211/iface.c | 23 +--
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 240862a74..1be775979 100644
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
drivers/net/wireless/quantenna/qtnfmac/core.c | 27 +--
1 file changed, 1 insertion(+), 26 deletions(-)
diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c
b/drivers/net
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
drivers/net/usb/usbnet.c | 24 +---
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 963d260d1
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
drivers/infiniband/hw/hfi1/ipoib_main.c | 34 +
1 file changed, 1 insertion(+), 33 deletions(-)
diff --git a/drivers/infiniband/hw/hfi1/ipoib_main.c
b/drivers/infiniband
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
net/ipv4/ip_tunnel_core.c | 23 +--
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index b2ea1a8c5
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
net/openvswitch/vport-internal_dev.c | 20 +---
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/net/openvswitch/vport-internal_dev.c
b/net/openvswitch/vport
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
net/dsa/slave.c | 21 +
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index e7c1d62fd..3bc5ca40c 100644
--- a/net/dsa/slave.c
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
net/bridge/br_device.c | 21 +
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 9a2fb4aa1..6f742fee8 100644
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
drivers/net/usb/qmi_wwan.c | 24 +---
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 5ca1356b8
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
---
net/xfrm/xfrm_interface.c | 22 +-
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c
index 5b120936d
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().
Signed-off-by: Heiner Kallweit
---
include/linux/netdevice.h | 2 ++
net/core/dev.c| 36
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().
Heiner Kallweit (12):
net: core: add function dev_fetch_sw_netstats for fetching
pcpu_sw_netstats
IB/hfi1
301 - 400 of 1978 matches
Mail list logo