[GIT] Networking

2017-08-08 Thread David Miller
The pull requests are getting smaller, that's progress I suppose :-) 1) Fix infinite loop in CIPSO option parsing, from Yujuan Qi. 2) Fix remote checksum handling in VXLAN and GUE tunneling drivers, from Koichiro Den. 3) Missing u64_stats_init() calls in several drivers, from Florian Fain

[PATCH] igmp: Fix regression caused by igmp sysctl namespace code.

2017-08-08 Thread Nikolay Borisov
Commit dcd87999d415 ("igmp: net: Move igmp namespace init to correct file") moved the igmp sysctls initialization from tcp_sk_init to igmp_net_init. This function is only called as part of per-namespace initialization, only if CONFIG_IP_MULTICAST is defined, otherwise igmp_mc_init() call in ip_init

Re:Re: Re:Re: Re: [PATCH net] ppp: Fix a scheduling-while-atomic bug in del_chan

2017-08-08 Thread Gao Feng
At 2017-08-09 03:45:53, "Cong Wang" wrote: >On Mon, Aug 7, 2017 at 6:10 PM, Gao Feng wrote: >> >> Sorry, I don't get you clearly. Why the sock_hold() isn't helpful? > >I already told you, the dereference happends before sock_hold(). > >sock = rcu_dereference(callid_sock[call_id]); >

[PATCH] net: dsa: make dsa_switch_ops const

2017-08-08 Thread Bhumika Goyal
Make these structures const as they are only stored in the ops field of a dsa_switch structure, which is const. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- drivers/net/dsa/dsa_loop.c | 2 +- drivers/net/dsa/lan9303-core.c | 2 +- drivers/net/dsa/mt7530.c | 2 +- 3 files cha

Re: panic at sock_zerocopy_put when I ssh into a VM

2017-08-08 Thread Willem de Bruijn
On Tue, Aug 8, 2017 at 9:48 PM, Willem de Bruijn wrote: > Thanks for the report, David, and sorry for the breakage. > > I am not able to reproduce the issue with my qemu setup with vhost-net > with experimental_zcopytx so far. I did just reproduce the (well, a) panic in sock_zerocopy_put. It is i

Re: panic at sock_zerocopy_put when I ssh into a VM

2017-08-08 Thread Willem de Bruijn
Thanks for the report, David, and sorry for the breakage. I am not able to reproduce the issue with my qemu setup with vhost-net with experimental_zcopytx so far. But looking at the code from that codepath point of view, I do see that there are incorrect assumptions on ubuf_info fields being init

Re: [PATCH net-next v2] net: ipv6: avoid overhead when no custom FIB rules are installed

2017-08-08 Thread David Miller
From: Vincent Bernat Date: Tue, 8 Aug 2017 20:23:49 +0200 > If the user hasn't installed any custom rules, don't go through the > whole FIB rules layer. This is pretty similar to f4530fa574df (ipv4: > Avoid overhead when no custom FIB rules are installed). > > Using a micro-benchmark module [1]

Re: [PATCH net] net: avoid skb_warn_bad_offload false positives on UFO

