Re: [PATCH 2/3] net: socionext: Add dummy PHY register read in phy_write()

2018-10-18 Thread Masahisa Kojima
On Fri, 19 Oct 2018 at 12:01, Florian Fainelli wrote: > > > > On 10/18/2018 6:08 PM, masahisa.koj...@linaro.org wrote: > > From: Masahisa Kojima > > > > There is a compatibility issue between RTL8211E implemented > > in Developerbox and netsec network controller IP(F_GMAC4). > > > > RTL8211E expe

Re: [PATCH 1/3] net: socionext: Stop PHY before resetting netsec

2018-10-18 Thread Masahisa Kojima
Hi, Thank you very much for your comment. I have not realized that reading MII_PHYSID1/ID2 are ignored if the PHY is in power down, this patch has a side effect in ACPI case. My intention is that netsec_reset_hardware() should be called in PHY power down state, but current place to add PHY power

[PATCH v6 bpf-next 0/2] bpf: add cg_skb_is_valid_access

2018-10-18 Thread Song Liu
Changes v5 -> v6: 1. Fixed dummy sk in bpf_prog_test_run_skb() as suggested by Eric Dumazet. Changes v4 -> v5: 1. Replaced bpf_compute_and_save_data_pointers() with bpf_compute_and_save_data_end(); Replaced bpf_restore_data_pointers() with bpf_restore_data_end(). 2. Fixed indentation in test

