net namespaces kernel stack overflow

2018-04-18 Thread Alexander Aring
Hi, I currently can crash my net/master kernel by execute the following script: --- snip modprobe dummy #mkdir /var/run/netns #touch /var/run/netns/init_net #mount --bind /proc/1/ns/net /var/run/netns/init_net while true do mkdir /var/run/netns touch /var/run/netns/init_net mount

[PATCH bpf-next v2 10/11] bpf: adding tests for bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
adding selftests for bpf_xdp_adjust_tail helper. in this synthetic test we are testing that 1) if data_end < data helper will return EINVAL 2) for normal use case packet's length would be reduced. --- tools/include/uapi/linux/bpf.h | 10 +++-

[PATCH bpf-next v2 11/11] bpf: add bpf_xdp_adjust_tail sample prog

2018-04-18 Thread Nikita V. Shirokov
adding bpf's sample program which is using bpf_xdp_adjust_tail helper by generating ICMPv4 "packet to big" message if ingress packet's size is bigger then 600 bytes --- samples/bpf/Makefile | 4 + samples/bpf/xdp_adjust_tail_kern.c| 152

[PATCH bpf-next v2 00/11] introduction of bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
In this patch series i'm add new bpf helper which allow to manupulate xdp's data_end pointer. right now only "shrinking" (reduce packet's size by moving pointer) is supported (and i see no use case for "growing"). Main use case for such helper is to be able to generate controll (ICMP) messages

[PATCH bpf-next v2 07/11] bpf: make tun compatible w/ bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for tun driver we need to adjust XDP_PASS handling by recalculating length of the packet if it was

[PATCH bpf-next v2 02/11] bpf: make generic xdp compatible w/ bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for generic XDP we need to reflect this packet's length change by adjusting skb's tail pointer

[PATCH bpf-next v2 04/11] bpf: make bnxt compatible w/ bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for bnxt driver we will just calculate packet's length unconditionally Acked-by: Alexei Starovoitov

[PATCH bpf-next v2 08/11] bpf: make virtio compatible w/ bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for virtio driver we need to adjust XDP_PASS handling by recalculating length of the packet if it was

[PATCH bpf-next v2 05/11] bpf: make cavium thunder compatible w/ bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for cavium's thunder driver we will just calculate packet's length unconditionally Acked-by: Alexei

[PATCH bpf-next v2 09/11] bpf: making bpf_prog_test run aware of possible data_end ptr change

2018-04-18 Thread Nikita V. Shirokov
after introduction of bpf_xdp_adjust_tail helper packet length could be changed not only if xdp->data pointer has been changed but xdp->data_end as well. making bpf_prog_test_run aware of this possibility --- net/bpf/test_run.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH bpf-next v2 06/11] bpf: make netronome nfp compatible w/ bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for nfp driver we will just calculate packet's length unconditionally Acked-by: Alexei Starovoitov

Re: [PATCH net 5/5] nfp: remove false positive offloads in flower vxlan

2018-04-18 Thread Or Gerlitz
On Fri, Nov 17, 2017 at 4:06 AM, Jakub Kicinski wrote: > From: John Hurley > > Pass information to the match offload on whether or not the repr is the > ingress or egress dev. Only accept tunnel matches if repr is the egress dev. > > This

Re: [PATCH 10/10] net: New ax88796 platform driver for Amiga X-Surf 100 Zorro board (m68k)

2018-04-18 Thread Geert Uytterhoeven
Hi Michael, On Wed, Apr 18, 2018 at 12:35 AM, Michael Schmitz wrote: > On Wed, Apr 18, 2018 at 1:53 AM, Geert Uytterhoeven > wrote: >> On Tue, Apr 17, 2018 at 12:04 AM, Michael Schmitz >> wrote: >>> Add platform device driver

[PATCH 6/6] rhashtable: add rhashtable_walk_prev()

2018-04-18 Thread NeilBrown
rhashtable_walk_prev() returns the object returned by the previous rhashtable_walk_next(), providing it is still in the table (or was during this grace period). This works even if rhashtable_walk_stop() and rhashtable_talk_start() have been called since the last rhashtable_walk_next(). If there

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Jiri Pirko
Wed, Apr 11, 2018 at 09:13:52PM CEST, sridhar.samudr...@intel.com wrote: >On 4/11/2018 8:51 AM, Jiri Pirko wrote: >> Tue, Apr 10, 2018 at 08:59:48PM CEST, sridhar.samudr...@intel.com wrote: >> > This provides a generic interface for paravirtual drivers to listen >> > for netdev

[PATCH net-next 3/4] tcp: track total bytes delivered with ECN CE marks

2018-04-18 Thread Yuchung Cheng
Introduce a new delivered_ce stat in tcp socket to estimate number of packets being marked with CE bits. The estimation is done via ACKs with ECE bit. Depending on the actual receiver behavior, the estimation could have biases. Since the TCP sender can't really see the CE bit in the data path, so

