[PATCH bpf-next 3/4] selftests/bpf: Add cgroup id helpers to bpf_helpers.h

2018-08-10 Thread Andrey Ignatov
Add bpf_skb_cgroup_id and bpf_skb_ancestor_cgroup_id helpers to bpf_helpers.h to use them in tests and samples. Signed-off-by: Andrey Ignatov --- tools/testing/selftests/bpf/bpf_helpers.h | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/bpf/bpf_helpers.h

[PATCH bpf-next 2/4] bpf: Sync bpf.h to tools/

2018-08-10 Thread Andrey Ignatov
Sync skb_ancestor_cgroup_id() related bpf UAPI changes to tools/. Signed-off-by: Andrey Ignatov --- tools/include/uapi/linux/bpf.h | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index

[PATCH bpf-next 4/4] selftests/bpf: Selftest for bpf_skb_ancestor_cgroup_id

2018-08-10 Thread Andrey Ignatov
Add selftests for bpf_skb_ancestor_cgroup_id helper. test_skb_cgroup_id.sh prepares testing interface and adds tc qdisc and filter for it using BPF object compiled from test_skb_cgroup_id_kern.c program. BPF program in test_skb_cgroup_id_kern.c gets ancestor cgroup id using the new helper at

[PATCH bpf-next 0/4] bpf_skb_ancestor_cgroup_id helper

2018-08-10 Thread Andrey Ignatov
This patch set adds new BPF helper bpf_skb_ancestor_cgroup_id that returns id of cgroup v2 that is ancestor of cgroup associated with the skb at the ancestor_level. The helper is useful to implement policies in TC based on cgroups that are upper in hierarchy than immediate cgroup associated with

[PATCH bpf-next 1/4] bpf: Introduce bpf_skb_ancestor_cgroup_id helper

2018-08-10 Thread Andrey Ignatov
== Problem description == It's useful to be able to identify cgroup associated with skb in TC so that a policy can be applied to this skb, and existing bpf_skb_cgroup_id helper can help with this. Though in real life cgroup hierarchy and hierarchy to apply a policy to don't map 1:1. It's often

Re: [net-next 03/12] net/mlx5e: Ethtool steering, ip6 support

2018-08-10 Thread David Miller
From: Saeed Mahameed Date: Fri, 10 Aug 2018 15:26:21 -0700 > +static bool is_zero_ip6(__be32 ip6[4]) > +{ > + int i; > + > + for (i = 0; i < 4; i++) > + if (ip6[i] != 0) > + return false; > + return true; > +} This is ipv6_addr_any().

Re: [net-next 01/12] net/mlx5e: Ethtool steering flow validation refactoring

