Re: kTLS broken somewhere between 4.18 and 5.0

2019-04-13 Thread Andre Tomt
On 13.04.2019 17:34, Steinar H. Gunderson wrote: Hi, I've been using kTLS for a while, with my video reflector Cubemap (https://git.sesse.net/?p=cubemap). After I upgraded my server from 4.18.11 to 5.0.6, seemingly I've started seeing corruption. The data sent with send() (HTTP headers, HLS play

Re: [PATCH net] ipv4: ensure rcu_read_lock() in ipv4_link_failure()

2019-04-13 Thread Stephen Suryaputra
Thank you. The one in cipso_v4_error needs the same fix (?) Add Nazarov Sergey. On Sat, Apr 13, 2019 at 05:32:21PM -0700, Eric Dumazet wrote: > fib_compute_spec_dst() needs to be called under rcu protection. > > syzbot reported : > > WARNING: suspicious RCU usage > 5.1.0-rc4+ #165 Not tainted >

[PATCH net] ipv4: ensure rcu_read_lock() in ipv4_link_failure()

2019-04-13 Thread Eric Dumazet
fib_compute_spec_dst() needs to be called under rcu protection. syzbot reported : WARNING: suspicious RCU usage 5.1.0-rc4+ #165 Not tainted include/linux/inetdevice.h:220 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks =

Re: [PATCH net] ipv4: recompile ip options in ipv4_link_failure

2019-04-13 Thread Eric Dumazet
On 04/12/2019 05:24 PM, David Miller wrote: > From: Stephen Suryaputra > Date: Fri, 12 Apr 2019 16:19:27 -0400 > >> Recompile IP options since IPCB may not be valid anymore when >> ipv4_link_failure is called from arp_error_report. >> >> Refer to the commit 3da1ed7ac398 ("net: avoid use IPCB i

Re: [PATCH v2 net-next 3/3] phy: warn if phylib and ethtool PHY mode definitions are out of sync

2019-04-13 Thread Andrew Lunn
On Sat, Apr 13, 2019 at 08:53:43PM +0200, Heiner Kallweit wrote: > If new PHY modes are added people may miss to update all relevant places > in the kernel. Therefore add a build bug check for new modes in enum > ethtool_link_mode_bit_indices that haven't been added to phylib yet. > > Suggested-by

Re: [PATCH v2 net-next 1/3] net: phy: shrink PHY settings array

2019-04-13 Thread Andrew Lunn
On Sat, Apr 13, 2019 at 08:48:55PM +0200, Heiner Kallweit wrote: > The definition of array settings[] is quite lengthy meanwhile. Add a > macro to shrink the definition. > > v2: > - Fix an indentation issue > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v2 net-next 2/3] net: phy: add support for new modes in phylib

2019-04-13 Thread Andrew Lunn
On Sat, Apr 13, 2019 at 08:50:24PM +0200, Heiner Kallweit wrote: > Recently new modes have been added to ethtool.h, but the related > extension to phylib hasn't been done yet. So add support for these > modes. > > v2: > - add missing 100Gbps and 50Gbps modes > > Signed-off-by: Heiner Kallweit R

[PATCH v2 net-next 1/3] net: phy: shrink PHY settings array

2019-04-13 Thread Heiner Kallweit
The definition of array settings[] is quite lengthy meanwhile. Add a macro to shrink the definition. v2: - Fix an indentation issue Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-core.c | 247 +++-- 1 file changed, 45 insertions(+), 202 deletions(-) diff

[PATCH v2 net-next 3/3] phy: warn if phylib and ethtool PHY mode definitions are out of sync

2019-04-13 Thread Heiner Kallweit
If new PHY modes are added people may miss to update all relevant places in the kernel. Therefore add a build bug check for new modes in enum ethtool_link_mode_bit_indices that haven't been added to phylib yet. Suggested-by: Andrew Lunn Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-cor

[PATCH v2 net-next 2/3] net: phy: add support for new modes in phylib

2019-04-13 Thread Heiner Kallweit
Recently new modes have been added to ethtool.h, but the related extension to phylib hasn't been done yet. So add support for these modes. v2: - add missing 100Gbps and 50Gbps modes Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-core.c | 18 ++ 1 file changed, 18 inserti

[PATCH v2 net-next 0/3] net: phy: shrink PHY settings array and add 200Gbps support

2019-04-13 Thread Heiner Kallweit
The definition of array settings[] is quite lengthy meanwhile. Add a macro to shrink the definition. When doing this I saw that the new 200Gbps modes and few 100Gbps/50Gbps modes aren't supported in phylib yet. So add this. To avoid ethtool and phylib mode definitions getting out of sync, add a b

Re: [PATCH netnext 02/16] net: aquantia: implement hwmon api for chip temperature

2019-04-13 Thread Andrew Lunn
On Sat, Apr 13, 2019 at 06:27:51PM +, Igor Russkikh wrote: > > >> + devm_hwmon_device_register_with_groups(&aq_nic->pdev->dev, > >> + ndev->name, > >> + dev_get_drvdata(&pdev->dev), > >> +

Re: [PATCH netnext 02/16] net: aquantia: implement hwmon api for chip temperature

2019-04-13 Thread Igor Russkikh
>> +devm_hwmon_device_register_with_groups(&aq_nic->pdev->dev, >> + ndev->name, >> + dev_get_drvdata(&pdev->dev), >> + aq_dev_groups); >> + > > You should be using dev

Re: [PATCH netnext 04/16] net: aquantia: link interrupt handling functions

2019-04-13 Thread Heiner Kallweit
On 13.04.2019 20:22, Igor Russkikh wrote: > > Hi Heiner, Andrew, > > >>> If you just schedule a task from the hard irq handler, why not using >>> a threaded interrupt? >> >> Yes, i was just about to say that. > > Thanks, will check that. > >>> And a further question because I worked on the Aqu

Re: [PATCH netnext 12/16] net: aquantia: wrap fw ops by mutex

2019-04-13 Thread Andrew Lunn
On Sat, Apr 13, 2019 at 12:32:11PM +, Igor Russkikh wrote: > From: Nikita Danilov > > Since fw ops may be invoked from different threads all its invocation > must be wrapped by mutex. Do all fw ops go through hw_atl_utils_fw_rpc_wait()? My experience with the mv88e6xxx driver is that you fo

Re: [PATCH netnext 04/16] net: aquantia: link interrupt handling functions

2019-04-13 Thread Igor Russkikh
Hi Heiner, Andrew, >> If you just schedule a task from the hard irq handler, why not using >> a threaded interrupt? > > Yes, i was just about to say that. Thanks, will check that. >> And a further question because I worked on the Aquantia PHY driver: >> I assume the integrated PHY's are ident

Re: [PATCH netnext 01/16] net: aquantia: add infrastructure to readout chip temperature

2019-04-13 Thread Igor Russkikh
Hi Andrew, > Is this a single chip MAC/PHY, or is there a discrete PHY? > > If this is not a single chip solution, maybe this should be called > get_phy_temp, so you can later add a get_mac_temp. Thats a single chip with integrated mac/phy. I however double checked it, and see phy and mac repor

Re: [PATCH netnext 01/16] net: aquantia: add infrastructure to readout chip temperature

2019-04-13 Thread Andrew Lunn
On Sat, Apr 13, 2019 at 07:51:05PM +0200, Andrew Lunn wrote: > On Sat, Apr 13, 2019 at 12:31:43PM +, Igor Russkikh wrote: > > From: Yana Esina > > > > Ability to read the chip temperature from memory > > via hwmon interface > > > + /* Convert PHY temperature from 1/256 degree Celsius > > +

Re: [PATCH netnext 04/16] net: aquantia: link interrupt handling functions

2019-04-13 Thread Andrew Lunn
> If you just schedule a task from the hard irq handler, why not using > a threaded interrupt? Yes, i was just about to say that. > And a further question because I worked on the Aquantia PHY driver: > I assume the integrated PHY's are identical or at least very similar > to the external ones lik

Re: [PATCH netnext 02/16] net: aquantia: implement hwmon api for chip temperature

2019-04-13 Thread Andrew Lunn
On Sat, Apr 13, 2019 at 12:31:45PM +, Igor Russkikh wrote: > From: Yana Esina > > Added support for hwmon api, through the use of the sensors utility > > +int aq_drvinfo_init(struct net_device *ndev) > +{ > + struct aq_nic_s *aq_nic = netdev_priv(ndev); > + struct pci_dev *pdev = aq_

Re: [PATCH netnext 01/16] net: aquantia: add infrastructure to readout chip temperature

2019-04-13 Thread Andrew Lunn
On Sat, Apr 13, 2019 at 12:31:43PM +, Igor Russkikh wrote: > From: Yana Esina > > Ability to read the chip temperature from memory > via hwmon interface > + /* Convert PHY temperature from 1/256 degree Celsius > + * to 1/1000 degree Celsius. > + */ > + *temp = temp_res * 1

Re: [PATCH net-next 0/2] net: phy: shrink PHY settings array and add 200Gbps support

2019-04-13 Thread Heiner Kallweit
On 13.04.2019 19:07, Andrew Lunn wrote: > On Sat, Apr 13, 2019 at 06:51:16PM +0200, Heiner Kallweit wrote: >> The definition of array settings[] is quite lengthy meanwhile. Add a >> macro to shrink the definition. >> >> When doing this I saw that the new 200Gbps modes aren't supported >> in phylib

Re: [PATCH net-next 1/2] net: phy: shrink PHY settings array

2019-04-13 Thread Heiner Kallweit
On 13.04.2019 19:14, Andrew Lunn wrote: >> +PHY_SETTING( 10, FULL, 10baseCR4_Full ), >> +PHY_SETTING( 10, FULL, 10baseKR4_Full ), >> +PHY_SETTING( 10, FULL, 10baseLR4_ER4_Full ), >> +PHY_SETTING( 10, FULL, 10baseSR4_Full

Re: [PATCH net-next 2/2] net: phy: add 200Gbps support to phylib

2019-04-13 Thread Andrew Lunn
On Sat, Apr 13, 2019 at 06:53:30PM +0200, Heiner Kallweit wrote: > Recently 200Gbps modes have been added to ethtool.h, but the related > extension to phylib hasn't been done yet. So add support for these > modes. > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next 1/2] net: phy: shrink PHY settings array

2019-04-13 Thread Andrew Lunn
> + PHY_SETTING( 10, FULL, 10baseCR4_Full ), > + PHY_SETTING( 10, FULL, 10baseKR4_Full ), > + PHY_SETTING( 10, FULL, 10baseLR4_ER4_Full ), > + PHY_SETTING( 10, FULL, 10baseSR4_Full ), > + PHY_SETTING( 56000, FU

Re: [PATCH net-next 0/2] net: phy: shrink PHY settings array and add 200Gbps support

2019-04-13 Thread Andrew Lunn
On Sat, Apr 13, 2019 at 06:51:16PM +0200, Heiner Kallweit wrote: > The definition of array settings[] is quite lengthy meanwhile. Add a > macro to shrink the definition. > > When doing this I saw that the new 200Gbps modes aren't supported > in phylib yet. So add this. I think we need to document

[PATCH net-next 2/2] net: phy: add 200Gbps support to phylib

2019-04-13 Thread Heiner Kallweit
Recently 200Gbps modes have been added to ethtool.h, but the related extension to phylib hasn't been done yet. So add support for these modes. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-core.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/phy/phy-core.c b/dr

[PATCH net-next 1/2] net: phy: shrink PHY settings array

2019-04-13 Thread Heiner Kallweit
The definition of array settings[] is quite lengthy meanwhile. Add a macro to shrink the definition. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-core.c | 247 +++-- 1 file changed, 45 insertions(+), 202 deletions(-) diff --git a/drivers/net/phy/phy-cor

[PATCH net-next 0/2] net: phy: shrink PHY settings array and add 200Gbps support

2019-04-13 Thread Heiner Kallweit
The definition of array settings[] is quite lengthy meanwhile. Add a macro to shrink the definition. When doing this I saw that the new 200Gbps modes aren't supported in phylib yet. So add this. I think we need to document somewhere which places in phylib need to be touched if a new speed / mode i

[patch net-next rfc 02/15] netdevsim: create devlink instance per netdevsim instance

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko Currently there is one devlink instance created per network namespace. That is quite odd considering the fact that devlink instance should represent an ASIC. The following patches are going to move the devlink instance even more down to a bus device, but until then, have one devl

[patch net-next rfc 08/15] netdevsim: add bus attributes to add new and delete devices

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko Add a way to add new netdevsim device on netdevsim bus and also to delete existing netdevsim device from the bus. Track the bus devices in using a list. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/bus.c | 97 ++- drivers/net/netdevsim/

[patch net-next rfc 05/15] netdevsim: move device registration and related code to bus.c

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko Move netdevsim device registration into bus.c and alongside with that the related sysfs attributes. Introduce new struct nsim_bus_dev to represent a netdevsim device on netdevsim bus. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/bus.c | 142 +-

[patch net-next rfc 06/15] netdevsim: add stub netdevsim driver implementation

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko In order to bus probing to work correctly, register a simple netdevsim driver implementation. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/bus.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/net/netdevsim/bus.c b/driv

[patch net-next rfc 11/15] netdevsim: generate random switch id instead of using dev id

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko Current implementation of parent_id/switch_id does not follow the original idea of being unique. The values are "0", "1", etc. Instead of that, generate 32 random bytes. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/dev.c | 3 +++ drivers/net/netdevsim/netdev.c

[patch net-next rfc 07/15] netdevsim: use ida for bus device ids

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko Instead of increments of u32 value, use ida to manage bus device ids. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/bus.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/netdevsim/bus.c b/drivers/net/netdevsim/bus.c index 5b

[patch net-next rfc 15/15] netdevsim: implement ndo_get_devlink_port

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko Implement ndo_get_devlink_port and allow switch_id and port_name to be handled by devlink. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/netdev.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c i

[patch net-next rfc 00/15] netdevsim: impement proper device model

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko Currently the model of netdevsim is a bit odd in multiple ways. 1) devlink instance is not in any way related with actual netdevsim netdevices. Instead, it is created per-namespace. 2) multi-port netdevsim device is done using "link" attribute. 3) netdevsim bus is there only t

[patch net-next rfc 01/15] netdevsim: move device registration on bus to be done earlier in init

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko As a dependency of the subsequent patch, mode device registration to be done earlier, directly in nsim_newlink(). Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/netdev.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drive

[patch net-next rfc 14/15] netdevsim: move netdev creation/destruction to dev probe

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko Remove the existing way to create netdevsim over rtnetlink and move the netdev creation/destruction to dev probe, so for every probed port, a netdevsim-netdev instance is created. Adjust selftests to work with new interface. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim

[patch net-next rfc 03/15] netdevsim: rename devlink.c to dev.c to contain per-dev(asic) items

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko The existing devlink.c code is going to be extended to represent asic device on a bus. As this is about more than just devlink, rename the file. Do appropriate prefix renaming alongside with that. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/Makefile | 2 +-

[patch net-next rfc 10/15] netdevsim: merge sdev into dev

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko As previously introduce dev which is mapped 1:1 to a bus device covers the purpose of the original shared device, merge the sdev code into dev. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/Makefile | 2 +- drivers/net/netdevsim/bpf.c | 79 +

[patch net-next rfc 12/15] netdevsim: change debugfs tree topology

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko With the model where dev is represented by devlink and ports are represented by devlink ports, make debugfs file names independent on netdev names. Change the topology to the one illustrated by the following example: $ ls /sys/kernel/debug/netdevsim/ netdevsim1 $ ls /sys/kernel/

[patch net-next rfc 04/15] netdevsim: put netdevsim bus code into separate file

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko As the code related to netdevsim bus is going to get bigger, move the existing code to a separate file. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/Makefile| 2 +- drivers/net/netdevsim/bus.c | 24 drivers/net/netdevsim/netdev.c|

[patch net-next rfc 13/15] netdevsim: implement dev probe/remove skeleton with port initialization

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko Implement netdevsim bus probing of netdevsim devices. For every probed device create a devlink instance. According to the user-passed value, create a number of ports represented by devlink port instances. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/bus.c | 29 ++

[patch net-next rfc 09/15] netdevsim: rename dev_init/exit() functions and make them independent on ns

2019-04-13 Thread Jiri Pirko
From: Jiri Pirko These functions are going to be called from bus probe/release(), therefore make them independent on ns struct and rename accordingly. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/dev.c | 31 --- drivers/net/netdevsim/netdev.c| 14 ++

kTLS broken somewhere between 4.18 and 5.0

2019-04-13 Thread Steinar H. Gunderson
Hi, I've been using kTLS for a while, with my video reflector Cubemap (https://git.sesse.net/?p=cubemap). After I upgraded my server from 4.18.11 to 5.0.6, seemingly I've started seeing corruption. The data sent with send() (HTTP headers, HLS playlists) appears to be fine, but sendfile() (actual v

Re: [PATCH netnext 04/16] net: aquantia: link interrupt handling functions

2019-04-13 Thread Heiner Kallweit
On 13.04.2019 14:31, Igor Russkikh wrote: > Define link interrupt handler and work task. > > Signed-off-by: Nikita Danilov > Signed-off-by: Igor Russkikh > --- > .../net/ethernet/aquantia/atlantic/aq_nic.c | 25 +++ > 1 file changed, 25 insertions(+) > > diff --git a/drivers/

[PATCH netnext 01/16] net: aquantia: add infrastructure to readout chip temperature

2019-04-13 Thread Igor Russkikh
From: Yana Esina Ability to read the chip temperature from memory via hwmon interface Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_hw.h| 2 ++ .../aquantia/atlantic/hw_atl/hw_atl_utils.c | 1 + .../atla

[PATCH netnext 07/16] net: aquantia: improve ifup link detection

2019-04-13 Thread Igor Russkikh
Original code detected link only after 1 sec is passed after up. Here we replace this with direct service callback which updates link status immediately Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH netnext 04/16] net: aquantia: link interrupt handling functions

2019-04-13 Thread Igor Russkikh
Define link interrupt handler and work task. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_nic.c | 25 +++ 1 file changed, 25 insertions(+) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ether

[PATCH netnext 08/16] net: aquantia: use macros for better visibility

2019-04-13 Thread Igor Russkikh
Improve for better readability Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 8 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --

[PATCH netnext 03/16] net: aquantia: add link interrupt fields

2019-04-13 Thread Igor Russkikh
Declare macroes and nic fields to support link interrupt handling Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 2 ++ drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) dif

