Re: [PATCH bpf-next 1/2] libbpf: add support for using AF_XDP sockets

2018-12-11 Thread Magnus Karlsson
On Wed, Dec 12, 2018 at 2:15 AM Daniel Borkmann wrote: > > On 12/10/2018 04:34 PM, Magnus Karlsson wrote: > [...] > > +int xsk_create_umem(void *umem_area, __u64 size, struct xsk_prod_ring *fq, > > + struct xsk_cons_ring *cq, > > + struct xsk_umem_config *usr_config

Re: [PATCH bpf-next 2/2] samples/bpf: convert xdpsock to use libbpf for AF_XDP access

2018-12-11 Thread Magnus Karlsson
Thanks Jakub, I will mention this in the commit message of the v2. /Magnus On Tue, Dec 11, 2018 at 2:08 AM Jakub Kicinski wrote: > > On Mon, 10 Dec 2018 16:34:45 +0100, Magnus Karlsson wrote: > > diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c > > index 57ecadc..ca94cfb 100

[PATCH net-next] net/mlx5: Remove duplicated include from eswitch.c

2018-12-11 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index e6a9b19..4f9dd0d 100644 --- a

Re: [PATCH net-next v2 RFC 7/8] devlink: Add a generic port parameter

2018-12-11 Thread Michael Chan
On Tue, Dec 11, 2018 at 10:18 AM Jakub Kicinski wrote: > > On Tue, 11 Dec 2018 14:16:47 +0530, Vasundhara Volam wrote: > > wake-on-lan - Enables Wake on Lan for this port. If enabled, > > the controller asserts a wake pin based on the wake-on-lan type. > > > > Cc: Jiri Pirko > > Signed-off-by: Va

Re: [PATCH net-next 0/9] mlxsw: Add Spectrum-2 multicast routing support

2018-12-11 Thread David Miller
From: Ido Schimmel Date: Mon, 10 Dec 2018 07:11:31 + > In Spectrum the firmware provided an abstraction for multicast routing > on top of the policy engine. In Spectrum-2 this is no longer the case > and the driver must interact directly with the policy engine in order to > program multicast

Re: [Patch net-next] net_sched: fold tcf_block_cb_call() into tc_setup_cb_call()

2018-12-11 Thread Jiri Pirko
Tue, Dec 11, 2018 at 08:15:46PM CET, xiyou.wangc...@gmail.com wrote: >After commit 69bd48404f25 ("net/sched: Remove egdev mechanism"), >tc_setup_cb_call() is nearly identical to tcf_block_cb_call(), >so we can just fold tcf_block_cb_call() into tc_setup_cb_call() >and remove its unused parameter 'e

Re: [PATCH net] r8169: fix crash if CONFIG_DEBUG_SHIRQ is enabled

2018-12-11 Thread David Miller
From: Heiner Kallweit Date: Sun, 9 Dec 2018 22:05:11 +0100 > If CONFIG_DEBUG_SHIRQ is enabled __free_irq() intentionally fires > a spurious interrupt. This interrupt causes a crash because > tp->dev->phydev is NULL at that time. > > Fixes: 38caff5a445b ("r8169: handle all interrupt events in the

Re: [PATCH] docs/networking: fix formatting of Intel drivers documentation

2018-12-11 Thread David Miller
From: Mike Rapoport Date: Sun, 9 Dec 2018 18:09:51 +0200 > The documentation of Intel drivers is missing the heading adornment for > document titles. > > This causes the generated html to have TOC entries from these documents to > appear as top level TOC entries: > > * Linux* Base Driver for I

Re: [PATCHv2 net 0/3] net: add support for flex_array_resize in flex_array

2018-12-11 Thread David Miller
From: Xin Long Date: Fri, 7 Dec 2018 14:30:32 +0800 > Without the support for the total_nr_elements's growing or shrinking > dynamically, flex_array is not that 'flexible'. Like when users want > to change the size, they have to redo flex_array_alloc and copy all > the elements from the old to t

[PATCH] can: flexcan: add TX support for variable payload size

2018-12-11 Thread Joakim Zhang
Now the FlexCAN driver always use last mailbox for TX, it will work well when MB payload size is 8/16 bytes. TX mailbox would change to 13 when MB payload size is 64 bytes to support CANFD. So we may need to set iflag register to add support for variable payload size. Signed-off-by: Joakim Zhang

Re: [PATCH net-next] rhashtable: further improve stability of rhashtable_walk

2018-12-11 Thread NeilBrown
On Wed, Dec 12 2018, Herbert Xu wrote: > On Wed, Dec 12, 2018 at 11:02:35AM +1100, NeilBrown wrote: >> >> So I think this is a real bug - it is quite unlikely to hit, but >> possibly. >> You need a chain with at least 2 objects, you need >> rhashtable_walk_stop() to be called after visiting an ob

Re: [PATCH v2 4/4] x86/vmalloc: Add TLB efficient x86 arch_vunmap

2018-12-11 Thread Nadav Amit
> On Dec 11, 2018, at 4:03 PM, Rick Edgecombe > wrote: > > This adds a more efficient x86 architecture specific implementation of > arch_vunmap, that can free any type of special permission memory with only 1 > TLB > flush. > > In order to enable this, _set_pages_p and _set_pages_np are made n

Re: IP (rtl8169) forwarding bug (performance)

2018-12-11 Thread Heiner Kallweit
According to your description of the issue it doesn't need a very exotic scenario to trigger it. And due to the fact that Realtek network chips are used on a lot of consumer mainboards, I would assume quite some people are using such a mainboard for a use case like yours. This makes it somewhat s

Re: KMSAN: uninit-value in __inet6_bind

2018-12-11 Thread Cong Wang
On Tue, Dec 11, 2018 at 1:04 AM Dmitry Vyukov wrote: > > On Tue, Dec 11, 2018 at 1:41 AM syzbot > wrote: > > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:3f06bda61398 kmsan: remove excessive KMSAN wrappers from a.. > > git tree: https://github.com/google/k

Re: [PATCH net-next] bnxt: lower log priority of hwrm message to info

2018-12-11 Thread Michael Chan
On Tue, Dec 11, 2018 at 11:23 AM Jonathan Toppins wrote: > > bnxt_en :19:00.0 (unregistered net_device) (uninitialized): hwrm > req_type 0x190 seq id 0x6 error 0x > > The message above is commonly seen when a newer driver is used on > hardware with older firmware. The issue is this messa

Re: [PATCH net-next] rhashtable: further improve stability of rhashtable_walk

2018-12-11 Thread Herbert Xu
On Wed, Dec 12, 2018 at 11:02:35AM +1100, NeilBrown wrote: > > So I think this is a real bug - it is quite unlikely to hit, but > possibly. > You need a chain with at least 2 objects, you need > rhashtable_walk_stop() to be called after visiting an object other than > the last object, and you need

[Patch net] tipc: check tsk->group in tipc_wait_for_cond()

2018-12-11 Thread Cong Wang
tipc_wait_for_cond() drops socket lock before going to sleep, but tsk->group could be freed right after that release_sock(). So we have to re-check and reload tsk->group after it wakes up. After this patch, tipc_wait_for_cond() returns -ERESTARTSYS when tsk->group is NULL, instead of continuing wi

[PATCH bpf-next 4/4] bpf: add self-check logic to liveness analysis

2018-12-11 Thread Alexei Starovoitov
introduce REG_LIVE_DONE to check the liveness propagation and prepare the states for merging See algorithm description in clean_live_states(). No difference in tests. Signed-off-by: Alexei Starovoitov --- include/linux/bpf_verifier.h | 1 + kernel/bpf/verifier.c| 108 ++

[PATCH bpf-next 2/4] selftests/bpf: check insn processed in test_verifier

2018-12-11 Thread Alexei Starovoitov
teach test_verifier to parse verifier output for insn processed and compare with expected number Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/test_verifier.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_

[PATCH bpf-next 1/4] bpf: speed up stacksafe check

2018-12-11 Thread Alexei Starovoitov
don't check the same stack liveness condition 8 times. once is enough. Signed-off-by: Alexei Starovoitov --- kernel/bpf/verifier.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 8b511a4fe84a..d4db4727a50e 100644 --- a/ke

[PATCH bpf-next 0/4] bpf: improve verifier state analysis

2018-12-11 Thread Alexei Starovoitov
Several improvements to verifier state logic. Patch 1 - trivial optimization Patch 3 - significant optimization for stack state equivalence Patch 4 - safety check for liveness and prep for future state merging Alexei Starovoitov (4): bpf: speed up stacksafe check selftests/bpf: check insn proc

[PATCH bpf-next 3/4] bpf: improve stacksafe state comparison

2018-12-11 Thread Alexei Starovoitov
if (old->allocated_stack > cur->allocated_stack) check is too conservative. In some cases explored stack could have allocated more space, but that stack space was not live. The test case improves from 19 to 15 processed insns and improvement on real programs is significant as well:

[PATCH] rtlwifi: Fix non-working BSS STA mode

2018-12-11 Thread Kai-Heng Feng
Once BSS STA mode gets started, it can be scanned by other clients but cannot entablish a connection. Turns out the set_bcn_reg() and its *_set_beacon_related_registers() callbacks never get called so it has problem beaconing. Enable the function in rtl_op_bss_info_changed() can make BSS STA mode

Re: [PATCH bpf-next] bpf: arm64: Enable arm64 jit to provide bpf_line_info

2018-12-11 Thread Martin Lau
On Wed, Dec 12, 2018 at 02:21:08AM +0100, Daniel Borkmann wrote: > On 12/12/2018 01:02 AM, Martin KaFai Lau wrote: > > This patch enables arm64's bpf_int_jit_compile() to provide > > bpf_line_info by calling bpf_prog_fill_jited_linfo(). > > > > Signed-off-by: Martin KaFai Lau > > Applied, thanks

Re: [PATCH bpf] bpf: verifier: make sure callees don't prune with caller differences

2018-12-11 Thread Alexei Starovoitov
On Mon, Dec 10, 2018 at 11:35:12AM -0800, Jakub Kicinski wrote: > Currently for liveness and state pruning the register parentage > chains don't include states of the callee. This makes some sense > as the callee can't access those registers. However, this means > that READs done after the callee

Re: [PATCH v2 bpf-next 1/2] bpf: include sub program tags in bpf_prog_info

2018-12-11 Thread Martin Lau
On Wed, Dec 12, 2018 at 03:22:38AM +0100, Daniel Borkmann wrote: > On 12/11/2018 09:18 AM, Song Liu wrote: > > Changes from v1: > > 1. Fix error path as Martin suggested. > > > > This patch adds nr_prog_tags and prog_tags to bpf_prog_info. This is a > > reliable way for user space to get tags of a

Re: [PATCH mlx5-next 0/2] Improvements for PTP clock in mlx5 driver

2018-12-11 Thread Saeed Mahameed
On Mon, Dec 3, 2018 at 4:59 AM Miroslav Lichvar wrote: > > This is a pair of patches for the mlx5 driver related to the PTP clock. > > The first patch fixes a potential issue causing backward jumps due to a > late update of the PHC timecounter. > > The second patch adds support for the PTP_SYS_OFF

Re: [PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling

2018-12-11 Thread Michael S. Tsirkin
On Wed, Dec 12, 2018 at 11:03:57AM +0800, Jason Wang wrote: > > On 2018/12/11 下午12:04, Michael S. Tsirkin wrote: > > On Tue, Dec 11, 2018 at 11:06:43AM +0800, Jason Wang wrote: > > > On 2018/12/11 上午9:34, Michael S. Tsirkin wrote: > > > > On Mon, Dec 10, 2018 at 05:44:52PM +0800, Jason Wang wrote:

RE: [Intel-wired-lan] [PATCH] igb: Fix an issue that PME is not enabled during runtime suspend

2018-12-11 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Kai-Heng Feng > Sent: Sunday, December 2, 2018 9:55 PM > To: Kirsher, Jeffrey T > Cc: netdev@vger.kernel.org; Kai-Heng Feng > ; intel-wired-...@lists.osuosl.org; > da...@davemloft.net; linux-ker...@vger.kernel.org >

Re: [PATCH net-next v2 01/17] net: sched: refactor mini_qdisc_pair_swap() to use workqueue

2018-12-11 Thread kbuild test robot
Hi Vlad, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Vlad-Buslov/Refactor-classifier-API-to-work-with-chain-classifiers-without-rtnl-lock/20181211-231158 config: mips-fuloong2e_defconfig

Re: [PATCH bpf-next v2 1/2] selftests/bpf: skip maps sockmap tests on kernels without support

2018-12-11 Thread Stanislav Fomichev
On 12/12, Daniel Borkmann wrote: > On 12/10/2018 09:43 PM, Stanislav Fomichev wrote: > > Include "autoconf.h" header in the test_maps.c and selectively > > disable test_sockmap if CONFIG_BPF_STREAM_PARSER is not specified > > in the kernel config. > > When building out of tree/without autoconf.h, f

[PATCH v2 bpf-next] selftests/bpf: use __bpf_constant_htons in test_prog.c

2018-12-11 Thread Stanislav Fomichev
For some reason, my older GCC (< 4.8) isn't smart enough to optimize the !__builtin_constant_p() branch in bpf_htons, I see: error: implicit declaration of function '__builtin_bswap16' Let's use __bpf_constant_htons as suggested by Daniel Borkmann. I tried to use simple htons, but it produces t

Re: [PATCH bpf v2] bpf: fix bpf_jit_limit knob for PAGE_SIZE >= 64K

2018-12-11 Thread Alexei Starovoitov
On Tue, Dec 11, 2018 at 12:14:12PM +0100, Daniel Borkmann wrote: > Michael and Sandipan report: > > Commit ede95a63b5 introduced a bpf_jit_limit tuneable to limit BPF > JIT allocations. At compile time it defaults to PAGE_SIZE * 4, > and is adjusted again at init time if MODULES_VADDR is

Re: [PATCH bpf-next] selftests/bpf: don't use bpf helpers in non-bpf environment

2018-12-11 Thread Stanislav Fomichev
On 12/12, Daniel Borkmann wrote: > On 12/11/2018 10:49 PM, Stanislav Fomichev wrote: > > On 12/11, Stanislav Fomichev wrote: > >> We're using bpf_htons in test_progs.c to initialize some static > >> global data and I think I hit some weird case on an older compiler > >> which doesn't have __builtin

Re: [PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2018-12-11 Thread Bjorn Helgaas
On Tue, Dec 11, 2018 at 6:38 PM David Gibson wrote: > > On Tue, Dec 11, 2018 at 08:01:43AM -0600, Bjorn Helgaas wrote: > > Hi David, > > > > I see you're still working on this, but if you do end up going this > > direction eventually, would you mind splitting this into two patches: > > 1) rename t

Re: [PATCH net 2/4] vhost_net: rework on the lock ordering for busy polling

2018-12-11 Thread Jason Wang
On 2018/12/11 下午12:04, Michael S. Tsirkin wrote: On Tue, Dec 11, 2018 at 11:06:43AM +0800, Jason Wang wrote: On 2018/12/11 上午9:34, Michael S. Tsirkin wrote: On Mon, Dec 10, 2018 at 05:44:52PM +0800, Jason Wang wrote: When we try to do rx busy polling in tx path in commit 441abde4cd84 ("net:

Re: [PATCH net] net: mvneta: fix operation for 64K PAGE_SIZE

2018-12-11 Thread Jisheng Zhang
Hi, On Tue, 11 Dec 2018 13:56:49 +0100 Marcin Wojtas wrote: > Recent changes in the mvneta driver reworked allocation > and handling of the ingress buffers to use entire pages. > Apart from that in SW BM scenario the HW must be informed > via PRXDQS about the biggest possible incoming buffer > th

Re: [PATCH v2 4/4] x86/vmalloc: Add TLB efficient x86 arch_vunmap

2018-12-11 Thread Andy Lutomirski
On Tue, Dec 11, 2018 at 4:12 PM Rick Edgecombe wrote: > > This adds a more efficient x86 architecture specific implementation of > arch_vunmap, that can free any type of special permission memory with only 1 > TLB > flush. > > In order to enable this, _set_pages_p and _set_pages_np are made non-s

Re: [PATCH v2 bpf-next 1/2] bpf: include sub program tags in bpf_prog_info

2018-12-11 Thread Daniel Borkmann
On 12/11/2018 09:18 AM, Song Liu wrote: > Changes from v1: > 1. Fix error path as Martin suggested. > > This patch adds nr_prog_tags and prog_tags to bpf_prog_info. This is a > reliable way for user space to get tags of all sub programs. Before this > patch, user space need to find sub program tag

Re: [PATCH V2] net: dsa: ksz: Add reset GPIO handling

2018-12-11 Thread Marek Vasut
On 12/10/2018 03:37 PM, Andrew Lunn wrote: > On Mon, Dec 10, 2018 at 02:26:51PM +0100, Marek Vasut wrote: >> On 12/08/2018 12:11 PM, Andrew Lunn wrote: This actually is an individual patch, it doesn't depend on anything. Or do you mean a series with the DT documentation change ? >>> >>> Y

Re: [PATCH v2 1/4] vmalloc: New flags for safe vfree on special perms

2018-12-11 Thread Andy Lutomirski
On Tue, Dec 11, 2018 at 4:12 PM Rick Edgecombe wrote: > > This adds two new flags VM_IMMEDIATE_UNMAP and VM_HAS_SPECIAL_PERMS, for > enabling vfree operations to immediately clear executable TLB entries to freed > pages, and handle freeing memory with special permissions. > > In order to support v

Re: [PATCH bpf-next v2 1/2] selftests/bpf: skip maps sockmap tests on kernels without support

2018-12-11 Thread Daniel Borkmann
On 12/10/2018 09:43 PM, Stanislav Fomichev wrote: > Include "autoconf.h" header in the test_maps.c and selectively > disable test_sockmap if CONFIG_BPF_STREAM_PARSER is not specified > in the kernel config. > When building out of tree/without autoconf.h, fall back to 'enabled'. > > v2 changes: > *

[PATCH net-next 0/5] neighbor: More gc_list changes

2018-12-11 Thread David Ahern
From: David Ahern More gc_list changes and cleanups. The first 2 patches are bug fixes from the first gc_list change. Specifically, fix the locking order to be consistent - table lock followed by neighbor lock, and then entries in the FAILED state should always be candidates for forced_gc withou

[PATCH net-next 4/5] neighbor: Move neigh_update_ext_learned to core file

2018-12-11 Thread David Ahern
From: David Ahern neigh_update_ext_learned has one caller in neighbour.c so does not need to be defined in the header. Move it and in the process remove the intialization of ndm_flags and just set it based on the flags check. Signed-off-by: David Ahern --- include/net/neighbour.h | 18

[PATCH net-next 3/5] neighbor: Remove state and flags arguments to neigh_del

2018-12-11 Thread David Ahern
From: David Ahern neigh_del now only has 1 caller, and the state and flags arguments are both 0. Remove them and simplify neigh_del. Signed-off-by: David Ahern --- net/core/neighbour.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/core/neighbour.c b/net/core/

[PATCH net-next 2/5] neighbor: Fix state check in neigh_forced_gc

2018-12-11 Thread David Ahern
From: David Ahern PERMANENT entries are not on the gc_list so the state check is now redundant. Also, the move to not purge entries until after 5 seconds should not apply to FAILED entries; those can be removed immediately to make way for newer ones. This restores the previous logic prior to the

[PATCH net-next 1/5] neighbor: Fix locking order for gc_list changes

2018-12-11 Thread David Ahern
From: David Ahern Lock checker noted an inverted lock order between neigh_change_state (neighbor lock then table lock) and neigh_periodic_work (table lock and then neighbor lock) resulting in: [ 121.057652] == [ 121.058740] WARNING: possible

[PATCH net-next 5/5] neighbor: Remove externally learned entries from gc_list

2018-12-11 Thread David Ahern
From: David Ahern Externally learned entries are similar to PERMANENT entries in the sense they are managed by userspace and can not be garbage collected. As such remove them from the gc_list, remove the flags check from neigh_forced_gc and skip threshold checks in neigh_alloc. As with PERMANENT

Re: [PATCH bpf-next] selftests/bpf: don't use bpf helpers in non-bpf environment

2018-12-11 Thread Daniel Borkmann
On 12/11/2018 10:49 PM, Stanislav Fomichev wrote: > On 12/11, Stanislav Fomichev wrote: >> We're using bpf_htons in test_progs.c to initialize some static >> global data and I think I hit some weird case on an older compiler >> which doesn't have __builtin_bswap16 (and __builtin_constant_p >> expan

[PATCH] Fix mm->owner point to a task that does not exists.

2018-12-11 Thread gchen . guomin
From: guomin chen Under normal circumstances,When do_exit exits, mm->owner will be updated on exit_mm(). but when the kernel process calls unuse_mm() and then exits,mm->owner cannot be updated. And it will point to a task that has been released. Below is my issue on vhost_net: A, B are

Re: IP (rtl8169) forwarding bug (performance)

2018-12-11 Thread Risto Pajula
Hello. I added some debug prints to diagnose the bug properly. I can send the patches if you are willing to debug/try... for example this output is produced: 96096:  -0 [000] ..s.   232.466703: rtl8169_start_xmit: RTLDBG221 eth1 rtl8169_start_xmit len: 1506 opts1: B000 txpol

Re: [PATCH bpf-next] bpf: arm64: Enable arm64 jit to provide bpf_line_info

2018-12-11 Thread Daniel Borkmann
On 12/12/2018 01:02 AM, Martin KaFai Lau wrote: > This patch enables arm64's bpf_int_jit_compile() to provide > bpf_line_info by calling bpf_prog_fill_jited_linfo(). > > Signed-off-by: Martin KaFai Lau Applied, thanks! Given the change is rather small, could you also follow-up for the other JITs

[PATCH net 1/2] net: bpfilter: restart bpfilter_umh when error occurred

2018-12-11 Thread Taehee Yoo
When bpfilter error occurred bpfilter_umh will be stopped via __stop_umh(). The bpfilter_umh() couldn't start again because there is no restart routine. The section of bpfilter_umh_{start/end} is no longer .init.rodata because these area should be reused in the restart routine. hence the section n

[PATCH net 2/2] net: bpfilter: disallow to remove bpfilter module while being used

2018-12-11 Thread Taehee Yoo
bpfilter.ko module can be removed while functions of bpfilter.ko are executing. so panic can occurred. in order to protect that, locks can be used. a bpfilter_lock protects routines in the __bpfilter_process_sockopt() but it's not enough because __exit routine can be executed concurrently. test co

[PATCH net 0/2] net: bpfilter: fix two bugs in bpfilter

2018-12-11 Thread Taehee Yoo
This patches fix two bugs in bpfilter which are related in iptables command. First patch adds error handling code for bpfilter_umh. When error occurred in bpfilter_umh, bpfilter is stopped. then it never be restarted. it makes failing iptables command. This patch adds restart bpfilter_umh routine.

Re: [net-next 03/14] net/mlx5e: Refactor eswitch flow attr for destination specific properties

2018-12-11 Thread Saeed Mahameed
On Tue, Dec 11, 2018 at 5:05 PM Saeed Mahameed wrote: > > On Tue, Dec 11, 2018 at 4:21 PM Cong Wang wrote: > > > > On Tue, Dec 11, 2018 at 3:27 PM Saeed Mahameed wrote: > > > @@ -939,8 +939,8 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv, > > > } > > > out_priv

Re: [PATCH bpf-next 1/2] libbpf: add support for using AF_XDP sockets

2018-12-11 Thread Daniel Borkmann
On 12/10/2018 04:34 PM, Magnus Karlsson wrote: [...] > +int xsk_create_umem(void *umem_area, __u64 size, struct xsk_prod_ring *fq, > + struct xsk_cons_ring *cq, > + struct xsk_umem_config *usr_config) > +{ > + struct xdp_mmap_offsets off; > + struct xsk_umem_

Re: [net-next 03/14] net/mlx5e: Refactor eswitch flow attr for destination specific properties

2018-12-11 Thread Saeed Mahameed
On Tue, Dec 11, 2018 at 4:21 PM Cong Wang wrote: > > On Tue, Dec 11, 2018 at 3:27 PM Saeed Mahameed wrote: > > @@ -939,8 +939,8 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv, > > } > > out_priv = netdev_priv(encap_dev); > > rpriv = out_priv->ppri

Re: [net-next 08/14] net/mlx5e: Change parse attr struct to accommodate multiple tunnel infos

2018-12-11 Thread Saeed Mahameed
On Tue, Dec 11, 2018 at 4:49 PM Cong Wang wrote: > > On Tue, Dec 11, 2018 at 3:28 PM Saeed Mahameed wrote: > > struct mlx5e_tc_flow_parse_attr { > > - struct ip_tunnel_info tun_info; > > + struct ip_tunnel_info tun_info[MLX5_MAX_FLOW_FWD_VPORTS]; > > struct net_device *filter

linux-next: manual merge of the net-next tree with the char-misc.current tree

2018-12-11 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: MAINTAINERS between commit: cb4f131e1f2c ("MAINTAINERS: Patch monkey for the Hyper-V code") from the char-misc.current tree and commit: b255e500c8dc ("net: documentation: build a directory structure for drivers")

Re: [PATCH bpf-next 1/2] libbpf: add support for using AF_XDP sockets

2018-12-11 Thread Daniel Borkmann
On 12/10/2018 04:34 PM, Magnus Karlsson wrote: [...] > diff --git a/tools/lib/bpf/README.rst b/tools/lib/bpf/README.rst > index 056f383..5a4d644 100644 > --- a/tools/lib/bpf/README.rst > +++ b/tools/lib/bpf/README.rst > @@ -9,7 +9,7 @@ described here. It's recommended to follow these conventions >

Re: [net-next 08/14] net/mlx5e: Change parse attr struct to accommodate multiple tunnel infos

2018-12-11 Thread Cong Wang
On Tue, Dec 11, 2018 at 3:28 PM Saeed Mahameed wrote: > struct mlx5e_tc_flow_parse_attr { > - struct ip_tunnel_info tun_info; > + struct ip_tunnel_info tun_info[MLX5_MAX_FLOW_FWD_VPORTS]; > struct net_device *filter_dev; > struct mlx5_flow_spec spec; > int num_

Re: [PATCH bpf-next 1/2] libbpf: add support for using AF_XDP sockets

2018-12-11 Thread Daniel Borkmann
On 12/10/2018 04:34 PM, Magnus Karlsson wrote: [...] > diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map > index cd02cd4..0dc79c8 100644 > --- a/tools/lib/bpf/libbpf.map > +++ b/tools/lib/bpf/libbpf.map > @@ -124,3 +124,15 @@ LIBBPF_0.0.1 { > local: > *; > }; > +

[PATCH bpf-next 4/7] tools/bpf: add test_btf unit tests for kind_flag

2018-12-11 Thread Yonghong Song
This patch added unit tests for different types handling type->info.kind_flag. The following new tests are added: $ test_btf ... BTF raw test[82] (invalid int kind_flag): OK BTF raw test[83] (invalid ptr kind_flag): OK BTF raw test[84] (invalid array kind_flag): OK BTF raw test[85] (inv

[PATCH bpf-next 5/7] tools/bpf: test kernel bpffs map pretty print with struct kind_flag

2018-12-11 Thread Yonghong Song
The new tests are added to test bpffs map pretty print in kernel with kind_flag for structure type. $ test_btf -p .. BTF pretty print array(#1)..OK BTF pretty print array(#2)..OK PASS:8 SKIP:0 FAIL:0 Signed-off-by: Yonghong Song --- tools/testing/selftests/bpf/test_btf.c |

[PATCH bpf-next 7/7] tools: bpftool: support pretty print with kind_flag set

2018-12-11 Thread Yonghong Song
The following example shows map pretty print with structures which include bitfield members. enum A { A1, A2, A3, A4, A5 }; typedef enum A ___A; struct tmp_t { char a1:4; int a2:4; int :4; __u32 a3:4; int b; ___A b1:4; enum A b2:4; }; st

[PATCH bpf-next 6/7] tools: bpftool: refactor btf_dumper_int_bits()

2018-12-11 Thread Yonghong Song
The core dump funcitonality in btf_dumper_int_bits() is refactored into a separate function btf_dumper_bitfield() which will be used by the next patch. Signed-off-by: Yonghong Song --- tools/bpf/bpftool/btf_dumper.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) d

[PATCH bpf-next 1/7] bpf: btf: refactor btf_int_bits_seq_show()

2018-12-11 Thread Yonghong Song
Refactor function btf_int_bits_seq_show() by creating function btf_bitfield_seq_show() which has no dependence on btf and btf_type. The function btf_bitfield_seq_show() will be in later patch to directly dump bitfield member values. Signed-off-by: Yonghong Song --- kernel/bpf/btf.c | 35

[PATCH bpf-next 3/7] tools/bpf: sync btf.h header from kernel to tools

2018-12-11 Thread Yonghong Song
Sync include/uapi/linux/btf.h to tools/include/uapi/linux/btf.h. Signed-off-by: Yonghong Song --- tools/include/uapi/linux/btf.h | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/include/uapi/linux/btf.h b/tools/include/uapi/linux/btf.h index 14f66948fc95

[PATCH bpf-next 2/7] bpf: btf: fix struct/union/fwd types with kind_flag

2018-12-11 Thread Yonghong Song
This patch fixed two issues with BTF. One is related to struct/union bitfield encoding and the other is related to forward type. Issue #1 and solution: == Current btf encoding of bitfield follows what pahole generates. For each bitfield, pahole will duplicate the type chain an

[PATCH bpf-next 0/7] bpf: btf: fix struct/union/fwd types with kind_flag

2018-12-11 Thread Yonghong Song
Commit 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)") introduced BTF, a debug info format for BTF. The original design has a couple of issues though. First, the bitfield size is only encoded in int type. If the struct member bitfield type is enum, pahole ([1]) or llvm is forced to repl

Re: [PATCH bpf-next 0/2] libbpf: adding af_xdp support

2018-12-11 Thread Daniel Borkmann
On 12/11/2018 01:10 AM, Jakub Kicinski wrote: > On Mon, 10 Dec 2018 16:34:43 +0100, Magnus Karlsson wrote: >> * Is it ok to have static inline functions in this library? They are >> currently static inline for performance reasons, but maybe -flto >> could fix this but not everyone uses this. >

Re: [PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2018-12-11 Thread David Gibson
On Tue, Dec 11, 2018 at 08:01:43AM -0600, Bjorn Helgaas wrote: > Hi David, > > I see you're still working on this, but if you do end up going this > direction eventually, would you mind splitting this into two patches: > 1) rename the quirk to make it more generic (but not changing any > behavior)

Re: [Patch net-next] net_sched: fold tcf_block_cb_call() into tc_setup_cb_call()

2018-12-11 Thread Cong Wang
On Tue, Dec 11, 2018 at 4:25 PM Jakub Kicinski wrote: > > p_err() breaks JSON so it's an actual bug. Fair enough. Mind to explain the following one to me? I know you were not involved but you didn't object it either. commit 74be39ebba36e98a973ddb914fb41dc9e5129e36 Author: Nicolas Dichtel Date:

Re: [Patch net-next] net_sched: fold tcf_block_cb_call() into tc_setup_cb_call()

2018-12-11 Thread Jakub Kicinski
On Tue, 11 Dec 2018 16:05:08 -0800, Cong Wang wrote: > On Tue, Dec 11, 2018 at 1:44 PM Jakub Kicinski wrote: > > On Tue, 11 Dec 2018 11:15:46 -0800, Cong Wang wrote: > > > After commit 69bd48404f25 ("net/sched: Remove egdev mechanism"), > > > tc_setup_cb_call() is nearly identical to tcf_block_cb

Re: [net-next 03/14] net/mlx5e: Refactor eswitch flow attr for destination specific properties

2018-12-11 Thread Cong Wang
On Tue, Dec 11, 2018 at 3:27 PM Saeed Mahameed wrote: > @@ -939,8 +939,8 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv, > } > out_priv = netdev_priv(encap_dev); > rpriv = out_priv->ppriv; > - attr->out_rep[attr->out_count] = rpriv->r

[PATCH v2 4/4] x86/vmalloc: Add TLB efficient x86 arch_vunmap

2018-12-11 Thread Rick Edgecombe
This adds a more efficient x86 architecture specific implementation of arch_vunmap, that can free any type of special permission memory with only 1 TLB flush. In order to enable this, _set_pages_p and _set_pages_np are made non-static and renamed set_pages_p_noflush and set_pages_np_noflush to bet

[PATCH v2 0/4] Don’t leave executable TLB entries to freed pages

2018-12-11 Thread Rick Edgecombe
Sometimes when memory is freed via the module subsystem, an executable permissioned TLB entry can remain to a freed page. If the page is re-used to back an address that will receive data from userspace, it can result in user data being mapped as executable in the kernel. The root of this behavior i

[PATCH v2 3/4] bpf: switch to new vmalloc vfree flags

2018-12-11 Thread Rick Edgecombe
This switches to use the new vmalloc flags to control freeing memory with special permissions. Signed-off-by: Rick Edgecombe --- include/linux/filter.h | 26 -- kernel/bpf/core.c | 1 - 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/include/linux/f

[PATCH v2 2/4] modules: Add new special vfree flags

2018-12-11 Thread Rick Edgecombe
Add new flags for handling freeing of special permissioned memory in vmalloc, and remove places where the handling was done in module.c. This will enable this flag for all architectures. Signed-off-by: Rick Edgecombe --- kernel/module.c | 43 --- 1 file c

[PATCH v2 1/4] vmalloc: New flags for safe vfree on special perms

2018-12-11 Thread Rick Edgecombe
This adds two new flags VM_IMMEDIATE_UNMAP and VM_HAS_SPECIAL_PERMS, for enabling vfree operations to immediately clear executable TLB entries to freed pages, and handle freeing memory with special permissions. In order to support vfree being called on memory that might be RO, the vfree deferred l

Re: [PATCH net-next 02/13] sk_buff: add skb extension infrastructure

2018-12-11 Thread Florian Westphal
Mat Martineau wrote: > > On Mon, 11 Dec 2018, Florian Westphal wrote: > > ... > > > diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h > > index b1831a5ca173..d715736eb734 100644 > > --- a/include/linux/skbuff.h > > +++ b/include/linux/skbuff.h > > ... > > > @@ -3896,6 +3906,113 @@

Re: [PATCH net-next 02/13] sk_buff: add skb extension infrastructure

2018-12-11 Thread Mat Martineau
On Mon, 11 Dec 2018, Florian Westphal wrote: ... diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index b1831a5ca173..d715736eb734 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h ... @@ -3896,6 +3906,113 @@ static inline void nf_conntrack_get(struct nf_conntrac

Re: [Patch net-next] net_sched: fold tcf_block_cb_call() into tc_setup_cb_call()

2018-12-11 Thread Cong Wang
On Tue, Dec 11, 2018 at 1:44 PM Jakub Kicinski wrote: > > On Tue, 11 Dec 2018 11:15:46 -0800, Cong Wang wrote: > > After commit 69bd48404f25 ("net/sched: Remove egdev mechanism"), > > tc_setup_cb_call() is nearly identical to tcf_block_cb_call(), > > so we can just fold tcf_block_cb_call() into tc

Re: [PATCH net-next] rhashtable: further improve stability of rhashtable_walk

2018-12-11 Thread NeilBrown
On Tue, Dec 11 2018, Herbert Xu wrote: > Hi Neil: > > On Mon, Dec 10, 2018 at 09:50:43AM +1100, NeilBrown wrote: >> I think it was agreed that I would not pursue features that were only >> of use to out-of-tree code, but I don't think that applies here. This >> is not a feature, this is a qual

[PATCH bpf-next] bpf: arm64: Enable arm64 jit to provide bpf_line_info

2018-12-11 Thread Martin KaFai Lau
This patch enables arm64's bpf_int_jit_compile() to provide bpf_line_info by calling bpf_prog_fill_jited_linfo(). Signed-off-by: Martin KaFai Lau --- arch/arm64/net/bpf_jit_comp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c in

RE: [PATCH RFC 5/6] net: dsa: microchip: Update tag_ksz.c to access switch driver

2018-12-11 Thread Tristram.Ha
> I'd be careful about locking. Seems like dsa was designed with "tag > format is static", and you want to change it dynamically... I see there is now a new overhead parameter in the dsa_device_ops structure and dev_set_mtu is called in master.c. It does not prevent the tag size to change dynamic

[PATCH v3 perf, bpf-next 2/4] perf: sync tools/include/uapi/linux/perf_event.h

2018-12-11 Thread Song Liu
Sync changes for PERF_RECORD_BPF_EVENT. Signed-off-by: Song Liu --- tools/include/uapi/linux/perf_event.h | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h index 9de8780ac

[PATCH v3 perf, bpf-next 1/4] perf, bpf: Introduce PERF_RECORD_BPF_EVENT

2018-12-11 Thread Song Liu
For better performance analysis of BPF programs, this patch introduces PERF_RECORD_BPF_EVENT, a new perf_event_type that exposes BPF program load/unload information to user space. Each BPF program may contain up to BPF_MAX_SUBPROGS (256) sub programs. The following example shows kernel symbols for

[PATCH v3 perf, bpf-next 4/4] perf tools: synthesize bpf event for loaded BPF programs

2018-12-11 Thread Song Liu
This patch synthesize PERF_RECORD_BPF_EVENT for BPF programs loaded before perf-record. This is achieved by gathering information about all BPF programs via sys_bpf. Signed-off-by: Song Liu --- tools/perf/builtin-record.c | 6 ++ tools/perf/util/bpf-event.c | 185 ++

[PATCH v3 perf, bpf-next 0/4] reveal invisible bpf programs

2018-12-11 Thread Song Liu
This set catches symbol for all BPF programs loaded/unloaded before/during/after perf-record run in a mmap-like event, PERF_RECORD_BPF_EVENT. PERF_RECORD_BPF_EVENT includes key information of a BPF program load and unload. It is sent through perf ringbuffer, and stored in perf.data. Before this pa

[PATCH v3 perf, bpf-next 3/4] perf util: handle PERF_RECORD_BPF_EVENT

2018-12-11 Thread Song Liu
This patch handles PERF_RECORD_BPF_EVENT in perf record/report. Specifically, map and symbol are created for PERF_BPF_EVENT_PROG_LOAD, and removed for PERF_BPF_EVENT_PROG_UNLOAD. This patch also set perf_event_attr.bpf_event properly. The flag is ON by default. Signed-off-by: Song Liu --- tools

[PATCH] Allow class-e address assignment via ifconfig ioctl

2018-12-11 Thread Dave Taht
While most distributions long ago switched to the iproute2 suite of utilities, which allow class-e (240.0.0.0/4) address assignment, distributions relying on busybox, toybox and other forms of ifconfig cannot assign class-e addresses without this kernel patch. While CIDR has been obsolete for 2 de

[net-next 08/14] net/mlx5e: Change parse attr struct to accommodate multiple tunnel infos

2018-12-11 Thread Saeed Mahameed
From: Eli Britstein Currently the driver can support only a single TC tunnel_set action. Change the tunnel info fields to arrays, as a pre-step to support multiple encapsulations for a single flow, with no functional change. Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Signed-off-by: Sa

[net-next 12/14] net/mlx5e: Avoid query PPCNT register if not supported by the device

2018-12-11 Thread Saeed Mahameed
From: Eyal Davidovich PPCNT is not supported if PCAM access reg is supported and ppcnt bit is clear. Signed-off-by: Eyal Davidovich Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 12 include/linux/mlx5/mlx5_ifc

[net-next 09/14] net/mlx5e: Allow association of a flow to multiple encaps

2018-12-11 Thread Saeed Mahameed
From: Eli Britstein Currently a flow can be associated with a single encap entry. The extended destination feature enables the driver to configure multiple encap entries per flow. Change the encap flow association field to array as a pre-step towards supporting multiple encap destinations. Use o

[net-next 07/14] net/mlx5e: Support header rewrite actions with remote port mirroring

2018-12-11 Thread Saeed Mahameed
From: Eli Britstein A rule with the following actions is split to a two level FDB: 1. Forward to local mirror vport 2. Header rewrite 3. Forward to local vport In the first level flow table, forward the packet to the local port and forward the packet to the second level flow table for header rewr

[net-next 11/14] net/mlx5e: Use CQE padding for Ethernet CQs

2018-12-11 Thread Saeed Mahameed
From: Daniel Jurgens Writing 64B CQEs to 128B cache lines results in a RMW operation. Padding the CQEs to 128B if possible improves performance on 128B cache line systems like PPC. Testing on PPC showed up to a 24% improvement in small packet throughput vs the default behavior, depending on the

[net-next 10/14] net/mlx5e: Support multiple encapsulations for a TC flow

2018-12-11 Thread Saeed Mahameed
From: Eli Britstein Currently a flow is associated with a single encap structure. The FW extended destination features enables the driver to associate a flow with multiple encap instances. Change the encap id field from a flow scope to a per destination value in the flow attributes struct. Use t

[net-next 14/14] net/mlx5e: Use monitor counters for update stats

2018-12-11 Thread Saeed Mahameed
From: Eyal Davidovich - Adding new notifier block (struct mlx5_nb) monitor_counters_nb for handeling MONITOR_COUNTER new event type. - Adding work queue element: monitor_counters_work for re-arm and update stats. - We re-queue the update stat work, only when working over firmware that doesn

  1   2   3   >