[PATCH v6 bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB

2018-10-18 Thread Song Liu
Tests are added to make sure CGROUP_SKB cannot access: tc_classid, data_meta, flow_keys and can read and write: mark, prority, and cb[0-4] and can read other fields. To make selftest with skb->sk work, a dummy sk is added in bpf_prog_test_run_skb(). Signed-off-by: Song Liu --- net/bpf/tes

[PATCH v6 bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB

2018-10-18 Thread Song Liu
BPF programs of BPF_PROG_TYPE_CGROUP_SKB need to access headers in the skb. This patch enables direct access of skb for these programs. Two helper functions bpf_compute_and_save_data_end() and bpf_restore_data_end() are introduced. There are used in __cgroup_bpf_run_filter_skb(), to compute proper

Re: [PATCH v5 bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB

2018-10-18 Thread Song Liu
> On Oct 18, 2018, at 10:22 PM, Eric Dumazet wrote: > > > > On 10/18/2018 10:01 PM, Song Liu wrote: >> Tests are added to make sure CGROUP_SKB cannot access: >> tc_classid, data_meta, flow_keys >> >> and can read and write: >> mark, prority, and cb[0-4] >> >> and can read other fields. >

Re: [PATCH bpf-next 2/2] samples: bpf: get ifindex from ifname

2018-10-18 Thread Y Song
On Thu, Oct 18, 2018 at 1:48 PM Matteo Croce wrote: > > Find the ifindex via ioctl(SIOCGIFINDEX) instead of requiring the > numeric ifindex. Maybe use if_nametoindex which is simpler? > > Signed-off-by: Matteo Croce > --- > samples/bpf/xdp1_user.c | 26 -- > 1 file chan

Re: [PATCH bpf-next 1/2] samples: bpf: improve xdp1 example

2018-10-18 Thread Y Song
On Thu, Oct 18, 2018 at 1:48 PM Matteo Croce wrote: > > Store only the total packet count for every protocol, instead of the > whole per-cpu array. > Use bpf_map_get_next_key() to iterate the map, instead of looking up > all the protocols. > > Signed-off-by: Matteo Croce Acked-by: Yonghong Song

Re: [PATCH v5 bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB

2018-10-18 Thread Eric Dumazet
On 10/18/2018 10:01 PM, Song Liu wrote: > Tests are added to make sure CGROUP_SKB cannot access: > tc_classid, data_meta, flow_keys > > and can read and write: > mark, prority, and cb[0-4] > > and can read other fields. > > To make selftest with skb->sk work, a dummy sk is added in > bpf_

Re: [PATCH bpf-next] bpf: Extend the sk_lookup() helper to XDP hookpoint.

2018-10-18 Thread Martin Lau
On Thu, Oct 18, 2018 at 04:52:40PM -0700, Joe Stringer wrote: > On Thu, 18 Oct 2018 at 14:20, Daniel Borkmann wrote: > > > > On 10/18/2018 11:06 PM, Joe Stringer wrote: > > > On Thu, 18 Oct 2018 at 11:54, Nitin Hande wrote: > > [...] > > >> Open Issue > > >> * The underlying code relies on presen

[PATCH v5 bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB

2018-10-18 Thread Song Liu
Tests are added to make sure CGROUP_SKB cannot access: tc_classid, data_meta, flow_keys and can read and write: mark, prority, and cb[0-4] and can read other fields. To make selftest with skb->sk work, a dummy sk is added in bpf_prog_test_run_skb(). Signed-off-by: Song Liu --- net/bpf/tes

[PATCH v5 bpf-next 0/2] bpf: add cg_skb_is_valid_access

2018-10-18 Thread Song Liu
Changes v4 -> v5: 1. Replaced bpf_compute_and_save_data_pointers() with bpf_compute_and_save_data_end(); Replaced bpf_restore_data_pointers() with bpf_restore_data_end(). 2. Fixed indentation in test_verifier.c Changes v3 -> v4: 1. Fixed crash issue reported by Alexei. Changes v2 -> v3: 1.

[PATCH v5 bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB

2018-10-18 Thread Song Liu
BPF programs of BPF_PROG_TYPE_CGROUP_SKB need to access headers in the skb. This patch enables direct access of skb for these programs. Two helper functions bpf_compute_and_save_data_end() and bpf_restore_data_end() are introduced. There are used in __cgroup_bpf_run_filter_skb(), to compute proper

Re: [PATCH bpf-next 2/3] tools, perf: use smp_{rmb,mb} barriers instead of {rmb,mb}

2018-10-18 Thread Alexei Starovoitov
On Thu, Oct 18, 2018 at 09:00:46PM +0200, Daniel Borkmann wrote: > On 10/18/2018 05:33 PM, Alexei Starovoitov wrote: > > On Thu, Oct 18, 2018 at 05:04:34PM +0200, Daniel Borkmann wrote: > >> #endif /* _TOOLS_LINUX_ASM_IA64_BARRIER_H */ > >> diff --git a/tools/arch/powerpc/include/asm/barrier.h >

Re: [PATCH 2/3] net: socionext: Add dummy PHY register read in phy_write()

2018-10-18 Thread Florian Fainelli
On 10/18/2018 6:08 PM, masahisa.koj...@linaro.org wrote: > From: Masahisa Kojima > > There is a compatibility issue between RTL8211E implemented > in Developerbox and netsec network controller IP(F_GMAC4). > > RTL8211E expects MDC clock must be kept toggling for several > clock cycle with MDI

Re: [PATCH 1/3] net: socionext: Stop PHY before resetting netsec

2018-10-18 Thread Florian Fainelli
On 10/18/2018 6:08 PM, masahisa.koj...@linaro.org wrote: > From: Masahisa Kojima > > After resetting netsec IP, driver have to wait until > netsec mode turns to NRM mode. > But sometimes mode transition to NRM will not complete > if the PHY is in normal operation state. > To avoid this situati

Re: [PATCH 0/3] Bugfix for the netsec driver

2018-10-18 Thread Florian Fainelli
On 10/18/2018 6:08 PM, masahisa.koj...@linaro.org wrote: > From: Masahisa Kojima > > This patch series include bugfix for the netsec ethernet > controller driver, fix the problem in interface down/up. Since all of these are bugfixes you would want to provide a Fixes: tag for the offending com

Re: [PATCH v4 bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB

2018-10-18 Thread Alexei Starovoitov
On 10/18/18 6:33 PM, Alexei Starovoitov wrote: > On 10/18/18 5:14 PM, Daniel Borkmann wrote: >>> +case bpf_ctx_range(struct __sk_buff, data_meta): >>> +case bpf_ctx_range(struct __sk_buff, flow_keys): >>> +return false; >> ... if it's disallowed anyway (disallowing it is the right t

Re: [PATCH v2 net] r8169: fix NAPI handling under high load

2018-10-18 Thread Eric Dumazet
On 10/18/2018 03:59 PM, Francois Romieu wrote: > Eric Dumazet : > [...] >> One has to wonder why rtl8169_poll(), which might be called in a loop under >> DOS, >> has to call rtl_ack_events() ? > > So as to cover a wider temporal range before any event can trigger an > extra irq. I was more wo

Re: [PATCH v4 bpf-next 0/2] bpf: add cg_skb_is_valid_access

2018-10-18 Thread Alexei Starovoitov
On 10/18/18 4:34 PM, Alexei Starovoitov wrote: > On Thu, Oct 18, 2018 at 09:06:47AM -0700, Song Liu wrote: >> Changes v3 -> v4: >> 1. Fixed crash issue reported by Alexei. >> >> Changes v2 -> v3: >> 1. Added helper function bpf_compute_and_save_data_pointers() and >>bpf_restore_data_pointers().

Re: [PATCH v4 bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB

2018-10-18 Thread Alexei Starovoitov
On 10/18/18 5:14 PM, Daniel Borkmann wrote: >> +case bpf_ctx_range(struct __sk_buff, data_meta): >> +case bpf_ctx_range(struct __sk_buff, flow_keys): >> +return false; > ... if it's disallowed anyway (disallowing it is the right thing to do, > but no need to save/restore then..)

[PATCH 2/3] net: socionext: Add dummy PHY register read in phy_write()

2018-10-18 Thread masahisa . kojima
From: Masahisa Kojima There is a compatibility issue between RTL8211E implemented in Developerbox and netsec network controller IP(F_GMAC4). RTL8211E expects MDC clock must be kept toggling for several clock cycle with MDIO high before entering the IDLE state. To meet this requirement, netsec dr

[PATCH 3/3] net: socionext: Reset tx queue in ndo_stop

2018-10-18 Thread masahisa . kojima
From: Masahisa Kojima Without resetting tx queue in ndo_stop, packets and bytes count are not reset when the interface is down. Eventually, tx queue is exhausted and packets will not be sent out. Signed-off-by: Masahisa Kojima Signed-off-by: Yoshitoyo Osaki --- drivers/net/ethernet/socionext/

[PATCH 1/3] net: socionext: Stop PHY before resetting netsec

2018-10-18 Thread masahisa . kojima
From: Masahisa Kojima After resetting netsec IP, driver have to wait until netsec mode turns to NRM mode. But sometimes mode transition to NRM will not complete if the PHY is in normal operation state. To avoid this situation, stop PHY before resetting netsec. Signed-off-by: Masahisa Kojima Sig

[PATCH 0/3] Bugfix for the netsec driver

2018-10-18 Thread masahisa . kojima
From: Masahisa Kojima This patch series include bugfix for the netsec ethernet controller driver, fix the problem in interface down/up. Masahisa Kojima (3): net: socionext: stop PHY before resetting netsec net: socionext: Add dummy PHY register read in phy_write() net: socionext: reset tx

Re: [PATCH v4 bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB

2018-10-18 Thread Daniel Borkmann
On 10/18/2018 06:06 PM, Song Liu wrote: > BPF programs of BPF_PROG_TYPE_CGROUP_SKB need to access headers in the > skb. This patch enables direct access of skb for these programs. > > Two helper functions bpf_compute_and_save_data_pointers() and > bpf_restore_data_pointers() are introduced. There

Re: [pull request][net-next 0/8] Mellanox, mlx5 updates 2018-10-18

2018-10-18 Thread David Miller
From: Saeed Mahameed Date: Thu, 18 Oct 2018 13:38:59 -0700 > This pull request provides some misc updates to mlx5 core and netdevice > driver. > > For more details please see tag log below. > > Please pull and let me know if there's any problem. Pulled, thanks Saeed.

Re: [PATCH net] ip6_tunnel: Fix encapsulation layout

2018-10-18 Thread David Miller
From: Stefano Brivio Date: Thu, 18 Oct 2018 21:25:07 +0200 > Commit 058214a4d1df ("ip6_tun: Add infrastructure for doing > encapsulation") added the ip6_tnl_encap() call in ip6_tnl_xmit(), before > the call to ipv6_push_frag_opts() to append the IPv6 Tunnel Encapsulation > Limit option (option 4,

Re: [PATCH bpf-next] bpf: Extend the sk_lookup() helper to XDP hookpoint.

2018-10-18 Thread Joe Stringer
On Thu, 18 Oct 2018 at 14:20, Daniel Borkmann wrote: > > On 10/18/2018 11:06 PM, Joe Stringer wrote: > > On Thu, 18 Oct 2018 at 11:54, Nitin Hande wrote: > [...] > >> Open Issue > >> * The underlying code relies on presence of an skb to find out the > >> right sk for the case of REUSEPORT socket

Re: [PATCH net-next] tcp: fix TCP_REPAIR xmit queue setup

2018-10-18 Thread David Miller
From: Eric Dumazet Date: Thu, 18 Oct 2018 09:12:19 -0700 > Andrey reported the following warning triggered while running CRIU tests: > > tcp_clean_rtx_queue() > ... > last_ackt = tcp_skb_timestamp_us(skb); > WARN_ON_ONCE(last_ackt == 0); > > This is caused by 5f6188a8003d ("tcp: do

Re: [PATCH net] net: ipmr: fix unresolved entry dumps

2018-10-18 Thread David Miller
From: David Ahern Date: Thu, 18 Oct 2018 09:16:17 -0600 > On 10/17/18 11:36 PM, David Miller wrote: >> From: Nikolay Aleksandrov >> Date: Wed, 17 Oct 2018 22:34:34 +0300 >> >>> If the skb space ends in an unresolved entry while dumping we'll miss >>> some unresolved entries. The reason is due t

Re: [PATCH bpf-next] bpf: Extend the sk_lookup() helper to XDP hookpoint.

2018-10-18 Thread Nitin Hande
On Thu, 18 Oct 2018 23:20:17 +0200 Daniel Borkmann wrote: > On 10/18/2018 11:06 PM, Joe Stringer wrote: > > On Thu, 18 Oct 2018 at 11:54, Nitin Hande wrote: > [...] > >> Open Issue > >> * The underlying code relies on presence of an skb to find out the > >> right sk for the case of REUSEPORT s

Re: [PATCH v4 bpf-next 0/2] bpf: add cg_skb_is_valid_access

2018-10-18 Thread Alexei Starovoitov
On Thu, Oct 18, 2018 at 09:06:47AM -0700, Song Liu wrote: > Changes v3 -> v4: > 1. Fixed crash issue reported by Alexei. > > Changes v2 -> v3: > 1. Added helper function bpf_compute_and_save_data_pointers() and >bpf_restore_data_pointers(). > > Changes v1 -> v2: > 1. Updated the list of read-

[PATCH] net: ethernet: lpc_eth: add device and device node local variables

2018-10-18 Thread Vladimir Zapolskiy
Trivial non-functional change added to simplify getting multiple references to device pointer in lpc_eth_drv_probe(). Signed-off-by: Vladimir Zapolskiy --- NB, to avoid a merge conflict the change should be applied after https://marc.info/?l=linux-netdev&m=153990402012273 drivers/net/ethernet/n

[PATCH] net: ethernet: lpc_eth: remove unused local variable

2018-10-18 Thread Vladimir Zapolskiy
A trivial change which removes an unused local variable, the issue is reported as a compile time warning: drivers/net/ethernet/nxp/lpc_eth.c: In function 'lpc_eth_drv_probe': drivers/net/ethernet/nxp/lpc_eth.c:1250:21: warning: variable 'phydev' set but not used [-Wunused-but-set-variable]

Re: [net PATCH] net: sched: Fix for duplicate class dump

2018-10-18 Thread David Miller
From: Phil Sutter Date: Thu, 18 Oct 2018 10:34:26 +0200 > When dumping classes by parent, kernel would return classes twice: > > | # tc qdisc add dev lo root prio > | # tc class show dev lo > | class prio 8001:1 parent 8001: > | class prio 8001:2 parent 8001: > | class prio 8001:3 parent 8001: >

Re: [PATCH v2 net] r8169: fix NAPI handling under high load

2018-10-18 Thread Francois Romieu
Eric Dumazet : [...] > One has to wonder why rtl8169_poll(), which might be called in a loop under > DOS, > has to call rtl_ack_events() ? So as to cover a wider temporal range before any event can trigger an extra irq. I was more worried about irq cost than about IO cost (and I still am). --

Re: [PATCH net-next] bnxt_en: Copy and paste bug in extended tx_stats

2018-10-18 Thread David Miller
From: Dan Carpenter Date: Thu, 18 Oct 2018 11:02:39 +0300 > The struct type was copied from the line before but it should be "tx" > instead of "rx". I have reviewed the code and I can't immediately see > that this bug causes a runtime issue. > > Fixes: 36e53349b60b ("bnxt_en: Add additional ext

[PATCH] net: ethernet: lpc_eth: remove CONFIG_OF guard from the driver

2018-10-18 Thread Vladimir Zapolskiy
The MAC controller device is available on NXP LPC32xx platform only, and the LPC32xx platform supports OF builds only, so additional checks in the device driver are not needed. Signed-off-by: Vladimir Zapolskiy --- drivers/net/ethernet/nxp/lpc_eth.c | 4 +--- 1 file changed, 1 insertion(+), 3 de

[PATCH] net: ethernet: lpc_eth: clean up the list of included headers

2018-10-18 Thread Vladimir Zapolskiy
The change removes all unnecessary included headers from the driver source code, the remaining list is sorted in alphabetical order. Signed-off-by: Vladimir Zapolskiy --- drivers/net/ethernet/nxp/lpc_eth.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff

Re: [net-next 00/13][pull request] Intel Wired LAN Doc Updates 2018-10-18

2018-10-18 Thread David Miller
From: Jeff Kirsher Date: Thu, 18 Oct 2018 13:32:46 -0700 > This series contains documentation fixes and updates for Intel wired LAN > drivers. > > The following was done: > - Updated incorrect URLs > - removed document references which did not apply to the current >in-kernel drivers > - a

Re: [PATCH v4.14-stable] sch_netem: restore skb->dev after dequeuing from the rbtree

2018-10-18 Thread David Miller
From: Christoph Paasch Date: Thu, 18 Oct 2018 13:38:40 -0700 > Upstream commit bffa72cf7f9d ("net: sk_buff rbnode reorg") got > backported as commit 6b921536f170 ("net: sk_buff rbnode reorg") into the > v4.14.x-tree. > > However, the backport does not include the changes in sch_netem.c > > We n

[PATCH v4.14-stable] sch_netem: restore skb->dev after dequeuing from the rbtree

2018-10-18 Thread Christoph Paasch
Upstream commit bffa72cf7f9d ("net: sk_buff rbnode reorg") got backported as commit 6b921536f170 ("net: sk_buff rbnode reorg") into the v4.14.x-tree. However, the backport does not include the changes in sch_netem.c We need these, as otherwise the skb->dev pointer is not set when dequeueing from

RE: Issues in error queue polling

2018-10-18 Thread Keller, Jacob E
Hi, > -Original Message- > From: Ricardo Biehl Pasquali [mailto:pasqual...@gmail.com] > Sent: Thursday, October 18, 2018 11:27 AM > To: netdev@vger.kernel.org > Cc: Keller, Jacob E ; Gomes, Vinicius > ; da...@davemloft.net > Subject: Issues in error queue polling > > The commit 7d4c04fc17

Re: Kernel oops with mlx5 and dual XDP redirect programs

2018-10-18 Thread Toke Høiland-Jørgensen
Saeed Mahameed writes: > I think that the mlx5 driver doesn't know how to tell the other device > to stop transmitting to it while it is resetting.. Maybe tariq or > Jesper know more about this ? > I will look at this tomorrow after noon and will try to repro... Hi Saeed Did you have a chance t

[bpf-next PATCH 0/3] sockmap, bpf_msg_push_data helper

2018-10-18 Thread John Fastabend
This series adds a new helper bpf_msg_push_data to be used by sk_msg programs. The helper can be used to insert extra bytes into the message that can then be used by the program as metadata tags among other things. The first patch adds the helper, second patch the libbpf support, and last patch up

[bpf-next PATCH 1/3] bpf: sk_msg program helper bpf_msg_push_data

2018-10-18 Thread John Fastabend
This allows user to push data into a msg using sk_msg program types. The format is as follows, bpf_msg_push_data(msg, offset, len, flags) this will insert 'len' bytes at offset 'offset'. For example to prepend 10 bytes at the front of the message the user can, bpf_msg_push_data(m

[bpf-next PATCH 2/3] bpf: libbpf support for msg_push_data

2018-10-18 Thread John Fastabend
Add support for new bpf_msg_push_data in libbpf. Signed-off-by: John Fastabend --- tools/include/uapi/linux/bpf.h| 20 +++- tools/testing/selftests/bpf/bpf_helpers.h |2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/b

[bpf-next PATCH 3/3] bpf: test_sockmap add options to use msg_push_data

2018-10-18 Thread John Fastabend
Add options to run msg_push_data, this patch creates two more flags in test_sockmap that can be used to specify the offset and length of bytes to be added. The new options are --txmsg_start_push to specify where bytes should be inserted and --txmsg_end_push to specify how many bytes. This is analag

Re: [PATCH bpf-next 2/2] samples: bpf: get ifindex from ifname

2018-10-18 Thread John Fastabend
On 10/18/2018 01:47 PM, Matteo Croce wrote: > Find the ifindex via ioctl(SIOCGIFINDEX) instead of requiring the > numeric ifindex. > > Signed-off-by: Matteo Croce > --- I don't think there are any expectation that samples have to be stable as far as inputs over versions. And because I consistent

Re: [PATCH net-next] MAINTAINERS: Update contact info for VRF entry

2018-10-18 Thread David Miller
From: David Ahern Date: Thu, 18 Oct 2018 13:15:49 -0600 > From: David Ahern > > Update Shrijeet's email address for the VRF entry. > > Signed-off-by: David Ahern Applied.

Re: [PATCH bpf-next v2 02/13] bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO

2018-10-18 Thread Martin Lau
On Thu, Oct 18, 2018 at 08:41:52PM +0100, Edward Cree wrote: > On 18/10/18 19:12, Martin Lau wrote: > > The BTF verification and bpf_prog_load() has to treat > > them differently. > > > > Are you suggesting they can be treated the same for > > the kernel verification purpose? > > > > or > > > > The

Re: [PATCH bpf-next] bpf: Extend the sk_lookup() helper to XDP hookpoint.

2018-10-18 Thread Daniel Borkmann
On 10/18/2018 11:06 PM, Joe Stringer wrote: > On Thu, 18 Oct 2018 at 11:54, Nitin Hande wrote: [...] >> Open Issue >> * The underlying code relies on presence of an skb to find out the >> right sk for the case of REUSEPORT socket option. Since there is >> no skb available at XDP hookpoint, the hel

Re: [PATCH bpf-next] bpf: Extend the sk_lookup() helper to XDP hookpoint.

2018-10-18 Thread Joe Stringer
On Thu, 18 Oct 2018 at 11:54, Nitin Hande wrote: > > > This patch proposes to extend the sk_lookup() BPF API to the > XDP hookpoint. The sk_lookup() helper supports a lookup > on incoming packet to find the corresponding socket that will > receive this packet. Current support for this BPF API is >

Re: [PATCH bpf-next v3 7/7] selftests/bpf: add test cases for queue and stack maps

2018-10-18 Thread Song Liu
On Thu, Oct 18, 2018 at 10:33 AM Mauricio Vasquez wrote: > > > On 10/18/18 11:36 AM, Song Liu wrote: > > On Thu, Oct 18, 2018 at 6:16 AM Mauricio Vasquez B > > wrote: > >> test_maps: > >> Tests that queue/stack maps are behaving correctly even in corner cases > >> > >> test_progs: > >> Tests new

[bpf-next v3 1/2] bpf: skmsg, fix psock create on existing kcm/tls port

2018-10-18 Thread John Fastabend
Before using the psock returned by sk_psock_get() when adding it to a sockmap we need to ensure it is actually a sockmap based psock. Previously we were only checking this after incrementing the reference counter which was an error. This resulted in a slab-out-of-bounds error when the psock was not

[bpf-next v3 2/2] bpf: test_maps add a test to catch kcm + sockmap

2018-10-18 Thread John Fastabend
Adding a socket to both sockmap and kcm is not supported due to collision on sk_user_data usage. If selftests is run without KCM support we will issue a warning and continue with the tests. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selfte

[bpf-next v3 0/2] Fix kcm + sockmap by checking psock type

2018-10-18 Thread John Fastabend
We check if the sk_user_data (the psock in skmsg) is in fact a sockmap type to late, after we read the refcnt which is an error. This series moves the check up before reading refcnt and also adds a test to test_maps to test trying to add a KCM socket into a sockmap. While reviewig this code I also

[PATCH bpf-next 2/2] samples: bpf: get ifindex from ifname

2018-10-18 Thread Matteo Croce
Find the ifindex via ioctl(SIOCGIFINDEX) instead of requiring the numeric ifindex. Signed-off-by: Matteo Croce --- samples/bpf/xdp1_user.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/samples/bpf/xdp1_user.c b/samples/bpf/xdp1_user.c index 4f3d8

[PATCH bpf-next 0/2] sample: xdp1 improvements

2018-10-18 Thread Matteo Croce
Small improvements to improve the readability and easiness to use of the xdp1 sample. Matteo Croce (2): samples: bpf: improve xdp1 example samples: bpf: get ifindex from ifname samples/bpf/xdp1_user.c | 44 ++--- 1 file changed, 32 insertions(+), 12 deleti

[PATCH bpf-next 1/2] samples: bpf: improve xdp1 example

2018-10-18 Thread Matteo Croce
Store only the total packet count for every protocol, instead of the whole per-cpu array. Use bpf_map_get_next_key() to iterate the map, instead of looking up all the protocols. Signed-off-by: Matteo Croce --- samples/bpf/xdp1_user.c | 18 -- 1 file changed, 8 insertions(+), 10 d

[net-next 2/8] net/mlx5: Take fs_counters dellist before addlist

2018-10-18 Thread Saeed Mahameed
From: Vlad Buslov In fs_counters elements from both addlist and dellist are removed by mlx5_fc_stats_work() without any locking. This introduces race condition when batch of new rules is created and then immediately deleted (for example, when error occurred during flow creation). In such case som

[net-next 3/8] net/mlx5: Remove counter from idr after removing it from list

2018-10-18 Thread Saeed Mahameed
From: Vlad Buslov Fs_counters list can temporary become unsorted when new counters are created/deleted concurrently. Idr is used to quickly lookup position to insert new counter in logarithmic time. However, if new flows are concurrently inserted during time window when flows with adjacent ids ar

[net-next 5/8] net/mlx5e: Add port FEC get/set functions

2018-10-18 Thread Saeed Mahameed
From: Shay Agroskin Added functions to query and set link FEC policy. To get/set FEC capabilities in PPLM reg we need to query current link speed. 'mlx5_get_fec_speed_field' queries current link speed and returns correct field offset. FEC Query's return value is divided into 'active FEC policy',

[pull request][net-next 0/8] Mellanox, mlx5 updates 2018-10-18

2018-10-18 Thread Saeed Mahameed
Hi Dave, This pull request provides some misc updates to mlx5 core and netdevice driver. For more details please see tag log below. Please pull and let me know if there's any problem. Thanks, Saeed. --- The following changes since commit 3a3295bfa6f484bba91de0a804c1d0bf7d31dbd3: Merge bran

[net-next 4/8] net/mlx5: Add FEC fields to Port Phy Link Mode (PPLM) reg

2018-10-18 Thread Saeed Mahameed
From: Shay Agroskin Added FEC related fields to PPLM layout. These fields are needed to set and query FEC policy for different link speeds. Signed-off-by: Shay Agroskin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- include/linux/mlx5/driver.h | 1 + include/linux/mlx5/mlx

[net-next 8/8] net/mlx5e: Added 'raw_errors_laneX' fields to ethtool statistics

2018-10-18 Thread Saeed Mahameed
From: Shay Agroskin These are counters for errors received on rx side, such as FEC errors. Signed-off-by: Shay Agroskin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/en_stats.c| 46 +-- 1 file changed, 41 insertions(+), 5 d

[net-next 1/8] net/mlx5: Refactor fragmented buffer struct fields and init flow

2018-10-18 Thread Saeed Mahameed
From: Tariq Toukan Take struct mlx5_frag_buf out of mlx5_frag_buf_ctrl, as it is not needed to manage and control the datapath of the fragmented buffers API. struct mlx5_frag_buf contains control info to manage the allocation and de-allocation of the fragmented buffer. Its fields are not relevan

[net-next 6/8] net/mlx5e: Ethtool driver callback for query/set FEC policy

2018-10-18 Thread Saeed Mahameed
From: Shay Agroskin Driver callback function for 'ethtool --show-fec', 'ethtool --set-fec' commands. The query function returns active and configured FEC policy for current link speed. The set function sets FEC policy for all supported link speeds. 1) If current link speed doesn't support reque

[net-next 7/8] net/mlx5: Added "per_lane_error_counters" cap bit to PCAM

2018-10-18 Thread Saeed Mahameed
From: Shay Agroskin Added "Per lane raw errors" capability bit in Ports Capabilities Mask (PCAM) enhanced features layout. This bit determines if the fields "phy_raw_errors_laneX" in "Physical Layer statistical" counters group are supported. Signed-off-by: Shay Agroskin Reviewed-by: Eran Ben E

[net-next 11/13] Documentation: ice: Prepare documentation for RST conversion

2018-10-18 Thread Jeff Kirsher
Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown --- Docume

[net-next 12/13] Documentation: fm10k: Add kernel documentation

2018-10-18 Thread Jeff Kirsher
Added the fm10k kernel documentation, which apparently was missing. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown --- Documentation/networking/fm10k.rst | 141 + Documentation/networking/index.rst | 1 + MAINTAINERS

[net-next 01/13] Documentation: networking: ixgb: Remove reference to IXGB_NAPI

2018-10-18 Thread Jeff Kirsher
From: Corentin Labbe NAPI is enabled by default and IXGB_NAPI was removed since commit 6d37ab282e24 ("ixgb: make NAPI the only option and the default") Update the doc accordingly. Signed-off-by: Corentin Labbe Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- Documentation/networking/ix

[net-next 04/13] Documentation: e1000e: Prepare documentation for RST conversion

2018-10-18 Thread Jeff Kirsher
Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown --- Docume

[net-next 06/13] Documentation: igbvf: Prepare documentation for RST conversion

2018-10-18 Thread Jeff Kirsher
Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown --- Docume

[net-next 03/13] Documentation: ixgb: Prepare documentation for RST conversion

2018-10-18 Thread Jeff Kirsher
Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown --- Docume

[net-next 02/13] Documentation: e100, e1000: Add missing SPDX header

2018-10-18 Thread Jeff Kirsher
Add the SPDX-Lincense-Identifier to the Intel wired Ethernet *.rst kernel documentation. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown --- Documentation/networking/e100.rst | 3 ++- Documentation/networking/e1000.rst | 3 ++- 2 files changed, 4 insertions(+), 2 d

[net-next 08/13] Documentation: ixgbevf: Prepare documentation for RST conversion

2018-10-18 Thread Jeff Kirsher
Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown --- Docume

[net-next 10/13] Documentation: iavf: Prepare documentation for RST conversion

2018-10-18 Thread Jeff Kirsher
Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown --- Docume

[net-next 05/13] Documentation: igb: Prepare documentation for RST conversion

2018-10-18 Thread Jeff Kirsher
Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown --- Docume

[net-next 13/13] Documentation: intel: Convert to RST format

2018-10-18 Thread Jeff Kirsher
Now that the documents have been updated to conform to the reStructured Text guidelines, we can now change the file extensions and update the other related references. This converts all of the Intel wired LAN driver documentation to *.rst. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Te

[net-next 00/13][pull request] Intel Wired LAN Doc Updates 2018-10-18

2018-10-18 Thread Jeff Kirsher
This series contains documentation fixes and updates for Intel wired LAN drivers. The following was done: - Updated incorrect URLs - removed document references which did not apply to the current in-kernel drivers - added documentation for fm10k driver - added missing documentation on exist

[net-next 09/13] Documentation: i40e: Prepare documentation for RST conversion

2018-10-18 Thread Jeff Kirsher
Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Acked-by: Shannon Nelson --- Docu

[net-next 07/13] Documentation: ixgbe: Prepare documentation for RST conversion

2018-10-18 Thread Jeff Kirsher
Before making the conversion to the RST (reStructured Text) format, there are changes needed to the documentation so that there are no build errors. Also fixed old/broken URLs to the correct or updated URL. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Tested-by: Aaron Brown --- Docume

Re: [bpf-next v2 1/2] bpf: skmsg, fix psock create on existing kcm/tls port

2018-10-18 Thread John Fastabend
On 10/18/2018 10:34 AM, Eric Dumazet wrote: > > > On 10/17/2018 10:20 PM, John Fastabend wrote: >> Before using the psock returned by sk_psock_get() when adding it to a >> sockmap we need to ensure it is actually a sockmap based psock. >> Previously we were only checking this after incrementing t

[PATCH net-next] r8169: handle all interrupt events in the hard irq handler

2018-10-18 Thread Heiner Kallweit
Having a separate "slow event" handler isn't needed because all interrupt events trigger asynchronous activity. And in case of SYSErr we have bigger problems than performance anyway. This patch also allows to get rid of acking interrupt events in the NAPI poll callback. Signed-off-by: Heiner Kallw

Re: [PATCH bpf-next] tools: bpftool: use 4 context mode for the NFP disasm

2018-10-18 Thread Daniel Borkmann
On 10/18/2018 08:34 PM, Jakub Kicinski wrote: > The nfp driver is currently always JITing the BPF for 4 context/thread > mode of the NFP flow processors. Tell this to the disassembler, > otherwise some registers may be incorrectly decoded. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Jiong W

[PATCH iproute2] doc/man: spelling fixes

2018-10-18 Thread Stephen Hemminger
Use ispell and codespell to find/fix spelling errors in documentation and man pages. Signed-off-by: Stephen Hemminger --- doc/actions/actions-general | 14 +++--- doc/actions/ifb-README | 18 +- doc/actions/mirred-usage| 6 +++--- man/man8/ip-link.8.in |

Re: [PATCH bpf-next v2 02/13] bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO

2018-10-18 Thread Edward Cree
On 18/10/18 19:12, Martin Lau wrote: > The BTF verification and bpf_prog_load() has to treat > them differently. > > Are you suggesting they can be treated the same for > the kernel verification purpose? > > or > > The concern is, having two kind, BTF_KIND_FUNC_PROTO and > BTF_KIND_FUNC, is confusi

[PATCH net] ip6_tunnel: Fix encapsulation layout

2018-10-18 Thread Stefano Brivio
Commit 058214a4d1df ("ip6_tun: Add infrastructure for doing encapsulation") added the ip6_tnl_encap() call in ip6_tnl_xmit(), before the call to ipv6_push_frag_opts() to append the IPv6 Tunnel Encapsulation Limit option (option 4, RFC 2473, par. 5.1) to the outer IPv6 header. As long as the option

[PATCH net-next] MAINTAINERS: Update contact info for VRF entry

2018-10-18 Thread David Ahern
From: David Ahern Update Shrijeet's email address for the VRF entry. Signed-off-by: David Ahern --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7f1399ac028e..144cd0ca41ec 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15745,7

Re: [PATCH] net: ethernet: fec: Add missing SPEED_

2018-10-18 Thread LABBE Corentin
On Thu, Oct 18, 2018 at 11:55:49AM -0700, Florian Fainelli wrote: > On 10/18/2018 11:47 AM, LABBE Corentin wrote: > > On Thu, Oct 18, 2018 at 11:39:24AM -0700, Florian Fainelli wrote: > >> On 10/18/2018 08:05 AM, Corentin Labbe wrote: > >>> Since commit 58056c1e1b0e ("net: ethernet: Use phy_set_max

Re: [PATCH linux-firmware] linux-firmware: liquidio: fix GPL compliance issue

2018-10-18 Thread Josh Boyer
On Wed, Oct 17, 2018 at 5:09 PM John W. Linville wrote: > > On Wed, Oct 17, 2018 at 07:34:42PM +, Manlunas, Felix wrote: > > On Fri, Sep 28, 2018 at 04:50:51PM -0700, Felix Manlunas wrote: > > > Part of the code inside the lio_vsw_23xx.bin firmware image is under GPL, > > > but the LICENCE.cav

Re: [PATCH bpf-next 2/3] tools, perf: use smp_{rmb,mb} barriers instead of {rmb,mb}

2018-10-18 Thread Daniel Borkmann
On 10/18/2018 05:33 PM, Alexei Starovoitov wrote: > On Thu, Oct 18, 2018 at 05:04:34PM +0200, Daniel Borkmann wrote: >> #endif /* _TOOLS_LINUX_ASM_IA64_BARRIER_H */ >> diff --git a/tools/arch/powerpc/include/asm/barrier.h >> b/tools/arch/powerpc/include/asm/barrier.h >> index a634da0..905a2c6 100

[PATCH bpf-next] bpf: Extend the sk_lookup() helper to XDP hookpoint.

2018-10-18 Thread Nitin Hande
This patch proposes to extend the sk_lookup() BPF API to the XDP hookpoint. The sk_lookup() helper supports a lookup on incoming packet to find the corresponding socket that will receive this packet. Current support for this BPF API is at the tc hookpoint. This patch will extend this API at XDP h

Re: [PATCH v2 net] r8169: fix NAPI handling under high load

2018-10-18 Thread David Miller
From: Heiner Kallweit Date: Thu, 18 Oct 2018 19:56:01 +0200 > rtl_rx() and rtl_tx() are called only if the respective bits are set > in the interrupt status register. Under high load NAPI may not be > able to process all data (work_done == budget) and it will schedule > subsequent calls to the po

[PATCH bpf-next] tools: bpftool: use 4 context mode for the NFP disasm

2018-10-18 Thread Jakub Kicinski
The nfp driver is currently always JITing the BPF for 4 context/thread mode of the NFP flow processors. Tell this to the disassembler, otherwise some registers may be incorrectly decoded. Signed-off-by: Jakub Kicinski Reviewed-by: Jiong Wang --- tools/bpf/bpftool/common.c | 5 - tools

Issues in error queue polling

2018-10-18 Thread Ricardo Biehl Pasquali
The commit 7d4c04fc170087119727 ("net: add option to enable error queue packets waking select") (2013-03-28) introduced SO_SELECT_ERR_QUEUE, which masks POLLPRI with POLLERR event return in some socket poll callbacks. POLLERR event issued with sock_queue_err_skb() did not wake up a poll when POLLE

Re: [iproute2 PATCH] tc: flower: Classify packets based port ranges

2018-10-18 Thread Nambiar, Amritha
On 10/18/2018 5:21 AM, Jiri Pirko wrote: > Fri, Oct 12, 2018 at 03:54:42PM CEST, amritha.namb...@intel.com wrote: > > [...] > >> @@ -1516,6 +1625,22 @@ static int flower_print_opt(struct filter_util *qu, >> FILE *f, >> if (nl_type >= 0) >> flower_print_port("src_port", tb[nl_ty

Re: [net-next PATCH] net: sched: cls_flower: Classify packets using port ranges

2018-10-18 Thread Nambiar, Amritha
On 10/18/2018 5:17 AM, Jiri Pirko wrote: > Fri, Oct 12, 2018 at 03:53:30PM CEST, amritha.namb...@intel.com wrote: >> Added support in tc flower for filtering based on port ranges. >> This is a rework of the RFC patch at: >> https://patchwork.ozlabs.org/patch/969595/ >> >> Example: >> 1. Match on a

  1   2   >