[PATCH netnext 02/16] net: aquantia: implement hwmon api for chip temperature

2019-04-13 Thread Igor Russkikh
From: Yana Esina Added support for hwmon api, through the use of the sensors utility Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/Makefile | 1 + .../ethernet/aquantia/atlantic/aq_drvinfo.c | 77 +

[PATCH netnext 06/16] net: aquantia: link status irq handling

2019-04-13 Thread Igor Russkikh
Here we define and request an extra interrupt line, assign it on link isr handler and restructure abit aq_pci code to better support that. Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_nic.c | 29 --- .../ethernet/aquantia/atlantic/aq_pci_func.c | 24 +

[PATCH netnext 05/16] net: aquantia: create global service workqueue

2019-04-13 Thread Igor Russkikh
From: Nikita Danilov We need this to schedule link interrupt handling and various service tasks. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_main.c | 41 +++ .../net/ethernet/aquantia/atlantic/aq_main.h | 2 + .../eth

[PATCH netnext 16/16] net: aquantia: remove outdated device ids

2019-04-13 Thread Igor Russkikh
From: Nikita Danilov Some device ids were never released and does not exist. Cleanup these. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_common.h| 3 --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 6 -- d

[PATCH netnext 15/16] net: aquantia: fixups on 64bit dma counters

2019-04-13 Thread Igor Russkikh
From: Dmitry Bogdanov DMA counters are 64 bit and we can fetch that to reduce counter overflow, espesially on byte counters. Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov --- .../aquantia/atlantic/hw_atl/hw_atl_llh.c | 5 - .../aquantia/at

