Re: [PATCH net V2] virtio-net: drop NETIF_F_FRAGLIST

2015-08-04 Thread Michael S. Tsirkin
On Wed, Aug 05, 2015 at 10:34:04AM +0800, Jason Wang wrote: > virtio declares support for NETIF_F_FRAGLIST, but assumes > that there are at most MAX_SKB_FRAGS + 2 fragments which isn't > always true with a fraglist. > > A longer fraglist in the skb will make the call to skb_to_sgvec overflow > the

[PATCH net-next] vxlan: combine VXLAN_FLOWBASED into VXLAN_COLLECT_METADATA

2015-08-04 Thread Alexei Starovoitov
IFLA_VXLAN_FLOWBASED is useless without IFLA_VXLAN_COLLECT_METADATA, so combine them into single IFLA_VXLAN_COLLECT_METADATA flag. 'flowbased' doesn't convey real meaning of the vxlan tunnel mode. This mode can be used by routing, tc+bpf and ovs. Only ovs is strictly flow based, so 'collect metadat

[PATCH v3 net-next 1/2] RDS-TCP: Make RDS-TCP work correctly when it is set up in a netns other than init_net

2015-08-04 Thread Sowmini Varadhan
Open the sockets calling sock_create_kern() with the correct struct net pointer, and use that struct net pointer when verifying the address passed to rds_bind(). Signed-off-by: Sowmini Varadhan --- v2: David Ahern comments. net/rds/bind.c|3 ++- net/rds/connection.c | 16

[PATCH v3 net-next 0/2] RDS-TCP: Network namespace support

2015-08-04 Thread Sowmini Varadhan
This patch series contains the set of changes to correctly set up the infra for PF_RDS sockets that use TCP as the transport in multiple network namespaces. Patch 1 in the series is the minimal set of changes to allow a single instance of RDS-TCP to run in any (i.e init_net or other) net namespac

[PATCH v3 net-next 2/2] RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns.

2015-08-04 Thread Sowmini Varadhan
Register pernet subsys init/stop functions that will set up and tear down per-net RDS-TCP listen endpoints. Unregister pernet subusys functions on 'modprobe -r' to clean up these end points. Enable keepalive on both accept and connect socket endpoints. The keepalive timer expiration will ensure th

Re: rtnl_mutex deadlock?

2015-08-04 Thread Cong Wang
On Tue, Aug 4, 2015 at 8:48 AM, Linus Torvalds wrote: > Sorry for the spamming of random rtnetlink people, but I just resumed > my laptop at PDX, and networking was dead. > > It looks like a deadlock on rtnl_mutex, possibly due to some error > path not releasing the lock. No network op was making

[PATCHv2 net-next 3/9] ipv6: Export nf_ct_frag6_gather()

2015-08-04 Thread Joe Stringer
Signed-off-by: Joe Stringer Acked-by: Thomas Graf --- net/ipv6/netfilter/nf_conntrack_reasm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 6d02498..701cd2b 100644 --- a/net/ipv6/netfilter/nf_conntrack

[PATCHv2 net-next 0/9] OVS conntrack support

2015-08-04 Thread Joe Stringer
The goal of this series is to allow OVS to send packets through the Linux kernel connection tracker, and subsequently match on fields populated by conntrack. This version addresses the feedback from v2, mostly minor tidyups and a few corner cases that were missed in v1. The biggest change is rathe

[PATCHv2 net-next 4/9] netfilter: connlabels: Export setting connlabel length

2015-08-04 Thread Joe Stringer
Add functions to change connlabel length into nf_conntrack_labels.c so they may be reused by other modules like OVS and nftables without needing to jump through xt_match_check() hoops. Suggested-by: Florian Westphal Signed-off-by: Joe Stringer --- v2: Protect connlabel modification with spinlock

[PATCHv2 net-next 1/9] openvswitch: Serialize acts with original netlink len

2015-08-04 Thread Joe Stringer
Previously, we used the kernel-internal netlink actions length to calculate the size of messages to serialize back to userspace. However,the sw_flow_actions may not be formatted exactly the same as the actions on the wire, so store the original actions length when de-serializing and re-use the orig

[PATCHv2 net-next 9/9] openvswitch: Allow attaching helpers to ct action

2015-08-04 Thread Joe Stringer
Add support for using conntrack helpers to assist protocol detection. The new OVS_CT_ATTR_HELPER attribute of the ct action specifies a helper to be used for this connection. Example ODP flows allowing FTP connections from ports 1->2: in_port=1,tcp,action=ct(helper=ftp,commit),2 in_port=2,tcp,ct_s

[PATCHv2 net-next 6/9] openvswitch: Allow matching on conntrack mark

2015-08-04 Thread Joe Stringer
From: Justin Pettit Allow matching and setting the conntrack mark field. As with conntrack state and zone, these are populated by executing the ct() action. Unlike these, the ct_mark is also a writable field. The set_field() action may be used to modify the mark, which will take effect on the mos

[PATCHv2 net-next 8/9] openvswitch: Allow matching on conntrack label

