[PATCH 5/5] net: defxx: constify eisa_device_id

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

[PATCH 4/5] net: hp100: constify eisa_device_id

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

[PATCH 3/5] net: de4x5: constify eisa_device_id

2017-08-18 Thread Arvind Yadav
eisa_device_id are not supposed to change at runtime. All functions working with eisa_device_id provided by work with const eisa_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/net/ethernet/dec/tulip/de4x5.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH 0/5] constify net eisa_device_id

2017-08-18 Thread Arvind Yadav
eisa_device_id are not supposed to change at runtime. All functions working with eisa_device_id provided by work with const eisa_device_id. So mark the non-const structs as const. Arvind Yadav (5): [PATCH 1/5] net: 3c509: constify eisa_device_id [PATCH 2/5] net: 3c59x: constify eisa_device_id

[PATCH 1/5] net: 3c509: constify eisa_device_id

2017-08-18 Thread Arvind Yadav
eisa_device_id are not supposed to change at runtime. All functions working with eisa_device_id provided by work with const eisa_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/net/ethernet/3com/3c509.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 2/5] net: 3c59x: constify eisa_device_id

2017-08-18 Thread Arvind Yadav
eisa_device_id are not supposed to change at runtime. All functions working with eisa_device_id provided by work with const eisa_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/net/ethernet/3com/3c59x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 2/2] vhost-net: revert vhost_exceeds_maxpend logic to its original

2017-08-18 Thread Koichiro Den
To depend on vq.num and the usage of VHOST_MAX_PEND is not succinct and in some case unexpected, so revert its logic part only. Signed-off-by: Koichiro Den --- drivers/vhost/net.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.

[PATCH 1/2] vhost: remove the possible fruitless search on iotlb prefetch

2017-08-18 Thread Koichiro Den
Signed-off-by: Koichiro Den --- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index e4613a3c362d..93e909afc1c3 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1184,7 +1184,7 @@ static int

[PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-18 Thread Koichiro Den
Facing the possible unbounded delay relying on freeing on xmit path, we also better to invoke and clear the upper layer zerocopy callback beforehand to keep them from waiting for unbounded duration in vain. For instance, this removes the possible deadlock in the case that the upper layer is a zeroc

[PATCH net-next] virtio-net: make napi_tx param easier to grasp

2017-08-18 Thread Koichiro Den
The module param napi_tx needs not to be writable for now since we do not have any means of activating/deactivating it online, which seems to be a low priority. Also make it clear that napi_tx is disabled when it has been dynamically disabled behind the scenes. Signed-off-by: Koichiro Den --- dr

Re: [PATCH RESEND 0/2] enable hires timer to timeout datagram socket

2017-08-18 Thread Richard Cochran
On Fri, Aug 18, 2017 at 10:27:56PM +, Vallish Vaidyeshwara wrote: > We have a on-demand application that uses long timeouts and needs to react to > events within milliseconds. Huh? The test program you posted does not react to any event. Thanks, Richard

[PATCH net-next 1/3 v6] net: ether: Add support for multiplexing and aggregation type

2017-08-18 Thread Subash Abhinov Kasiviswanathan
Define the multiplexing and aggregation (MAP) ether type 0xDA1A. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan --- include/uapi/linux/if_ether.h | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH net-next 2/3 v6] net: arp: Add support for raw IP device

2017-08-18 Thread Subash Abhinov Kasiviswanathan
Define the raw IP type. This is needed for raw IP net devices like rmnet. Signed-off-by: Subash Abhinov Kasiviswanathan --- include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h index cf73510..a2a6356 100644 ---

[PATCH net-next 3/3 v6] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-18 Thread Subash Abhinov Kasiviswanathan
RmNet driver provides a transport agnostic MAP (multiplexing and aggregation protocol) support in embedded module. Module provides virtual network devices which can be attached to any IP-mode physical device. This will be used to provide all MAP functionality on future hardware in a single consiste

[PATCH net-next 0/3 v6] Add support for rmnet driver

2017-08-18 Thread Subash Abhinov Kasiviswanathan
This patch adds support for the rmnet driver which is required to support recent chipsets using Qualcomm Technologies, Inc. modems. The data from hardware follows the multiplexing and aggregation protocol (MAP). This driver can be used to register onto any physical network device in IP mode. Physi

Re: [net-next PATCH 06/10] bpf: sockmap with sk redirect support

