Re: [Patch net-next] ipvs: remove an annoying printk in netns init

2016-12-11 Thread Simon Horman
On vr, dec 09, 2016 at 09:09:59 -0800, Cong Wang wrote: > At most it is used for debugging purpose, but I don't think > it is even useful for debugging, just remove it. > > Cc: Simon Horman > Signed-off-by: Cong Wang Thanks, applied.

[PATCH] vhost: cache used event for better performance

2016-12-11 Thread Jason Wang
When event index was enabled, we need to fetch used event from userspace memory each time. This userspace fetch (with memory barrier) could be saved sometime when 1) caching used event and 2) if used event is ahead of new and old to new updating does not cross it, we're sure there's no need to

Re: [PATCH] net: wan: Use dma_pool_zalloc

2016-12-11 Thread Souptick Joarder
On Fri, Dec 9, 2016 at 6:33 PM, Krzysztof Hałasa wrote: > Souptick Joarder writes: > >> We should use dma_pool_zalloc instead of dma_pool_alloc/memset >> >> Signed-off-by: Souptick joarder >> --- >> drivers/net/wan/ixp4xx_hss.c | 5

linux-next: manual merge of the tip tree with the net-next tree

2016-12-11 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the tip tree got a conflict in: drivers/net/ethernet/ti/Kconfig between commit: 6246168b4a38 ("net: ethernet: ti: netcp: add support of cpts") from the net-next tree and commit: d1cbfd771ce8 ("ptp_clock: Allow for it to be optional") from the tip

Re: [PATCH 08/10] vsock/virtio: mark an internal function static

2016-12-11 Thread Jason Wang
On 2016年12月08日 22:25, Michael S. Tsirkin wrote: On Wed, Dec 07, 2016 at 12:21:22PM +0800, Jason Wang wrote: On 2016年12月06日 23:41, Michael S. Tsirkin wrote: virtio_transport_alloc_pkt is only used locally, make it static. Signed-off-by: Michael S. Tsirkin ---

[PATCH v2] ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output

2016-12-11 Thread Zheng Li
From: zheng li There is an inconsistent conditional judgement in __ip_append_data and ip_finish_output functions, the variable length in __ip_append_data just include the length of application's payload and udp header, don't include the length of ip header, but in

[iproute2 net-next 4/8] move cmd_exec to lib utils

2016-12-11 Thread David Ahern
Code move only; no functional change intended. Signed-off-by: David Ahern --- include/utils.h | 2 ++ ip/ipnetns.c| 34 -- lib/Makefile| 2 +- lib/exec.c | 40 + 4 files changed, 43

[iproute2 net-next 6/8] change name_is_vrf to return index

2016-12-11 Thread David Ahern
index of 0 means name is not a valid vrf. Signed-off-by: David Ahern --- ip/ip_common.h | 2 +- ip/iplink_vrf.c | 15 +-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ip/ip_common.h b/ip/ip_common.h index 0147f45a7a31..3162f1ca5b2c

[iproute2 net-next 3/8] bpf: Add BPF_ macros

2016-12-11 Thread David Ahern
Based on version in kernel repo, samples/bpf/libbpf.h Signed-off-by: David Ahern --- include/bpf_util.h | 179 + 1 file changed, 179 insertions(+) diff --git a/include/bpf_util.h b/include/bpf_util.h index

[iproute2 net-next 1/8] lib bpf: Add support for BPF_PROG_ATTACH and BPF_PROG_DETACH

2016-12-11 Thread David Ahern
Signed-off-by: David Ahern --- include/bpf_util.h | 3 +++ lib/bpf.c | 21 + 2 files changed, 24 insertions(+) diff --git a/include/bpf_util.h b/include/bpf_util.h index 05baeecda57f..b038379684a8 100644 --- a/include/bpf_util.h +++

[iproute2 net-next 8/8] Introduce ip vrf command

2016-12-11 Thread David Ahern
'ip vrf' follows the user semnatics established by 'ip netns'. The 'ip vrf' subcommand supports 3 usages: 1. Run a command against a given vrf: ip vrf exec NAME CMD Uses the recently committed cgroup/sock BPF option. vrf directory is added to cgroup2 mount. Individual vrfs are

[iproute2 net-next 5/8] Add filesystem APIs to lib