2015-08-04 Thread Joe Stringer
Allow matching and setting the conntrack label field. As with ct_mark, this is populated by executing the ct() action, and is a writable field. The set_field() action may be used to modify the label, which will take effect on the most recent conntrack entry. E.g.: actions:ct(zone=1),set_field(1->c

[PATCHv2 net-next 7/9] netfilter: Always export nf_connlabels_replace()

2015-08-04 Thread Joe Stringer
The following patches will reuse this code from OVS. Signed-off-by: Joe Stringer --- net/netfilter/nf_conntrack_labels.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_labels.c b/net/netfilter/nf_conntrack_labels.c index 06e71a0..3ce5c31 100644 --- a/net/netfilt

[PATCHv2 net-next 2/9] openvswitch: Move MASKED* macros to datapath.h

2015-08-04 Thread Joe Stringer
This will allow the ovs-conntrack code to reuse these macros. Signed-off-by: Joe Stringer Acked-by: Thomas Graf --- net/openvswitch/actions.c | 52 ++ net/openvswitch/datapath.h | 4 2 files changed, 29 insertions(+), 27 deletions(-) diff --gi

[PATCHv2 net-next 5/9] openvswitch: Add conntrack action

2015-08-04 Thread Joe Stringer
Expose the kernel connection tracker via OVS. Userspace components can make use of the "ct()" action, followed by "recirculate", to populate the conntracking state in the OVS flow key, and subsequently match on that state. Example ODP flows allowing traffic from 1->2, only replies from 2->1: in_po

Re: [PATCH net-next 1/9] openvswitch: Scrub packet in ovs_vport_receive()

2015-08-04 Thread Joe Stringer
On 1 August 2015 at 12:17, Thomas Graf wrote: > On 07/31/15 at 10:51am, Joe Stringer wrote: >> On 31 July 2015 at 07:34, Hannes Frederic Sowa wrote: >> > In general, this shouldn't be necessary as the packet should already be >> > scrubbed before they arrive here. >> > >> > Could you maybe add a

Re: [PATCH v2 net-next 2/2] RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns.

2015-08-04 Thread Cong Wang
On Mon, Aug 3, 2015 at 10:29 PM, Sowmini Varadhan wrote: > +static struct pernet_operations rds_tcp_net_ops = { > + .init = rds_tcp_init_net, > + .exit = rds_tcp_exit_net, > + .id = &rds_tcp_netid, > + .size = sizeof(struct rds_tcp_net), > +}; > + > +static void rds_tcp_kil

Re: [PATCH net-next v3 2/3] openvswitch: Use regular GRE net_device instead of vport

2015-08-04 Thread Alexei Starovoitov
On Tue, Aug 04, 2015 at 07:50:40PM -0700, Pravin Shelar wrote: > > I am planning on adding the ip_gre netlink interface later on. OVS > userspace needs same interface to directly create the GRE device > without vport-gre module. vport-gre module is compatibility code. If > you want I can do it in

Re: [PATCH] ipv6:Fix concurrent access issue in the function inet6_rtm_deladdr

2015-08-04 Thread Cong Wang
On Tue, Aug 4, 2015 at 7:39 PM, Nicholas Krause wrote: > From: Nicholas Krause > > This fixes the issue with conncurrent access when calling the function > inte6_addr_del due to this function using non locked wrapper versions > of certain functions by locking the routing mutex before and after th

Re: veths often slow to come up

2015-08-04 Thread Cong Wang
(Cc'ing netdev for network issues) On Tue, Aug 4, 2015 at 6:42 AM, Shaun Crampton wrote: > Please CC me on any responses, thanks. > > Setting both ends of a veth to be oper UP completes very quickly but I > find that pings only start flowing over the veth after about a second. > This seems to cor

Re: [PATCH net-next v3 2/3] openvswitch: Use regular GRE net_device instead of vport

2015-08-04 Thread Pravin Shelar
On Tue, Aug 4, 2015 at 7:27 PM, Alexei Starovoitov wrote: > On Tue, Aug 04, 2015 at 04:22:35PM -0700, Pravin B Shelar wrote: >> Following patch adds support for flow based tunnel to GRE >> tap deivces. Using flow based tunneling, we can implement >> OVS GRE vport. This patch removes all of the OVS

[PATCH] ipv6:Fix concurrent access issue in the function inet6_rtm_deladdr

2015-08-04 Thread Nicholas Krause
From: Nicholas Krause This fixes the issue with conncurrent access when calling the function inte6_addr_del due to this function using non locked wrapper versions of certain functions by locking the routing mutex before and after this call with rtnl_lock/unlock. After the unlocking just return th

[PATCH net V2] virtio-net: drop NETIF_F_FRAGLIST

2015-08-04 Thread Jason Wang
virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRAGLIST so we on

Re: [PATCH net] virtio-net: drop NETIF_F_FRAGLIST

2015-08-04 Thread Jason Wang
On 08/04/2015 07:11 PM, Sergei Shtylyov wrote: > Hello. > > On 8/4/2015 12:55 PM, Jason Wang wrote: > >> virtio declares support for NETIF_F_FRAGLIST, but assumes >> that there are at most MAX_SKB_FRAGS + 2 fragments which isn't >> always true with a fraglist. > >> A longer fraglist in the skb wi

Re: [PATCH net-next v3 2/3] openvswitch: Use regular GRE net_device instead of vport

2015-08-04 Thread Alexei Starovoitov
On Tue, Aug 04, 2015 at 04:22:35PM -0700, Pravin B Shelar wrote: > Following patch adds support for flow based tunnel to GRE > tap deivces. Using flow based tunneling, we can implement > OVS GRE vport. This patch removes all of the OVS > specific GRE code and make OVS use a ip_gre net_device. > Min

Re: [PATCH v6 3/4] bpf: Implement function bpf_perf_event_read() that get the selected hardware PMU conuter

2015-08-04 Thread xiakaixu
于 2015/8/5 1:55, Alexei Starovoitov 写道: > On 8/4/15 1:58 AM, Kaixu Xia wrote: >> +static int check_func_limit(struct bpf_map **mapp, int func_id) > > how about 'check_map_func_compatibility' or 'check_map_func_affinity' ? > >> +{ >> +struct bpf_map *map = *mapp; > > why pass pointer to a poi

[RFC PATCH v5 net-next 0/4] tcp: add NV congestion control

2015-08-04 Thread Lawrence Brakmo
This patchset adds support for NV congestion control. Changes from v4: passing structure as constant in pkts_acked() Consists of the following patches: [RFC PATCH v5 net-next 1/4] tcp: replace cnt & rtt with struct in [RFC PATCH v5 net-next 2/4] tcp: refactor struct tcp_skb_cb [RFC PATCH v5 net

[RFC PATCH v5 net-next 4/4] tcp: add NV congestion control

2015-08-04 Thread Lawrence Brakmo
This is a request for comments. TCP-NV (New Vegas) is a major update to TCP-Vegas. An earlier version of NV was presented at 2010's LPC. It is a delayed based congestion avoidance for the data center. This version has been tested within a 10G rack where the HW RTTs are 20-50us. A description of T

[RFC PATCH v5 net-next 2/4] tcp: refactor struct tcp_skb_cb

2015-08-04 Thread Lawrence Brakmo
Refactor tcp_skb_cb to create two overlaping areas to store state for incoming or outgoing skbs based on comments by Neal Cardwell to tcp_nv patch: AFAICT this patch would not require an increase in the size of sk_buff cb[] if it were to take advantage of the fact that the tcp_skb_cb head

[RFC PATCH v5 net-next 3/4] tcp: add in_flight to tcp_skb_cb

2015-08-04 Thread Lawrence Brakmo
Add in_flight (bytes in flight when packet was sent) field to tx component of tcp_skb_cb and make it available to congestion modules' pkts_acked() function through the ack_sample function argument. Signed-off-by: Lawrence Brakmo --- include/net/tcp.h | 2 ++ net/ipv4/tcp_input.c | 5 -

[RFC PATCH v5 net-next 1/4] tcp: replace cnt & rtt with struct in pkts_acked()

2015-08-04 Thread Lawrence Brakmo
Replace 2 arguments (cnt and rtt) in the congestion control modules' pkts_acked() function with a struct. This will allow adding more information without having to modify existing congestion control modules (tcp_nv in particular needs bytes in flight when packet was sent). As proposed by Neal Card

[PATCH] stmmac: dwmac-ipq806x: fix static checker warning

2015-08-04 Thread Mathieu Olivari
The patch b1c17215d718: "stmmac: add ipq806x glue layer", leads to the following static checker warning: .../stmmac/dwmac-ipq806x.c:314 ipq806x_gmac_probe() warn: double left shift '1 << (1 << gmac->id)' The NSS_COMMON_CLK_SRC_CTRL_OFFSET macro is used once as an offset, and once as a mask, which

Re: net: Fix skb_set_peeked use-after-free bug

2015-08-04 Thread Herbert Xu
On Tue, Aug 04, 2015 at 08:30:23AM -0700, Brenden Blanco wrote: > > This patch holds good in my testing. Thanks! Thanks for testing. Let's add a tag for patchwork: Tested-by: Brenden Blanco -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.a

Re: [PATCH net 0/2] bridge: netlink: add missing policy entries and sizes

2015-08-04 Thread Stephen Hemminger
On Tue, 4 Aug 2015 19:06:31 +0200 Nikolay Aleksandrov wrote: > From: Nikolay Aleksandrov > > Hi, > When IFLA_BRPORT_PROXYARP and PROXYARP_WIFI were introduced they weren't > accounted for in the get_slave_size() callback and didn't get a policy > entry, so fix it now. Sending as two separate p

[PATCH net-next v3 3/3] gre: Remove support for sharing GRE protocol hook.

2015-08-04 Thread Pravin B Shelar
Support for sharing GREPROTO_CISCO port was added so that OVS gre port and kernel GRE devices can co-exist. After flow-based tunneling patches OVS GRE protocol processing is completely moved to ip_gre module. so there is no need for GRE protocol hook. Following patch consolidates GRE protocol relat

[PATCH net-next v3 1/3] openvswitch: Move tunnel destroy function to oppenvswitch module.

2015-08-04 Thread Pravin B Shelar
This function will be used in gre and geneve vport implementations. Signed-off-by: Pravin B Shelar --- net/openvswitch/vport-netdev.c | 16 net/openvswitch/vport-netdev.h | 1 + net/openvswitch/vport-vxlan.c | 17 + 3 files changed, 18 insertions(+), 16 deletio

[PATCH net-next v3 0/3] GRE: Use flow based tunneling for OVS GRE vport.

2015-08-04 Thread Pravin B Shelar
Following patches make use of new flow based tunneling API from kernel. This allows us to directly use netdev based GRE tunnel implementation. While doing so I have removed GRE demux API which were targeted for OVS. Most of GRE protocol code is now consolidated in ip_gre module. v2-v3: Add API to

[PATCH net-next v3 2/3] openvswitch: Use regular GRE net_device instead of vport

2015-08-04 Thread Pravin B Shelar
Following patch adds support for flow based tunnel to GRE tap deivces. Using flow based tunneling, we can implement OVS GRE vport. This patch removes all of the OVS specific GRE code and make OVS use a ip_gre net_device. Minimal GRE vport is kept to handle compatibility with current userspace appli

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-04 Thread Boris Ostrovsky
On 08/04/2015 02:12 PM, Julien Grall wrote: /* * We detect special mappings in one of two ways: @@ -217,9 +232,13 @@ static inline unsigned long bfn_to_local_pfn(unsigned long mfn) /* VIRT <-> MACHINE conversion */ #define virt_to_machine(v)(phys_to_machine(XPADDR(__pa(v

Re: [Xen-devel] printk from softirq on xen: hard lockup

2015-08-04 Thread Jason A. Donenfeld
Hey David, Sorry for the premature response on my phone earlier. Real reply follows. >> rcu_read_lock, when using Xen PV. Relevant excerpts of the > ^^ PV guest? Yes. The lockup occurs on a PV guest. Nothing special at all about the configuration. Vanilla upstream

RE: [PATCH 2/3] missing rtnl_unlock in igb_sriov_reinit()

2015-08-04 Thread Brown, Aaron F
> From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Vasily Averin > Sent: Tuesday, July 07, 2015 8:54 AM > To: David S. Miller; netdev@vger.kernel.org > Cc: intel-wired-...@lists.osuosl.org; Kirsher, Jeffrey T; Fujinaka, Todd > Subject: [PATCH 2/3] missing rtnl

Re: [PATCH 1/1] net/ipv4: Enable flow-based ECMP

2015-08-04 Thread Tom Herbert
On Tue, Aug 4, 2015 at 12:37 AM, Oleg A Arkhangelsky wrote: > > > 04.08.2015, 04:29, "Richard Laing" : >> Enable flow-based ECMP. > > Looks like your approach is only restricted to the case when sockets are > involved. What about forwarded traffic (IP routing case)? > skb_get_hash_flowi4 can be ca

RE: [PATCH] igb: do not re-init SR-IOV during probe

2015-08-04 Thread Brown, Aaron F
> From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Stefan Assmann > Sent: Friday, July 10, 2015 6:01 AM > To: intel-wired-...@lists.osuosl.org > Cc: netdev@vger.kernel.org; Kirsher, Jeffrey T; sassm...@kpanic.de > Subject: [PATCH] igb: do not re-init SR-IOV du

Re: [PATCH 1/1] net/ipv4: Enable flow-based ECMP

2015-08-04 Thread Richard Laing
Hi Oleg, I hadn't seen that patch, thanks, it looks like a pretty thorough solution. Best Regards, Richard On 08/04/2015 07:37 PM, Oleg A Arkhangelsky wrote: > > 04.08.2015, 04:29, "Richard Laing" : >> Enable flow-based ECMP. > Looks like your approach is only restricted to the case when sockets

Re: [PATCH 1/1] net/ipv4: Enable flow-based ECMP

2015-08-04 Thread Richard Laing
Hi Stephen, Given that fib_nhs is currently an int I would rather keep live_nexthops also as an int to match, probably fib_nhs could at least be set as unsigned or changed to u16 or even u8 perhaps. Best Regards, Richard On 08/04/2015 05:31 PM, Stephen Hemminger wrote: > On Tue, 4 Aug 2015 13

Re: [ovs-dev] [PATCH net-next v2] openvswitch: Make 100 percents packets sampled when sampling rate is 1.

2015-08-04 Thread Pravin Shelar
On Mon, Aug 3, 2015 at 9:07 PM, Wenyu Zhang wrote: > When sampling rate is 1, the sampling probability is UINT32_MAX. The packet > should be sampled even the prandom_u32() generate the number of UINT32_MAX. > And none packet need be sampled when the probability is 0. > > Signed-off-by: Wenyu Zhang

[PATCH] net: netcp: fix unused interface rx buffer size configuration

2015-08-04 Thread WingMan Kwok
Prior to this patch, rx buffer size for each rx queue of an interface is configurable through dts bindings. But for an interface, the first rx queue's rx buffer size is always the usual MTU size (plus usual overhead) and page size for the remaining rx queues (if they are enabled by specifying a non

Re: [PATCH net] r8169: enforce RX_MULTI_EN on rtl8168ep/8111ep chips

2015-08-04 Thread Francois Romieu
Ivan Vecera : > Enforcing this flag in RxConfig for the mentioned chips fixes netdev > watchdog issues prepended with AMD IOMMU message(s) like: > AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x001d > address=0x3000 flags=0x0050] FWIW: Acked-by: Francois Romieu Adding

Diagnosing arp/neighbour table overflows and RFC for a related patch idea

2015-08-04 Thread Rick Jones
Some of my colleagues have been doing a bit of scale testing in the likes of OpenStack. They get to a certain number of instances launched and then they start seeing messages of the form: Sep 25 08:17:37 overcloud-novacompute7-hqauwkkp6cnb kernel: [176969.125887] net_ratelimit: 62 callbacks s

[PATCH net] r8169: enforce RX_MULTI_EN on rtl8168ep/8111ep chips

2015-08-04 Thread Ivan Vecera
Enforcing this flag in RxConfig for the mentioned chips fixes netdev watchdog issues prepended with AMD IOMMU message(s) like: AMD-Vi: Event logged [IO_PAGE_FAULT device=01:00.0 domain=0x001d address=0x3000 flags=0x0050] Note that this flag is also set in Realtek's own driver for thes

Re: [B.A.T.M.A.N.] pull request [net]: batman-adv 20150804

2015-08-04 Thread Antonio Quartulli
On 04/08/15 21:40, David Miller wrote: > From: Antonio Quartulli > Date: Tue, 4 Aug 2015 18:35:20 +0200 > >> here you have our batch of fixes intended for net/linux-4.2. > > Sorry, you can't come to me this late in the -RC series with such > a huge collection of bug fixes. > > Break out the

Re: pull request [net]: batman-adv 20150804

2015-08-04 Thread David Miller
From: Antonio Quartulli Date: Tue, 4 Aug 2015 18:35:20 +0200 > here you have our batch of fixes intended for net/linux-4.2. Sorry, you can't come to me this late in the -RC series with such a huge collection of bug fixes. Break out the most important critical ones, and only submit those. The r

[PATCH net] net: thunderx: remove effective "default y" from Kconfig if ARCH_THUNDER=y

2015-08-04 Thread Ian Campbell
As well as for kernels built only for ThunderX ARCH_THUNDERX is also enabled for kernels which support multiple platforms (such as distro kernels). Thus "default ARCH_THUNDER" is inappropriate. I believe default m is equally frowned upon, so remove the line completely rather than "default m if ARC

Re: [PATCH 8/8] can: replace timestamp as unique skb attribute

2015-08-04 Thread Greg KH
On Mon, Jul 27, 2015 at 08:34:32PM +0200, Oliver Hartkopp wrote: > Hello Greg, > > On 12.07.2015 21:18, Marc Kleine-Budde wrote: > >From: Oliver Hartkopp > > > >Commit 514ac99c64b "can: fix multiple delivery of a single CAN frame for > >overlapping CAN filters" requires the skb->tstamp to be set

[PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-04 Thread Julien Grall
Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN is meant, I suspect this is because the first support for Xen was for PV. This resulted in some misimplementation of helpers on ARM and confused developers about the expected behavior. For instance, with pfn_to_mfn, we expect to

[PATCH v2 0/8] Use correctly the Xen memory terminologies in Linux

2015-08-04 Thread Julien Grall
Hi all, This patch series aims to use the memory terminologies described in include/xen/mm.h [1] for Linux xen code. Linux is using mistakenly MFN when GFN is meant, I suspect this is because the first support of Xen was for PV. This has brought some misimplementation of memory helpers on ARM and

Re: [PATCH v6 3/4] bpf: Implement function bpf_perf_event_read() that get the selected hardware PMU conuter

2015-08-04 Thread Alexei Starovoitov
On 8/4/15 1:58 AM, Kaixu Xia wrote: +static int check_func_limit(struct bpf_map **mapp, int func_id) how about 'check_map_func_compatibility' or 'check_map_func_affinity' ? +{ + struct bpf_map *map = *mapp; why pass pointer to a pointer? single pointer would be be fine. + bool

Re: [PATCH] netfilter: ipt_SYNPROXY: fix sending window update to client

2015-08-04 Thread Pablo Neira Ayuso
On Tue, Jul 28, 2015 at 12:53:26AM +0200, Phil Sutter wrote: > Upon receipt of SYNACK from the server, ipt_SYNPROXY first sends back an ACK > to > finish the server handshake, then calls nf_ct_seqadj_init() to initiate > sequence number adjustment of forwarded packets to the client and finally >

Re: [PATCH v6 2/4] bpf: Add new bpf map type to store the pointer to struct perf_event

2015-08-04 Thread Alexei Starovoitov
On 8/4/15 1:58 AM, Kaixu Xia wrote: diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index 45df657..b1e98ff 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c @@ -273,3 +273,60 @@ static int __init register_prog_array_map(void) return 0; } late_initcall(register_

Re: [PATCH] net: pktgen: don't abuse current->state in pktgen_thread_worker()

2015-08-04 Thread Marcelo Ricardo Leitner
On Tue, Aug 04, 2015 at 07:08:27PM +0200, Oleg Nesterov wrote: > On 08/04, Marcelo Ricardo Leitner wrote: > > > > On Tue, Aug 04, 2015 at 06:33:34PM +0200, Oleg Nesterov wrote: > > > Commit 1fbe4b46caca "net: pktgen: kill the Wait for kthread_stop > > > code in pktgen_thread_worker()" removed (in p

Re: [Xen-devel] printk from softirq on xen: hard lockup

2015-08-04 Thread David Vrabel
On 04/08/15 17:41, Jason A. Donenfeld wrote: > Hi folks, > > Paul McKenney and I had an offline discussion about some rcu questions > that eventually lead into me investigating a strange full lock-up I'm > experiencing as a consequence of a printk in softirq inside of an > rcu_read_lock, when usin

Re: [PATCH] net: pktgen: don't abuse current->state in pktgen_thread_worker()

2015-08-04 Thread Oleg Nesterov
On 08/04, Marcelo Ricardo Leitner wrote: > > On Tue, Aug 04, 2015 at 06:33:34PM +0200, Oleg Nesterov wrote: > > Commit 1fbe4b46caca "net: pktgen: kill the Wait for kthread_stop > > code in pktgen_thread_worker()" removed (in particular) the final > > __set_current_state(TASK_RUNNING) and I didn't n

[PATCH net 0/2] bridge: netlink: add missing policy entries and sizes

2015-08-04 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Hi, When IFLA_BRPORT_PROXYARP and PROXYARP_WIFI were introduced they weren't accounted for in the get_slave_size() callback and didn't get a policy entry, so fix it now. Sending as two separate patches because the first one goes further back than the second and thus we g

[PATCH net 1/2] bridge: netlink: account for the IFLA_BRPORT_PROXYARP attribute size and policy

2015-08-04 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The attribute size wasn't accounted for in the get_slave_size() callback (br_port_get_slave_size) when it was introduced, so fix it now. Also add a policy entry for it in br_port_policy. Signed-off-by: Nikolay Aleksandrov Fixes: 958501163ddd ("bridge: Add support for I

[PATCH net 2/2] bridge: netlink: account for the IFLA_BRPORT_PROXYARP_WIFI attribute size and policy

2015-08-04 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The attribute size wasn't accounted for in the get_slave_size() callback (br_port_get_slave_size) when it was introduced, so fix it now. Also add a policy entry for it in br_port_policy. Signed-off-by: Nikolay Aleksandrov Fixes: 842a9ae08a25 ("bridge: Extend Proxy ARP

[PATCH 04/14] batman-adv: Make DAT capability changes atomic

2015-08-04 Thread Antonio Quartulli
From: Linus Lüssing Bitwise OR/AND assignments in C aren't guaranteed to be atomic. One OGM handler might undo the set/clear of a specific bit from another handler run in between. Fix this by using the atomic set_bit()/clear_bit()/test_bit() functions. Fixes: 17cf0ea455f1 ("batman-adv: tvlv - a

[PATCH 07/14] batman-adv: Make MCAST capability changes atomic

2015-08-04 Thread Antonio Quartulli
From: Linus Lüssing Bitwise OR/AND assignments in C aren't guaranteed to be atomic. One OGM handler might undo the set/clear of a specific bit from another handler run in between. Fix this by using the atomic set_bit()/clear_bit()/test_bit() functions. Fixes: 60432d756cf0 ("batman-adv: Announce

[PATCH 09/14] batman-adv: fix kernel crash due to missing NULL checks

2015-08-04 Thread Antonio Quartulli
From: Marek Lindner batadv_softif_vlan_get() may return NULL which has to be verified by the caller. Fixes: 35df3b298fc8 ("batman-adv: fix TT VLAN inconsistency on VLAN re-add") Reported-by: Ryan Thompson Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/soft-i

[PATCH 02/14] batman-adv: Avoid u32 overflow during gateway select

2015-08-04 Thread Antonio Quartulli
From: Ruben Wisniewski The gateway selection based on fast connections is using a single value calculated from the average tq (0-255) and the download bandwidth (in 100Kibit). The formula for the first step (tq ** 2 * 1 * bandwidth) tends to overflow a u32 with low bandwidth settings like 50

[PATCH 01/14] batman-adv: Replace gw_reselect divisor with simple shift

2015-08-04 Thread Antonio Quartulli
From: Sven Eckelmann The gw_factor is divided by BATADV_TQ_LOCAL_WINDOW_SIZE ** 2 * 64. But the rest of the calculation has nothing to do with the tq window size and therefore the calculation is just (tmp_gw_factor / (64 ** 3)). Replace it with a simple shift to avoid a costly 64-bit divide when

[PATCH 08/14] batman-adv: Fix potential synchronization issues in mcast tvlv handler

2015-08-04 Thread Antonio Quartulli
From: Linus Lüssing So far the mcast tvlv handler did not anticipate the processing of multiple incoming OGMs from the same originator at the same time. This can lead to various issues: * Broken refcounting: For instance two mcast handlers might both assume that an originator just got multicas

[PATCH 13/14] batman-adv: remove broadcast packets scheduled for purged outgoing if

2015-08-04 Thread Antonio Quartulli
From: Simon Wunderlich When an interface is purged, the broadcast packets scheduled for this interface should get purged as well. Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/send.c | 3 ++- 1 file changed, 2 insertions(+),

pull request [net]: batman-adv 20150804

2015-08-04 Thread Antonio Quartulli
Hello David, here you have our batch of fixes intended for net/linux-4.2. Patch 1 by Sven Eckelmann is changing the way the GW metric is computed so that the resulting operation does not make use of divisions and also does not lead to any data type promotion. This is a requirement for patch 2. P

[PATCH 05/14] batman-adv: Make NC capability changes atomic

2015-08-04 Thread Antonio Quartulli
From: Linus Lüssing Bitwise OR/AND assignments in C aren't guaranteed to be atomic. One OGM handler might undo the set/clear of a specific bit from another handler run in between. Fix this by using the atomic set_bit()/clear_bit()/test_bit() functions. Fixes: 3f4841ffb336 ("batman-adv: tvlv - a

[PATCH 11/14] batman-adv: protect tt request from double deletion

2015-08-04 Thread Antonio Quartulli
From: Marek Lindner The list_del() calls were changed to list_del_init() to prevent an accidental double deletion in batadv_tt_req_node_new(). Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/translation-table.c | 9 + 1 file changed, 5 insertions(+), 4

pull-request: wireless-drivers 2015-08-04

2015-08-04 Thread Kalle Valo
Hi Dave, here are few small fixes I would like to get to 4.2. Please let me know if there are any problems. Kalle The following changes since commit df2cd4586f177acf9493dee079fc7d18268c5f54: Merge tag 'iwlwifi-for-kalle-2015-06-12' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/i

[PATCH 12/14] batman-adv: initialize up/down values when adding a gateway

2015-08-04 Thread Antonio Quartulli
From: Simon Wunderlich Without this initialization, gateways which actually announce up/down bandwidth of 0/0 could be added. If these nodes get purged via _batadv_purge_orig() later, the gw_node structure does not get removed since batadv_gw_node_delete() updates the gw_node with up/down bandwid

[PATCH 06/14] batman-adv: Make TT capability changes atomic

2015-08-04 Thread Antonio Quartulli
From: Linus Lüssing Bitwise OR/AND assignments in C aren't guaranteed to be atomic. One OGM handler might undo the set/clear of a specific bit from another handler run in between. Fix this by using the atomic set_bit()/clear_bit()/test_bit() functions. Fixes: e17931d1a61d ("batman-adv: introduc

[PATCH 10/14] batman-adv: protect tt_local_entry from concurrent delete events

2015-08-04 Thread Antonio Quartulli
From: Marek Lindner The tt_local_entry deletion performed in batadv_tt_local_remove() was neither protecting against simultaneous deletes nor checking whether the element was still part of the list before calling hlist_del_rcu(). Replacing the hlist_del_rcu() call with batadv_hash_remove() provi

[PATCH 03/14] batman-adv: avoid DAT to mess up LAN state

2015-08-04 Thread Antonio Quartulli
When a node running DAT receives an ARP request from the LAN for the first time, it is likely that this node will request the ARP entry through the distributed ARP table (DAT) in the mesh. Once a DAT reply is received the asking node must check if the MAC address for which the IP address has been

printk from softirq on xen: hard lockup

2015-08-04 Thread Jason A. Donenfeld
Hi folks, Paul McKenney and I had an offline discussion about some rcu questions that eventually lead into me investigating a strange full lock-up I'm experiencing as a consequence of a printk in softirq inside of an rcu_read_lock, when using Xen PV. Relevant excerpts of the conversation follow:

[PATCH 14/14] batman-adv: Fix potentially broken skb network header access

2015-08-04 Thread Antonio Quartulli
From: Linus Lüssing The two commits noted below added calls to ip_hdr() and ipv6_hdr(). They need a correctly set skb network header. Unfortunately we cannot rely on the device drivers to set it for us. Therefore setting it in the beginning of the according ndo_start_xmit handler. Fixes: 1d8ab8

Re: [PATCH] net: pktgen: don't abuse current->state in pktgen_thread_worker()

2015-08-04 Thread Marcelo Ricardo Leitner
On Tue, Aug 04, 2015 at 06:33:34PM +0200, Oleg Nesterov wrote: > Commit 1fbe4b46caca "net: pktgen: kill the Wait for kthread_stop > code in pktgen_thread_worker()" removed (in particular) the final > __set_current_state(TASK_RUNNING) and I didn't notice the previous > set_current_state(TASK_INTERRU

[PATCH] net: pktgen: don't abuse current->state in pktgen_thread_worker()

2015-08-04 Thread Oleg Nesterov
Commit 1fbe4b46caca "net: pktgen: kill the Wait for kthread_stop code in pktgen_thread_worker()" removed (in particular) the final __set_current_state(TASK_RUNNING) and I didn't notice the previous set_current_state(TASK_INTERRUPTIBLE). This triggers the warning in __might_sleep() after return. Af

Re: [PATCH net-next] net_sched: act_bpf: remove spinlock in fast path

2015-08-04 Thread Alexei Starovoitov
On 8/4/15 1:55 AM, Daniel Borkmann wrote: Okay, what happens however, when we have an action attached to a classifier and do a replace on that action, meaning one CPU is still executing the filter inside tcf_bpf(), while another one is already running tcf_bpf_cfg_cleanup() on that prog? Afaik, th

[PATCH v3] net_dbg_ratelimited: turn into no-op when !DEBUG

2015-08-04 Thread Jason A. Donenfeld
The pr_debug family of functions turns into a no-op when -DDEBUG is not specified, opting instead to call "no_printk", which gets compiled to a no-op (but retains gcc's nice warnings about printf-style arguments). The problem with net_dbg_ratelimited is that it is defined to be a variant of net_ra

Re: RX overrun errors building on several of our hosts

2015-08-04 Thread Dan Finn
On 8/4/15, 5:39 AM, "Yuval Mintz" wrote: >> After implementing a new monitoring tool I've noticed that several of >>our >> physical servers have increasing RX errors, all seem to be classified >>as overruns. > >Just to be sure we're looking at the same thing - are you referring to >the errors

Re: [PATCH net-next 4/4] net: dsa: mv88e6xxx: refactor FDB routines

2015-08-04 Thread Andrew Lunn
On Tue, Aug 04, 2015 at 02:33:38AM -0400, Vivien Didelot wrote: > Refactor mv88e6xxx_port_fdb_{add,del,getnext} to respect the new DSA > switch driver FDB access routines. > > The Marvell 88E6xxx switches support up to 4094 FIDs (from 1 to 0xfff; > FID 0 means that multiple address databases are n

Re: [PATCH] net: fec: fix initial runtime PM refcount

2015-08-04 Thread Alan Stern
On Tue, 4 Aug 2015, Uwe [iso-8859-1] Kleine-K�nig wrote: > Hello, > > On Tue, Aug 04, 2015 at 10:20:55AM -0400, Alan Stern wrote: > > In that case, adding a call pm_runtime_get_noresume() is the right > > thing to do. > Is this an ack for Lucas' patch? Yes: Acked-by: Alan Stern Alan Stern -

Re: [PATCH] net_dbg_ratelimited: turn into no-op when !DEBUG

2015-08-04 Thread Joe Perches
On Tue, 2015-08-04 at 17:07 +0200, Jason A. Donenfeld wrote: > The pr_debug family of functions turns into a no-op when -DDEBUG is not > specified, opting instead to call "no_printk", which gets compiled to a > no-op (but retains gcc's nice warnings about printf-style arguments). [] > diff --git a/

rtnl_mutex deadlock?

2015-08-04 Thread Linus Torvalds
Sorry for the spamming of random rtnetlink people, but I just resumed my laptop at PDX, and networking was dead. It looks like a deadlock on rtnl_mutex, possibly due to some error path not releasing the lock. No network op was making any progress, and as you can see from the attached sysrq-w, it a

Re: [PATCH V2 net-next 4/6] test_bpf: add module parameters to filter the tests to run.

2015-08-04 Thread Alexei Starovoitov
On 8/4/15 6:19 AM, Nicolas Schichan wrote: When developping on the interpreter or a particular JIT, it can be interesting to restrict the tests list to a specific test or a particular range of tests. This patch adds the following module parameters to the test_bpf module: * test_name=: only the

Re: [PATCH net-next 3/4] net: dsa: add support for switchdev FDB objects

2015-08-04 Thread Vivien Didelot
Hi Scott, On Aug 4, 2015, at 8:18 AM, Scott Feldman sfel...@gmail.com wrote: > On Mon, Aug 3, 2015 at 11:30 PM, Vivien Didelot > wrote: >> Remove the fdb_{add,del,getnext} function pointer in favor of new >> port_fdb_{add,del,getnext}. >> >> Implement the switchdev_port_obj_{add,del,dump} functi

Re: net: Fix skb_set_peeked use-after-free bug

2015-08-04 Thread Brenden Blanco
> The commit 738ac1ebb96d02e0d23bc320302a6ea94c612dec ("net: Clone > skb before setting peeked flag") introduced a use-after-free bug > in skb_recv_datagram. This is because skb_set_peeked may create > a new skb and free the existing one. As it stands the caller will > continue to use the old fre

Re: [PATCH] net_dbg_ratelimited: turn into no-op when !DEBUG

2015-08-04 Thread Jason A. Donenfeld
Sorry, I forgot to 'v2' the subject, but here's the respin suggested by Joe and asked for by David. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] net_dbg_ratelimited: turn into no-op when !DEBUG

2015-08-04 Thread Jason A. Donenfeld
The pr_debug family of functions turns into a no-op when -DDEBUG is not specified, opting instead to call "no_printk", which gets compiled to a no-op (but retains gcc's nice warnings about printf-style arguments). The problem with net_dbg_ratelimited is that it is defined to be a variant of net_ra

[PATCH v2] xen/netback: Wake dealloc thread after completing zerocopy work

2015-08-04 Thread Ross Lagerwall
Waking the dealloc thread before decrementing inflight_packets is racy because it means the thread may go to sleep before inflight_packets is decremented. If kthread_stop() has already been called, the dealloc thread may wait forever with nothing to wake it. Instead, wake the thread only after decr

Re: [PATCH v2] xen/netback: Wake dealloc thread after completing zerocopy work

2015-08-04 Thread Wei Liu
On Tue, Aug 04, 2015 at 03:40:59PM +0100, Ross Lagerwall wrote: > Waking the dealloc thread before decrementing inflight_packets is racy > because it means the thread may go to sleep before inflight_packets is > decremented. If kthread_stop() has already been called, the dealloc > thread may wait f

Re: [PATCH] net: fec: fix initial runtime PM refcount

2015-08-04 Thread Uwe Kleine-König
Hello, On Tue, Aug 04, 2015 at 10:20:55AM -0400, Alan Stern wrote: > In that case, adding a call pm_runtime_get_noresume() is the right > thing to do. Is this an ack for Lucas' patch? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linu

  1   2   >