Re: [PATCH net-next v2 1/2] net: stmmac: Rework coalesce timer and fix multi-queue races

2018-09-18 Thread Tal Gilboa
On 9/10/2018 10:22 PM, Florian Fainelli wrote: On 09/10/2018 02:14 AM, Jose Abreu wrote: This follows David Miller advice and tries to fix coalesce timer in multi-queue scenarios. We are now using per-queue coalesce values and per-queue TX timer. Coalesce timer default values was changed to 1m

Re: [PATCH v2 net] net: aquantia: memory corruption on jumbo frames

2018-09-18 Thread Igor Russkikh
>> Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code") >> >> Reported-by: Friedemann Gerold >> Reported-by: Michael Rauch >> Signed-off-by: Friedemann Gerold >> Tested-by: Nikita Danilov >> Signed-off-by: Igor Russkikh > > APplied and queued up for -stable. Hi David, I s

pegged softirq and NAPI race (?)

2018-09-18 Thread Song Liu
We are debugging this issue that netconsole message triggers pegged softirq (ksoftirqd taking 100% CPU for many seconds). We found this issue in production with both bnxt and ixgbe, on a 4.11 based kernel. This is easily reproducible with ixgbe on 4.11, and latest net/net-next (see [1] for more det

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-18 Thread Wang, Dongsheng
On 2018/9/18 0:54, Florian Fainelli wrote: > On 09/17/2018 09:47 AM, Wang, Dongsheng wrote: >> On 9/17/2018 10:50 PM, Andrew Lunn wrote: >>> On Mon, Sep 17, 2018 at 04:53:29PM +0800, Wang Dongsheng wrote: This property copy from "ibm,emac.txt" to describe a shared MIDO bus. Since emac inc

[PATCH iproute2] iplink: fix incorrect any address handling for ip tunnels

2018-09-18 Thread Hangbin Liu
After commit d42c7891d26e4 ("utils: Do not reset family for default, any, all addresses"), when call get_addr() for any/all addresses, we will set addr->flags to ADDRTYPE_INET_UNSPEC if family is AF_INET/AF_INET6, which makes is_addrtype_inet() checking passed and assigns incorrect address to kerne

[PATCH bpf-next 2/2] xsk: fix bug when trying to use both copy and zero-copy on one queue id

2018-09-18 Thread Magnus Karlsson
Previously, the xsk code did not record which umem was bound to a specific queue id. This was not required if all drivers were zero-copy enabled as this had to be recorded in the driver anyway. So if a user tried to bind two umems to the same queue, the driver would say no. But if copy-mode was fir

[PATCH bpf-next 0/2] xsk: fix bug when trying to use both copy and zero-copy mode

2018-09-18 Thread Magnus Karlsson
Previously, the xsk code did not record which umem was bound to a specific queue id. This was not required if all drivers were zero-copy enabled as this had to be recorded in the driver anyway. So if a user tried to bind two umems to the same queue, the driver would say no. But if copy-mode was fir

[PATCH bpf-next 1/2] net: add umem reference in netdev{_rx}_queue

2018-09-18 Thread Magnus Karlsson
These references to the umem will be used to store information on what kind of AF_XDP umem that is bound to a queue id, if any. Signed-off-by: Magnus Karlsson --- include/linux/netdevice.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevi

Re: [PATCH v3 net-next 07/12] net: ethernet: Add helper to remove a supported link mode

2018-09-18 Thread Simon Horman
On Mon, Sep 17, 2018 at 05:38:11PM +0200, Andrew Lunn wrote: > On Mon, Sep 17, 2018 at 05:13:07PM +0200, Simon Horman wrote: > > On Wed, Sep 12, 2018 at 01:53:14AM +0200, Andrew Lunn wrote: > > > Some MAC hardware cannot support a subset of link modes. e.g. often > > > 1Gbps Full duplex is supporte

Re: [PATCH net-next RFC 7/8] udp: gro behind static key

2018-09-18 Thread Steffen Klassert
On Mon, Sep 17, 2018 at 10:19:22AM -0400, Willem de Bruijn wrote: > On Mon, Sep 17, 2018 at 6:37 AM Steffen Klassert > wrote: > > > > Maybe in case that forwarding is enabled on the receiving device, > > inet_gro_receive() could do a route lookup and allow GRO if the > > route lookup returned at f

OK

2018-09-18 Thread Ahmed Zama
Good Day, I am in need of a reliable and trust worthy person to work with me in receiving huge sum of money into his or her account. I will give you the full details immediately you respond to this email. Ahmed Zama +22675844869

[PATCH net-next] cxgb4vf: Add ethtool private flags for changing force_link_up

2018-09-18 Thread Arjun Vynipadath
Forcing link up of virtual interfaces even when physical link is down causes packet drops and ping failures during bonding failover. Hence adding a ethtool private flag to toggle force_link_up whenever required. Signed-off-by: Arjun Vynipadath Signed-off-by: Casey Leedom Signed-off-by: Ganesh Go

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-18 Thread Andrew Lunn
> > If you want to describe the MDIO controller, then you embed a mdio > > subnode into your Ethernet MAC node: > > > > emac0: ethernet@feb2 { > > mdio { > > #address-cells = <1>; > > #size-cells = <0>; > > > > phy0: ethernet-phy@0 { > >

Re: [PATCH v3 net-next 07/12] net: ethernet: Add helper to remove a supported link mode

2018-09-18 Thread Andrew Lunn
> Hi Andrew, Hi Simon Thanks for the dumps > 1. net-next: cf7d97e1e54d ("net: mdio: remove duplicated include from > mdio_bus.c") > > basic status: no link > capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD > 10baseT-FD 10baseT-HD > advertising: 100baseTx-FD 100baseTx

[RFC 1/5] netlink: remove NLA_NESTED_COMPAT

2018-09-18 Thread Johannes Berg
From: Johannes Berg This isn't used anywhere, so we might as well get rid of it. Signed-off-by: Johannes Berg --- include/net/netlink.h | 2 -- lib/nlattr.c | 11 --- 2 files changed, 13 deletions(-) diff --git a/include/net/netlink.h b/include/net/netlink.h index 318b1ded38

[RFC 3/5] netlink: combine validate/parse functions

2018-09-18 Thread Johannes Berg
From: Johannes Berg The parse function of course contains validate, but it's implemented a second time, sharing just the validation of a single attribute. Introduce nla_validate_parse() that can be used for both parsing/validation and only validation, to share code. Signed-off-by: Johannes Berg

[RFC 2/5] netlink: set extack error message in nla_validate()

2018-09-18 Thread Johannes Berg
From: Johannes Berg In nla_parse() we already set this, but it makes sense to also do it in nla_validate() which already also sets the bad attribute pointer. CC: David Ahern Signed-off-by: Johannes Berg --- lib/nlattr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/

[RFC 5/5] netlink: allow NLA_NESTED to specify nested policy to validate

2018-09-18 Thread Johannes Berg
From: Johannes Berg Now that we have a validation_data pointer, and the len field in the policy is unused for NLA_NESTED, we can allow using them both to have nested validation. This can be nice in code, although we still have to use nla_parse_nested() or similar which would also take a policy; h

[RFC 4/5] netlink: prepare validate extack setting for recursion

2018-09-18 Thread Johannes Berg
From: Johannes Berg In one of my previous patches in this area I introduced code to pass out just the error message to store in the extack, for use in NLA_REJECT. Change this code now to set both the error message and the bad attribute pointer, and carry around a boolean indicating that the valu

Re: [PATCH net-next v3 1/2] netlink: ipv4 igmp join notifications

2018-09-18 Thread Patrick Ruddy
On Thu, 2018-09-13 at 10:03 -0700, Roopa Prabhu wrote: > On Thu, Sep 6, 2018 at 8:40 PM, Roopa Prabhu > wrote: > > On Thu, Sep 6, 2018 at 2:10 AM, Patrick Ruddy > > wrote: > > > Some userspace applications need to know about IGMP joins from the > > > kernel for 2 reasons: > > > 1. To allow the p

Re: [PATCH]ipv6: multicast: In mld_send_cr function moving read lock to second for loop

2018-09-18 Thread Guruswamy Basavaiah
> This will lead to deadlocks, idev->mc_lock must be taken with _bh(). Modified the existing spin_lock to spin_lock_bh > I have zero confidence in this change, did you do any stress testing > with lockdep enabled? It would have caught this quickly. With LOCKDEP enabled ran LTP multicast stress

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Eric Dumazet
On Tue, Sep 18, 2018 at 1:41 AM Song Liu wrote: > > We are debugging this issue that netconsole message triggers pegged softirq > (ksoftirqd taking 100% CPU for many seconds). We found this issue in > production with both bnxt and ixgbe, on a 4.11 based kernel. This is easily > reproducible with i

Re: [PATCH][net-next] netlink: avoid to allocate full skb when sending to many devices

2018-09-18 Thread Eric Dumazet
On 09/17/2018 10:26 PM, Li RongQing wrote: > if skb->head is vmalloc address, when this skb is delivered, full > allocation for this skb is required, if there are many devices, > the full allocation will be called for every devices > > now using the first time allocated skb when iterate other d

RE: [Intel-wired-lan] [PATCH net-next v2 02/14] iavf: diet and reformat

2018-09-18 Thread Bowers, AndrewX
> -Original Message- > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Jesse Brandeburg > Sent: Friday, September 14, 2018 5:38 PM > To: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org > Subject: [Intel-wired-lan] [PATCH net-next v2 02/14] iavf: die

Re: [PATCH bpf-next v2] tools/bpf: bpftool: improve output format for bpftool net

2018-09-18 Thread Daniel Borkmann
On 09/18/2018 01:13 AM, Yonghong Song wrote: > This is a followup patch for Commit f6f3bac08ff9 > ("tools/bpf: bpftool: add net support"). > Some improvements are made for the bpftool net output. > Specially, plain output is more concise such that > per attachment should nicely fit in one line. > C

[PATCH net] sfp: fix oops with ethtool -m

2018-09-18 Thread Russell King
If a network interface is created prior to the SFP socket being available, ethtool can request module information. This unfortunately leads to an oops: Unable to handle kernel NULL pointer dereference at virtual address 0008 pgd = (ptrval) [0008] *pgd=7c400831, *pte=, *ppte=00

Re: [PATCH bpf-next] samples/bpf: fix a compilation failure

2018-09-18 Thread Daniel Borkmann
On 09/18/2018 07:08 AM, Yonghong Song wrote: > samples/bpf build failed with the following errors: > > $ make samples/bpf/ > ... > HOSTCC samples/bpf/sockex3_user.o > /data/users/yhs/work/net-next/samples/bpf/sockex3_user.c:16:8: error: > redefinition of ‘struct bpf_flow_keys’ >struc

[bpf PATCH v4 0/3] bpf, sockmap ESTABLISHED state only

2018-09-18 Thread John Fastabend
Eric noted that using the close callback is not sufficient to catch all transitions from ESTABLISHED state to a LISTEN state. So this series does two things. First, only allow adding socks in ESTABLISH state and second use unhash callback to catch tcp_disconnect() transitions. v2: added check for

[bpf PATCH v4 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-18 Thread John Fastabend
It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE state via tcp_disconnect() without actually calling tcp_close which would then call our bpf_tcp_close() callback. Because of this a user could disconnect a socket then put it in a LISTEN state which would break our assumptions abo

[bpf PATCH v4 1/3] bpf: sockmap only allow ESTABLISHED sock state

2018-09-18 Thread John Fastabend
After this patch we only allow socks that are in ESTABLISHED state or are being added via a sock_ops event that is transitioning into an ESTABLISHED state. By allowing sock_ops events we allow users to manage sockmaps directly from sock ops programs. The two supported sock_ops ops are BPF_SOCK_OPS_

[bpf PATCH v4 3/3] bpf: test_maps, only support ESTABLISHED socks

2018-09-18 Thread John Fastabend
Ensure that sockets added to a sock{map|hash} that is not in the ESTABLISHED state is rejected. Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend Acked-by: Yonghong Song --- tools/testing/selftests/bpf/test_maps.c | 10 +++--- 1 file

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Song Liu
> On Sep 18, 2018, at 6:45 AM, Eric Dumazet wrote: > > On Tue, Sep 18, 2018 at 1:41 AM Song Liu wrote: >> >> We are debugging this issue that netconsole message triggers pegged softirq >> (ksoftirqd taking 100% CPU for many seconds). We found this issue in >> production with both bnxt and ix

[PATCH net-next v5 13/20] zinc: BLAKE2s x86_64 implementation

2018-09-18 Thread Jason A. Donenfeld
These implementations from Samuel Neves support AVX and AVX-512VL. Originally this used AVX-512F, but Skylake thermal throttling made AVX-512VL more attractive and possible to do with negligable difference. Signed-off-by: Jason A. Donenfeld Signed-off-by: Samuel Neves Cc: Andy Lutomirski Cc: Gr

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Rik van Riel
On Tue, 2018-09-18 at 12:19 -0400, Song Liu wrote: > > On Sep 18, 2018, at 6:45 AM, Eric Dumazet > > wrote: > > > > On Tue, Sep 18, 2018 at 1:41 AM Song Liu > > wrote: > > > > > > We are debugging this issue that netconsole message triggers > > > pegged softirq > > > (ksoftirqd taking 100% CPU

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Eric Dumazet
On Tue, Sep 18, 2018 at 9:19 AM Song Liu wrote: > > > > > On Sep 18, 2018, at 6:45 AM, Eric Dumazet wrote: > > > > On Tue, Sep 18, 2018 at 1:41 AM Song Liu wrote: > >> > >> We are debugging this issue that netconsole message triggers pegged softirq > >> (ksoftirqd taking 100% CPU for many second

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Song Liu
> On Sep 18, 2018, at 9:33 AM, Eric Dumazet wrote: > > On Tue, Sep 18, 2018 at 9:19 AM Song Liu wrote: >> >> >> >>> On Sep 18, 2018, at 6:45 AM, Eric Dumazet wrote: >>> >>> On Tue, Sep 18, 2018 at 1:41 AM Song Liu wrote: We are debugging this issue that netconsole message tri

[PATCH bpf] tools: bpf: fix license for a compat header file

2018-09-18 Thread Jakub Kicinski
libc_compat.h is used by libbpf so make sure it's licensed under LGPL or BSD license. The license change should be OK, I'm the only author of the file. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/include/tools/libc_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 dele

Re: [RFC 2/5] netlink: set extack error message in nla_validate()

2018-09-18 Thread David Ahern
On 9/18/18 6:12 AM, Johannes Berg wrote: > diff --git a/lib/nlattr.c b/lib/nlattr.c > index 120ad569e13d..efbd6c1aff29 100644 > --- a/lib/nlattr.c > +++ b/lib/nlattr.c > @@ -181,9 +181,13 @@ int nla_validate(const struct nlattr *head, int len, int > maxtype, > int rem; > > nla_for_ea

Re: [RFC 1/5] netlink: remove NLA_NESTED_COMPAT

2018-09-18 Thread David Ahern
On 9/18/18 6:12 AM, Johannes Berg wrote: > From: Johannes Berg > > This isn't used anywhere, so we might as well get rid of it. > > Signed-off-by: Johannes Berg > --- > include/net/netlink.h | 2 -- > lib/nlattr.c | 11 --- > 2 files changed, 13 deletions(-) > Reviewed-by:

Re: [PATCH bpf-next 2/2] xsk: fix bug when trying to use both copy and zero-copy on one queue id

2018-09-18 Thread Y Song
On Tue, Sep 18, 2018 at 3:13 AM Magnus Karlsson wrote: > > Previously, the xsk code did not record which umem was bound to a > specific queue id. This was not required if all drivers were zero-copy > enabled as this had to be recorded in the driver anyway. So if a user > tried to bind two umems to

Re: [PATCH bpf] tools: bpf: fix license for a compat header file

2018-09-18 Thread Y Song
On Tue, Sep 18, 2018 at 10:15 AM Jakub Kicinski wrote: > > libc_compat.h is used by libbpf so make sure it's licensed under > LGPL or BSD license. The license change should be OK, I'm the only > author of the file. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Quentin Monnet Acked-by: Yongh

Re: [RFC 2/5] netlink: set extack error message in nla_validate()

2018-09-18 Thread Johannes Berg
On Tue, 2018-09-18 at 10:18 -0700, David Ahern wrote: > On 9/18/18 6:12 AM, Johannes Berg wrote: > > diff --git a/lib/nlattr.c b/lib/nlattr.c > > index 120ad569e13d..efbd6c1aff29 100644 > > --- a/lib/nlattr.c > > +++ b/lib/nlattr.c > > @@ -181,9 +181,13 @@ int nla_validate(const struct nlattr *head

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Alexei Starovoitov
On 9/18/18 6:45 AM, Eric Dumazet wrote: > On Tue, Sep 18, 2018 at 1:41 AM Song Liu wrote: >> >> We are debugging this issue that netconsole message triggers pegged softirq >> (ksoftirqd taking 100% CPU for many seconds). We found this issue in >> production with both bnxt and ixgbe, on a 4.11 base

Re: [bpf-next, v4 1/5] flow_dissector: implements flow dissector BPF hook

2018-09-18 Thread Eric Dumazet
On 09/14/2018 07:46 AM, Petar Penkov wrote: > From: Petar Penkov > > Adds a hook for programs of type BPF_PROG_TYPE_FLOW_DISSECTOR and > attach type BPF_FLOW_DISSECTOR that is executed in the flow dissector > path. The BPF program is per-network namespace ... > > + rcu_read_lock(); > +

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Eric Dumazet
On Tue, Sep 18, 2018 at 10:51 AM Alexei Starovoitov wrote: > > On 9/18/18 6:45 AM, Eric Dumazet wrote: > > On Tue, Sep 18, 2018 at 1:41 AM Song Liu wrote: > >> > >> We are debugging this issue that netconsole message triggers pegged softirq > >> (ksoftirqd taking 100% CPU for many seconds). We fo

Re: [PATCH net-next] cxgb4vf: Add ethtool private flags for changing force_link_up

2018-09-18 Thread Jakub Kicinski
On Tue, 18 Sep 2018 18:37:23 +0530, Arjun Vynipadath wrote: > Forcing link up of virtual interfaces even when physical link is down > causes packet drops and ping failures during bonding failover. Hence > adding a ethtool private flag to toggle force_link_up whenever required. > > Signed-off-by: A

[PATCH] net: phy: don't reschedule state machine when PHY is halted

2018-09-18 Thread Heiner Kallweit
I think I've seen a similar or same patch before, not sure why it didn't make it yet. When being in state PHY_HALTED we don't have to reschedule the state machine, phy_start() will start it again. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH net-next 0/2] net: phy: make phy_stop() synchronous

2018-09-18 Thread Heiner Kallweit
There have been few not that successful attempts in the past to make phy_stop() a synchronous call instead of just changing the state. Patch 1 of this series addresses an issue which prevented this change. At least for me it works fine now. Would appreciate if Geert could re-test as well that suspe

[PATCH net-next 2/2] net: phy: call state machine synchronously in phy_stop

2018-09-18 Thread Heiner Kallweit
phy_stop() may be called e.g. when suspending, therefore all needed actions should be performed synchronously. Therefore add a synchronous call to the state machine. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/phy/phy

[PATCH net-next 1/2] net: linkwatch: add check for netdevice being present to linkwatch_do_dev

2018-09-18 Thread Heiner Kallweit
When bringing down the netdevice (incl. detaching it) and calling netif_carrier_off directly or indirectly the latter triggers an asynchronous linkwatch event. This linkwatch event eventually may fail to access chip registers in the ndo_get_stats/ndo_get_stats64 callback because the device isn't ac

Re: [PATCH] net: phy: don't reschedule state machine when PHY is halted

2018-09-18 Thread Florian Fainelli
On 09/18/2018 12:12 PM, Heiner Kallweit wrote: > I think I've seen a similar or same patch before, not sure why it > didn't make it yet. When being in state PHY_HALTED we don't have to > reschedule the state machine, phy_start() will start it again. Yes, this is conceptually the same patch as as t

Re: [PATCH] net: phy: don't reschedule state machine when PHY is halted

2018-09-18 Thread Heiner Kallweit
On 18.09.2018 22:02, Florian Fainelli wrote: > On 09/18/2018 12:12 PM, Heiner Kallweit wrote: >> I think I've seen a similar or same patch before, not sure why it >> didn't make it yet. When being in state PHY_HALTED we don't have to >> reschedule the state machine, phy_start() will start it again.

Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-18 Thread Cong Wang
On Mon, Sep 17, 2018 at 12:25 AM Kirill Tkhai wrote: > In inet_init() the order of registration is: > > ip_mr_init(); > init_inet_pernet_ops(); > > This means, ipmr_net_ops pernet operations are before af_inet_ops > in pernet_list. So, there is a theoretical probability, sometimes

[PATCH bpf-next] flow_dissector: fix build failure without CONFIG_NET

2018-09-18 Thread Willem de Bruijn
From: Willem de Bruijn If boolean CONFIG_BPF_SYSCALL is enabled, kernel/bpf/syscall.c will call flow_dissector functions from net/core/flow_dissector.c. This causes this build failure if CONFIG_NET is disabled: kernel/bpf/syscall.o: In function `__x64_sys_bpf': syscall.c:(.text+0x3278):

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Song Liu
> On Sep 18, 2018, at 11:17 AM, Eric Dumazet wrote: > > On Tue, Sep 18, 2018 at 10:51 AM Alexei Starovoitov wrote: >> >> On 9/18/18 6:45 AM, Eric Dumazet wrote: >>> On Tue, Sep 18, 2018 at 1:41 AM Song Liu wrote: We are debugging this issue that netconsole message triggers pegged

Re: [bpf-next, v4 1/5] flow_dissector: implements flow dissector BPF hook

2018-09-18 Thread Willem de Bruijn
On Tue, Sep 18, 2018 at 2:09 PM Eric Dumazet wrote: > > > > On 09/14/2018 07:46 AM, Petar Penkov wrote: > > From: Petar Penkov > > > > Adds a hook for programs of type BPF_PROG_TYPE_FLOW_DISSECTOR and > > attach type BPF_FLOW_DISSECTOR that is executed in the flow dissector > > path. The BPF prog

[PATCH net 2/2] ipv6: fix memory leak on dst->_metrics

2018-09-18 Thread Wei Wang
From: Wei Wang When dst->_metrics and f6i->fib6_metrics share the same memory, both take reference count on the dst_metrics structure. However, when dst is destroyed, ip6_dst_destroy() only invokes dst_destroy_metrics_generic() which does not take care of READONLY metrics and does not release ref

[PATCH net 1/2] Revert "ipv6: fix double refcount of fib6_metrics"

2018-09-18 Thread Wei Wang
From: Wei Wang This reverts commit e70a3aad44cc8b24986687ffc98c4a4f6ecf25ea. This change causes use-after-free on dst->_metrics. The crash trace looks like this: [ 97.763269] BUG: KASAN: use-after-free in ip6_mtu+0x116/0x140 [ 97.769038] Read of size 4 at addr 881781d2cf84 by task svw_N

[PATCH net 0/2] ipv6: fix issues on accessing fib6_metrics

2018-09-18 Thread Wei Wang
From: Wei Wang The latest fix on the memory leak of fib6_metrics still causes use-after-free. This patch series first revert the previous fix and propose a new fix that is more inline with ipv4 logic and is tested to fix the use-after-free issue reported. Wei Wang (2): Revert "ipv6: fix double

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Eric Dumazet
On Tue, Sep 18, 2018 at 1:37 PM Song Liu wrote: > > Looks like a patch like the following fixes the issue for ixgbe. But I > cannot explain it yet. > > Does this ring a bell? I dunno, it looks like the NIC is generating an interrupt while it should not, and constantly sets NAPI_STATE_MISSED. O

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Song Liu
> On Sep 18, 2018, at 2:13 PM, Eric Dumazet wrote: > > On Tue, Sep 18, 2018 at 1:37 PM Song Liu wrote: >> > >> Looks like a patch like the following fixes the issue for ixgbe. But I >> cannot explain it yet. >> >> Does this ring a bell? > > I dunno, it looks like the NIC is generating an

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Eric Dumazet
On 09/18/2018 02:13 PM, Eric Dumazet wrote: > On Tue, Sep 18, 2018 at 1:37 PM Song Liu wrote: >> > >> Looks like a patch like the following fixes the issue for ixgbe. But I >> cannot explain it yet. >> >> Does this ring a bell? > > I dunno, it looks like the NIC is generating an interrupt wh

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Eric Dumazet
On Tue, Sep 18, 2018 at 2:22 PM Song Liu wrote: > > Thanks Eric! > > I was looking at exactly this part. :) And it seems working! And this should also make busy polling a bit faster as well, avoiding enabling/receiving interrupts in the busy loop. > > I will run a bigger test and update shortly

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Florian Fainelli
On 09/18/2018 02:13 PM, Eric Dumazet wrote: > On Tue, Sep 18, 2018 at 1:37 PM Song Liu wrote: >> > >> Looks like a patch like the following fixes the issue for ixgbe. But I >> cannot explain it yet. >> >> Does this ring a bell? > > I dunno, it looks like the NIC is generating an interrupt while

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Eric Dumazet
On Tue, Sep 18, 2018 at 2:25 PM Florian Fainelli wrote: > > > This would not be the only driver doing this unfortunately... should we > add a __must_check annotation to help catch those (mis)uses? Though that > could cause false positives for drivers using NAPI to clean their TX ring. > Well, bef

Re: [PATCH bpf-next] flow_dissector: fix build failure without CONFIG_NET

2018-09-18 Thread Randy Dunlap
On 9/18/18 1:20 PM, Willem de Bruijn wrote: > From: Willem de Bruijn > > If boolean CONFIG_BPF_SYSCALL is enabled, kernel/bpf/syscall.c will > call flow_dissector functions from net/core/flow_dissector.c. > > This causes this build failure if CONFIG_NET is disabled: > > kernel/bpf/syscall.o

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Florian Fainelli
On 09/18/2018 02:28 PM, Eric Dumazet wrote: > On Tue, Sep 18, 2018 at 2:25 PM Florian Fainelli wrote: >> >> >> This would not be the only driver doing this unfortunately... should we >> add a __must_check annotation to help catch those (mis)uses? Though that >> could cause false positives for driv

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Song Liu
> On Sep 18, 2018, at 2:28 PM, Eric Dumazet wrote: > > On Tue, Sep 18, 2018 at 2:25 PM Florian Fainelli wrote: >> >> >> This would not be the only driver doing this unfortunately... should we >> add a __must_check annotation to help catch those (mis)uses? Though that >> could cause false po

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Jeff Kirsher
On Tue, 2018-09-18 at 14:21 -0700, Eric Dumazet wrote: > > On 09/18/2018 02:13 PM, Eric Dumazet wrote: > > On Tue, Sep 18, 2018 at 1:37 PM Song Liu > > wrote: > > > > > > Looks like a patch like the following fixes the issue for ixgbe. > > > But I > > > cannot explain it yet. > > > > > > Does t

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Song Liu
> On Sep 18, 2018, at 2:36 PM, Jeff Kirsher wrote: > > On Tue, 2018-09-18 at 14:21 -0700, Eric Dumazet wrote: >> >> On 09/18/2018 02:13 PM, Eric Dumazet wrote: >>> On Tue, Sep 18, 2018 at 1:37 PM Song Liu >>> wrote: Looks like a patch like the following fixes the issue for ixgbe.

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Eric Dumazet
On Tue, Sep 18, 2018 at 2:41 PM Song Liu wrote: > > > > > > I would submit the patch if Eric prefer not to. :) Hmmm maybe the bug is really in ixgbe_netpoll() This whole ndo_poll_controller() stuff is crazy. All sane implementations should only call napi_schedule()

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Song Liu
> On Sep 18, 2018, at 2:46 PM, Eric Dumazet wrote: > > On Tue, Sep 18, 2018 at 2:41 PM Song Liu wrote: >> >> >> >>> >> I would submit the patch if Eric prefer not to. :) > > > Hmmm maybe the bug is really in ixgbe_netpoll() > > This whole ndo_poll_controller() stuff is crazy. > >

Re: pegged softirq and NAPI race (?)

2018-09-18 Thread Eric Dumazet
On Tue, Sep 18, 2018 at 2:56 PM Song Liu wrote: > > > > > On Sep 18, 2018, at 2:46 PM, Eric Dumazet wrote: > > > > On Tue, Sep 18, 2018 at 2:41 PM Song Liu wrote: > >> > >> > >> > >>> > >> I would submit the patch if Eric prefer not to. :) > > > > > > Hmmm maybe the bug is really in ixgbe_ne

[net-next 08/14] iavf: rename I40E_ADMINQ_DESC

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg Take care of some renames containing I40E_ADMINQ_DESC. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 18 +- drivers/net/ethernet/intel/iavf/i40e_adminq.h | 4 ++-

[net-next 00/14][pull request] 40GbE Intel Wired LAN Driver Updates 2018-09-18

2018-09-18 Thread Jeff Kirsher
This series contains changes to i40evf so that it becomes a more generic virtual function driver for current and future silicon. While doing the rename of i40evf to a more generic name of iavf, we also put the driver on a severe diet due to how much of the code was unneeded or was unused. The out

[net-next 09/14] iavf: rename i40e_hw to iavf_hw

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg Fix up the i40e_hw names to new name, including versions inside other strings. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 43 --- drivers/net/ethernet/intel/iavf/i

[net-next 13/14] iavf: finish renaming files to iavf

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg This finishes the process of renaming the files that make sense to rename (skipping adminq related files that talk to i40e), and fixes up the build and the #includes so that everything builds nicely. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by:

[net-next 04/14] iavf: rename i40e_status to iavf_status

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg This is just a rename of an internal variable i40e_status, but it was a pretty big change and so deserved it's own patch. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 81 +++

[net-next 06/14] iavf: remove references to old names

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg Remove the register name references to I40E_VF* and change to IAVF_VF. Update the descriptor names and defines to the IAVF name. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 28

[net-next 01/14] intel-ethernet: rename i40evf to iavf

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg Rename the Intel Ethernet Adaptive Virtual Function driver (i40evf) to a new name (iavf) that is more consistent with the ongoing maintenance of the driver as the universal VF driver for multiple product lines. This first patch fixes up the directory names and the .ko name

[net-next 14/14] intel-ethernet: use correct module license

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg We recently updated all our SPDX identifiers to correctly indicate our net/ethernet/intel/* drivers were always released and intended to be released under GPL v2, but the MODULE_LICENSE declaration was never updated. Fix the MODULE_LICENSE to be GPL v2, for all our drivers

[net-next 11/14] iavf: tracing infrastructure rename

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg Rename the i40e_trace file and fix up all the callers to the new names inside the iavf_trace.h file. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- .../intel/iavf/{i40e_tra

[net-next 10/14] iavf: replace i40e_debug with iavf version

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg Change another string (i40e_debug) Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 28 +-- drivers/net/ethernet/intel/iavf/i40e_common.c | 12 drivers/net/

[net-next 02/14] iavf: diet and reformat

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg Remove a bunch of unused code and reformat a few lines. Also remove some now un-necessary files. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 27 - .../net/ethernet/intel/iavf

[net-next 05/14] iavf: move i40evf files to new name

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg Simply move the i40evf files to the new name, updating the #includes to track the new names, and updating the Makefile as well. A future patch will remove the i40e references (after the code removal patches later in this series). Signed-off-by: Jesse Brandeburg Tested-by

[net-next 07/14] iavf: rename device ID defines

2018-09-18 Thread Jeff Kirsher
From: Jesse Brandeburg Rename the device ID defines to have IAVF in them and remove all the unused defines. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 22 +- drivers/net/ethernet/intel/iavf/

Re: [RFC PATCH bpf-next v3 1/7] bpf: rename stack trace map

2018-09-18 Thread Alexei Starovoitov
On Tue, Sep 18, 2018 at 06:52:34AM +0200, Mauricio Vasquez B wrote: > In the following patches queue and stack maps (FIFO and LIFO > datastructures) will be implemented. In order to avoid confusion and > a possible name clash rename stackmap.c to stacktracemap.c and > stack_map_ops to stack_trace_

Re: [PATCH net 1/2] Revert "ipv6: fix double refcount of fib6_metrics"

2018-09-18 Thread David Ahern
On 9/18/18 1:44 PM, Wei Wang wrote: > From: Wei Wang > > This reverts commit e70a3aad44cc8b24986687ffc98c4a4f6ecf25ea. > > This change causes use-after-free on dst->_metrics. > Reported-by: John Sperbeck > Signed-off-by: Wei Wang > Signed-off-by: Eric Dumazet > --- > net/ipv6/route.c

Re: [PATCH net 2/2] ipv6: fix memory leak on dst->_metrics

2018-09-18 Thread David Ahern
On 9/18/18 1:45 PM, Wei Wang wrote: > From: Wei Wang > > When dst->_metrics and f6i->fib6_metrics share the same memory, both > take reference count on the dst_metrics structure. However, when dst is > destroyed, ip6_dst_destroy() only invokes dst_destroy_metrics_generic() > which does not take c

Re: [RFC PATCH bpf-next v3 4/7] bpf: add bpf queue and stack maps

2018-09-18 Thread Alexei Starovoitov
On Tue, Sep 18, 2018 at 06:52:51AM +0200, Mauricio Vasquez B wrote: > Implement two new kind of maps that support the peek, push and pop > operations. > > A use case for this is to keep track of a pool of elements, like > network ports in a SNAT. > > Signed-off-by: Mauricio Vasquez B > --- > in

Re: [RFC PATCH bpf-next v3 7/7] selftests/bpf: add test cases for queue and stack maps

2018-09-18 Thread Alexei Starovoitov
On Tue, Sep 18, 2018 at 06:53:07AM +0200, Mauricio Vasquez B wrote: > Two types of tests are done: > - test_maps: only userspace api. > - test_progs: userspace api and ebpf helpers. > > Signed-off-by: Mauricio Vasquez B > --- > kernel/bpf/helpers.c |2 > tools/

Re: [PATCH bpf-next] flow_dissector: fix build failure without CONFIG_NET

2018-09-18 Thread Y Song
On Tue, Sep 18, 2018 at 1:20 PM Willem de Bruijn wrote: > > From: Willem de Bruijn > > If boolean CONFIG_BPF_SYSCALL is enabled, kernel/bpf/syscall.c will > call flow_dissector functions from net/core/flow_dissector.c. > > This causes this build failure if CONFIG_NET is disabled: > > kernel/b

[PATCH 0/1] macsec: reflect the master interface state

2018-09-18 Thread Radu Rendec
Hi everyone, I came across an issue with macsec interfaces where they don't reflect the master interface state. On one hand you cannot set the macsec interface link state to up unless the master interface is already up, but on the other hand, if the master interface goes down while the macsec inte

[PATCH 1/1] macsec: reflect the master interface state

2018-09-18 Thread Radu Rendec
This patch makes macsec interfaces reflect the state of the underlying interface: if the master interface changes state to up/down, the macsec interface changes its state accordingly. This closes a loophole in the macsec interface state logic: the macsec interface cannot be brought up if the maste

Re: [PATCH net 2/2] ipv6: fix memory leak on dst->_metrics

2018-09-18 Thread Wei Wang
On Tue, Sep 18, 2018 at 4:25 PM David Ahern wrote: > > On 9/18/18 1:45 PM, Wei Wang wrote: > > From: Wei Wang > > > > When dst->_metrics and f6i->fib6_metrics share the same memory, both > > take reference count on the dst_metrics structure. However, when dst is > > destroyed, ip6_dst_destroy() o

[PATCH RFT net-next 0/2] net: phy: Eliminate unnecessary soft

2018-09-18 Thread Florian Fainelli
Hi all, This patch series eliminates unnecessary software resets of the PHY. This should hopefully not break anybody's hardware; but I would appreciate testing to make sure this is is the case. Sorry for this long email list, I wanted to make sure I reached out to all people who made changes to t

[PATCH RFT net-next 2/2] net: phy: marvell: Avoid unnecessary soft reset

2018-09-18 Thread Florian Fainelli
The BMCR.RESET bit on Marvell PHYs appears to be acting as a commit operation, so we try to hit that bit which disrupts the link, only when an actual register programming required a change. Determine from marvell_set_polarity()'s return code whether the register value was changed and if it was, pr

[PATCH RFT net-next 1/2] net: phy: Stop with excessive soft reset

2018-09-18 Thread Florian Fainelli
While consolidating the PHY reset in phy_init_hw() an unconditionaly BMCR soft-reset I became quite trigger happy with those. This was later on deactivated for the Generic PHY driver on the premise that a prior software entity (e.g: bootloader) might have applied workarounds in commit 0878fff1f42c

Re: [PATCH bpf-next 2/2] xsk: fix bug when trying to use both copy and zero-copy on one queue id

2018-09-18 Thread Jakub Kicinski
On Tue, 18 Sep 2018 10:22:11 -0700, Y Song wrote: > > +/* The umem is stored both in the _rx struct and the _tx struct as we do > > + * not know if the device has more tx queues than rx, or the opposite. > > + * This might also change during run time. > > + */ > > +static void xdp_reg_umem_at_qid(s

答复: [PATCH][net-next] netlink: avoid to allocate full skb when sending to many devices

2018-09-18 Thread Li,Rongqing
> On 09/17/2018 10:26 PM, Li RongQing wrote: > > if skb->head is vmalloc address, when this skb is delivered, full > > allocation for this skb is required, if there are many devices, the > > --- > > net/netlink/af_netlink.c | 14 -- > > 1 file changed, 8 insertions(+), 6 deletions(-) >

  1   2   >