[PATCH netnext 14/16] net: aquantia: get total counters from DMA block

2019-04-13 Thread Igor Russkikh
From: Dmitry Bogdanov aq_nic_update_ndev_stats pushes statistics to ndev->stats from system interface. This is not always good because it counts packets/bytes before any of rx filters (including mac filter). Its better to report the packet/bytes statistics from DMA counters which gives actual va

[PATCH netnext 13/16] net: aquantia: fetch up to date statistics on ethtool request

2019-04-13 Thread Igor Russkikh
From: Dmitry Bogdanov This improves ethtool -S usage, where stats are now actual on each request. Before that stats only were updated at service timer period. Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov --- drivers/net/ethernet/aquantia/atlantic/aq_n

[PATCH netnext 09/16] net: aquantia: user correct MSI irq type

2019-04-13 Thread Igor Russkikh
Typo in msi code. No much impact though. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/et

[PATCH netnext 12/16] net: aquantia: wrap fw ops by mutex

2019-04-13 Thread Igor Russkikh
From: Nikita Danilov Since fw ops may be invoked from different threads all its invocation must be wrapped by mutex. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../ethernet/aquantia/atlantic/aq_ethtool.c | 22 +--- .../net/ethernet/aquantia/atlantic/aq_nic.c

[PATCH netnext 10/16] net: aquantia: introduce fwreq mutex