[PATCH net-next 1/4] tcp: better delivery accounting for SYN-ACK and SYN-data

2018-04-18 Thread Yuchung Cheng
the tcp_sock:delivered has inconsistent accounting for SYN and FIN. 1. it counts pure FIN 2. it counts pure SYN 3. it counts SYN-data twice 4. it does not count SYN-ACK For congestion control perspective it does not matter much as C.C. only cares about the difference not the aboslute value. But

[PATCH net-next 2/4] tcp: new helper to calculate newly delivered

2018-04-18 Thread Yuchung Cheng
Add new helper tcp_newly_delivered() to prepare the ECN accounting change. Signed-off-by: Yuchung Cheng Reviewed-by: Neal Cardwell Reviewed-by: Soheil Hassas Yeganeh Reviewed-by: Eric Dumazet ---

[PATCH net-next 4/4] tcp: export packets delivery info

2018-04-18 Thread Yuchung Cheng
Export data delivered and delivered with CE marks to 1) SNMP TCPDelivered and TCPDeliveredCE 2) getsockopt(TCP_INFO) 3) Timestamping API SOF_TIMESTAMPING_OPT_STATS Note that for SCM_TSTAMP_ACK, the delivery info in SOF_TIMESTAMPING_OPT_STATS is reported before the info was fully updated on the

[PATCH net-next 0/4] tracking TCP data delivery and ECN stats

2018-04-18 Thread Yuchung Cheng
This patch series improve tracking the data delivery status 1. minor improvement on SYN data 2. accounting bytes delivered with CE marks 3. exporting the delivery stats to applications s.t. users can get better sense of TCP performance at per host, per connection, and even per application

[PATCH 0/6] Assorted rhashtable improvements. RESEND

2018-04-18 Thread NeilBrown
[[ I mistyped linux-kernel the first time I sent these, so resending. Please reply to this set. Sorry - neilb ]] Some of these have been posted before and a couple received an Ack from Herbert, but haven't appeared in any git tree yet. Another (the first) has been sent but received no ack.

[PATCH net-next] net-next/hinic: add arm64 support

2018-04-18 Thread Zhao Chen
This patch enables arm64 platform support for the HINIC driver. Signed-off-by: Zhao Chen --- drivers/net/ethernet/huawei/hinic/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/huawei/hinic/Kconfig

Re: [PATCH v3 1/9] net: phy: new Asix Electronics PHY driver

2018-04-18 Thread John Paul Adrian Glaubitz
On 04/18/2018 06:26 AM, Michael Schmitz wrote: > The Asix Electronics PHY found on the X-Surf 100 Amiga Zorro network > card by Individual Computers is buggy, and needs the reset bit toggled > as workaround to make a PHY soft reset succed. ^^