2017-08-18 Thread Alexei Starovoitov
On 8/18/17 8:30 PM, John Fastabend wrote: So this is really close to what I proposed above. For a TX_SOCKMAP simply do not attach any programs, bpf_create_map(BPF_MAP_TYPE_SOCKMAP, ) [...] For an RX_SOCKMAP, bpf_create_map(BPF_MAP_TYPE_SOCKMAP, ) bpf_prog_attach(verdict_p

Re: [RFC] about net: Fix inconsistent teardown and release of private netdev state.

2017-08-18 Thread Eric Dumazet
On Fri, 2017-08-18 at 15:58 -0700, David Miller wrote: > From: Eric Dumazet > Date: Fri, 18 Aug 2017 06:13:49 -0700 > > > On Thu, 2017-08-17 at 22:21 -0700, David Miller wrote: > >> From: Eric Dumazet > >> Date: Thu, 17 Aug 2017 15:30:40 -0700 > >> > >> > So we do not really know if we need to

Re: [net-next PATCH 06/10] bpf: sockmap with sk redirect support

2017-08-18 Thread John Fastabend
[...] (trimmed email leaving proposal - 1 summary) >> >> syscall: >> >> bpf_create_map(BPF_MAP_TYPE_SOCKMAP, ) >> bpf_prog_attach(verdict_prog, map_fd, BPF_SMAP_STREAM_VERDICT, 0); >> bpf_prog_attach(parse_prog, map_fd, BPF_SMAP_STREAM_PARSER, 0); >> bpf_map_update_elem(map_fd, key,

Re: [PATCH net] ipv6: add rcu grace period before freeing fib6_node

2017-08-18 Thread Martin KaFai Lau
On Fri, Aug 18, 2017 at 05:36:55PM -0700, Wei Wang wrote: > From: Wei Wang > > We currently keep rt->rt6i_node pointing to the fib6_node for the route. > And some functions make use of this pointer to dereference the fib6_node > from rt structure, e.g. rt6_check(). However, as there is neither > r

[PATCH net-next] liquidio: fix use of pf in pass-through mode in a virtual machine

2017-08-18 Thread Felix Manlunas
From: Rick Farrington Fix problem when PF is used in pass-through mode in a VM (w/embedded f/w). If host error reading PF num from CN23XX_PCIE_SRIOV_FDL reg, try to retrieve PF num from SLI_PKT(0)_INPUT_CONTROL (initialized by f/w). Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas

Re: [PATCH net-next v2 1/2] bpf: make htab inlining more robust wrt assumptions

2017-08-18 Thread Alexei Starovoitov
On 8/18/17 6:12 PM, Daniel Borkmann wrote: Commit 9015d2f59535 ("bpf: inline htab_map_lookup_elem()") was making the assumption that a direct call emission to the function __htab_map_lookup_elem() will always work out for JITs. This is currently true since all JITs we have are for 64 bit archs,

Re: [PATCH 0/3] MIPS,bpf: Improvements for MIPS eBPF JIT

2017-08-18 Thread Daniel Borkmann
On 08/19/2017 01:40 AM, David Daney wrote: Here are several improvements and bug fixes for the MIPS eBPF JIT. The main change is the addition of support for JLT, JLE, JSLT and JSLE ops, that were recently added. Also fix WARN output when used with preemptable kernel, and a small cleanup/optimiz

[PATCH net-next v2 2/2] bpf: inline map in map lookup functions for array and htab

2017-08-18 Thread Daniel Borkmann
Avoid two successive functions calls for the map in map lookup, first is the bpf_map_lookup_elem() helper call, and second the callback via map->ops->map_lookup_elem() to get to the map in map implementation. Implementation inlines array and htab flavor for map in map lookups. Signed-off-by: Danie

[PATCH net-next v2 1/2] bpf: make htab inlining more robust wrt assumptions

2017-08-18 Thread Daniel Borkmann
Commit 9015d2f59535 ("bpf: inline htab_map_lookup_elem()") was making the assumption that a direct call emission to the function __htab_map_lookup_elem() will always work out for JITs. This is currently true since all JITs we have are for 64 bit archs, but in case of 32 bit JITs like upcoming arm3

[PATCH net-next v2 0/2] BPF inline improvements

2017-08-18 Thread Daniel Borkmann
First one makes htab inlining more robust wrt future jits and second one inlines map in map lookups through map_gen_lookup() callback. Thanks! v1 -> v2: - BITS_PER_LONG guard in patch 1 - BPF_EMIT_CALL is on __htab_map_lookup_elem Daniel Borkmann (2): bpf: make htab inlining more robust wr

Re: [PATCH net-next 00/12] nfp: add basic ethtool callbacks to representors

2017-08-18 Thread David Miller
From: Jakub Kicinski Date: Fri, 18 Aug 2017 15:48:10 -0700 > This set extends the basic ethtool functionality to representor > netdevs. I start with providing link state via ethtool and then > move on to functions such as driver information, statistics and > FW log dump. The series contains a n

Re: [PATCH net-next 00/10] sysfs related cleanups

2017-08-18 Thread David Miller
From: Stephen Hemminger Date: Fri, 18 Aug 2017 13:46:18 -0700 > Network sysfs infrastructure changes. Mostly related to using ro_after_init > to make function tables immutable. Series applied, thanks Stephen.

[PATCH net] ipv6: add rcu grace period before freeing fib6_node

2017-08-18 Thread Wei Wang
From: Wei Wang We currently keep rt->rt6i_node pointing to the fib6_node for the route. And some functions make use of this pointer to dereference the fib6_node from rt structure, e.g. rt6_check(). However, as there is neither refcount nor rcu taken when dereferencing rt->rt6i_node, it could pote

Re: [PATCH v2 net-next] net: ipv6: put host and anycast routes on device with address

2017-08-18 Thread Hannes Frederic Sowa
David Ahern writes: > On 8/18/17 6:05 PM, David Ahern wrote: >> On 8/18/17 5:15 PM, Hannes Frederic Sowa wrote: >>> Hello David, >>> >>> David Ahern writes: >>> @@ -2688,15 +2716,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, { u32 tb_id; struct

Re: [PATCH net-next 1/2] bpf: improve htab inlining for future 32 bit jits

2017-08-18 Thread Alexei Starovoitov
On 8/18/17 5:21 PM, Daniel Borkmann wrote: On 08/19/2017 02:00 AM, Alexei Starovoitov wrote: On 8/18/17 4:51 PM, Daniel Borkmann wrote: Lets future proof htab lookup inlining, commit 9015d2f59535 ("bpf: inline htab_map_lookup_elem()") was making the assumption that a direct call emission to __h

Re: [PATCH net-next 1/2] bpf: improve htab inlining for future 32 bit jits

2017-08-18 Thread Daniel Borkmann
On 08/19/2017 02:00 AM, Alexei Starovoitov wrote: On 8/18/17 4:51 PM, Daniel Borkmann wrote: Lets future proof htab lookup inlining, commit 9015d2f59535 ("bpf: inline htab_map_lookup_elem()") was making the assumption that a direct call emission to __htab_map_lookup_elem() will always work out f

[PATCH net] ipv6: repair fib6 tree in failure case

2017-08-18 Thread Wei Wang
From: Wei Wang In fib6_add(), it is possible that fib6_add_1() picks an intermediate node and sets the node's fn->leaf to NULL in order to add this new route. However, if fib6_add_rt2node() fails to add the new route for some reason, fn->leaf will be left as NULL and could potentially cause crash

Re: [PATCH v2 net-next] net: ipv6: put host and anycast routes on device with address

2017-08-18 Thread David Ahern
On 8/18/17 6:05 PM, David Ahern wrote: > On 8/18/17 5:15 PM, Hannes Frederic Sowa wrote: >> Hello David, >> >> David Ahern writes: >> >>> @@ -2688,15 +2716,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev >>> *idev, >>> { >>> u32 tb_id; >>> struct net *net = dev_net(idev->dev);

[PATCH RFC net] fsl/man: Inherit parent device and of_node

2017-08-18 Thread Florian Fainelli
Junote Cai reported that he was not able to get a DSA setup involving the Freescale DPAA/FMAN driver to work and narrowed it down to of_find_net_device_by_node(). This function requires the network device's device reference to be correctly set which is the case here, though we have lost any device_

Re: [PATCH v2 net-next] net: ipv6: put host and anycast routes on device with address

2017-08-18 Thread David Ahern
On 8/18/17 5:15 PM, Hannes Frederic Sowa wrote: > Hello David, > > David Ahern writes: > >> @@ -2688,15 +2716,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev >> *idev, >> { >> u32 tb_id; >> struct net *net = dev_net(idev->dev); >> -struct net_device *dev = net->loopback

Re: [PATCH net-next 2/2] bpf: inline map in map lookup functions for array and htab

2017-08-18 Thread Alexei Starovoitov
On 8/18/17 4:51 PM, Daniel Borkmann wrote: Avoid two successive functions calls for the map in map lookup, first is the bpf_map_lookup_elem() helper call, and second the callback via map->ops->map_lookup_elem() to get to the map in map implementation. Implementation inlines array and htab flavor

Re: [PATCH net-next 1/2] bpf: improve htab inlining for future 32 bit jits

2017-08-18 Thread Alexei Starovoitov
On 8/18/17 4:51 PM, Daniel Borkmann wrote: Lets future proof htab lookup inlining, commit 9015d2f59535 ("bpf: inline htab_map_lookup_elem()") was making the assumption that a direct call emission to __htab_map_lookup_elem() will always work out for JITs. This is currently true since all JITs we h

[PATCH net-next 2/2] bpf: inline map in map lookup functions for array and htab

2017-08-18 Thread Daniel Borkmann
Avoid two successive functions calls for the map in map lookup, first is the bpf_map_lookup_elem() helper call, and second the callback via map->ops->map_lookup_elem() to get to the map in map implementation. Implementation inlines array and htab flavor for map in map lookups. Signed-off-by: Danie

[PATCH net-next 0/2] BPF inline improvements

2017-08-18 Thread Daniel Borkmann
First one makes htab inlining more robust wrt future jits and second one inlines map in map lookups through map_gen_lookup() callback. Thanks! Daniel Borkmann (2): bpf: improve htab inlining for future 32 bit jits bpf: inline map in map lookup functions for array and htab kernel/bpf/arrayma

[PATCH net-next 1/2] bpf: improve htab inlining for future 32 bit jits

2017-08-18 Thread Daniel Borkmann
Lets future proof htab lookup inlining, commit 9015d2f59535 ("bpf: inline htab_map_lookup_elem()") was making the assumption that a direct call emission to __htab_map_lookup_elem() will always work out for JITs. This is currently true since all JITs we have are for 64 bit archs, but in case of 32 b

[PATCH 1/3] MIPS,bpf: Fix using smp_processor_id() in preemptible splat.

2017-08-18 Thread David Daney
If the kernel is configured with preemption enabled we were getting warning stack traces for use of current_cpu_type(). Fix by moving the test between preempt_disable()/preempt_enable() and caching the results of the CPU type tests for use during code generation. Signed-off-by: David Daney ---

[PATCH 2/3] MIPS,bpf: Implement JLT, JLE, JSLT and JSLE ops in the eBPF JIT.

2017-08-18 Thread David Daney
Signed-off-by: David Daney --- arch/mips/net/ebpf_jit.c | 101 +-- 1 file changed, 72 insertions(+), 29 deletions(-) diff --git a/arch/mips/net/ebpf_jit.c b/arch/mips/net/ebpf_jit.c index 721216b..c1e21cb 100644 --- a/arch/mips/net/ebpf_jit.c +++ b/arc

[PATCH 3/3] MIPS,bpf: Cache value of BPF_OP(insn->code) in eBPF JIT.

2017-08-18 Thread David Daney
The code looks a little cleaner if we replace BPF_OP(insn->code) with the local variable bpf_op. Caching the value this way also saves 300 bytes (about 1%) in the code size of the JIT. Signed-off-by: David Daney --- arch/mips/net/ebpf_jit.c | 67

[PATCH 0/3] MIPS,bpf: Improvements for MIPS eBPF JIT

2017-08-18 Thread David Daney
Here are several improvements and bug fixes for the MIPS eBPF JIT. The main change is the addition of support for JLT, JLE, JSLT and JSLE ops, that were recently added. Also fix WARN output when used with preemptable kernel, and a small cleanup/optimization in the use of BPF_OP(insn->code). I su

Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning

2017-08-18 Thread Alexei Starovoitov
On 8/18/17 7:16 AM, Edward Cree wrote: On 18/08/17 04:21, Alexei Starovoitov wrote: On 8/15/17 12:34 PM, Edward Cree wrote: State of a register doesn't matter if it wasn't read in reaching an exit; a write screens off all reads downstream of it from all explored_states upstream of it. This al

Re: [PATCH net-next v2 00/13] amd-xgbe: AMD XGBE driver updates 2017-08-17

2017-08-18 Thread David Miller
From: Tom Lendacky Date: Fri, 18 Aug 2017 09:02:09 -0500 > The following updates are included in this driver update series: > > - Set the MDIO mode to clause 45 for the 10GBase-T configuration > - Set the MII control width to 8-bits for speeds less than 1Gbps > - Fix an issue to related to modul

Re: [PATCH] mlx5: ensure 0 is returned when vport is zero

2017-08-18 Thread David Miller
From: Colin King Date: Fri, 18 Aug 2017 14:49:25 +0100 > From: Colin Ian King > > Currently, if vport is zero then then an uninialized return status > in err is returned. Since the only return status at the end of the > function esw_add_uc_addr is zero for the current set of return paths > we

Re: [PATCH v7 net-next] net: systemport: Support 64bit statistics

2017-08-18 Thread Florian Fainelli
On 08/06/2017 09:21 PM, David Miller wrote: > From: "Jianming.qiao" > Date: Fri, 4 Aug 2017 00:07:45 +0100 > >> When using Broadcom Systemport device in 32bit Platform, ifconfig can >> only report up to 4G tx,rx status, which will be wrapped to 0 when the >> number of incoming or outgoing packet

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

2017-08-18 Thread David Miller
From: Xin Long Date: Fri, 18 Aug 2017 11:01:36 +0800 > As we know in some target's checkentry it may dereference par.entryinfo > to check entry stuff inside. But when sched action calls xt_check_target, > par.entryinfo is set with NULL. It would cause kernel panic when calling > some targets. >

Re: [PATCH net-next] bpf: Fix map-in-map checking in the verifier

2017-08-18 Thread David Miller
From: Martin KaFai Lau Date: Thu, 17 Aug 2017 18:14:43 -0700 > In check_map_func_compatibility(), a 'break' has been accidentally > removed for the BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS > cases. This patch adds it back. > > Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect

[PATCH] net: ibm: emac: Fix some error handling path in 'emac_probe()'

2017-08-18 Thread Christophe JAILLET
If 'irq_of_parse_and_map()' or 'of_address_to_resource()' fail, 'err' is known to be 0 at this point. So return -ENODEV instead in the first case and propagate the error returned by 'of_address_to_resource()' in the 2nd case. While at it, turn a 'err != 0' test into an equivalent 'err' to be more

Re: [PATCH net] rxrpc: Fix oops when discarding a preallocated service call

2017-08-18 Thread David Miller
From: David Howells Date: Fri, 18 Aug 2017 00:19:42 +0100 > rxrpc_service_prealloc_one() doesn't set the socket pointer on any new call > it preallocates, but does add it to the rxrpc net namespace call list. > This, however, causes rxrpc_put_call() to oops when the call is discarded > when the s

Re: [PATCH] irda: do not leak initialized list.dev to userspace

2017-08-18 Thread David Miller
From: Colin King Date: Thu, 17 Aug 2017 23:14:58 +0100 > From: Colin Ian King > > list.dev has not been initialized and so the copy_to_user is copying > data from the stack back to user space which is a potential > information leak. Fix this ensuring all of list is initialized to > zero. > > D

Re: [PATCH 0/2] xdp: adjust xdp redirect tracepoint

2017-08-18 Thread David Miller
From: Jesper Dangaard Brouer Date: Thu, 17 Aug 2017 18:22:27 +0200 > Working on streamlining the tracepoints for XDP. The eBPF programs > and XDP have no flow-control or queueing. Investigating using > tracepoint to provide a feedback on XDP_REDIRECT xmit overflow events. Series applied, thank

Re: [PATCH net 1/1] net/mlx4_core: Enable 4K UAR if SRIOV module parameter is not enabled

2017-08-18 Thread David Miller
From: Saeed Mahameed Date: Thu, 17 Aug 2017 18:29:52 +0300 > From: Huy Nguyen > > enable_4k_uar module parameter was added in patch cited below to > address the backward compatibility issue in SRIOV when the VM has > system's PAGE_SIZE uar implementation and the Hypervisor has 4k uar > implemen

Re: [PATCH v2 net-next] net: ipv6: put host and anycast routes on device with address

2017-08-18 Thread Hannes Frederic Sowa
Hello David, David Ahern writes: > @@ -2688,15 +2716,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev > *idev, > { > u32 tb_id; > struct net *net = dev_net(idev->dev); > - struct net_device *dev = net->loopback_dev; > + struct net_device *dev = idev->dev; > s

Re: [PATCH] PCI: Allow PCI express root ports to find themselves

2017-08-18 Thread David Miller
From: Thierry Reding Date: Thu, 17 Aug 2017 13:06:14 +0200 > From: Thierry Reding > > If the pci_find_pcie_root_port() function is called on a root port > itself, return the root port rather than NULL. > > This effectively reverts commit 0e405232871d6 ("PCI: fix oops when > try to find Root Po

Re: [PATCH net-next] liquidio: remove support for deprecated f/w cmd OCTNET_CMD_RESET_PF

2017-08-18 Thread David Miller
From: Felix Manlunas Date: Wed, 16 Aug 2017 18:30:13 -0700 > From: Rick Farrington > > Signed-off-by: Rick Farrington > Signed-off-by: Felix Manlunas Applied.

Re: [PATCH v3] net: inet: diag: expose sockets cgroup classid

2017-08-18 Thread David Miller
From: "Levin, Alexander (Sasha Levin)" Date: Thu, 17 Aug 2017 00:35:11 + > From: "Levin, Alexander (Sasha Levin)" > > This is useful for directly looking up a task based on class id rather than > having to scan through all open file descriptors. > > Signed-off-by: Sasha Levin Applied to

Re: [PATCH next] neigh: initialize neigh entry correctly during arp processing

2017-08-18 Thread David Miller
From: Mahesh Bandewar Date: Wed, 16 Aug 2017 17:02:51 -0700 > From: Mahesh Bandewar > > If the ARP processing creates a neigh entry, it's immediately marked > as STALE without timer and stays that way in that state as long as > host do not send traffic to that neighbour. > > I observed this on

Re: [PATCH net] tcp: when rearming RTO, if RTO time is in past then fire RTO ASAP

2017-08-18 Thread David Miller
From: Neal Cardwell Date: Wed, 16 Aug 2017 17:53:36 -0400 > In some situations tcp_send_loss_probe() can realize that it's unable > to send a loss probe (TLP), and falls back to calling tcp_rearm_rto() > to schedule an RTO timer. In such cases, sometimes tcp_rearm_rto() > realizes that the RTO wa

RE: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-18 Thread Dexuan Cui
> From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > > CID is not really used by us, because we only support guest<->host > communication, > > and don't support guest<->guest communication. The Hyper-V host > references > > every VM by VmID (which is invisible to the VM), and a VM can only talk t

Re: [PATCH net-next] macvlan: add offload features for encapsulation

2017-08-18 Thread David Miller
From: Dimitris Michailidis Date: Wed, 16 Aug 2017 14:34:46 -0700 > Currently macvlan devices do not set their hw_enc_features making > encapsulated Tx packets resort to SW fallbacks. Add encapsulation GSO > offloads to ->features as is done for the other GSOs and set > ->hw_enc_features. > > Sig

Re: [PATCH net v2] net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set

2017-08-18 Thread David Miller
From: Roopa Prabhu Date: Wed, 16 Aug 2017 12:38:52 -0700 > From: Roopa Prabhu > > Syzkaller hit 'general protection fault in fib_dump_info' bug on > commit 4.13-rc5.. > > Guilty file: net/ipv4/fib_semantics.c ... > This patch adds a res->fi NULL check. > > example run: > $ip route get 0.0.0.

Re: [net-next PATCH] net: rcu lock and preempt disable missing around generic xdp

2017-08-18 Thread David Miller
From: John Fastabend Date: Wed, 16 Aug 2017 11:33:19 -0700 > do_xdp_generic must be called inside rcu critical section with preempt > disabled to ensure BPF programs are valid and per-cpu variables used > for redirect operations are consistent. This patch ensures this is true > and fixes the spla

Re: [PATCH net] ipv6: reset fn->rr_ptr when replacing route

2017-08-18 Thread David Miller
From: Wei Wang Date: Wed, 16 Aug 2017 11:18:09 -0700 > From: Wei Wang > > syzcaller reported the following use-after-free issue in rt6_select(): ... > The root cause of it is that in fib6_add_rt2node(), when it replaces an > existing route with the new one, it does not update fn->rr_ptr. > Thi

Re: [PATCH v3] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()

2017-08-18 Thread David Miller
From: Alexander Potapenko Date: Wed, 16 Aug 2017 20:16:40 +0200 > KMSAN reported use of uninitialized sctp_addr->v4.sin_addr.s_addr and > sctp_addr->v6.sin6_scope_id in sctp_v6_cmp_addr() (see below). > Make sure all fields of an IPv6 address are initialized, which > guarantees that the IPv4 fiel

Re: [PATCH net] tipc: fix use-after-free

2017-08-18 Thread David Miller
From: Eric Dumazet Date: Wed, 16 Aug 2017 09:41:54 -0700 > From: Eric Dumazet > > syszkaller reported use-after-free in tipc [1] > > When msg->rep skb is freed, set the pointer to NULL, > so that caller does not free it again. ... > Signed-off-by: Eric Dumazet > Reported-by: Dmitry Vyukov

Re: [RFC] about net: Fix inconsistent teardown and release of private netdev state.

2017-08-18 Thread David Miller
From: Eric Dumazet Date: Fri, 18 Aug 2017 06:13:49 -0700 > On Thu, 2017-08-17 at 22:21 -0700, David Miller wrote: >> From: Eric Dumazet >> Date: Thu, 17 Aug 2017 15:30:40 -0700 >> >> > So we do not really know if we need to clean up or not. >> >> We always know, the answer is that whenever reg

[PATCH net-next 03/12] nfp: allow retreiving management FW logs on representors

2017-08-18 Thread Jakub Kicinski
Users should be able to dump the management FW logs on any of the driver's netdevs. Make the code only depend on the nfp_app and share it between vNICs and representors. Storing the dump flag is simply dropped for now, since we only support the argument being set to 0. Signed-off-by: Jakub Kicin

[PATCH net-next 01/12] nfp: link basic ethtool ops to representors

2017-08-18 Thread Jakub Kicinski
Start linking ethtool ops to representors. Begin by adding a separate ops structure and providing link state. Next patches will convert appropriate functions to only use nfp_port, which will make them reusable on representors. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- driver

[PATCH net-next 00/12] nfp: add basic ethtool callbacks to representors

2017-08-18 Thread Jakub Kicinski
Hi! This set extends the basic ethtool functionality to representor netdevs. I start with providing link state via ethtool and then move on to functions such as driver information, statistics and FW log dump. The series contains a number of clean ups to the ethtool stats code too, some of the lo

[PATCH net-next 07/12] nfp: store pointer to MAC statistics in nfp_port

2017-08-18 Thread Jakub Kicinski
Store pointer to device memory containing MAC statistics in nfp_port. This simplifies representor code and will be used to dump those statistics in ethtool as well. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 12

[PATCH net-next 10/12] nfp: add ethtool statistics for representors

2017-08-18 Thread Jakub Kicinski
Representors may be associated with both VFs or more importantly with physical ports. Allow vNIC and MAC statistics to be read with ethtool -S on representors. In case of vNICs we reuse the vNIC statistic helper, we just need to swap RX and TX to give statistics the "switch perspective." Signed-

[PATCH net-next 11/12] nfp: fix copy paste in names and messages regarding vNICs

2017-08-18 Thread Jakub Kicinski
Data and control vNICs currently use the same area name and error message. This could lead to confusion. Make sure the error message says "ctrl" in case of control and the data area is called "nfp.bar0". Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- drivers/net/ethernet/netronom

[PATCH net-next 06/12] nfp: split software and hardware vNIC statistics

2017-08-18 Thread Jakub Kicinski
In preparation for reporting vNIC HW stats on representors split handling of the SW and HW stats in ethtool -S. Representors don't have SW stats (since vNIC is assigned to the VM). Remove the questionable defines which assume nn variable exists in the scope. Signed-off-by: Jakub Kicinski Reviewe

[PATCH net-next 02/12] nfp: provide ethtool_drvinfo on representors

2017-08-18 Thread Jakub Kicinski
Extend representors' ethtool ops to show basic info like firmware version, driver version, and driver name. While at it don't set drvinfo.n_stats and drvinfo.regdump_len, core will invoke appropriate handlers to get those. A helper is added to turn a netdev into nfp_app for convenience. Signed-o

[PATCH net-next 08/12] nfp: report MAC statistics in ethtool

2017-08-18 Thread Jakub Kicinski
Add reporting of MAC statistics in ethtool. MAC statistics are read out from the MAC IP and accumulated by application FW, therefore their presence depends on the application FW. Add missing defines and string names for the statistics and dump them in ethtool -S. Signed-off-by: Jakub Kicinski R

[PATCH net-next 05/12] nfp: add helper for printing ethtool strings

2017-08-18 Thread Jakub Kicinski
Add a helper for printing ethtool strings and advancing the pointer correctly. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 65 +++--- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/drivers/net/

[PATCH net-next 04/12] nfp: don't report standard netdev statistics in ethtool

2017-08-18 Thread Jakub Kicinski
We have been recently called out as a bad example for reporting standard netdev statistics as part of ethtool. Fix that :) Removing standard statistics allows us to simplify the structure holding definitions since we no longer have to mux different types of statistics. Signed-off-by: Jakub Kicin

[PATCH net-next 12/12] nfp: don't reuse pointers in ring dumping

2017-08-18 Thread Jakub Kicinski
We were reusing skb pointer when reading page frag, since ring entries contain a union of a skb and frag pointer. This can be confusing to people reading the code. Refactor the code to read frag pointer directly. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- drivers/net/ethernet

[PATCH net-next 09/12] nfp: add pointer to vNIC config memory to nfp_port structure

2017-08-18 Thread Jakub Kicinski
Simplify the statistics handling code by keeping pointer to vNIC's config memory in nfp_port. Note that this is referring to the representor side of vNICs, vNIC side has the pointer in nfp_net. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- drivers/net/ethernet/netronome/nfp/flowe

Re: [PATCH RESEND 0/2] enable hires timer to timeout datagram socket

2017-08-18 Thread Vallish Vaidyeshwara
On Fri, Aug 18, 2017 at 10:18:54PM +0200, Richard Cochran wrote: > On Fri, Aug 18, 2017 at 06:44:08PM +, Vallish Vaidyeshwara wrote: > > There has been a behavior change in 4.9 kernel with refactoring of Kernel > > timer wheel in 4.8. We have a use case wherein our datagram socket > > applicati

Re: [PATCH V4 net 0/2] ipv6: fix flowlabel issue for reset packet

2017-08-18 Thread David Miller
From: Martin KaFai Lau Date: Fri, 18 Aug 2017 13:51:36 -0700 > It seems like that middle box specifically drops TCP_RST if it > does not know anything about this flow. Since the flowlabel of the TCP_RST > (sent in TW state) is always different, it always lands to a different middle > box. All o

RE: [PATCH net-next 3/3] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-18 Thread Dexuan Cui
> From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > Sent: Thursday, August 17, 2017 07:56 > To: Dexuan Cui > On Tue, Aug 15, 2017 at 10:18:41PM +, Dexuan Cui wrote: > > +static u32 hvs_get_local_cid(void) > > +{ > > + return VMADDR_CID_ANY; > > +} > > Interesting concept: the guest never

Re: [PATCH net-next] liquidio: fix Smatch error

2017-08-18 Thread David Miller
From: Felix Manlunas Date: Fri, 18 Aug 2017 13:07:19 -0700 > From: Intiyaz Basha > > Fix Smatch error by not dereferencing iq pointer if it's NULL. > > See http://marc.info/?l=kernel-janitors&m=150296723301129&w=2 > > Also, remove unnecessary parentheses. > > Fixes: d314ac222829 ("liquidio:

Re: [PATCH v3 net-next] ipv4: convert dst_metrics.refcnt from atomic_t to refcount_t

2017-08-18 Thread David Miller
From: Eric Dumazet Date: Fri, 18 Aug 2017 12:08:07 -0700 > From: Eric Dumazet > > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-fr

Re: [PATCH net v3] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread David Miller
From: Matthew Dawson Date: Fri, 18 Aug 2017 15:04:54 -0400 > Due to commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac ("udp: remove > headers from UDP packets before queueing"), when udp packets are being > peeked the requested extra offset is always 0 as there is no need to skip > the udp header.

Re: [PATCH net-next 00/11] net: dsa: add generic debugfs interface

2017-08-18 Thread Florian Fainelli
On 08/14/2017 03:22 PM, Vivien Didelot wrote: > This patch series adds a generic debugfs interface for the DSA > framework, so that all switch devices benefit from it, e.g. Marvell, > Broadcom, Microchip or any other DSA driver. > > This is really convenient for debugging, especially CPU ports and

[PATCH net-next] i40e: fix a typo in i40e_pf documentation.

2017-08-18 Thread Rami Rosen
This patch fixes a typo in i40e_pf object documentation; num_req_vfs refers to the number of VFs requested for the PF. Signed-off-by: Rami Rosen --- drivers/net/ethernet/intel/i40e/i40e.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e.h

RE: [PATCH net-next 2/3] vsock: fix vsock_dequeue/enqueue_accept race

2017-08-18 Thread Dexuan Cui
> From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > Sent: Thursday, August 17, 2017 07:06 > > On Tue, Aug 15, 2017 at 10:15:39PM +, Dexuan Cui wrote: > > With the current code, when vsock_dequeue_accept() is removing a sock > > from the list, nothing prevents vsock_enqueue_accept() from add

[PATCH 2/2] netfilter/libxt_hashlimit: new feature/algorithm for xt_hashlimit

2017-08-18 Thread Vishwanath Pai
This patch adds a new feature to hashlimit that allows matching on the current packet/byte rate without rate limiting. This can be enabled with a new flag --hashlimit-rate-match. The match returns true if the current rate of packets is above/below the user specified value. The main difference betw

[PATCH 1/2] netfilter/xt_hashlimit: new feature/algorithm for xt_hashlimit

2017-08-18 Thread Vishwanath Pai
This patch adds a new feature to hashlimit that allows matching on the current packet/byte rate without rate limiting. This can be enabled with a new flag --hashlimit-rate-match. The match returns true if the current rate of packets is above/below the user specified value. The main difference betw

Re: [PATCH V4 net 0/2] ipv6: fix flowlabel issue for reset packet

2017-08-18 Thread Martin KaFai Lau
On Fri, Aug 18, 2017 at 07:50:03AM -0700, Tom Herbert wrote: > > We had been using the auto_flowlabels=1 (i.e. essentially enable flowlabel) > > mainly because we want to take the benefit of dst_negative_advice() when > > tcp_write_timeout() happens. > > > > During our test, our system handles quit

[PATCH net-next 06/10] net: drop unused attribute argument from sysfs queue funcs

2017-08-18 Thread Stephen Hemminger
The show and store functions don't need/use the attribute. Signed-off-by: Stephen Hemminger --- include/linux/netdevice.h | 5 ++--- net/core/net-sysfs.c | 37 +++-- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git a/include/linux/netdevice.h b

[PATCH net-next 08/10] net: make queue attributes ro_after_init

2017-08-18 Thread Stephen Hemminger
The XPS queue attributes can be ro_after_init. Also use __ATTR_RX macros to simplify initialization. Signed-off-by: Stephen Hemminger --- net/core/net-sysfs.c | 40 +++- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/net/core/net-sysfs.c b/net

[PATCH net-next 03/10] net: make net_class ro_after_init

2017-08-18 Thread Stephen Hemminger
The net_class in sysfs is only modified on init. Signed-off-by: Stephen Hemminger --- net/core/net-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 40937ee63f14..99061b0a1ebd 100644 --- a/net/core/net-sysfs.c +++ b/net/

[PATCH net-next 05/10] net: make net sysfs attributes ro_after_init

2017-08-18 Thread Stephen Hemminger
The attributes of net devices are immutable. Ideally, attribute groups would contain const attributes but there are too many places that do modifications of list during startup (in other code) to allow that. Signed-off-by: Stephen Hemminger --- net/core/net-sysfs.c | 4 ++-- 1 file changed, 2 i

[PATCH net-next 07/10] net: make BQL sysfs attributes ro_after_init

2017-08-18 Thread Stephen Hemminger
Also fix macro to not have ; at end. Signed-off-by: Stephen Hemminger --- net/core/net-sysfs.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 48714c8024f3..a4af5e2ff398 100644 --- a/net/core/net-sysfs

[PATCH net-next 02/10] net: constify netdev_class_file

2017-08-18 Thread Stephen Hemminger
These functions are wrapper arount class_create_file which can take a const attribute. Signed-off-by: Stephen Hemminger --- include/linux/netdevice.h | 8 net/core/net-sysfs.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/netdevice.h b/inclu

  1   2   3   >