2019-04-13 Thread Igor Russkikh
From: Nikita Danilov Some of FW operations could be invoked simultaneously, from f.e. ethtool context and from service service activity work. Here we introduce a fw mutex to secure and serialize access to FW logic. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/eth

[PATCH netnext 11/16] net: aquantia: extract timer cb into work job

2019-04-13 Thread Igor Russkikh
Service timer callback fetches statistics from FW and that may cause a long delay in error cases. We also now need to use fw mutex to prevent concurrent access to FW, thus - extract that logic from timer callback into the job in the separate work queue. Signed-off-by: Nikita Danilov Signed-off-by

[PATCH netnext 00/16] net: atlantic: Aquantia driver updates 2019-04

2019-04-13 Thread Igor Russkikh
This patchset contains various improvements: - Work targeting link up speedups: link interrupt introduced, some other logic changes to imrove this. - FW operations securing with mutex - Counters and statistics logic improved by Dmitry - read out of chip temperature via hwmon interface implement

[PATCH] net: Fix missing meta data in skb with vlan packet

2019-04-13 Thread Yuya Kusakabe
skb_reorder_vlan_header() should move XDP meta data with ethernet header if XDP meta data exists. Signed-off-by: Yuya Kusakabe Signed-off-by: Takeru Hayasaka Co-developed-by: Takeru Hayasaka --- net/core/skbuff.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net

Re: [PATCH v3 bpf-next 04/19] bpf: refactor "check_reg_arg" to eliminate code redundancy

2019-04-13 Thread Jiong Wang
Alexei Starovoitov writes: > On Fri, Apr 12, 2019 at 10:59:37PM +0100, Jiong Wang wrote: >> There are a few "regs[regno]" here are there across "check_reg_arg", this >> patch factor it out into a simple "reg" pointer. The intention is to >> simplify code indentation and make the later patches in