2018-08-10 Thread David Miller
From: Saeed Mahameed Date: Fri, 10 Aug 2018 15:26:19 -0700 > +static int validate_tcpudp4(struct ethtool_rx_flow_spec *fs) > +{ > + struct ethtool_tcpip4_spec *l4_mask = >m_u.tcp_ip4_spec; > + int ntuples = 0; > + > + if (fs->m_u.tcp_ip4_spec.tos)

Re: [PATCH net-next v2] bnxt_en: Fix strcpy() warnings in bnxt_ethtool.c

2018-08-10 Thread David Miller
From: Michael Chan Date: Fri, 10 Aug 2018 18:24:43 -0400 > From: Vasundhara Volam > > This patch fixes following smatch warnings: > > drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2826 > bnxt_fill_coredump_seg_hdr() error: strcpy() '"sEgM"' too large for > 'seg_hdr->signature' (5 vs 4)

Re: [PATCH bpf-next 0/9] Introduce BPF_MAP_TYPE_REUSEPORT_SOCKARRAY and BPF_PROG_TYPE_SK_REUSEPORT

2018-08-10 Thread Daniel Borkmann
On 08/08/2018 09:59 AM, Martin KaFai Lau wrote: > This series introduces a new map type "BPF_MAP_TYPE_REUSEPORT_SOCKARRAY" > and a new prog type BPF_PROG_TYPE_SK_REUSEPORT. > > Here is a snippet from a commit message: > > "To unleash the full potential of a bpf prog, it is essential for the >

Re: [PATCH bpf-next 0/3] bpf: add bpffs pretty print for hash/lru_hash maps

2018-08-10 Thread Daniel Borkmann
On 08/09/2018 05:55 PM, Yonghong Song wrote: > Commit a26ca7c982cb ("bpf: btf: Add pretty print support to > the basic arraymap") added pretty print support to array map. > This patch adds pretty print for hash and lru_hash maps. > > The following example shows the pretty-print result of a pinned

Re: [PATCH v2 bpf-next] BPF: helpers: New helper to obtain namespace data from current task

2018-08-10 Thread Alexei Starovoitov
On Fri, Aug 10, 2018 at 08:41:04AM -0400, Carlos Neira wrote: > This helper obtains the active namespace from current and returns pid, tgid, > device and namespace id as seen from that namespace, allowing to instrument > a process inside a container. > Device is read from /proc/self/ns/pid, as in

[net-next 03/12] net/mlx5e: Ethtool steering, ip6 support

2018-08-10 Thread Saeed Mahameed
Add ip6 support for ethtool flow steering. New supported flow types: ip6|tcp6|udp6| Supported fields: src-ip|dst-ip|src-port|dst-port Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/en_fs_ethtool.c| 138 ++ 1 file changed, 138 insertions(+) diff --git

[net-next 11/12] net/mlx5: Reorganize the makefile

2018-08-10 Thread Saeed Mahameed
Reorganize the Makefile and group files together according to their functionality and importance. Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/Makefile | 57 +-- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git

[net-next 09/12] net/mlx5e: vxlan.c depends on CONFIG_VXLAN

2018-08-10 Thread Saeed Mahameed
When vxlan is not enabled by kernel, no need to enable it in mlx5. Compile out lib/vxlan.c if CONFIG_VXLAN is not selected. Signed-off-by: Saeed Mahameed Reviewed-by: Moshe Shemesh Reviewed-by: Eran Ben Elisha --- drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 +

[net-next 10/12] net/mlx5e: clock.c depends on CONFIG_PTP_1588_CLOCK

2018-08-10 Thread Saeed Mahameed
From: Moshe Shemesh lib/clock.c includes clock related functions which require ptp support. Thus compile out lib/clock.c and add the needed function stubs in case kconfig CONFIG_PTP_1588_CLOCK is off. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed ---

[net-next 08/12] net/mlx5e: Move flow steering declarations into en/fs.h

2018-08-10 Thread Saeed Mahameed
Move flow steering declarations and definitions into the dedicated en/fs.h header file Signed-off-by: Saeed Mahameed Reviewed-by: Moshe Shemesh --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 126 - .../net/ethernet/mellanox/mlx5/core/en/fs.h | 129 ++ 2

[net-next 05/12] net/mlx5e: Ethtool steering, move ethtool callbacks

2018-08-10 Thread Saeed Mahameed
Move ethool rxnfc callback into en_fs_etthool file where they belong. This will allow us to make many ethtool fs related helper functions static. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 11 +-- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 48

[net-next 04/12] net/mlx5e: Ethtool steering, l4 proto support

2018-08-10 Thread Saeed Mahameed
Add support for l4 proto ip field in ethtool flow steering. Example: Redirect icmpv6 to rx queue #2 ethtool -U eth0 flow-type ip6 l4proto 58 action 2 Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/en_fs_ethtool.c| 19 --- 1 file changed, 16 insertions(+), 3

[net-next 12/12] net/mlx5: Improve argument name for add flow API

2018-08-10 Thread Saeed Mahameed
From: Eli Cohen The last argument to mlx5_add_flow_rules passes the number of destinations in the struct pointed to by the dest arg. Change the name to better reflect this fact. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed ---

[net-next 07/12] net/mlx5e: Add CONFIG_MLX5_EN_ARFS for accelerated flow steering support

2018-08-10 Thread Saeed Mahameed
Add new mlx5 Kconfig flag to allow selecting accelerated flow steering support, and compile out en_arfs.c if not selected. Move arfs declarations and definitions to en/fs.h header file. Signed-off-by: Saeed Mahameed Reviewed-by: Moshe Shemesh --- .../net/ethernet/mellanox/mlx5/core/Kconfig

[net-next 06/12] net/mlx5e: Add CONFIG_MLX5_EN_RXNFC for ethtool rx nfc

2018-08-10 Thread Saeed Mahameed
Add new mlx5 Kconfig flag to allow selecting ethtool rx nfc support, and compile out en_fs_ehtool.c if not selected. Add en/fs.h header file to host all steering declarations and definitions. Signed-off-by: Saeed Mahameed Reviewed-by: Moshe Shemesh ---

[net-next 01/12] net/mlx5e: Ethtool steering flow validation refactoring

2018-08-10 Thread Saeed Mahameed
Have a ethtool rx flow spec validation helper function per flow type. Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/en_fs_ethtool.c| 164 +++--- 1 file changed, 100 insertions(+), 64 deletions(-) diff --git

[net-next 02/12] net/mlx5e: Ethtool steering flow parsing refactoring

2018-08-10 Thread Saeed Mahameed
Have a parsing function per flow type, that converts from ethtool rx flow spec to mlx5 flow spec. Will be useful to add support for ip6 ethtool flow steering in the next patch. Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/en_fs_ethtool.c| 230 ++ 1 file

[pull request][net-next 00/12] Mellanox, mlx5e updates 2018-08-10

2018-08-10 Thread Saeed Mahameed
Hi Dave, This series provides some updates to mlx5e netdevice driver. For more information please see tag log below. Please pull and let me know if there's any problem. Thanks, Saeed. --- The following changes since commit fd685657cd5441e504113db1928196d030c8c414: Merge

[PATCH net-next v2] bnxt_en: Fix strcpy() warnings in bnxt_ethtool.c

2018-08-10 Thread Michael Chan
From: Vasundhara Volam This patch fixes following smatch warnings: drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2826 bnxt_fill_coredump_seg_hdr() error: strcpy() '"sEgM"' too large for 'seg_hdr->signature' (5 vs 4) drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2858

Re: [PATCH net-next] bnxt_en: Fix strcpy() warnings in bnxt_ethtool.c

2018-08-10 Thread Michael Chan
On Fri, Aug 10, 2018 at 2:37 PM, David Miller wrote: > From: David Miller > Date: Fri, 10 Aug 2018 14:35:45 -0700 (PDT) > >> From: Michael Chan >> Date: Fri, 10 Aug 2018 17:02:12 -0400 >> >>> From: Vasundhara Volam >>> >>> This patch fixes following smatch warnings: >>> >>>

Re: [PATCH net-next v6 10/11] net: sched: atomically check-allocate action

2018-08-10 Thread Cong Wang
On Fri, Aug 10, 2018 at 3:29 AM Vlad Buslov wrote: > > Approach you suggest is valid, but has its own trade-offs: > > - As you noted, lock granularity becomes coarse-grained due to per-netns > scope. Sure, you acquire idrinfo->lock too, the only difference is how long you take it. The

Re: [PATCH net-next] liquidio: copperhead LED identification

2018-08-10 Thread David Miller
From: Felix Manlunas Date: Thu, 9 Aug 2018 13:54:12 -0700 > From: Raghu Vatsavayi > > Add LED identification support for liquidio TP copperhead cards. > > Signed-off-by: Raghu Vatsavayi > Acked-by: Derek Chickles > Signed-off-by: Felix Manlunas Applied.

Re: [PATCH net-next] bnxt_en: Fix strcpy() warnings in bnxt_ethtool.c

2018-08-10 Thread David Miller
From: David Miller Date: Fri, 10 Aug 2018 14:35:45 -0700 (PDT) > From: Michael Chan > Date: Fri, 10 Aug 2018 17:02:12 -0400 > >> From: Vasundhara Volam >> >> This patch fixes following smatch warnings: >> >> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2826 >>

Re: [PATCH net-next] bnxt_en: Fix strcpy() warnings in bnxt_ethtool.c

2018-08-10 Thread David Miller
From: Michael Chan Date: Fri, 10 Aug 2018 17:02:12 -0400 > From: Vasundhara Volam > > This patch fixes following smatch warnings: > > drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2826 > bnxt_fill_coredump_seg_hdr() error: strcpy() '"sEgM"' too large for > 'seg_hdr->signature' (5 vs 4)

Re: [PATCH net-next 0/4] r8169: smaller improvements

2018-08-10 Thread David Miller
From: Heiner Kallweit Date: Fri, 10 Aug 2018 22:36:03 +0200 > This series includes smaller improvements, no functional change > intended. Series applied, thank you.

Re: [PATCH net-next] r8169: remove version info

2018-08-10 Thread David Miller
From: Heiner Kallweit Date: Fri, 10 Aug 2018 21:27:55 +0200 > The version number hasn't changed for ages and in general I doubt it > provides any benefit. The message in rtl_init_one() may even be > misleading because it's printed also if something fails in probe. > Therefore let's remove the

Re: pull request: bluetooth-next 2018-08-10

2018-08-10 Thread David Miller
From: Johan Hedberg Date: Fri, 10 Aug 2018 22:57:07 +0300 > Here's one more (most likely last) bluetooth-next pull request for the > 4.19 kernel. > > - Added support for MediaTek serial Bluetooth devices > - Initial skeleton for controller-side address resolution support > - Fix

[PATCH net-next] bnxt_en: Fix strcpy() warnings in bnxt_ethtool.c

2018-08-10 Thread Michael Chan
From: Vasundhara Volam This patch fixes following smatch warnings: drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2826 bnxt_fill_coredump_seg_hdr() error: strcpy() '"sEgM"' too large for 'seg_hdr->signature' (5 vs 4) drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2858

Re: Error running AF_XDP sample application

2018-08-10 Thread Konrad Djimeli
> On 2018-08-10 17:45, Björn Töpel wrote: > Thanks for taking AF_XDP for a spin! Thanks, I am actually an Igalia Coding Experience participant working remotely from Cameroon in Africa and I am working on making use of AF_XDP within Snabb. I am currently trying to familiarize myself with XDP and

Re: [PATCH net-next] r8169: remove version info

2018-08-10 Thread Andrew Lunn
On Fri, Aug 10, 2018 at 09:27:55PM +0200, Heiner Kallweit wrote: > The version number hasn't changed for ages and in general I doubt it > provides any benefit. The message in rtl_init_one() may even be > misleading because it's printed also if something fails in probe. > Therefore let's remove the

[PATCH net-next 4/4] r8169: don't configure max jumbo frame size per chip version

2018-08-10 Thread Heiner Kallweit
We don't have to configure the max jumbo frame size per chip (sub-)version. It can be easily determined based on the chip family. And new members of the RTL8168 family (if there are any) should be automatically covered. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c |

[PATCH net-next 2/4] r8169: simplify interrupt handler

2018-08-10 Thread Heiner Kallweit
Simplify the interrupt handler a little and make it better readable. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

[PATCH net-next 3/4] r8169: don't configure csum function per chip version

2018-08-10 Thread Heiner Kallweit
We don't have to configure the csum function per chip (sub-)version. The distinction is simple, versions RTL8102e and from RTL8168c onwards support csum_v2. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 134 +-- 1 file changed, 67

[PATCH net-next 1/4] r8169: don't include asm headers directly

2018-08-10 Thread Heiner Kallweit
The asm headers shouldn't be included directly. asm/irq.h is implicitly included by linux/interrupt.h, and instead of asm/io.h include linux/io.h. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH net-next 0/4] r8169: smaller improvements

2018-08-10 Thread Heiner Kallweit
This series includes smaller improvements, no functional change intended. Heiner Kallweit (4): r8169: don't include asm headers directly r8169: simplify interrupt handler r8169: don't configure csum function per chip version r8169: don't configure max jumbo frame size per chip version

pull request: bluetooth-next 2018-08-10

2018-08-10 Thread Johan Hedberg
Hi Dave, Here's one more (most likely last) bluetooth-next pull request for the 4.19 kernel. - Added support for MediaTek serial Bluetooth devices - Initial skeleton for controller-side address resolution support - Fix BT_HCIUART_RTL related Kconfig dependencies - A few other minor

[PATCH net-next] r8169: remove version info

2018-08-10 Thread Heiner Kallweit
The version number hasn't changed for ages and in general I doubt it provides any benefit. The message in rtl_init_one() may even be misleading because it's printed also if something fails in probe. Therefore let's remove the version information. Signed-off-by: Heiner Kallweit ---

[PATCH next-queue] ixgbe: don't clear ipsec sa counters on hw clearing

2018-08-10 Thread Shannon Nelson
The software SA record counters should not be cleared when clearing the hardware tables. This causes the counters to be out of sync after a driver reset. Fixes: 63a67fe229ea ("ixgbe: add ipsec offload add and remove SA") Signed-off-by: Shannon Nelson ---

Re: [PATCH bpf-next] BPF: helpers: New helper to obtain namespace data from current task

2018-08-10 Thread Carlos Neira
Jesper, I'm sorry, thanks a lot for the pointers to the current process. I just submitted v2 of for this patch. Thanks again for checking this out. Bests On Fri, Aug 10, 2018 at 12:40:29PM +0200, Jesper Dangaard Brouer wrote: > On Thu, 9 Aug 2018 12:07:00 -0400 > Carlos Neira wrote: > > >

Re: [PATCH bpf-next] bpf: enable btf for use in all maps

2018-08-10 Thread Daniel Borkmann
On 08/10/2018 06:40 PM, Alexei Starovoitov wrote: > On Fri, Aug 10, 2018 at 09:55:35AM +0200, Daniel Borkmann wrote: >> On 08/10/2018 04:13 AM, Alexei Starovoitov wrote: >>> On Fri, Aug 10, 2018 at 12:43:20AM +0200, Daniel Borkmann wrote: On 08/09/2018 11:44 PM, Alexei Starovoitov wrote:

[PATCH net v2] l2tp: use sk_dst_check() to avoid race on sk->sk_dst_cache

2018-08-10 Thread Wei Wang
From: Wei Wang In l2tp code, if it is a L2TP_UDP_ENCAP tunnel, tunnel->sk points to a UDP socket. User could call sendmsg() on both this tunnel and the UDP socket itself concurrently. As l2tp_xmit_skb() holds socket lock and call __sk_dst_check() to refresh sk->sk_dst_cache, while

Re: [PATCH net] l2tp: fix missing refcount drop in pppol2tp_tunnel_ioctl()

2018-08-10 Thread David Miller
From: Guillaume Nault Date: Fri, 10 Aug 2018 19:58:38 +0200 > As far as I can see, f664e37dcc52 ("l2tp: fix missing refcount drop in > pppol2tp_tunnel_ioctl()") is still in your -stable queue, but the two > patches it depends on haven't made their way to -stable. I'd suggest to > either drop

Re: [PATCH net] l2tp: fix missing refcount drop in pppol2tp_tunnel_ioctl()

2018-08-10 Thread Guillaume Nault
On Sun, Aug 05, 2018 at 01:24:13PM +0200, Guillaume Nault wrote: > On Fri, Aug 03, 2018 at 12:42:22PM -0700, David Miller wrote: > > From: Guillaume Nault > > Date: Fri, 3 Aug 2018 17:00:11 +0200 > > > > > If 'session' is not NULL and is not a PPP pseudo-wire, then we fail to > > > drop the

[PATCH net-next v2 10/15] net: sched: act_tunnel_key: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Use tcf lock to protect tunnel key action struct private data from concurrent modification in init and dump. Use rcu swap operation to reassign params pointer under protection of tcf lock. (old params value is not used by init, so there is no need of standalone rcu dereference step) Remove rtnl

[PATCH net-next v2 09/15] net: sched: act_skbmod: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Move read of skbmod_p rcu pointer to be protected by tcf spinlock. Use tcf spinlock to protect private skbmod data from concurrent modification during dump. Signed-off-by: Vlad Buslov --- net/sched/act_skbmod.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git

[PATCH net-next v2 07/15] net: sched: act_sample: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Use tcf spinlock to protect private sample action data from concurrent modification during dump and init. Signed-off-by: Vlad Buslov --- net/sched/act_sample.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c index

[PATCH net-next v2 06/15] net: sched: act_pedit: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Rearrange pedit init code to only access pedit action data while holding tcf spinlock. Change keys allocation type to atomic to allow it to execute while holding tcf spinlock. Take tcf spinlock in dump function when accessing pedit action data. Signed-off-by: Vlad Buslov ---

[PATCH net-next v2 05/15] net: sched: act_ipt: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Use tcf spinlock to protect ipt action private data from concurrent modification during dump. Ipt init already takes tcf spinlock when modifying ipt state. Signed-off-by: Vlad Buslov --- net/sched/act_ipt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/sched/act_ipt.c

[PATCH net-next v2 01/15] net: sched: act_bpf: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Use tcf spinlock to protect bpf action private data from concurrent modification during dump and init. Remove rtnl lock assertion that is no longer necessary. Signed-off-by: Vlad Buslov --- net/sched/act_bpf.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[PATCH net-next v2 11/15] net: sched: act_vlan: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Use tcf spinlock to protect vlan action private data from concurrent modification during dump and init. Use rcu swap operation to reassign params pointer under protection of tcf lock. (old params value is not used by init, so there is no need of standalone rcu dereference step) Remove rtnl

[PATCH net-next v2 12/15] net: sched: extend action ops with put_dev callback

2018-08-10 Thread Vlad Buslov
As a preparation for removing dependency on rtnl lock from rules update path, all users of shared objects must take reference while working with them. Extend action ops with put_dev() API to be used on net device returned by get_dev(). Modify mirred action (only action that implements get_dev

[PATCH net-next v2 08/15] net: sched: act_simple: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Use tcf spinlock to protect private simple action data from concurrent modification during dump. (simple init already uses tcf spinlock when changing action state) Signed-off-by: Vlad Buslov --- net/sched/act_simple.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[PATCH net-next v2 15/15] net: sched: act_police: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Use tcf spinlock to protect police action private data from concurrent modification during dump. (init already uses tcf spinlock when changing police action state) Pass tcf spinlock as estimator lock argument to gen_replace_estimator() during action init. Signed-off-by: Vlad Buslov ---

[PATCH net-next v2 14/15] net: core: protect rate estimator statistics pointer with lock

2018-08-10 Thread Vlad Buslov
Extend gen_new_estimator() to also take stats_lock when re-assigning rate estimator statistics pointer. (to be used by unlocked actions) Rename 'stats_lock' to 'lock' and change argument description to explain that it is now also used for control path. Signed-off-by: Vlad Buslov ---

[PATCH net-next v2 04/15] net: sched: act_ife: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Use tcf spinlock and rcu to protect params pointer from concurrent modification during dump and init. Use rcu swap operation to reassign params pointer under protection of tcf lock. (old params value is not used by init, so there is no need of standalone rcu dereference step) Ife action has

[PATCH net-next v2 03/15] net: sched: act_gact: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Use tcf spinlock to protect gact action private state from concurrent modification during dump and init. Remove rtnl assertion that is no longer necessary. Signed-off-by: Vlad Buslov --- net/sched/act_gact.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git

[PATCH net-next v2 13/15] net: sched: act_mirred: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Re-introduce mirred list spinlock, that was removed some time ago, in order to protect it from concurrent modifications, instead of relying on rtnl lock. Use tcf spinlock to protect mirred action private data from concurrent modification in init and dump. Rearrange access to mirred data in order

[PATCH net-next v2 02/15] net: sched: act_csum: remove dependency on rtnl lock

2018-08-10 Thread Vlad Buslov
Use tcf lock to protect csum action struct private data from concurrent modification in init and dump. Use rcu swap operation to reassign params pointer under protection of tcf lock. (old params value is not used by init, so there is no need of standalone rcu dereference step) Remove rtnl

[PATCH net-next v2 00/15] Remove rtnl lock dependency from all action implementations

2018-08-10 Thread Vlad Buslov
Currently, all netlink protocol handlers for updating rules, actions and qdiscs are protected with single global rtnl lock which removes any possibility for parallelism. This patch set is a second step to remove rtnl lock dependency from TC rules update path. Recently, new rtnl registration flag

Re: [PATCH][net-next] packet: switch kvzalloc to allocate memory

2018-08-10 Thread David Miller
From: Li RongQing Date: Fri, 10 Aug 2018 18:00:00 +0800 > @@ -4275,7 +4259,7 @@ static int packet_set_ring(struct sock *sk, union > tpacket_req_u *req_u, > > err = -ENOMEM; > order = get_order(req->tp_block_size); > - pg_vec = alloc_pg_vec(req, order);

Re: [PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-10 Thread Marcelo Ricardo Leitner
On Fri, Aug 10, 2018 at 08:03:51PM +0300, Konstantin Khorenko wrote: > On 08/09/2018 11:43 AM, Konstantin Khorenko wrote: > > On 08/04/2018 02:36 AM, Marcelo Ricardo Leitner wrote: > > > On Fri, Aug 03, 2018 at 07:21:00PM +0300, Konstantin Khorenko wrote: > > > ... > > > > Performance results: > >

Re: [Query]: DSA Understanding

2018-08-10 Thread Florian Fainelli
On 08/10/2018 04:26 AM, Lad, Prabhakar wrote: > Hi Andrew, > > On Thu, Aug 9, 2018 at 6:23 PM Andrew Lunn wrote: >> >>> Its coming from the switch lan4 I have attached the png, where >>> C4:F3:12:08:FE:7F is >>> the mac of lan4, which is broadcast to ff:ff:ff:ff:ff:ff, which is >>> causing rx

Re: [PATCH net-next] cxgb4: add support to display DCB info

2018-08-10 Thread David Miller
From: Ganesh Goudar Date: Fri, 10 Aug 2018 14:47:01 +0530 > display Data Center bridging information in debug > fs. > > Signed-off-by: Casey Leedom > Signed-off-by: Ganesh Goudar Applied.

[PATCH net-next] openvswitch: Derive IP protocol number for IPv6 later frags

2018-08-10 Thread Yi-Hung Wei
Currently, OVS only parses the IP protocol number for the first IPv6 fragment, but sets the IP protocol number for the later fragments to be NEXTHDF_FRAGMENT. This patch tries to derive the IP protocol number for the IPV6 later frags so that we can match that. Signed-off-by: Yi-Hung Wei ---

[PATCH v3 2/2] net/sctp: Replace in/out stream arrays with flex_array

2018-08-10 Thread Konstantin Khorenko
This path replaces physically contiguous memory arrays allocated using kmalloc_array() with flexible arrays. This enables to avoid memory allocation failures on the systems under a memory stress. Signed-off-by: Oleg Babin Signed-off-by: Konstantin Khorenko --- include/net/sctp/structs.h | 9

[PATCH v3 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-10 Thread Konstantin Khorenko
Each SCTP association can have up to 65535 input and output streams. For each stream type an array of sctp_stream_in or sctp_stream_out structures is allocated using kmalloc_array() function. This function allocates physically contiguous memory regions, so this can lead to allocation of memory

[PATCH v3 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-10 Thread Konstantin Khorenko
This patch introduces wrappers for accessing in/out streams indirectly. This will enable to replace physically contiguous memory arrays of streams with flexible arrays (or maybe any other appropriate mechanism) which do memory allocation on a per-page basis. Signed-off-by: Oleg Babin

Re: [PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-10 Thread Konstantin Khorenko
On 08/09/2018 11:43 AM, Konstantin Khorenko wrote: On 08/04/2018 02:36 AM, Marcelo Ricardo Leitner wrote: On Fri, Aug 03, 2018 at 07:21:00PM +0300, Konstantin Khorenko wrote: ... Performance results: * Kernel: v4.18-rc6 - stock and with 2 patches from Oleg (earlier in

Re: [PATCH bpf-next] bpf: enable btf for use in all maps

2018-08-10 Thread Alexei Starovoitov
On Fri, Aug 10, 2018 at 09:55:35AM +0200, Daniel Borkmann wrote: > On 08/10/2018 04:13 AM, Alexei Starovoitov wrote: > > On Fri, Aug 10, 2018 at 12:43:20AM +0200, Daniel Borkmann wrote: > >> On 08/09/2018 11:44 PM, Alexei Starovoitov wrote: > >>> On Thu, Aug 09, 2018 at 11:30:52PM +0200, Daniel

Re: C45 support and mdiobus_scan

2018-08-10 Thread Andrew Lunn
On Fri, Aug 10, 2018 at 10:20:56AM -0500, Tom Lendacky wrote: > On 8/9/2018 10:25 AM, Andrew Lunn wrote: > >>> The PCIe core will look in the device tree and when it creates the > >>> platform device for the i210 on the pcie bus, it points > >>> pdev->dev.of_node at this node. So long as you are

Re: [PATCH bpf] Revert "xdp: add NULL pointer check in __xdp_return()"

2018-08-10 Thread Jakub Kicinski
On Fri, 10 Aug 2018 17:16:45 +0200, Björn Töpel wrote: > Den fre 10 aug. 2018 kl 16:10 skrev Daniel Borkmann : > > > > On 08/10/2018 11:28 AM, Björn Töpel wrote: > > > From: Björn Töpel > > > > > > This reverts commit 36e0f12bbfd3016f495904b35e41c5711707509f. > > > > > > The reverted commit

[PATCH net-next 1/2] ip: add helpers to process in-order fragments faster.

2018-08-10 Thread Peter Oskolkov
This patch introduces several helper functions/macros that will be used in the follow-up patch. No runtime changes yet. The new logic (fully implemented in the second patch) is as follows: * Nodes in the rb-tree will now contain not single fragments, but lists of consecutive fragments

[PATCH net-next 2/2] ip: process in-order fragments efficiently

2018-08-10 Thread Peter Oskolkov
This patch changes the runtime behavior of IP defrag queue: incoming in-order fragments are added to the end of the current list/"run" of in-order fragments at the tail. On some workloads, UDP stream performance is substantially improved: RX: ./udp_stream -F 10 -T 2 -l 60 TX: ./udp_stream -c -H

Re: [PATCH bpf] Revert "xdp: add NULL pointer check in __xdp_return()"

2018-08-10 Thread Jakub Kicinski
On Fri, 10 Aug 2018 17:15:07 +0200, Björn Töpel wrote: > Den fre 10 aug. 2018 kl 12:18 skrev Jesper Dangaard Brouer > : > > > > On Fri, 10 Aug 2018 11:28:02 +0200 > > Björn Töpel wrote: > > > > > From: Björn Töpel > > > > > > This reverts commit 36e0f12bbfd3016f495904b35e41c5711707509f. > > >

Motorcycle Owners List

2018-08-10 Thread Brenda Calkins
-- Hi, Greetings of the day! Would you be interested in acquiring an email list of "Motorcycle Owners List" from USA? We also have data for Luxury Car Owners List, Luxury Brand Buyers List, Mercedes-Benz Owners, BMW Owners, Audi Owners, Hyundai Owners, Porsche Owners, Toyota Owners,

Re: [PATCH net] l2tp: use sk_dst_check() to avoid race on sk->sk_dst_cache

2018-08-10 Thread Guillaume Nault
On Thu, Aug 09, 2018 at 11:54:05AM -0700, Wei Wang wrote: > From: Wei Wang > > In l2tp code, if it is a L2TP_UDP_ENCAP tunnel, tunnel->sk points to a > UDP socket. User could call sendmsg() on both this tunnel and the UDP > socket itself concurrently. As l2tp_xmit_skb() holds socket lock and

Re: Error running AF_XDP sample application

2018-08-10 Thread Björn Töpel
Den fre 10 aug. 2018 kl 15:23 skrev Konrad Djimeli : > > On 2018-08-10 11:58, Konrad Djimeli wrote: > > On 2018-08-10 03:51, Jakub Kicinski wrote: > >> On Thu, 09 Aug 2018 18:18:08 +0200, kdjimeli wrote: > >>> Hello, > >>> > >>> I have been trying to test a sample AF_XDP program, but I have been >

Re: C45 support and mdiobus_scan

2018-08-10 Thread Tom Lendacky
On 8/9/2018 10:25 AM, Andrew Lunn wrote: >>> The PCIe core will look in the device tree and when it creates the >>> platform device for the i210 on the pcie bus, it points >>> pdev->dev.of_node at this node. So long as you are using a platform >>> with DT, you can do this. I hope you are not using

Re: [PATCH bpf] Revert "xdp: add NULL pointer check in __xdp_return()"

2018-08-10 Thread Björn Töpel
Den fre 10 aug. 2018 kl 16:10 skrev Daniel Borkmann : > > On 08/10/2018 11:28 AM, Björn Töpel wrote: > > From: Björn Töpel > > > > This reverts commit 36e0f12bbfd3016f495904b35e41c5711707509f. > > > > The reverted commit adds a WARN to check against NULL entries in the > > mem_id_ht rhashtable.

Re: [PATCH bpf] Revert "xdp: add NULL pointer check in __xdp_return()"

2018-08-10 Thread Björn Töpel
Den fre 10 aug. 2018 kl 12:18 skrev Jesper Dangaard Brouer : > > On Fri, 10 Aug 2018 11:28:02 +0200 > Björn Töpel wrote: > > > From: Björn Töpel > > > > This reverts commit 36e0f12bbfd3016f495904b35e41c5711707509f. > > > > The reverted commit adds a WARN to check against NULL entries in the > >

Re: [PATCH iproute2/net-next v2] tc_util: Add support for showing TCA_STATS_BASIC_HW statistics

2018-08-10 Thread Eelco Chaudron
On 10 Aug 2018, at 16:44, Stephen Hemminger wrote: > On Fri, 10 Aug 2018 07:59:30 -0400 > Eelco Chaudron wrote: > >> +if (bs.bytes >= bs_hw.bytes && bs.packets >= bs_hw.packets) { >> +print_string(PRINT_FP, NULL, "%s", _SL_); >> +

Re: [PATCH iproute2/net-next v2] tc_util: Add support for showing TCA_STATS_BASIC_HW statistics

2018-08-10 Thread Stephen Hemminger
On Fri, 10 Aug 2018 07:59:30 -0400 Eelco Chaudron wrote: > + if (bs.bytes >= bs_hw.bytes && bs.packets >= bs_hw.packets) { > + print_string(PRINT_FP, NULL, "%s", _SL_); > + print_string(PRINT_FP, NULL, "%s", prefix); > +

Re: [PATCH v8 bpf-next 00/10] veth: Driver XDP

2018-08-10 Thread Daniel Borkmann
On 08/03/2018 09:58 AM, Toshiaki Makita wrote: > This patch set introduces driver XDP for veth. > Basically this is used in conjunction with redirect action of another XDP > program. > > NIC ---> veth===veth > (XDP) (redirect)(XDP) > > In this case xdp_frame can be forwarded

Re: [bpf-next V2 PATCH 0/2] Implement sample code for XDP cpumap IP-pair load-balancing

2018-08-10 Thread Daniel Borkmann
On 08/10/2018 02:02 PM, Jesper Dangaard Brouer wrote: > Background: cpumap moves the SKB allocation out of the driver code, > and instead allocate it on the remote CPU, and invokes the regular > kernel network stack with the newly allocated SKB. > > The idea behind the XDP CPU redirect feature,

Re: [PATCH bpf] Revert "xdp: add NULL pointer check in __xdp_return()"

2018-08-10 Thread Daniel Borkmann
On 08/10/2018 11:28 AM, Björn Töpel wrote: > From: Björn Töpel > > This reverts commit 36e0f12bbfd3016f495904b35e41c5711707509f. > > The reverted commit adds a WARN to check against NULL entries in the > mem_id_ht rhashtable. Any kernel path implementing the XDP (generic or > driver) fast path

[PATCH net-next 1/1] tc: Update README and add config

2018-08-10 Thread Keara Leibovitz
Updated README. Added config file that contains the minimum required features enabled to run the tests currently present in the kernel. This must be updated when new unittests are created and require their own modules. Signed-off-by: Keara Leibovitz ---

Re: [PATCH bpf-next] bpf: enable btf for use in all maps

2018-08-10 Thread Daniel Borkmann
On 08/10/2018 02:54 PM, Martin KaFai Lau wrote: > On Fri, Aug 10, 2018 at 09:55:35AM +0200, Daniel Borkmann wrote: >> On 08/10/2018 04:13 AM, Alexei Starovoitov wrote: >>> On Fri, Aug 10, 2018 at 12:43:20AM +0200, Daniel Borkmann wrote: On 08/09/2018 11:44 PM, Alexei Starovoitov wrote: >

Re: Error running AF_XDP sample application

2018-08-10 Thread Konrad Djimeli
On 2018-08-10 11:58, Konrad Djimeli wrote: > On 2018-08-10 03:51, Jakub Kicinski wrote: >> On Thu, 09 Aug 2018 18:18:08 +0200, kdjimeli wrote: >>> Hello, >>> >>> I have been trying to test a sample AF_XDP program, but I have been >>> experiencing some issues. >>> After building the sample code >>>

Re: [PATCH bpf-next] bpf: enable btf for use in all maps

2018-08-10 Thread Martin KaFai Lau
On Fri, Aug 10, 2018 at 09:55:35AM +0200, Daniel Borkmann wrote: > On 08/10/2018 04:13 AM, Alexei Starovoitov wrote: > > On Fri, Aug 10, 2018 at 12:43:20AM +0200, Daniel Borkmann wrote: > >> On 08/09/2018 11:44 PM, Alexei Starovoitov wrote: > >>> On Thu, Aug 09, 2018 at 11:30:52PM +0200, Daniel

[PATCH v2 bpf-next] BPF: helpers: New helper to obtain namespace data from current task

2018-08-10 Thread Carlos Neira
This helper obtains the active namespace from current and returns pid, tgid, device and namespace id as seen from that namespace, allowing to instrument a process inside a container. Device is read from /proc/self/ns/pid, as in the future it's possible that different pid_ns files may belong to

[bpf-next V2 PATCH 0/2] Implement sample code for XDP cpumap IP-pair load-balancing

2018-08-10 Thread Jesper Dangaard Brouer
Background: cpumap moves the SKB allocation out of the driver code, and instead allocate it on the remote CPU, and invokes the regular kernel network stack with the newly allocated SKB. The idea behind the XDP CPU redirect feature, is to use XDP as a load-balancer step in-front of regular kernel

[bpf-next V2 PATCH 2/2] samples/bpf: xdp_redirect_cpu load balance like Suricata

2018-08-10 Thread Jesper Dangaard Brouer
From: Jesper Dangaard Brouer This implement XDP CPU redirection load-balancing across available CPUs, based on the hashing IP-pairs + L4-protocol. This equivalent to xdp-cpu-redirect feature in Suricata, which is inspired by the Suricata 'ippair' hashing code. An important property is that the

[bpf-next V2 PATCH 1/2] samples/bpf: add Paul Hsieh's (LGPL 2.1) hash function SuperFastHash

2018-08-10 Thread Jesper Dangaard Brouer
Adjusted function call API to take an initval. This allow the API user to set the initial value, as a seed. This could also be used for inputting the previous hash. Signed-off-by: Jesper Dangaard Brouer --- samples/bpf/hash_func01.h | 55 + 1 file

[PATCH iproute2/net-next v2] tc_util: Add support for showing TCA_STATS_BASIC_HW statistics

2018-08-10 Thread Eelco Chaudron
Add support for showing hardware specific counters to easy troubleshooting hardware offload. $ tc -s filter show dev enp3s0np0 parent : filter protocol ip pref 1 flower chain 0 filter protocol ip pref 1 flower chain 0 handle 0x1 eth_type ipv4 dst_ip 2.0.0.0 src_ip 1.0.0.0 ip_flags

  1   2   >