2016-12-11 Thread David Ahern
Add make_path to recursively call mkdir as needed to create a given path with the given mode. Add find_cgroup2_mount to lookup path where cgroup2 is mounted. If it is not already mounted, cgroup2 is mounted under /var/run/cgroup2 for use by iproute2. Signed-off-by: David Ahern

[iproute2 net-next 7/8] libnetlink: Add variant of rtnl_talk that does not display RTNETLINK answers error

2016-12-11 Thread David Ahern
iplink_vrf has 2 functions used to validate a user given device name is a VRF device and to return the table id. If the user string is not a device name ip commands with a vrf keyword show a confusing error message: "RTNETLINK answers: No such device". Add a variant of rtnl_talk that does not

[iproute2 v3 net-next 0/8] Add support for vrf helper

2016-12-11 Thread David Ahern
This series adds support to iproute2 to run a command against a specific VRF. The user semantics are similar to 'ip netns'. The 'ip vrf' subcommand supports 3 usages: 1. Run a command against a given vrf: ip vrf exec NAME CMD Uses the recently committed cgroup/sock BPF option. vrf

[iproute2 net-next 2/8] bpf: export bpf_prog_load

2016-12-11 Thread David Ahern
Code move only; no functional change intended. Signed-off-by: David Ahern --- include/bpf_util.h | 4 lib/bpf.c | 40 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/include/bpf_util.h

[PATCH iproute2 -net-next] lwt: BPF support for LWT

2016-12-11 Thread Daniel Borkmann
From: Thomas Graf Adds support to configure BPF programs as nexthop actions via the LWT framework. Example: ip route add 192.168.253.2/32 \ encap bpf out obj lwt_len_hist_kern.o section len_hist \ dev veth0 Signed-off-by: Thomas Graf ---

[no subject]

2016-12-11 Thread KA Alice
I would like to solicit your assistance to claim $9 M from my bank and you will benefit 30% of the fund for assisting me while the remaining 70% will be mine, let know if you are capable so that i can give you the full details of the transaction. Regards,

[PATCH] net: chelsio: cxgb3: use new api ethtool_{get|set}_link_ksettings

2016-12-11 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 65 +-- 1 files changed, 37 insertions(+), 28 deletions(-)

[PATCH] net: chelsio: cxgb2: use new api ethtool_{get|set}_link_ksettings

2016-12-11 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 64 + 1 files changed, 37 insertions(+), 27 deletions(-)

Re: [PATCH net] net: dsa: mv88e6xxx: Fix opps when adding vlan bridge

2016-12-11 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > @@ -1804,6 +1807,9 @@ static int mv88e6xxx_port_check_hw_vlan(struct > dsa_switch *ds, int port, > chip->ports[port].bridge_dev) > break; /* same bridge, check next VLAN */ > > +

Re: [PATCH 1/1] Signed-off-by: Jan Wang <bbw...@163.com>

2016-12-11 Thread Eric Dumazet
On Sun, 2016-12-11 at 23:31 +0800, Jan Wang wrote: > [net]: Missing init queue tail > > Accept queue tail doesn't initialize NULL. > Though looks like no harm, unify it with reqsk_queue_remove( > it will initialize tail to NULL when empty). Well, if having a NULL or not causes no harm, what

Re: [PATCH 1/2] net: ethernet: sxgbe: remove private tx queue lock

2016-12-11 Thread Pavel Machek
Hi! > On 09.12.2016 12:21, Pavel Machek wrote: > > On Fri 2016-12-09 00:19:43, Francois Romieu wrote: > >> Lino Sanfilippo : > >> [...] > >> > OTOH Pavel said that he actually could produce a deadlock. Now I wonder > >> > if > >> > this is caused by that locking scheme

[PATCH net] net: dsa: mv88e6xxx: Fix opps when adding vlan bridge