Re: [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support

2018-04-18 Thread Xin Long
On Wed, Apr 18, 2018 at 9:33 AM, Marcelo Ricardo Leitner wrote: > On Tue, Apr 17, 2018 at 04:35:18PM -0400, Vlad Yasevich wrote: >> On 04/02/2018 10:47 AM, Marcelo Ricardo Leitner wrote: >> > On Mon, Apr 02, 2018 at 09:40:01AM -0400, Vladislav Yasevich wrote: >> >> Now

[PATCH net] net: stmmac: Disable ACS Feature for GMAC >= 4

2018-04-18 Thread Jose Abreu
ACS Feature is currently enabled for GMAC >= 4 but the llc_snap status is never checked in descriptor rx_status callback. This will cause stmmac to always strip packets even that ACS feature is already stripping them. Lets be safe and disable the ACS feature for GMAC >= 4 and always strip the

[PATCH bpf-next v2 03/11] bpf: make mlx4 compatible w/ bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for mlx4 driver we will just calculate packet's length unconditionally (the same way as it's already

[PATCH bpf-next v2 01/11] bpf: adding bpf_xdp_adjust_tail helper

2018-04-18 Thread Nikita V. Shirokov
Adding new bpf helper which would allow us to manipulate xdp's data_end pointer, and allow us to reduce packet's size indended use case: to generate ICMP messages from XDP context, where such message would contain truncated original packet. --- include/uapi/linux/bpf.h | 10 +-

[PATCH 3/6] rhashtable: reset iter when rhashtable_walk_start sees new table

2018-04-18 Thread NeilBrown
The documentation claims that when rhashtable_walk_start_check() detects a resize event, it will rewind back to the beginning of the table. This is not true. We need to set ->slot and ->skip to be zero for it to be true. Acked-by: Herbert Xu Signed-off-by:

[PATCH 4/6] rhashtable: improve rhashtable_walk stability when stop/start used.

2018-04-18 Thread NeilBrown
When a walk of an rhashtable is interrupted with rhastable_walk_stop() and then rhashtable_walk_start(), the location to restart from is based on a 'skip' count in the current hash chain, and this can be incorrect if insertions or deletions have happened. This does not happen when the walk is not

[PATCH 1/6] rhashtable: remove outdated comments about grow_decision etc

2018-04-18 Thread NeilBrown
grow_decision and shink_decision no longer exist, so remove the remaining references to them. Signed-off-by: NeilBrown --- include/linux/rhashtable.h | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git

[PATCH 0/6] Assorted rhashtable improvements.

2018-04-18 Thread NeilBrown
Some of these have been posted before and a couple received an Ack from Herbert, but haven't appeared in any git tree yet. Another (the first) has been sent but received no ack. I've added the second patch, which removes more incorrect documentation, and added the last two patches. One further

[PATCH 6/6] rhashtable: add rhashtable_walk_prev()

2018-04-18 Thread NeilBrown
rhashtable_walk_prev() returns the object returned by the previous rhashtable_walk_next(), providing it is still in the table (or was during this grace period). This works even if rhashtable_walk_stop() and rhashtable_talk_start() have been called since the last rhashtable_walk_next(). If there

[PATCH 5/6] rhashtable: further improve stability of rhashtable_walk

2018-04-18 Thread NeilBrown
If the sequence: obj = rhashtable_walk_next(iter); rhashtable_walk_stop(iter); rhashtable_remove_fast(ht, >head, params); rhashtable_walk_start(iter); races with another thread inserting or removing an object on the same hash chain, a subsequent rhashtable_walk_next() is not

[PATCH 1/6] rhashtable: remove outdated comments about grow_decision etc

2018-04-18 Thread NeilBrown
grow_decision and shink_decision no longer exist, so remove the remaining references to them. Signed-off-by: NeilBrown --- include/linux/rhashtable.h | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git

[PATCH 2/6] rhashtable: remove incorrect comment on r{hl, hash}table_walk_enter()

2018-04-18 Thread NeilBrown
Neither rhashtable_walk_enter() or rhltable_walk_enter() sleep, so remove the comments which suggest that they do. Signed-off-by: NeilBrown --- include/linux/rhashtable.h |3 --- lib/rhashtable.c |3 --- 2 files changed, 6 deletions(-) diff --git

[PATCH 3/6] rhashtable: reset iter when rhashtable_walk_start sees new table

2018-04-18 Thread NeilBrown
The documentation claims that when rhashtable_walk_start_check() detects a resize event, it will rewind back to the beginning of the table. This is not true. We need to set ->slot and ->skip to be zero for it to be true. Acked-by: Herbert Xu Signed-off-by:

[PATCH 4/6] rhashtable: improve rhashtable_walk stability when stop/start used.

2018-04-18 Thread NeilBrown
When a walk of an rhashtable is interrupted with rhastable_walk_stop() and then rhashtable_walk_start(), the location to restart from is based on a 'skip' count in the current hash chain, and this can be incorrect if insertions or deletions have happened. This does not happen when the walk is not

[PATCH 5/6] rhashtable: further improve stability of rhashtable_walk

2018-04-18 Thread NeilBrown
If the sequence: obj = rhashtable_walk_next(iter); rhashtable_walk_stop(iter); rhashtable_remove_fast(ht, >head, params); rhashtable_walk_start(iter); races with another thread inserting or removing an object on the same hash chain, a subsequent rhashtable_walk_next() is not

Re: tcp hang when socket fills up ?

2018-04-18 Thread Dominique Martinet
Dominique Martinet wrote on Wed, Apr 18, 2018: > Jozsef Kadlecsik wrote on Wed, Apr 18, 2018: > > Yes, the state transition is wrong for simultaneous open, because the > > tcp_conntracks table is not (cannot be) smart enough. Could you verify the > > next untested patch? > > Thanks for the

Re: [PATCH] bpf, x86_32: add eBPF JIT compiler for ia32 (x86_32)

2018-04-18 Thread Wang YanQing
On Wed, Apr 18, 2018 at 05:31:18PM +0800, Wang YanQing wrote: > The JIT compiler emits ia32 bit instructions. Currently, It supports > eBPF only. Classic BPF is supported because of the conversion by BPF core. > > Almost all instructions from eBPF ISA supported except the following: > BPF_ALU64 |

Re: [PATCH net-next v4 0/3] kernel: add support to collect hardware logs in crash recovery kernel

2018-04-18 Thread Dave Young
Hi Rahul, On 04/17/18 at 01:14pm, Rahul Lakkireddy wrote: > On production servers running variety of workloads over time, kernel > panic can happen sporadically after days or even months. It is > important to collect as much debug logs as possible to root cause > and fix the problem, that may not

[PATCH net] net: mvpp2: Fix DMA address mask size

2018-04-18 Thread Maxime Chevallier
PPv2 TX/RX descriptors uses 40bits DMA addresses, but 41 bits masks were used (GENMASK_ULL(40, 0)). This commit fixes that by using the correct mask. Fixes: e7c5359f2eed ("net: mvpp2: introduce PPv2.2 HW descriptors and adapt accessors") Signed-off-by: Maxime Chevallier

[PATCH] bpf, x86_32: add eBPF JIT compiler for ia32 (x86_32)

2018-04-18 Thread Wang YanQing
The JIT compiler emits ia32 bit instructions. Currently, It supports eBPF only. Classic BPF is supported because of the conversion by BPF core. Almost all instructions from eBPF ISA supported except the following: BPF_ALU64 | BPF_DIV | BPF_K BPF_ALU64 | BPF_DIV | BPF_X BPF_ALU64 | BPF_MOD | BPF_K

Re: tcp hang when socket fills up ?

2018-04-18 Thread Jozsef Kadlecsik
Hi, On Tue, 17 Apr 2018, Florian Westphal wrote: > Dominique Martinet wrote: > > [ CC Jozsef ] > > > Could it have something to do with the way I setup the connection? > > I don't think the "both remotes call connect() with carefully selected > > source/dest port" is a

[PATCH 2/6] rhashtable: remove incorrect comment on r{hl, hash}table_walk_enter()

2018-04-18 Thread NeilBrown
Neither rhashtable_walk_enter() or rhltable_walk_enter() sleep, so remove the comments which suggest that they do. Signed-off-by: NeilBrown --- include/linux/rhashtable.h |3 --- lib/rhashtable.c |3 --- 2 files changed, 6 deletions(-) diff --git

Re: [net PATCH v2] net: sched, fix OOO packets with pfifo_fast

2018-04-18 Thread Paolo Abeni
Hi, let me revive this old thread... On Mon, 2018-03-26 at 11:16 -0700, John Fastabend wrote: > On 03/26/2018 10:30 AM, Cong Wang wrote: > > On Sat, Mar 24, 2018 at 10:25 PM, John Fastabend > > wrote: > > > After the qdisc lock was dropped in pfifo_fast we allow

Re: tcp hang when socket fills up ?

2018-04-18 Thread Dominique Martinet
Jozsef Kadlecsik wrote on Wed, Apr 18, 2018: > Yes, the state transition is wrong for simultaneous open, because the > tcp_conntracks table is not (cannot be) smart enough. Could you verify the > next untested patch? Thanks for the patch; I'll give it a try (probably won't make it today so will

RE: [PATCH net-next 3/3] net: phy: Enable C45 PHYs with vendor specific address space

2018-04-18 Thread Vicenţiu Galanopulo
> > Having dev-addr stored in devices_addrs, in get_phy_c45_ids(), when > > probing the identifiers, dev-addr can be extracted from devices_addrs > > and probed if devices_addrs[current_identifier] is not 0. > > I must clearly be missing something, but why are you introducing all these >

Re: [virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 04:33:34PM -0700, Samudrala, Sridhar wrote: > On 4/17/2018 5:26 PM, Siwei Liu wrote: > > I ran this with a few folks offline and gathered some good feedbacks > > that I'd like to share thus revive the discussion. > > > > First of all, as illustrated in the reply below,

Re: [PATCH bpf-next v2 9/9] tools/bpf: add a test_progs test case for bpf_get_stack helper

2018-04-18 Thread Alexei Starovoitov
On Wed, Apr 18, 2018 at 09:54:44AM -0700, Yonghong Song wrote: > The test_stacktrace_map is enhanced to call bpf_get_stack > in the helper to get the stack trace as well. > The stack traces from bpf_get_stack and bpf_get_stackid > are compared to ensure that for the same stack as > represented as

Re: [PATCH bpf-next 4/5] samples/bpf: Refine printing symbol for sampleip

2018-04-18 Thread Leo Yan
On Wed, Apr 18, 2018 at 10:21:25PM -0700, Alexei Starovoitov wrote: > On Thu, Apr 19, 2018 at 01:12:49PM +0800, Leo Yan wrote: > > On Wed, Apr 18, 2018 at 09:47:45PM -0700, Alexei Starovoitov wrote: > > > On Thu, Apr 19, 2018 at 09:34:05AM +0800, Leo Yan wrote: > > > > The code defines macro

Re: [PATCH bpf-next v2 2/9] bpf: add bpf_get_stack helper

2018-04-18 Thread Alexei Starovoitov
On Wed, Apr 18, 2018 at 09:54:37AM -0700, Yonghong Song wrote: > Currently, stackmap and bpf_get_stackid helper are provided > for bpf program to get the stack trace. This approach has > a limitation though. If two stack traces have the same hash, > only one will get stored in the stackmap table,

Re: [PATCH bpf-next v2 3/9] bpf/verifier: refine retval R0 state for bpf_get_stack helper

2018-04-18 Thread Alexei Starovoitov
On Wed, Apr 18, 2018 at 09:54:38AM -0700, Yonghong Song wrote: > The special property of return values for helpers bpf_get_stack > and bpf_probe_read_str are captured in verifier. > Both helpers return a negative error code or > a length, which is equal to or smaller than the buffer > size

Re: [virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 10:00:51PM -0700, Samudrala, Sridhar wrote: > On 4/18/2018 9:41 PM, Michael S. Tsirkin wrote: > > On Wed, Apr 18, 2018 at 04:33:34PM -0700, Samudrala, Sridhar wrote: > > > On 4/17/2018 5:26 PM, Siwei Liu wrote: > > > > I ran this with a few folks offline and gathered some

Re: [PATCH] net: add mutex_unlock on xfrm4_protocol_register

2018-04-18 Thread Steffen Klassert
On Thu, Apr 19, 2018 at 09:08:57AM +0800, sunlianwen wrote: > The function of xfrm4_protocol_register() don't release > the mutx lock, which potential cause deadlock. Can you please explain how this can happen? > > Signed-off-by: Lianwen Sun > --- >

Re: [PATCH net] virtio_net: split out ctrl buffer

2018-04-18 Thread Michael S. Tsirkin
On Thu, Apr 19, 2018 at 08:01:49AM +0300, Michael S. Tsirkin wrote: > When sending control commands, virtio net sets up several buffers for > DMA. The buffers are all part of the net device which means it's > actually allocated by kvmalloc so in theory (on extreme memory pressure) > it's possible

答复: [PATCH][net-next] net: ip tos cgroup

2018-04-18 Thread Li,Rongqing
> -邮件原件- > 发件人: Daniel Borkmann [mailto:dan...@iogearbox.net] > 发送时间: 2018年4月17日 22:11 > 收件人: Li,Rongqing > 抄送: netdev@vger.kernel.org; t...@kernel.org; a...@fb.com; > bra...@fb.com > 主题: Re: [PATCH][net-next] net: ip tos cgroup > > On 04/17/2018 05:36 AM, Li

[PATCH] net: hns: Avoid action name truncation

2018-04-18 Thread dann frazier
When longer interface names are used, the action names exposed in /proc/interrupts and /proc/irq/* maybe truncated. For example, when using the predictable name algorithm in systemd on a HiSilicon D05, I see: ubuntu@d05-3:~$ grep enahisic2i0-tx /proc/interrupts | sed 's/.* //'

[PATCH net] virtio_net: split out ctrl buffer

2018-04-18 Thread Michael S. Tsirkin
When sending control commands, virtio net sets up several buffers for DMA. The buffers are all part of the net device which means it's actually allocated by kvmalloc so in theory (on extreme memory pressure) it's possible to get a vmalloc'ed buffer which on some platforms means we can't DMA there.

Re: [virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-18 Thread Samudrala, Sridhar
On 4/18/2018 9:41 PM, Michael S. Tsirkin wrote: On Wed, Apr 18, 2018 at 04:33:34PM -0700, Samudrala, Sridhar wrote: On 4/17/2018 5:26 PM, Siwei Liu wrote: I ran this with a few folks offline and gathered some good feedbacks that I'd like to share thus revive the discussion. First of all, as

Re: [PATCH bpf-next 4/5] samples/bpf: Refine printing symbol for sampleip

2018-04-18 Thread Leo Yan
On Wed, Apr 18, 2018 at 09:47:45PM -0700, Alexei Starovoitov wrote: > On Thu, Apr 19, 2018 at 09:34:05AM +0800, Leo Yan wrote: > > The code defines macro 'PAGE_OFFSET' and uses it to decide if the > > address is in kernel space or not. But different architecture has > > different 'PAGE_OFFSET' so

[PATCH v2 net 3/3] virtio_net: sparse annotation fix

2018-04-18 Thread Michael S. Tsirkin
offloads is a buffer in virtio format, should use the __virtio64 tag. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index f84fe04..c5b11f2

[PATCH v2 net 1/3] virtio_net: split out ctrl buffer

2018-04-18 Thread Michael S. Tsirkin
When sending control commands, virtio net sets up several buffers for DMA. The buffers are all part of the net device which means it's actually allocated by kvmalloc so it's in theory (on extreme memory pressure) possible to get a vmalloc'ed buffer which on some platforms means we can't DMA there.

[PATCH v2 net 2/3] virtio_net: fix adding vids on big-endian

2018-04-18 Thread Michael S. Tsirkin
Programming vids (adding or removing them) still passes guest-endian values in the DMA buffer. That's wrong if guest is big-endian and when virtio 1 is enabled. Note: this is on top of a previous patch: virtio_net: split out ctrl buffer Fixes: 9465a7a6f ("virtio_net: enable v1.0

Re: tg3 crashes under high load, when using 100Mbits

2018-04-18 Thread Siva Reddy Kallam
On Sat, Apr 14, 2018 at 9:17 PM, Kai-Heng Feng wrote: > Hi Satish, > >> On 2018Mar21, at 00:57, Kai-Heng Feng wrote: >> >> Satish Baddipadige wrote: >> >>> On Thu, Feb 15, 2018 at 7:37 PM, Siva Reddy

[PATCH] net: net_cls: remove a NULL check for css_cls_state

2018-04-18 Thread Li RongQing
The input of css_cls_state() is impossible to NULL except cgrp_css_online, so simplify it Signed-off-by: Li RongQing --- net/core/netclassid_cgroup.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/core/netclassid_cgroup.c

Re: [PATCH bpf-next v2 7/9] samples/bpf: add a test for bpf_get_stack helper

2018-04-18 Thread Alexei Starovoitov
On Wed, Apr 18, 2018 at 09:54:42AM -0700, Yonghong Song wrote: > The test attached a kprobe program to kernel function sys_write. > It tested to get stack for user space, kernel space and user > space with build_id request. It also tested to get user > and kernel stack into the same buffer with

Re: [PATCH bpf-next 4/5] samples/bpf: Refine printing symbol for sampleip

2018-04-18 Thread Alexei Starovoitov
On Thu, Apr 19, 2018 at 01:12:49PM +0800, Leo Yan wrote: > On Wed, Apr 18, 2018 at 09:47:45PM -0700, Alexei Starovoitov wrote: > > On Thu, Apr 19, 2018 at 09:34:05AM +0800, Leo Yan wrote: > > > The code defines macro 'PAGE_OFFSET' and uses it to decide if the > > > address is in kernel space or

Re: [PATCH bpf-next v2 4/9] bpf/verifier: improve register value range tracking with ARSH

2018-04-18 Thread Alexei Starovoitov
On Wed, Apr 18, 2018 at 09:54:39AM -0700, Yonghong Song wrote: > When helpers like bpf_get_stack returns an int value > and later on used for arithmetic computation, the LSH and ARSH > operations are often required to get proper sign extension into > 64-bit. For example, without this patch: >

[PATCH] net: qrtr: Expose tunneling endpoint to user space

2018-04-18 Thread Bjorn Andersson
This implements a misc character device named "qrtr-tun" for the purpose of allowing user space applications to implement endpoints in the qrtr network. This allows more advanced (and dynamic) testing of the qrtr code as well as opens up the ability of tunneling qrtr over a network or USB link.

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 01:38:43PM -0700, Eric Dumazet wrote: > > > On 04/18/2018 10:55 AM, Michael S. Tsirkin wrote: > > > Imagine you want to pass some data to card. > > Natural thing is to just put it in a variable and start DMA. > > However DMA API disallows stack access nowdays, > > so

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 10:32:06PM +0200, Jiri Pirko wrote: > >> >> > With regards to alternate names for 'active', you suggested 'stolen', > >> >> > but i > >> >> > am not too happy with it. > >> >> > netvsc uses vf_netdev, are you OK with this? Or another option is > >> >> > 'passthru' > >> >>

Re: [PATCH 02/12] storsvc: don't set a bounce limit

2018-04-18 Thread Martin K. Petersen
Christoph, > The default already is to never bounce, so the call is a no-op. Applied to 4.18/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 01/12] iscsi_tcp: don't set a bounce limit

2018-04-18 Thread Martin K. Petersen
Christoph, > The default already is to never bounce, so the call is a no-op. Applied to 4.18/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH bpf-next 4/5] samples/bpf: Refine printing symbol for sampleip

2018-04-18 Thread Alexei Starovoitov
On Thu, Apr 19, 2018 at 09:34:05AM +0800, Leo Yan wrote: > The code defines macro 'PAGE_OFFSET' and uses it to decide if the > address is in kernel space or not. But different architecture has > different 'PAGE_OFFSET' so this program cannot be used for all > platforms. > > This commit changes

Re: [PATCH net 3/3] net: sched: ife: check on metadata length

2018-04-18 Thread yotam gigi
On Thu, Apr 19, 2018 at 12:35 AM, Alexander Aring wrote: > This patch checks if sk buffer is available to dererence ife header. If > not then NULL will returned to signal an malformed ife packet. This > avoids to crashing the kernel from outside. > > Signed-off-by: Alexander

Re: [PATCH net 2/3] net: sched: ife: handle malformed tlv length

2018-04-18 Thread yotam gigi
On Thu, Apr 19, 2018 at 12:35 AM, Alexander Aring wrote: > There is currently no handling to check on a invalid tlv length. This > patch adds such handling to avoid killing the kernel with a malformed > ife packet. That's very important. Thanks for that! > > Signed-off-by:

Re: [PATCH net 1/3] net: sched: ife: signal not finding metaid

2018-04-18 Thread yotam gigi
On Thu, Apr 19, 2018 at 12:35 AM, Alexander Aring wrote: > We need to record stats for received metadata that we dont know how > to process. Have find_decode_metaid() return -ENOENT to capture this. Agree. > > Signed-off-by: Alexander Aring Reviewed-by:

Re: [PATCH v3 1/9] net: phy: new Asix Electronics PHY driver

2018-04-18 Thread Michael Schmitz
Hi Andrew, I agree, that's much better. I had something like that in mind before I got distracted... /me looking for brown paper bag now. Cheers, Michael On Thu, Apr 19, 2018 at 12:13 AM, Andrew Lunn wrote: >> + >> +/** >> + * asix_soft_reset - software reset the PHY via

Re: [PATCH bpf-next,v2 1/2] bpf: add helper for getting xfrm states

2018-04-18 Thread Alexei Starovoitov
On Thu, Apr 19, 2018 at 12:58:22AM +0300, Eyal Birger wrote: > This commit introduces a helper which allows fetching xfrm state > parameters by eBPF programs attached to TC. > > Prototype: > bpf_skb_get_xfrm_state(skb, index, xfrm_state, size, flags) > > skb: pointer to skb > index: the index in

[PATCH net-next 1/8] net/ipv6: Rename fib6_info struct elements

2018-04-18 Thread David Ahern
Change the prefix for fib6_info struct elements from rt6i_ to fib6_. rt6i_pcpu and rt6i_exception_bucket are left as is given that they point to rt6_info entries. Rename only; not functional change intended. Signed-off-by: David Ahern ---

[PATCH bpf-next v5 01/10] bpf: btf: Introduce BPF Type Format (BTF)

2018-04-18 Thread Martin KaFai Lau
This patch introduces BPF type Format (BTF). BTF (BPF Type Format) is the meta data format which describes the data types of BPF program/map. Hence, it basically focus on the C programming language which the modern BPF is primary using. The first use case is to provide a generic pretty print

[PATCH bpf-next v5 02/10] bpf: btf: Validate type reference

2018-04-18 Thread Martin KaFai Lau
After collecting all btf_type in the first pass in an earlier patch, the second pass (in this patch) can validate the reference types (e.g. the referring type does exist and it does not refer to itself). While checking the reference type, it also gathers other information (e.g. the size of an

[PATCH bpf-next v5 03/10] bpf: btf: Check members of struct/union

2018-04-18 Thread Martin KaFai Lau
This patch checks a few things of struct's members: 1) It has a valid size (e.g. a "const void" is invalid) 2) A member's size (+ its member's offset) does not exceed the containing struct's size. 3) The member's offset satisfies the alignment requirement The above can only be done after the

[PATCH bpf-next v5 10/10] bpf: btf: Add BTF tests

2018-04-18 Thread Martin KaFai Lau
This patch tests the BTF loading, map_create with BTF and the changes in libbpf. -r: Raw tests that test raw crafted BTF data -f: Test LLVM compiled bpf prog with BTF data -g: Test BPF_OBJ_GET_INFO_BY_FD for btf_fd -p: Test pretty print The tools/testing/selftests/bpf/Makefile will probe for BTF

Re: [PATCH 2/6] rhashtable: remove incorrect comment on r{hl, hash}table_walk_enter()

2018-04-18 Thread NeilBrown
On Wed, Apr 18 2018, Herbert Xu wrote: > On Wed, Apr 18, 2018 at 04:47:01PM +1000, NeilBrown wrote: >> Neither rhashtable_walk_enter() or rhltable_walk_enter() sleep, so >> remove the comments which suggest that they do. >> >> Signed-off-by: NeilBrown >> --- >>

[PATCH net-next 11/11] net: phy: mdio-gpio: Remove redundant platform data header

2018-04-18 Thread Andrew Lunn
The platform data header file is now unused. Remove it, but add an extra include which it brought in. Signed-off-by: Andrew Lunn --- MAINTAINERS | 1 - drivers/net/phy/mdio-gpio.c | 2 +- include/linux/platform_data/mdio-gpio.h | 23

[PATCH net-next 07/11] net: phy: mdio-gpio: Swap to using gpio descriptors

2018-04-18 Thread Andrew Lunn
This simplifies the code, removing the need to handle active low flags, etc. Signed-off-by: Andrew Lunn --- drivers/net/phy/mdio-gpio.c | 73 ++--- include/linux/platform_data/mdio-gpio.h | 10 +--- 2 files changed, 20 insertions(+), 63

[PATCH net-next 01/11] net: phy_ mdio-gpio: Fixup , which should be ;

2018-04-18 Thread Andrew Lunn
Seems like an old typ0. Signed-off-by: Andrew Lunn --- drivers/net/phy/mdio-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 4333c6e14742..369f5f35d6fd 100644 ---

Re: [RFC PATCH ghak32 V2 01/13] audit: add container id

2018-04-18 Thread Paul Moore
On Fri, Mar 16, 2018 at 5:00 AM, Richard Guy Briggs wrote: > Implement the proc fs write to set the audit container ID of a process, > emitting an AUDIT_CONTAINER record to document the event. > > This is a write from the container orchestrator task to a proc entry of > the form

Re: [PATCH iproute2 net-next] vxlan: fix ttl inherit behavior

2018-04-18 Thread Hangbin Liu
On Wed, Apr 18, 2018 at 08:50:16AM -0700, Stephen Hemminger wrote: > When davem merges the feature into net-next, dsa will merge this into > iproute2-next. > We hold off merging into iproute2 because often the kernel review feedback > causes > API changes. Got it, Thanks. Regards Hangbin

Re: [PATCH net-next] net: phy: mdio-boardinfo: Allow recursive mdiobus_register()

2018-04-18 Thread Florian Fainelli
On 04/18/2018 05:00 PM, Andrew Lunn wrote: > mdiobus_register will search for any mdiobus board info registered for > the bus being registered. If found, it will probe devices on the bus. > That device, if for example it is an ethernet switch, may then try to > register an mdio bus. Thus we need

Re: [PATCH bpf-next v3 00/11] introduction of bpf_xdp_adjust_tail

2018-04-18 Thread Daniel Borkmann
On 04/18/2018 06:42 AM, Nikita V. Shirokov wrote: > In this patch series i'm add new bpf helper which allow to manupulate > xdp's data_end pointer. right now only "shrinking" (reduce packet's size > by moving pointer) is supported (and i see no use case for "growing"). > Main use case for such

Re: [PATCH bpf-next v3 5/8] bpf: add documentation for eBPF helpers (33-41)

2018-04-18 Thread Alexei Starovoitov
On Tue, Apr 17, 2018 at 03:34:35PM +0100, Quentin Monnet wrote: > Add documentation for eBPF helper functions to bpf.h user header file. > This documentation can be parsed with the Python script provided in > another commit of the patch series, in order to provide a RST document > that can later

Re: [PATCH net 5/5] nfp: remove false positive offloads in flower vxlan

2018-04-18 Thread John Hurley
On Wed, Apr 18, 2018 at 7:18 PM, Or Gerlitz wrote: > On Wed, Apr 18, 2018 at 3:31 PM, John Hurley > wrote: >> On Wed, Apr 18, 2018 at 8:43 AM, Or Gerlitz wrote: >>> On Fri, Nov 17, 2017 at 4:06 AM, Jakub Kicinski >>>

[PATCH net-next 7/8] net/ipv6: Remove fib6_idev

2018-04-18 Thread David Ahern
fib6_idev can be obtained from __in6_dev_get on the nexthop device rather than caching it in the fib6_info. Remove it. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 1 - net/ipv6/ip6_fib.c| 2 -- net/ipv6/route.c | 66

[PATCH net-next 4/8] net/ipv6: Remove unnecessary checks on fib6_idev

2018-04-18 Thread David Ahern
Prior to 4832c30d5458 ("net: ipv6: put host and anycast routes on device with address") host routes and anycast routes were installed with the device set to loopback (or VRF device once that feature was added). In the older code dst.dev was set to loopback (needed for packet tx) and rt6i_idev was

[PATCH net-next 3/8] net/ipv6: Remove aca_idev

2018-04-18 Thread David Ahern
aca_idev has only 1 user - inet6_fill_ifacaddr - and it only wants the device index which can be extracted from the fib6_info nexthop. Signed-off-by: David Ahern --- include/net/if_inet6.h | 1 - include/net/ip6_fib.h | 5 + net/ipv6/addrconf.c| 3 ++-

[PATCH net-next 8/8] net/ipv6: Fix gfp_flags arg to addrconf_prefix_route

2018-04-18 Thread David Ahern
Eric noticed that __ipv6_ifa_notify is called under rcu_read_lock, so the gfp argument to addrconf_prefix_route can not be GFP_KERNEL. While scrubbing other calls I noticed addrconf_addr_gen has one place with GFP_ATOMIC that can be GFP_KERNEL. Fixes: acb54e3cba404 ("net/ipv6: Add gfp_flags to

[PATCH net-next 0/8] net/ipv6: followup to fib6_info change

2018-04-18 Thread David Ahern
Followup to fib change for IPv6. First 2 patches rename fib6_info struct elements to match its name, and rename addrconf_dst_alloc to match what it returns. Patches 3-7 refactor the code to remove the need for fib6_idev reducing fib6_info by another 8 bytes to 200 bytes. Patch 8 fixes the gfp

<    1   2   3   4   >