2017-08-08 Thread David Miller
From: Willem de Bruijn Date: Tue, 8 Aug 2017 14:22:55 -0400 > From: Willem de Bruijn > > skb_warn_bad_offload triggers a warning when an skb enters the GSO > stack at __skb_gso_segment that does not have CHECKSUM_PARTIAL > checksum offload set. > > Commit b2504a5dbef3 ("net: reduce skb_warn_b

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-08-08 Thread Michael S. Tsirkin
On Wed, Aug 09, 2017 at 10:38:10AM +0800, Jason Wang wrote: > I think don't think current code can work well if vq.num is grater than > 2^15. Since all cached idx is u16. This looks like a bug which needs to be > fixed. That's a limitation of virtio 1.0. > > * else if the interval of vq.num is [2

Re: [PATCH net-next 0/7] rtnetlink: allow to run selected handlers without rtnl

2017-08-08 Thread David Miller
From: Florian Westphal Date: Tue, 8 Aug 2017 18:02:29 +0200 > Unfortunately RTNL mutex is a performance issue, e.g. a cpu adding > an ip address prevents other cpus from seemingly unrelated tasks > such as dumping tc classifiers. It is related if somehow the TC entries refer to IP addresses. S

Re: [PATCH net,stable] qmi_wwan: fix NULL deref on disconnect

2017-08-08 Thread David Miller
From: Bjørn Mork Date: Tue, 8 Aug 2017 18:02:11 +0200 > qmi_wwan_disconnect is called twice when disconnecting devices with > separate control and data interfaces. The first invocation will set > the interface data to NULL for both interfaces to flag that the > disconnect has been handled. But

Re: [PATCH] hv_set_ifconfig.sh double check before setting ip

2017-08-08 Thread David Miller
From: Eduardo Otubo Date: Tue, 8 Aug 2017 15:53:45 +0200 > This patch fixes the behavior of the hv_set_ifconfig script when setting > the interface ip. Sometimes the interface has already been configured by > network daemon, in this case hv_set_ifconfig causes "RTNETLINK: file > exists error"; i

Re: [PATCH 33/35] wireless: realtek: rtl8192cu: constify usb_device_id

2017-08-08 Thread Larry Finger
On 08/08/2017 11:05 AM, Arvind Yadav wrote: usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- Acked-by: Larry Finger Thanks, Larry

Re: [PATCH][next] net: phy: mdio-bcm-unimac: fix unsigned wrap-around when decrementing timeout

2017-08-08 Thread David Miller
From: Colin King Date: Tue, 8 Aug 2017 10:52:32 +0100 > From: Colin Ian King > > Change post-decrement compare to pre-decrement to avoid an > unsigned integer wrap-around on timeout. This leads to the following > !timeout check to never to be true so -ETIMEDOUT is never returned. > > Detected

Re: [PATCH net] ppp: fix xmit recursion detection on ppp channels

2017-08-08 Thread David Miller
From: Guillaume Nault Date: Tue, 8 Aug 2017 11:43:24 +0200 > Commit e5dadc65f9e0 ("ppp: Fix false xmit recursion detect with two ppp > devices") dropped the xmit_recursion counter incrementation in > ppp_channel_push() and relied on ppp_xmit_process() for this task. > But __ppp_channel_push() can

Re: [PATCH] net: phy: Use tab for indentation in Kconfig

2017-08-08 Thread David Miller
From: Michal Simek Date: Tue, 8 Aug 2017 11:32:25 +0200 > Using tabs instead of space for indentaion > > Signed-off-by: Michal Simek This really isn't appropriate for the 'net' tree, it doesn't fix anything it just makes the spacing consistent. Please respin this patch against net-next, than

Re: [PATCH net] rds: Reintroduce statistics counting

2017-08-08 Thread David Miller
From: Håkon Bugge Date: Tue, 8 Aug 2017 11:13:32 +0200 > In commit 7e3f2952eeb1 ("rds: don't let RDS shutdown a connection > while senders are present"), refilling the receive queue was removed > from rds_ib_recv(), along with the increment of > s_ib_rx_refill_from_thread. > > Commit 73ce4317bf

Re: [PATCH net] tcp: fastopen: tcp_connect() must refresh the route

2017-08-08 Thread David Miller
From: Eric Dumazet Date: Tue, 08 Aug 2017 01:41:58 -0700 > From: Eric Dumazet > > With new TCP_FASTOPEN_CONNECT socket option, there is a possibility > to call tcp_connect() while socket sk_dst_cache is either NULL > or invalid. > > +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 4 > +0 fcntl(4,

[PATCH iproute2 master] examples/bpf: update list of examples

2017-08-08 Thread Alexander Alemayhu
Remove deleted examples and add the new map in map example. Signed-off-by: Alexander Alemayhu --- examples/bpf/README | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/bpf/README b/examples/bpf/README index 4247257850eb..1bbdda3f8dc1 100644 --- a/examples/bpf/REA

Re: [PATCHv3 net] net: sched: set xt_tgchk_param par.net properly in ipt_init_target

2017-08-08 Thread David Miller
From: Xin Long Date: Tue, 8 Aug 2017 15:25:25 +0800 > Now xt_tgchk_param par in ipt_init_target is a local varibale, > par.net is not initialized there. Later when xt_check_target > calls target's checkentry in which it may access par.net, it > would cause kernel panic. > > Jaroslav found this

Re: [PATCH net-next] cxgb4: Clear On FLASH config file after a FW upgrade

2017-08-08 Thread David Miller
From: Ganesh Goudar Date: Tue, 8 Aug 2017 11:20:52 +0530 > From: Arjun Vynipadath > > Because Firmware and the Firmware Configuration File need to be > in sync; clear out any On-FLASH Firmware Configuration File when new > Firmware is loaded. This will avoid difficult to diagnose and fix > pr

Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building samples on arm64

2017-08-08 Thread David Miller
From: Joel Fernandes Date: Mon, 7 Aug 2017 18:20:49 -0700 > On Mon, Aug 7, 2017 at 11:28 AM, David Miller wrote: >> The amount of hellish hacks we are adding to deal with this is getting >> way out of control. > > I agree with you that hellish hacks are being added which is why it > keeps break

Re: [PATCH v9 2/4] PCI: Disable PCIe Relaxed Ordering if unsupported

2017-08-08 Thread Bjorn Helgaas
On Tue, Aug 08, 2017 at 09:22:39PM -0500, Bjorn Helgaas wrote: > On Sat, Aug 05, 2017 at 03:15:11PM +0800, Ding Tianhong wrote: > > When bit4 is set in the PCIe Device Control register, it indicates > > whether the device is permitted to use relaxed ordering. > > On some platforms using relaxed ord

Re: [PATCH v9 1/4] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-08-08 Thread Bjorn Helgaas
On Wed, Aug 09, 2017 at 01:40:01AM +, Casey Leedom wrote: > | From: Bjorn Helgaas > | Sent: Tuesday, August 8, 2017 4:22 PM > | > | This needs to include a link to the Intel spec > | > (https://software.intel.com/sites/default/files/managed/9e/bc/64-ia-32-architectures-optimization-manual.pd

[PATCH 0/3] Fix y2038 issues for security/keys subsystem

2017-08-08 Thread Baolin Wang
Since 'time_t', 'timeval' and 'timespec' types are not year 2038 safe on 32 bits system, this patchset tries to fix this issues for security/keys subsystem and net/rxrpc subsystem which is connected with security/keys subsystem. Baolin Wang (3): security: keys: Replace time_t/timespec with time6

[PATCH 1/3] security: keys: Replace time_t/timespec with time64_t

2017-08-08 Thread Baolin Wang
The 'struct key' will use 'time_t' which we try to remove in the kernel, since 'time_t' is not year 2038 safe on 32bit systems. Also the 'struct keyring_search_context' will use 'timespec' type to record current time, which is also not year 2038 safe on 32bit systems. Thus this patch replaces 'tim

[PATCH 2/3] security: keys: Replace time_t with time64_t for struct key_preparsed_payload

2017-08-08 Thread Baolin Wang
The 'struct key_preparsed_payload' will use 'time_t' which we will try to remove in the kernel, since 'time_t' is not year 2038 safe on 32bits systems. Thus this patch replaces 'time_t' with 'time64_t' which is year 2038 safe on 32 bits system for 'struct key_preparsed_payload', moreover we should

[PATCH 3/3] net: rxrpc: Replace time_t type with time64_t type

2017-08-08 Thread Baolin Wang
Since the 'expiry' variable of 'struct key_preparsed_payload' has been changed to 'time64_t' type, which is year 2038 safe on 32bits system. In net/rxrpc subsystem, we need convert 'u32' type to 'time64_t' type when copying ticket expires time to 'prep->expiry', then this patch introduces two help

Re: [ovs-dev] [PATCH net-next] openvswitch: add NSH support

2017-08-08 Thread Ben Pfaff
To be clear, the OVS implementation is a placeholder. It will get replaced by whatever netdev implements, and that's OK. I didn't focus on making it perfect because I knew that. Instead, I just made sure it was good enough for an internal OVS implementation that doesn't fix any ABI or API. OVS

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-08-08 Thread Jason Wang
On 2017年07月30日 14:26, K. Den wrote: On Wed, 2017-07-26 at 19:08 +0300, Michael S. Tsirkin wrote: On Wed, Jul 26, 2017 at 09:37:15PM +0800, Jason Wang wrote: On 2017年07月26日 21:18, Jason Wang wrote: On 2017年07月26日 20:57, Michael S. Tsirkin wrote: On Wed, Jul 26, 2017 at 04:03:17PM +0800, Ja

[PATCH net-next] liquidio: napi cleanup

2017-08-08 Thread Felix Manlunas
From: Intiyaz Basha Disable napi when interface is going down. Delete napi when destroying the interface. Signed-off-by: Intiyaz Basha Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_main.c| 15 +++ drivers/net/ethernet/cavium/liquidio/lio_vf_main.c

Re: [PATCH v9 2/4] PCI: Disable PCIe Relaxed Ordering if unsupported

2017-08-08 Thread Bjorn Helgaas
On Sat, Aug 05, 2017 at 03:15:11PM +0800, Ding Tianhong wrote: > When bit4 is set in the PCIe Device Control register, it indicates > whether the device is permitted to use relaxed ordering. > On some platforms using relaxed ordering can have performance issues or > due to erratum can cause data-co

RE: [PATCH net-next] openvswitch: add NSH support

2017-08-08 Thread Yang, Yi Y
Hi, Jiri Thank you for your comments. __be32 c[4] is the name Ben Pfaff suggested, the original name is c1, c2, c3, c4, they are context data, so c seems ok, too :-) OVS has merged it and has the same name, maybe the better way is adding comment /* Context data */ after it. For MD type 2, str

Re: [PATCH v9 1/4] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-08-08 Thread Casey Leedom
| From: Bjorn Helgaas | Sent: Tuesday, August 8, 2017 4:22 PM | | This needs to include a link to the Intel spec | (https://software.intel.com/sites/default/files/managed/9e/bc/64-ia-32-architectures-optimization-manual.pdf, | sec 3.9.1). In the commit message or as a comment? Regardless, I

Re: [Patch net-next] net_sched: get rid of some forward declarations

2017-08-08 Thread David Miller
From: Cong Wang Date: Mon, 7 Aug 2017 15:26:50 -0700 > If we move up tcf_fill_node() we can get rid of these > forward declarations. > > Also, move down tfilter_notify_chain() to group them together. > > Reported-by: Jamal Hadi Salim > Cc: Jamal Hadi Salim > Signed-off-by: Cong Wang Applie

Re: [RFC PATCH] net: don't set __LINK_STATE_START until after dev->open() call

2017-08-08 Thread David Miller
From: Jacob Keller Date: Mon, 7 Aug 2017 15:24:21 -0700 > Fix an issue with relying on netif_running() which could be true during > when dev->open() handler is being called, even if it would exit with > a failure. This ensures the state does not get set and removed with > a narrow race for other

Re: [PATCH net-next] net: dsa: lan9303: Only allocate 3 ports

2017-08-08 Thread David Miller
From: Egil Hjelmeland Date: Tue, 8 Aug 2017 00:22:21 +0200 > Save 2628 bytes on arm eabi by allocate only the required 3 ports. > > Now that ds->num_ports is correct: In net/dsa/tag_lan9303.c > eliminate duplicate LAN9303_MAX_PORTS, use ds->num_ports. > (Matching the pattern of other net/dsa/ta

Re: [PATCH net-next] liquidio: fix misspelled firmware image filenames

2017-08-08 Thread David Miller
From: Felix Manlunas Date: Mon, 7 Aug 2017 12:22:15 -0700 > From: Derek Chickles > > Fix misspelled firmware image filenames advertised via MODULE_FIRMWARE(). > > Signed-off-by: Derek Chickles > Signed-off-by: Felix Manlunas Applied.

Re: [PATCH net-next] selftests: bpf: add a test for XDP redirect

2017-08-08 Thread David Miller
From: William Tu Date: Mon, 7 Aug 2017 13:14:42 -0700 > Add test for xdp_redirect by creating two namespaces with two > veth peers, then forward packets in-between. > > Signed-off-by: William Tu Applied, thank you.

Re: [PATCH net-next v2 1/2] bpf: Move check_uarg_tail_zero() upward

2017-08-08 Thread David Miller
From: Mickaël Salaün Date: Mon, 7 Aug 2017 20:45:19 +0200 > The function check_uarg_tail_zero() may be useful for other part of the > code in the syscall.c file. Move this function at the beginning of the > file. > > Signed-off-by: Mickaël Salaün > Acked-by: Daniel Borkmann Applied.

Re: [PATCH net-next v2 2/2] bpf: Extend check_uarg_tail_zero() checks

2017-08-08 Thread David Miller
From: Mickaël Salaün Date: Mon, 7 Aug 2017 20:45:20 +0200 > The function check_uarg_tail_zero() was created from bpf(2) for > BPF_OBJ_GET_INFO_BY_FD without taking the access_ok() nor the PAGE_SIZE > checks. Make this checks more generally available while unlikely to be > triggered, extend the m

Re: [PATCH net-next 1/1] netvsc: make sure and unregister datapath

2017-08-08 Thread David Miller
From: Stephen Hemminger Date: Mon, 7 Aug 2017 11:30:00 -0700 > Go back to switching datapath directly in the notifier callback. > Otherwise datapath might not get switched on unregister. > > No need for calling the NOTIFY_PEERS notifier since that is only for > a gratitious ARP/ND packet; but t

Re: [PATCH net-next] liquidio: fix wrong info about vf rx/tx ring parameters reported to ethtool

2017-08-08 Thread David Miller
From: Felix Manlunas Date: Mon, 7 Aug 2017 10:39:00 -0700 > From: Intiyaz Basha > > Information reported to ethtool about vf rx/tx ring parameters is wrong. > Fix it by adding the missing initializations. > > Signed-off-by: Intiyaz Basha > Signed-off-by: Felix Manlunas Applied.

Re: [PATCH v3 net-next 0/5] ulp: Generalize ULP infrastructure

2017-08-08 Thread David Miller
From: Edward Cree Date: Tue, 8 Aug 2017 21:23:03 +0100 > In any case, if you go with the enum approach and later it _does_ prove > necessary to have more flexibility, you can have enum values dynamically > assigned (like genetlink manages to do); and programs using the existing > fixed IDs wil

Re: [PATCH] net: dsa: mediatek: add adjust link support for user ports

2017-08-08 Thread David Miller
From: John Crispin Date: Mon, 7 Aug 2017 16:20:49 +0200 > Manually adjust the port settings of user ports once PHY polling has > completed. This patch extends the adjust_link callback to configure the > per port PMCR register, applying the proper values polled from the PHY. > Without this patch

Re: [PATCH net v2] net/mlx4_en: don't set CHECKSUM_COMPLETE on SCTP packets

2017-08-08 Thread David Miller
From: Saeed Mahameed Date: Tue, 8 Aug 2017 19:16:52 +0300 > On Thu, Aug 3, 2017 at 11:54 PM, Davide Caratti wrote: >> if the NIC fails to validate the checksum on TCP/UDP, and validation of IP >> checksum is successful, the driver subtracts the pseudo-header checksum >> from the value obtained b

Re: [PATCH v5 net-next 00/12] bpf: rewrite value tracking in verifier

2017-08-08 Thread David Miller
From: Daniel Borkmann Date: Tue, 08 Aug 2017 02:46:16 +0200 > On 08/07/2017 04:21 PM, Edward Cree wrote: >> This series simplifies alignment tracking, generalises bounds tracking >> and >> fixes some bounds-tracking bugs in the BPF verifier. Pointer >> arithmetic on >> packet pointers, sta

Re: [PATCH 0/6] In-kernel QMI handling

2017-08-08 Thread Dan Williams
On Tue, 2017-08-08 at 15:42 -0700, Bjorn Andersson wrote: > On Tue 08 Aug 04:02 PDT 2017, Bj?rn Mork wrote: > > > Bjorn Andersson writes: > > > > > This series starts by moving the common definitions of the QMUX > > > protocol to the > > > uapi header, as they are shared with clients - both in k

[PATCH net] geneve: maximum value of VNI cannot be used

2017-08-08 Thread Girish Moodalbail
Geneve's Virtual Network Identifier (VNI) is 24 bit long, so the range of values for it would be from 0 to 16777215 (2^24 -1). However, one cannot create a geneve device with VNI set to 16777215. This patch fixes this issue. Signed-off-by: Girish Moodalbail --- drivers/net/geneve.c | 2 +- 1 fi

Re: [PATCH] netfilter: nf_nat_h323: fix logical-not-parentheses warning

2017-08-08 Thread Nick Desaulniers
bumping for review On Mon, Jul 31, 2017 at 11:39 AM, Nick Desaulniers wrote: > Clang produces the following warning: > > net/ipv4/netfilter/nf_nat_h323.c:553:6: error: > logical not is only applied to the left hand side of this comparison > [-Werror,-Wlogical-not-parentheses] > if (!set_h225_ad

Re: [PATCH v06 35/36] uapi linux/tls.h: don't include in user space

2017-08-08 Thread Dmitry V. Levin
On Sun, Aug 06, 2017 at 06:44:26PM +0200, Mikko Rapeli wrote: > It is not needed and not part of uapi headers, but causes > user space compilation error: > > fatal error: net/tcp.h: No such file or directory > #include > ^ > > Signed-off-by: Mikko Rapeli > Cc: Dave Watson

Re: [PATCH v9 1/4] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-08-08 Thread Bjorn Helgaas
On Sat, Aug 05, 2017 at 03:15:10PM +0800, Ding Tianhong wrote: > From: Casey Leedom > > The patch adds a new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING to indicate that > Relaxed Ordering (RO) attribute should not be used for Transaction Layer > Packets (TLP) targetted towards these affected root com

Re: [PATCH net-next v2] wan: dscc4: add checks for dma mapping errors

2017-08-08 Thread Francois Romieu
Alexey Khoroshilov : [...] > diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c > index 799830f..6a9ffac 100644 > --- a/drivers/net/wan/dscc4.c > +++ b/drivers/net/wan/dscc4.c > @@ -518,23 +518,31 @@ static void dscc4_release_ring(struct dscc4_dev_priv > *dpriv) > static inline int t

Re: [PATCH v06 15/36] uapi linux/socket.h: include sys/socket.h in user space

2017-08-08 Thread Dmitry V. Levin
On Sun, Aug 06, 2017 at 06:44:06PM +0200, Mikko Rapeli wrote: > This libc header has sockaddr definition in user space. > > Fixes user space compilation errors like these from kernel headers including > only linux/socket.h: > > error: field ‘ifru_addr’ has incomplete type > struct sockaddr ifru_a

Re: skb allocation from interrupt handler?

2017-08-08 Thread David Miller
From: Murali Karicheri Date: Tue, 8 Aug 2017 18:17:52 -0400 > Is there an skb_alloc function that can be used from interrupt handler? Looks > like netdev_alloc_skb() > can't be used since I see following trace with kernel hack debug options > enabled. > > [ 652.481713] [] (unwind_backtrace) f

Re: [PATCH 0/6] In-kernel QMI handling

2017-08-08 Thread Bjorn Andersson
On Tue 08 Aug 04:02 PDT 2017, Bj?rn Mork wrote: > Bjorn Andersson writes: > > > This series starts by moving the common definitions of the QMUX protocol to > > the > > uapi header, as they are shared with clients - both in kernel and userspace. > > > > This series then introduces in-kernel help

Re: skb allocation from interrupt handler?

2017-08-08 Thread Matteo Croce
Il giorno mar, 08/08/2017 alle 18.17 -0400, Murali Karicheri ha scritto: > Is there an skb_alloc function that can be used from interrupt > handler? Looks like netdev_alloc_skb() > can't be used since I see following trace with kernel hack debug > options enabled. > > [ 652.481713] [] (unwind_bac

skb allocation from interrupt handler?

2017-08-08 Thread Murali Karicheri
Is there an skb_alloc function that can be used from interrupt handler? Looks like netdev_alloc_skb() can't be used since I see following trace with kernel hack debug options enabled. [ 652.481713] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 652.481725] [] (show_stack) from [] (du

Re: [PATCH] net: systemport: Fix software statistics for SYSTEMPORT Lite

2017-08-08 Thread David Miller
From: Florian Fainelli Date: Tue, 8 Aug 2017 14:44:40 -0700 > On 08/08/2017 02:39 PM, Florian Fainelli wrote: >> With SYSTEMPORT Lite we have holes in our statistics layout that make us >> skip over the hardware MIB counters, bcm_sysport_get_stats() was not >> taking that into account, resulting

Re: [RFC PATCH 2/2] bpf: Initialise mod[] in bpf_trace_printk

2017-08-08 Thread David Miller
From: James Hogan Date: Tue, 08 Aug 2017 22:20:05 +0100 > cool, i hadn't realised unmentioned elements in an initialiser are > always zeroed, even when non-global/static, so had interpreted the > whole array as uninitialised. learn something new every day :-) > sorry for the noise. You didn't ha

[PATCH net-next] net: ipv6: lower ndisc notifier priority below addrconf

2017-08-08 Thread David Ahern
ndisc_notify is used to send unsolicited neighbor advertisements (e.g., on a link up). Currently, the ndisc notifier is run before the addrconf notifer which means NA's are not sent for link-local addresses which are added by the addrconf notifier. Fix by lowering the priority of the ndisc notifie

[PATCH net v2] net: systemport: Fix software statistics for SYSTEMPORT Lite

2017-08-08 Thread Florian Fainelli
With SYSTEMPORT Lite we have holes in our statistics layout that make us skip over the hardware MIB counters, bcm_sysport_get_stats() was not taking that into account resulting in reporting 0 for all SW-maintained statistics, fix this by skipping accordingly. Fixes: 44a4524c54af ("net: systemport:

Re: [PATCH] net: systemport: Fix software statistics for SYSTEMPORT Lite

2017-08-08 Thread Florian Fainelli
On 08/08/2017 02:39 PM, Florian Fainelli wrote: > With SYSTEMPORT Lite we have holes in our statistics layout that make us > skip over the hardware MIB counters, bcm_sysport_get_stats() was not > taking that into account, resulting in reporting 0 for all SW-maintained > statistics, fix this by skip

[PATCH] net: systemport: Fix software statistics for SYSTEMPORT Lite

2017-08-08 Thread Florian Fainelli
With SYSTEMPORT Lite we have holes in our statistics layout that make us skip over the hardware MIB counters, bcm_sysport_get_stats() was not taking that into account, resulting in reporting 0 for all SW-maintained statistics, fix this by skipping accordingly. Fixes: 44a4524c54af ("net: systemport

Re: [RFC PATCH 2/2] bpf: Initialise mod[] in bpf_trace_printk

2017-08-08 Thread James Hogan
On 8 August 2017 17:48:57 BST, David Miller wrote: >From: Daniel Borkmann >Date: Tue, 08 Aug 2017 10:46:52 +0200 > >> On 08/08/2017 12:25 AM, James Hogan wrote: >>> In bpf_trace_printk(), the elements in mod[] are left uninitialised, >>> but >>> they are then incremented to track the width of the

Re: [PATCH v3 net-next 0/5] ulp: Generalize ULP infrastructure

2017-08-08 Thread Tom Herbert
On Tue, Aug 8, 2017 at 1:23 PM, Edward Cree wrote: > On 08/08/17 20:50, Tom Herbert wrote: >> It's a tradeoff. The nice thing about using strings is that we don't >> need maintain a universal enum. > Hmm, that makes it sound as though you're intending for random out-of-tree > modules to add these

[PATCH ericsson v2 1/1] tipc: remove premature ESTABLISH FSM event at link synchronization

2017-08-08 Thread Jon Maloy
When a link between two nodes come up, both endpoints will initially send out a STATE message to the peer, to increase the probability that the peer endpoint also is up when the first traffic message arrives. Thereafter, if the establishing link is the second link between two nodes, this first "tra

[net 1/1] tipc: remove premature ESTABLISH FSM event at link synchronization

2017-08-08 Thread Jon Maloy
When a link between two nodes come up, both endpoints will initially send out a STATE message to the peer, to increase the probability that the peer endpoint also is up when the first traffic message arrives. Thereafter, if the establishing link is the second link between two nodes, this first "tra

Re: [PATCH v3 net-next 0/5] ulp: Generalize ULP infrastructure

2017-08-08 Thread Edward Cree
On 08/08/17 20:50, Tom Herbert wrote: > It's a tradeoff. The nice thing about using strings is that we don't > need maintain a universal enum. Hmm, that makes it sound as though you're intending for random out-of-tree modules to add these things; since if they're in-tree it's easy for them to get

Re: [PATCH v3 net-next 0/5] ulp: Generalize ULP infrastructure

2017-08-08 Thread Tom Herbert
On Tue, Aug 8, 2017 at 12:30 PM, John Fastabend wrote: > On 08/08/2017 10:04 AM, Tom Herbert wrote: >> On Tue, Aug 8, 2017 at 8:31 AM, John Fastabend >> wrote: >>> On 08/07/2017 10:28 AM, Tom Herbert wrote: Generalize the ULP infrastructure that was recently introduced to support kTLS.

Re: Re:Re: Re: [PATCH net] ppp: Fix a scheduling-while-atomic bug in del_chan

2017-08-08 Thread Cong Wang
On Mon, Aug 7, 2017 at 6:10 PM, Gao Feng wrote: > > Sorry, I don't get you clearly. Why the sock_hold() isn't helpful? I already told you, the dereference happends before sock_hold(). sock = rcu_dereference(callid_sock[call_id]); if (sock) { opt = &sock->proto.ppt

Re: [PATCH v3 net-next 4/5] tcp: Adjust TCP ULP to defer to sockets ULP

2017-08-08 Thread John Fastabend
On 08/07/2017 10:28 AM, Tom Herbert wrote: > Fix TCP and TLS to use the newer ULP infrastructure in sockets. > > Signed-off-by: Tom Herbert > --- Looks OK to me. Acked-by: John Fastabend

Re: [PATCH net] net: sched: fix NULL pointer dereference when action calls some targets

2017-08-08 Thread Cong Wang
On Mon, Aug 7, 2017 at 7:33 PM, Xin Long wrote: > On Tue, Aug 8, 2017 at 9:15 AM, Cong Wang wrote: >> This looks like a completely API burden? > netfilter xt targets are not really compatible with netsched action. > I've got to say, the patch is just a way to make checkentry return > false and av

Re: [PATCH v3 net-next 0/5] ulp: Generalize ULP infrastructure

2017-08-08 Thread John Fastabend
On 08/08/2017 10:04 AM, Tom Herbert wrote: > On Tue, Aug 8, 2017 at 8:31 AM, John Fastabend > wrote: >> On 08/07/2017 10:28 AM, Tom Herbert wrote: >>> Generalize the ULP infrastructure that was recently introduced to >>> support kTLS. This adds a SO_ULP socket option and creates new fields in >>>

[PATCH net-next v2] wan: dscc4: add checks for dma mapping errors

2017-08-08 Thread Alexey Khoroshilov
The driver does not check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- v2: Fix issues noted by David Miller and Francois Romieu. drivers/net/wan/dscc4.c | 52 +

Re: [PATCH net-next v2] net: ipv6: avoid overhead when no custom FIB rules are installed

2017-08-08 Thread David Ahern
On 8/8/17 12:23 PM, Vincent Bernat wrote: > If the user hasn't installed any custom rules, don't go through the > whole FIB rules layer. This is pretty similar to f4530fa574df (ipv4: > Avoid overhead when no custom FIB rules are installed). > > Using a micro-benchmark module [1], timing ip6_route_

Re: sysctl, argument parsing, possible bug

2017-08-08 Thread Stephen Hemminger
On Tue, 8 Aug 2017 20:26:36 +0200 Massimo Sala wrote: > I make another test with kernel 4.9.32-15.41 > > sysctl procps version 3.2.8 > > sysctl net.ipv4.conf.eth0.100.forwarding > error: "net.ipv4.conf.eth0.100.forwarding" is an unknown key > > > so I install busybox : > > BusyBox v1

Re: [PATCH 00/35] constify net usb_device_id

2017-08-08 Thread Kalle Valo
Arvind Yadav writes: > usb_device_id are not supposed to change at runtime. All functions > working with usb_device_id provided by work with > const usb_device_id. So mark the non-const structs as const. [...] > [PATCH 16/35] wireless: ath: ar5523: constify usb_device_id > [PATCH 17/35] wi

Re: sysctl, argument parsing, possible bug

2017-08-08 Thread Massimo Sala
I make another test with kernel 4.9.32-15.41 sysctl procps version 3.2.8 sysctl net.ipv4.conf.eth0.100.forwarding error: "net.ipv4.conf.eth0.100.forwarding" is an unknown key so I install busybox : BusyBox v1.19.3 busybox sysctl net.ipv4.conf.eth0.100.forwarding net.ipv4.conf.

[PATCH net-next v2] net: ipv6: avoid overhead when no custom FIB rules are installed

2017-08-08 Thread Vincent Bernat
If the user hasn't installed any custom rules, don't go through the whole FIB rules layer. This is pretty similar to f4530fa574df (ipv4: Avoid overhead when no custom FIB rules are installed). Using a micro-benchmark module [1], timing ip6_route_output() with get_cycles(), with 40,000 routes in th

[PATCH net] net: avoid skb_warn_bad_offload false positives on UFO

2017-08-08 Thread Willem de Bruijn
From: Willem de Bruijn skb_warn_bad_offload triggers a warning when an skb enters the GSO stack at __skb_gso_segment that does not have CHECKSUM_PARTIAL checksum offload set. Commit b2504a5dbef3 ("net: reduce skb_warn_bad_offload() noise") observed that SKB_GSO_DODGY producers can trigger the ch

Re: [PATCH net] tcp: fastopen: tcp_connect() must refresh the route

2017-08-08 Thread Yuchung Cheng
On Tue, Aug 8, 2017 at 1:41 AM, Eric Dumazet wrote: > From: Eric Dumazet > > With new TCP_FASTOPEN_CONNECT socket option, there is a possibility > to call tcp_connect() while socket sk_dst_cache is either NULL > or invalid. > > +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 4 > +0 fcntl(4, F_SETFL,

Re: [PATCH] net: Reduce skb_warn_bad_offload() noise.

2017-08-08 Thread Willem de Bruijn
>> @@ -2670,6 +2670,7 @@ static inline bool skb_needs_check(struct >> sk_buff *skb, bool tx_path) >> { >> if (tx_path) >> return skb->ip_summed != CHECKSUM_PARTIAL && >> + skb->ip_summed != CHECKSUM_UNNECESSARY && >>skb->ip_summe

Re: [PATCH net-next] ibmvnic: Add netdev_dbg output for debugging

2017-08-08 Thread Nathan Fontenot
On 08/08/2017 11:27 AM, Stephen Hemminger wrote: > On Mon, 07 Aug 2017 15:02:58 -0400 > Nathan Fontenot wrote: > >> To ease debugging of the ibmvnic driver add a series of netdev_dbg() >> statements to track driver status, especially during initialization, >> removal, and resetting of the driver.

Re: [PATCH v1 net] TCP_USER_TIMEOUT and tcp_keepalive should conform to RFC5482

2017-08-08 Thread Yuchung Cheng
On Mon, Aug 7, 2017 at 11:16 AM, Rao Shoaib wrote: > Change from version 0: Rationale behind the change: > > The man page for tcp(7) states > > when used with the TCP keepalive (SO_KEEPALIVE) option, TCP_USER_TIMEOUT will > override keepalive to determine when to close a connection due to keepal

Re: [PATCH v3 net-next 3/5] sock: ULP infrastructure

2017-08-08 Thread Tom Herbert
On Tue, Aug 8, 2017 at 9:38 AM, Hannes Frederic Sowa wrote: > Tom Herbert writes: > >> +#ifdef CONFIG_MODULES >> + if (!ulp && capable(CAP_NET_ADMIN)) { >> + rcu_read_unlock(); >> + request_module("%s", name); >> + rcu_read_lock(); >> + ulp = ul

Re: [PATCH v3 net-next 0/5] ulp: Generalize ULP infrastructure

2017-08-08 Thread Tom Herbert
On Tue, Aug 8, 2017 at 8:31 AM, John Fastabend wrote: > On 08/07/2017 10:28 AM, Tom Herbert wrote: >> Generalize the ULP infrastructure that was recently introduced to >> support kTLS. This adds a SO_ULP socket option and creates new fields in >> sock structure for ULP ops and ULP data. Also, the

Re: [PATCH net] tcp: fastopen: tcp_connect() must refresh the route

2017-08-08 Thread Wei Wang
On Tue, Aug 8, 2017 at 1:41 AM, Eric Dumazet wrote: > From: Eric Dumazet > > With new TCP_FASTOPEN_CONNECT socket option, there is a possibility > to call tcp_connect() while socket sk_dst_cache is either NULL > or invalid. > > +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 4 > +0 fcntl(4, F_SETFL,

Re: [PATCH V3 net-next 03/21] net-next/hinic: Initialize api cmd resources

2017-08-08 Thread David Miller
From: Aviad Krawczyk Date: Tue, 8 Aug 2017 19:23:32 +0300 > Is it a new rule? It's at least 10 years old. > We can fix it, but I can look over the Linux Kernel source and there are > a lot of examples that have the same problem. Stop right there. Just because there is code in the kernel with

[PATCH] isdn: hisax: hfc_usb: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/isdn/hisax/hfc_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH] isdn: hfcsusb: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/isdn/hardware/mISDN/hfcsusb.h | 2 +- 1 file changed, 1 insertion(+), 1 deleti

Re: [RFC PATCH 2/2] bpf: Initialise mod[] in bpf_trace_printk

2017-08-08 Thread David Miller
From: Daniel Borkmann Date: Tue, 08 Aug 2017 10:46:52 +0200 > On 08/08/2017 12:25 AM, James Hogan wrote: >> In bpf_trace_printk(), the elements in mod[] are left uninitialised, >> but >> they are then incremented to track the width of the formats. Zero >> initialise the array just in case the mem

Re: [PATCH net] rds: Reintroduce statistics counting

2017-08-08 Thread Santosh Shilimkar
On 8/8/2017 2:13 AM, Håkon Bugge wrote: In commit 7e3f2952eeb1 ("rds: don't let RDS shutdown a connection while senders are present"), refilling the receive queue was removed from rds_ib_recv(), along with the increment of s_ib_rx_refill_from_thread. Commit 73ce4317bf98 ("RDS: make sure we post

Re: [PATCH v3 net-next 3/5] sock: ULP infrastructure

2017-08-08 Thread Hannes Frederic Sowa
Tom Herbert writes: > +#ifdef CONFIG_MODULES > + if (!ulp && capable(CAP_NET_ADMIN)) { > + rcu_read_unlock(); > + request_module("%s", name); > + rcu_read_lock(); > + ulp = ulp_find(name); > + } > +#endif It looks to me that this allows use

Re: [PATCH net-next] ibmvnic: Add netdev_dbg output for debugging

2017-08-08 Thread Stephen Hemminger
On Mon, 07 Aug 2017 15:02:58 -0400 Nathan Fontenot wrote: > To ease debugging of the ibmvnic driver add a series of netdev_dbg() > statements to track driver status, especially during initialization, > removal, and resetting of the driver. > > Signed-off-by: Nathan Fontenot Maybe use netif_dbg

Re: [PATCH V3 net-next 03/21] net-next/hinic: Initialize api cmd resources

2017-08-08 Thread Aviad Krawczyk
Hi David, Is it a new rule? We can fix it, but I can look over the Linux Kernel source and there are a lot of examples that have the same problem. I can see even code that inserted to 4.10 with the same problem. Thanks for your time and review, Aviad On 8/4/2017 1:35 AM, David Miller wrote: > F

Question about via-ircc.ko

2017-08-08 Thread Anton Volkov
Hello. While searching for races in the Linux kernel I've come across "drivers/net/irda/via-ircc.ko" module. Here are questions that I came up with while analyzing results. Lines are given using the info from Linux v4.12. Consider the following case: Thread 1:Thread 2: via_i

Re: [PATCH net v2] net/mlx4_en: don't set CHECKSUM_COMPLETE on SCTP packets

2017-08-08 Thread Saeed Mahameed
On Thu, Aug 3, 2017 at 11:54 PM, Davide Caratti wrote: > if the NIC fails to validate the checksum on TCP/UDP, and validation of IP > checksum is successful, the driver subtracts the pseudo-header checksum > from the value obtained by the hardware and sets CHECKSUM_COMPLETE. Don't > do that if pro

Re: [PATCH net v2] net/mlx4_en: don't set CHECKSUM_COMPLETE on SCTP packets

2017-08-08 Thread Saeed Mahameed
On Tue, Aug 8, 2017 at 7:06 PM, Davide Caratti wrote: > On Tue, 2017-08-08 at 18:07 +0300, Saeed Mahameed wrote: >> > { >> > __u16 length_for_csum = 0; >> > __wsum csum_pseudo_header = 0; >> > + __u8 ipproto = iph->protocol; >> > + >> > + if (unlikely(ipproto == IPP

[PATCH 04/35] net: irda: irda-usb: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/net/irda/irda-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

  1   2   3   >