2016-12-11 Thread Andrew Lunn
A port is not necessarily assigned to a netdev. And a port does not need to be a member of a bridge. So when iterating over all ports, check before using the netdev and bridge_dev for a port. Otherwise we dereference a NULL pointer. Fixes: da9c359e19f0 ("net: dsa: mv88e6xxx: check hardware VLAN

Re: [PATCH] stmmac: disable tx coalescing

2016-12-11 Thread Pavel Machek
On Sun 2016-12-11 14:31:13, David Miller wrote: > From: Pavel Machek > Date: Sun, 11 Dec 2016 20:07:50 +0100 > > > David, ping? Can I get you to apply this one? > > > > As you noticed, tx coalescing is completely broken in that driver, and > > not easy to repair. This is simplest

Re: [PATCH] [v4] net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause

2016-12-11 Thread Florian Fainelli
Le 12/07/16 à 11:20, Timur Tabi a écrit : > Instead of having individual PHY drivers set the SUPPORTED_Pause and > SUPPORTED_Asym_Pause flags, phylib itself should set those flags, > unless there is a hardware erratum or other special case. During > autonegotiation, the PHYs will determine

Re: [PATCH] stmmac: disable tx coalescing

2016-12-11 Thread David Miller
From: Pavel Machek Date: Sun, 11 Dec 2016 20:07:50 +0100 > David, ping? Can I get you to apply this one? > > As you noticed, tx coalescing is completely broken in that driver, and > not easy to repair. This is simplest way to disable it. It can still > be re-enabled from

Re: [PATCH] stmmac: disable tx coalescing

2016-12-11 Thread Pavel Machek
Hi! David, ping? Can I get you to apply this one? As you noticed, tx coalescing is completely broken in that driver, and not easy to repair. This is simplest way to disable it. It can still be re-enabled from userspace, so code can be fixed in future. Best regards,

net/3com/3c515: Fix timer handling, prevent leaks and crashes

2016-12-11 Thread Thomas Gleixner
The timer handling in this driver is broken in several ways: - corkscrew_open() initializes and arms a timer before requesting the device interrupt. If the request fails the timer stays armed. A second call to corkscrew_open will unconditionally reinitialize the quued timer and arm it

Re: Misalignment, MIPS, and ip_hdr(skb)->version

2016-12-11 Thread Willy Tarreau
On Sun, Dec 11, 2016 at 03:50:31PM +0100, Jason A. Donenfeld wrote: > 3. Add 3 bytes of padding, set to zero, to the encrypted section just > before the IP header, marked for future use. > Pros: satisfies IETF mantras, can use those extra bits in the future > for interesting protocol extensions

Re: Misalignment, MIPS, and ip_hdr(skb)->version

2016-12-11 Thread Jason A. Donenfeld
On Sun, Dec 11, 2016 at 4:30 PM, Andrew Lunn wrote: > I'm not a crypto expert, but does this not give you a helping hand in > breaking the crypto? You know the plain text value of these bytes, and > where they are in the encrypted text. You also know with some probability that

[PATCH 1/1] Signed-off-by: Jan Wang <bbw...@163.com>

2016-12-11 Thread Jan Wang
[net]: Missing init queue tail Accept queue tail doesn't initialize NULL. Though looks like no harm, unify it with reqsk_queue_remove( it will initialize tail to NULL when empty). Signed-off-by: Jan Wang --- net/core/request_sock.c | 1 + 1 file changed, 1 insertion(+) diff

Re: Misalignment, MIPS, and ip_hdr(skb)->version

2016-12-11 Thread Andrew Lunn
> 3. Add 3 bytes of padding, set to zero, to the encrypted section just > before the IP header, marked for future use. > Pros: satisfies IETF mantras, can use those extra bits in the future > for interesting protocol extensions for authenticated peers. > Cons: lowers MTU, marginally more difficult

Re: [PATCH net-next 0/2] Add ethtool set regs support

2016-12-11 Thread Andrew Lunn
On Sun, Dec 11, 2016 at 02:18:00PM +0200, Saeed Mahameed wrote: > On Wed, Dec 7, 2016 at 4:41 AM, Andrew Lunn wrote: > > On Wed, Dec 07, 2016 at 12:33:08AM +0200, Saeed Mahameed wrote: > >> Hi Dave, > >> > >> This series adds the support for setting device registers from user > >>

Re: [PATCH net-next] netfilter: nft_counter: rework atomic dump and reset

2016-12-11 Thread Arnd Bergmann
On Sunday, December 11, 2016 11:43:59 AM CET Pablo Neira Ayuso wrote: > Dump and reset doesn't work unless cmpxchg64() is used both from packet > and control plane paths. This approach is going to be slow though. > Instead, use a percpu seqcount to fetch counters consistently, then > subtract

Re: [PATCH net-next] netfilter: nft_counter: rework atomic dump and reset

2016-12-11 Thread David Miller
From: Pablo Neira Ayuso Date: Sun, 11 Dec 2016 11:43:59 +0100 > Dump and reset doesn't work unless cmpxchg64() is used both from packet > and control plane paths. This approach is going to be slow though. > Instead, use a percpu seqcount to fetch counters consistently, then

Re: Misalignment, MIPS, and ip_hdr(skb)->version

2016-12-11 Thread Jason A. Donenfeld
Hey guys, Thanks for the extremely detailed answers. The main take-away from this is that passing unaligned packets to the networking stack kills kittens. So now it's a question of mitigation. I have three options: 1. Copy the plaintext to three bytes before the start of the cipher text,

Re: [PATCH net-next 0/2] Add ethtool set regs support

2016-12-11 Thread Saeed Mahameed
On Wed, Dec 7, 2016 at 4:57 AM, David Miller wrote: > From: Andrew Lunn > Date: Wed, 7 Dec 2016 03:41:43 +0100 > >> On Wed, Dec 07, 2016 at 12:33:08AM +0200, Saeed Mahameed wrote: >>> Hi Dave, >>> >>> This series adds the support for setting device registers

Re: [PATCH net-next 0/2] Add ethtool set regs support

2016-12-11 Thread Saeed Mahameed
On Wed, Dec 7, 2016 at 4:41 AM, Andrew Lunn wrote: > On Wed, Dec 07, 2016 at 12:33:08AM +0200, Saeed Mahameed wrote: >> Hi Dave, >> >> This series adds the support for setting device registers from user >> space ethtool. > > Is this not the start of allowing binary only drivers in

Re: [PATCH net-next 0/2] Add ethtool set regs support

2016-12-11 Thread Saeed Mahameed
On Wed, Dec 7, 2016 at 12:45 AM, Stephen Hemminger wrote: > On Wed, 7 Dec 2016 00:33:08 +0200 > Saeed Mahameed wrote: > >> This simple ethool change will give HW vendors the flexibility to set >> pure HW configurations (not directly related to

Re: Misalignment, MIPS, and ip_hdr(skb)->version

2016-12-11 Thread Måns Rullgård
Willy Tarreau writes: > Hi Jason, > > On Thu, Dec 08, 2016 at 11:20:04PM +0100, Jason A. Donenfeld wrote: >> Hi David, >> >> On Thu, Dec 8, 2016 at 1:37 AM, David Miller wrote: >> > You really have to land the IP header on a proper 4 byte boundary. >> > >> > I

[PATCH net-next] netfilter: nft_counter: rework atomic dump and reset

2016-12-11 Thread Pablo Neira Ayuso
Dump and reset doesn't work unless cmpxchg64() is used both from packet and control plane paths. This approach is going to be slow though. Instead, use a percpu seqcount to fetch counters consistently, then subtract bytes and packets in case a reset was requested. The cpu that running over the

Re: [PATCH net-next] netfilter: nft_counter: rework atomic dump and reset

2016-12-11 Thread Pablo Neira Ayuso
On Sat, Dec 10, 2016 at 07:40:08AM -0800, Eric Dumazet wrote: > On Sat, 2016-12-10 at 15:25 +0100, Pablo Neira Ayuso wrote: > > On Sat, Dec 10, 2016 at 03:16:55PM +0100, Pablo Neira Ayuso wrote: > = > > > > - nft_counter_fetch(priv, , reset); > > + nft_counter_fetch(priv, ); > > +

Re: net: deadlock on genl_mutex

2016-12-11 Thread Dmitry Vyukov
On Fri, Dec 9, 2016 at 6:08 AM, Cong Wang wrote: > On Thu, Dec 8, 2016 at 4:32 PM, Cong Wang wrote: >> On Thu, Dec 8, 2016 at 9:16 AM, Dmitry Vyukov wrote: >>> Chain exists of: >>> Possible unsafe locking scenario: >>> >>>

Re: Misalignment, MIPS, and ip_hdr(skb)->version

2016-12-11 Thread Willy Tarreau
Hi Jason, On Thu, Dec 08, 2016 at 11:20:04PM +0100, Jason A. Donenfeld wrote: > Hi David, > > On Thu, Dec 8, 2016 at 1:37 AM, David Miller wrote: > > You really have to land the IP header on a proper 4 byte boundary. > > > > I would suggest pushing 3 dummy garbage bytes of