Re: Removing skb_orphan() from ip_rcv_core()

2019-06-24 Thread Eric Dumazet
On 6/24/19 8:17 PM, Joe Stringer wrote: > On Fri, Jun 21, 2019 at 1:59 PM Florian Westphal wrote: >> >> Joe Stringer wrote: >>> As discussed during LSFMM, I've been looking at adding something like >>> an `skb_sk_assign()` helper to BPF so that logic similar to TPROXY can >>> be implemented wi

[iproute2-next v6] tipc: support interface name when activating UDP bearer

2019-06-24 Thread Hoang Le
Support for indicating interface name has an ip address in parallel with specifying ip address when activating UDP bearer. This liberates the user from keeping track of the current ip address for each device. Old command syntax: $tipc bearer enable media udp name NAME localip IP New command synta

Re: [PATCH next 0/3] blackhole device to invalidate dst

2019-06-24 Thread महेश बंडेवार
On Mon, Jun 24, 2019 at 9:00 PM Michael Chan wrote: > > On Fri, Jun 21, 2019 at 5:45 PM Mahesh Bandewar wrote: > > > Well, I'm not a TCP expert and though we have experienced > > these corner cases in our environment, I could not reproduce > > this case reliably in my test setup to try this fix m

Re: [PATCH net] vxlan: do not destroy fdb if register_netdevice() is failed

2019-06-24 Thread Roopa Prabhu
On Sun, Jun 23, 2019 at 7:18 PM Taehee Yoo wrote: > > On Mon, 24 Jun 2019 at 03:07, David Miller wrote: > > > > Hi David, > > Thank you for the review! > > > From: Taehee Yoo > > Date: Thu, 20 Jun 2019 20:51:08 +0900 > > > > > __vxlan_dev_create() destroys FDB using specific pointer which indica

RE: [EXT] [PATCH V2] bnx2x: Prevent ptp_task to be rescheduled indefinitely

2019-06-24 Thread Sudarsana Reddy Kalluru
> -Original Message- > From: Guilherme G. Piccoli > Sent: Tuesday, June 25, 2019 3:54 AM > To: GR-everest-linux-l2 ; > netdev@vger.kernel.org; Sudarsana Reddy Kalluru > Cc: Ariel Elior ; gpicc...@canonical.com; > jay.vosbu...@canonical.com > Subject: [EXT] [PATCH V2] bnx2x: Prevent ptp_

Re: [PATCH next 0/3] blackhole device to invalidate dst

2019-06-24 Thread Michael Chan
On Fri, Jun 21, 2019 at 5:45 PM Mahesh Bandewar wrote: > Well, I'm not a TCP expert and though we have experienced > these corner cases in our environment, I could not reproduce > this case reliably in my test setup to try this fix myself. > However, Michael Chan had a setup > where these fixes

Re: Removing skb_orphan() from ip_rcv_core()

2019-06-24 Thread Joe Stringer
On Mon, Jun 24, 2019 at 7:47 AM Jamal Hadi Salim wrote: > > On 2019-06-21 1:58 p.m., Joe Stringer wrote: > > Hi folks, picking this up again.. > [..] > > During LSFMM, it seemed like no-one knew quite why the skb_orphan() is > > necessary in that path in the current version of the code, and that w

Re: [RFC V1 net-next 1/1] net: ena: implement XDP drop support

2019-06-24 Thread Machulsky, Zorik
On 6/23/19, 7:21 AM, "Jesper Dangaard Brouer" wrote: On Sun, 23 Jun 2019 10:06:49 +0300 wrote: > This commit implements the basic functionality of drop/pass logic in the > ena driver. Usually we require a driver to implement all the XDP return codes, before we ac

Re: Removing skb_orphan() from ip_rcv_core()

2019-06-24 Thread Joe Stringer
On Fri, Jun 21, 2019 at 1:59 PM Florian Westphal wrote: > > Joe Stringer wrote: > > As discussed during LSFMM, I've been looking at adding something like > > an `skb_sk_assign()` helper to BPF so that logic similar to TPROXY can > > be implemented with integration into other BPF logic, however >

Re: [PATCH v2 0/3] fix bugs when enable route_localnet

2019-06-24 Thread Luoshijie (Poincare Lab)
On 2019/6/25 0:03, David Miller wrote: > From: luoshijie > Date: Tue, 18 Jun 2019 15:14:02 + > >> From: Shijie Luo >> >> When enable route_localnet, route of the 127/8 address is enabled. >> But in some situations like arp_announce=2, ARP requests or reply >> work abnormally. >> >> This patc

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Takshak Chahande
Alexei Starovoitov wrote on Mon [2019-Jun-24 18:23:28 -0700]: > On 6/24/19 5:57 PM, Jakub Kicinski wrote: > > On Mon, 24 Jun 2019 17:47:26 -0700, Jakub Kicinski wrote: > >> I see. The local flag would not an option in getopt_long() sense, what > >> I was thinking was about adding an "effective" k

Re: [PATCH v2 0/3] fix bugs when enable route_localnet

2019-06-24 Thread Zhiqiang Liu
On 2019/6/25 0:03, David Miller wrote: > From: luoshijie > Date: Tue, 18 Jun 2019 15:14:02 + > >> From: Shijie Luo >> >> When enable route_localnet, route of the 127/8 address is enabled. >> But in some situations like arp_announce=2, ARP requests or reply >> work abnormally. >> >> This p

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Alexei Starovoitov
On 6/24/19 5:57 PM, Jakub Kicinski wrote: > On Mon, 24 Jun 2019 17:47:26 -0700, Jakub Kicinski wrote: >> I see. The local flag would not an option in getopt_long() sense, what >> I was thinking was about adding an "effective" keyword: > > Something like this, untested: > > --->8 > >

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Alexei Starovoitov
On 6/24/19 5:47 PM, Jakub Kicinski wrote: > On Tue, 25 Jun 2019 00:40:09 +, Alexei Starovoitov wrote: >> On 6/24/19 5:30 PM, Jakub Kicinski wrote: >>> On Tue, 25 Jun 2019 00:21:57 +, Alexei Starovoitov wrote: On 6/24/19 5:16 PM, Jakub Kicinski wrote: > On Mon, 24 Jun 2019 23:38:11

[PATCH net] ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while loop

2019-06-24 Thread Stephen Suryaputra
In commit 19e4e768064a8 ("ipv4: Fix raw socket lookup for local traffic"), the dif argument to __raw_v4_lookup() is coming from the returned value of inet_iif() but the change was done only for the first lookup. Subsequent lookups in the while loop still use skb->dev->ifIndex. Signed-off-by: Steph

[PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-24 Thread Lucas Bates
This patch restores the original behaviour for tdc prior to the introduction of the plugin system, where the network namespace functionality was split from the main script. It introduces the concept of required plugins for testcases, and will automatically load any plugin that isn't already enable

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-24 Thread Daniel Santos
On 6/24/19 9:52 AM, René van Dorst wrote: > Convert mt7530 to PHYLINK API > > Signed-off-by: René van Dorst > --- > drivers/net/dsa/mt7530.c | 237 +-- > drivers/net/dsa/mt7530.h | 9 ++ > 2 files changed, 187 insertions(+), 59 deletions(-) > > diff --git

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Jakub Kicinski
On Mon, 24 Jun 2019 17:47:26 -0700, Jakub Kicinski wrote: > I see. The local flag would not an option in getopt_long() sense, what > I was thinking was about adding an "effective" keyword: Something like this, untested: --->8 The BPF_F_QUERY_EFFECTIVE is a syscall flag, and fits nic

[PATCH v2] samples: bpf: make the use of xdp samples consistent

2019-06-24 Thread Daniel T. Lee
Currently, each xdp samples are inconsistent in the use. Most of the samples fetch the interface with it's name. (ex. xdp1, xdp2skb, xdp_redirect_cpu, xdp_sample_pkts, etc.) But some of the xdp samples are fetching the interface with ifindex by command argument. This commit enables xdp samples to

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Jakub Kicinski
On Tue, 25 Jun 2019 00:40:09 +, Alexei Starovoitov wrote: > On 6/24/19 5:30 PM, Jakub Kicinski wrote: > > On Tue, 25 Jun 2019 00:21:57 +, Alexei Starovoitov wrote: > >> On 6/24/19 5:16 PM, Jakub Kicinski wrote: > >>> On Mon, 24 Jun 2019 23:38:11 +, Alexei Starovoitov wrote: >

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Alexei Starovoitov
On 6/24/19 5:30 PM, Jakub Kicinski wrote: > On Tue, 25 Jun 2019 00:21:57 +, Alexei Starovoitov wrote: >> On 6/24/19 5:16 PM, Jakub Kicinski wrote: >>> On Mon, 24 Jun 2019 23:38:11 +, Alexei Starovoitov wrote: I don't think this patch should be penalized. I'd rather see we fix them

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Jakub Kicinski
On Tue, 25 Jun 2019 00:21:57 +, Alexei Starovoitov wrote: > On 6/24/19 5:16 PM, Jakub Kicinski wrote: > > On Mon, 24 Jun 2019 23:38:11 +, Alexei Starovoitov wrote: > >> I don't think this patch should be penalized. > >> I'd rather see we fix them all. > > > > So we are going to add thi

Re: [PATCH RFC net-next 5/5] net: dsa: mt7530: Add mediatek,ephy-handle to isolate external phy

2019-06-24 Thread Daniel Santos
On 6/24/19 4:52 PM, Andrew Lunn wrote: >> +static int mt7530_isolate_ephy(struct dsa_switch *ds, >> + struct device_node *ephy_node) >> +{ >> +struct phy_device *phydev = of_phy_find_device(ephy_node); >> +int ret; >> + >> +if (!phydev) >> +return 0

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Alexei Starovoitov
On 6/24/19 5:16 PM, Jakub Kicinski wrote: > On Mon, 24 Jun 2019 23:38:11 +, Alexei Starovoitov wrote: >> I don't think this patch should be penalized. >> I'd rather see we fix them all. > > So we are going to add this broken option just to remove it? > I don't understand. > I'm happy to spend

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Jakub Kicinski
On Mon, 24 Jun 2019 23:38:11 +, Alexei Starovoitov wrote: > I don't think this patch should be penalized. > I'd rather see we fix them all. So we are going to add this broken option just to remove it? I don't understand. I'm happy to spend the 15 minutes rewriting this if you don't want to

Re: [RFC PATCH 2/6] bpf: add BPF_MAP_DUMP command to access more than one entry per call

2019-06-24 Thread Jakub Kicinski
On Mon, 24 Jun 2019 16:35:05 -0700, Brian Vazquez wrote: > On Mon, Jun 24, 2019 at 3:46 PM Jakub Kicinski wrote: > > On Fri, 21 Jun 2019 16:16:46 -0700, Brian Vazquez wrote: > > > @@ -385,6 +386,14 @@ union bpf_attr { > > > __u64 flags; > > > }; > > > > > > + str

[PATCH 07/26] ipset: Fix memory accounting for hash types on resize

2019-06-24 Thread Pablo Neira Ayuso
From: Stefano Brivio If a fresh array block is allocated during resize, the current in-memory set size should be increased by the size of the block, not replaced by it. Before the fix, adding entries to a hash set type, leading to a table resize, caused an inconsistent memory size to be reported

[PATCH 14/26] netfilter: synproxy: add common uapi for SYNPROXY infrastructure

2019-06-24 Thread Pablo Neira Ayuso
From: Fernando Fernandez Mancera This new UAPI file is going to be used by the xt and nft common SYNPROXY infrastructure. It is needed to avoid duplicated code. Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso --- include/uapi/linux/netfilter/nf_SYNPROXY.h | 19 +

[PATCH 11/26] netfilter: xt_owner: bail out with EINVAL in case of unsupported flags

2019-06-24 Thread Pablo Neira Ayuso
Reject flags that are not supported with EINVAL. Signed-off-by: Pablo Neira Ayuso --- include/uapi/linux/netfilter/xt_owner.h | 5 + net/netfilter/xt_owner.c| 3 +++ 2 files changed, 8 insertions(+) diff --git a/include/uapi/linux/netfilter/xt_owner.h b/include/uapi/linux/n

[PATCH 12/26] netfilter: bridge: port sysctls to use brnf_net

2019-06-24 Thread Pablo Neira Ayuso
From: Christian Brauner This ports the sysctls to use struct brnf_net. With this patch we make it possible to namespace the br_netfilter module in the following patch. Signed-off-by: Christian Brauner Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/br_netfilter.h | 3 +- net/bri

[PATCH 06/26] netfilter: ipset: Fix error path in set_target_v3_checkentry()

2019-06-24 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Fix error path and release the references properly. Signed-off-by: Jozsef Kadlecsik --- net/netfilter/xt_set.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/net/netfilter/xt_set.c b/net/netfilter/xt_set.c

[PATCH 15/26] netfilter: synproxy: remove module dependency on IPv6 SYNPROXY

2019-06-24 Thread Pablo Neira Ayuso
From: Fernando Fernandez Mancera This is a prerequisite for the infrastructure module NETFILTER_SYNPROXY. The new module is needed to avoid duplicated code for the SYNPROXY nftables support. Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso --- include/linux/netfilter

[PATCH 13/26] netfilter: bridge: namespace bridge netfilter sysctls

2019-06-24 Thread Pablo Neira Ayuso
From: Christian Brauner Currently, the /proc/sys/net/bridge folder is only created in the initial network namespace. This patch ensures that the /proc/sys/net/bridge folder is available in each network namespace if the module is loaded and disappears from all network namespaces when the module is

[PATCH 03/26] netfilter: ipset: merge uadd and udel functions

2019-06-24 Thread Pablo Neira Ayuso
From: Florent Fourcot Both functions are using exactly the same code, except the command value passed to call_ad function. Signed-off-by: Florent Fourcot Signed-off-by: Jozsef Kadlecsik --- net/netfilter/ipset/ip_set_core.c | 71 +++ 1 file changed, 20 inse

[PATCH 26/26] netfilter: nf_tables: add support for matching IPv4 options

2019-06-24 Thread Pablo Neira Ayuso
From: Stephen Suryaputra This is the kernel change for the overall changes with this description: Add capability to have rules matching IPv4 options. This is developed mainly to support dropping of IP packets with loose and/or strict source route route options. Signed-off-by: Stephen Suryaputra

[PATCH 20/26] netfilter: synproxy: fix building syncookie calls

2019-06-24 Thread Pablo Neira Ayuso
From: Arnd Bergmann When either CONFIG_IPV6 or CONFIG_SYN_COOKIES are disabled, the kernel fails to build: include/linux/netfilter_ipv6.h:180:9: error: implicit declaration of function '__cookie_v6_init_sequence' [-Werror,-Wimplicit-function-declaration] return __cookie_v6_init_se

[PATCH] bpf: Allow bpf_skb_event_output for a few prog types

2019-06-24 Thread allanzhang
Software event output is only enabled by a few prog types right now (TC, LWT out, XDP, sockops). Many other skb based prog types need bpf_skb_event_output to produce software event. Added socket_filter, cg_skb, sk_skb prog types to generate sw event. Test bpf code is generated from code snippet:

[PATCH 22/26] netfilter: bridge: prevent UAF in brnf_exit_net()

2019-06-24 Thread Pablo Neira Ayuso
From: Christian Brauner Prevent a UAF in brnf_exit_net(). When unregister_net_sysctl_table() is called the ctl_hdr pointer will obviously be freed and so accessing it righter after is invalid. Fix this by stashing a pointer to the table we want to free before we unregister the sysctl header. No

[PATCH 21/26] netfilter: synproxy: use nf_cookie_v6_check() from core

2019-06-24 Thread Pablo Neira Ayuso
This helper function is never used and it is intended to avoid a direct dependency with the ipv6 module. Fixes: d7f9b2f18eae ("netfilter: synproxy: extract SYNPROXY infrastructure from {ipt, ip6t}_SYNPROXY") Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_synproxy_core.c | 2 +- 1 file ch

[PATCH 24/26] netfilter: bridge: Fix non-untagged fragment packet

2019-06-24 Thread Pablo Neira Ayuso
From: wenxu ip netns exec ns1 ip a a dev eth0 10.0.0.7/24 ip netns exec ns2 ip link a link eth0 name vlan type vlan id 200 ip netns exec ns2 ip a a dev vlan 10.0.0.8/24 ip l add dev br0 type bridge vlan_filtering 1 brctl addif br0 veth1 brctl addif br0 veth2 bridge vlan add dev veth1 vid 200 pv

[PATCH 17/26] netfilter: synproxy: ensure zero is returned on non-error return path

2019-06-24 Thread Pablo Neira Ayuso
From: Colin Ian King Currently functions nf_synproxy_{ipc4|ipv6}_init return an uninitialized garbage value in variable ret on a successful return. Fix this by returning zero on success. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: d7f9b2f18eae ("netfilter: synproxy: extract SYN

[PATCH 19/26] netfilter: nf_tables: enable set expiration time for set elements

2019-06-24 Thread Pablo Neira Ayuso
From: Laura Garcia Liebana Currently, the expiration of every element in a set or map is a read-only parameter generated at kernel side. This change will permit to set a certain expiration date per element that will be required, for example, during stateful replication among several nodes. This

[PATCH] bpf: Allow bpf_skb_event_output for a few prog types

2019-06-24 Thread allanzhang
Software event output is only enabled by a few prog types right now (TC, LWT out, XDP, sockops). Many other skb based prog types need bpf_skb_event_output to produce software event. Added socket_filter, cg_skb, sk_skb prog types to generate sw event. Test bpf code is generated from code snippet:

[PATCH] bpf: Allow bpf_skb_event_output for a few prog types

2019-06-24 Thread allanzhang
Software event output is only enabled by a few prog types right now (TC, LWT out, XDP, sockops). Many other skb based prog types need bpf_skb_event_output to produce software event. Added socket_filter, cg_skb, sk_skb prog types to generate sw event. Test bpf code is generated

[PATCH 25/26] netfilter: synproxy: fix manual bump of the reference counter

2019-06-24 Thread Pablo Neira Ayuso
From: Fernando Fernandez Mancera This operation is handled by nf_synproxy_ipv4_init() now. Fixes: d7f9b2f18eae ("netfilter: synproxy: extract SYNPROXY infrastructure from {ipt, ip6t}_SYNPROXY") Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso --- net/ipv4/netfilter/

[PATCH 16/26] netfilter: synproxy: extract SYNPROXY infrastructure from {ipt, ip6t}_SYNPROXY

2019-06-24 Thread Pablo Neira Ayuso
From: Fernando Fernandez Mancera Add common functions into nf_synproxy_core.c to prepare for nftables support. The prototypes of the functions used by {ipt, ip6t}_SYNPROXY are in the new file nf_synproxy.h Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso --- include/

[PATCH 23/26] netfilter: fix nf_conntrack_bridge/ipv6 link error

2019-06-24 Thread Pablo Neira Ayuso
From: Arnd Bergmann When CONFIG_IPV6 is disabled, the bridge netfilter code produces a link error: ERROR: "br_ip6_fragment" [net/bridge/netfilter/nf_conntrack_bridge.ko] undefined! ERROR: "nf_ct_frag6_gather" [net/bridge/netfilter/nf_conntrack_bridge.ko] undefined! The problem is that it assu

[PATCH 08/26] Update my email address

2019-06-24 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik It's better to use my kad...@netfilter.org email address in the source code. I might not be able to use kad...@blackhole.kfki.hu in the future. Signed-off-by: Jozsef Kadlecsik Signed-off-by: Jozsef Kadlecsik --- CREDITS| 2 +- MAI

[PATCH 10/26] netfilter: conntrack: small conntrack lookup optimization

2019-06-24 Thread Pablo Neira Ayuso
From: Florian Westphal nf_conntrack_find() performs checks on the conntrack objects in this order: 1. if (nf_ct_is_expired(ct)) This fetches ct->timeout, in third cache line. The hnnode that is used to store the list pointers resides in the first (origin) or second (reply tuple) cache line

[PATCH 18/26] netfilter: nft_ct: fix null pointer in ct expectations support

2019-06-24 Thread Pablo Neira Ayuso
From: Stéphane Veyret nf_ct_helper_ext_add may return null, which must then be checked. Fixes: 857b46027d6f ("netfilter: nft_ct: add ct expectations support") Reported-by: Colin Ian King Signed-off-by: Stéphane Veyret Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nft_ct.c | 4 1 fi

[PATCH 09/26] netfilter: nft_ct: add ct expectations support

2019-06-24 Thread Pablo Neira Ayuso
From: Stéphane Veyret This patch allows to add, list and delete expectations via nft objref infrastructure and assigning these expectations via nft rule. This allows manual port triggering when no helper is defined to manage a specific protocol. For example, if I have an online game which protoc

[PATCH 05/26] netfilter: ipset: Fix the last missing check of nla_parse_deprecated()

2019-06-24 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik In dump_init() the outdated comment was incorrect and we had a missing validation check of nla_parse_deprecated(). Signed-off-by: Jozsef Kadlecsik --- net/netfilter/ipset/ip_set_core.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/net

[PATCH 00/26] Netfilter updates for net-next

2019-06-24 Thread Pablo Neira Ayuso
Hi, The following patches contains Netfilter updates for net-next: 1) .br_defrag indirection depends on CONFIG_NF_DEFRAG_IPV6, from wenxu. 2) Remove unnecessary memset() in ipset, from Florent Fourcot. 3) Merge control plane addition and deletion in ipset, also from Florent. 4) A few missing c

[PATCH 02/26] netfilter: ipset: remove useless memset() calls

2019-06-24 Thread Pablo Neira Ayuso
From: Florent Fourcot One of the memset call is buggy: it does not erase full array, but only pointer size. Moreover, after a check, first step of nla_parse_nested/nla_parse is to erase tb array as well. We can remove both calls safely. Signed-off-by: Florent Fourcot Signed-off-by: Jozsef Kadl

[PATCH 01/26] netfilter: ipv6: Fix undefined symbol nf_ct_frag6_gather

2019-06-24 Thread Pablo Neira Ayuso
From: wenxu CONFIG_NETFILTER=m and CONFIG_NF_DEFRAG_IPV6 is not set ERROR: "nf_ct_frag6_gather" [net/ipv6/ipv6.ko] undefined! Fixes: c9bb6165a16e ("netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y") Reported-by: kbuild test robot Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso --- ne

[PATCH 04/26] netfilter: ipset: fix a missing check of nla_parse

2019-06-24 Thread Pablo Neira Ayuso
From: Aditya Pakki When nla_parse fails, we should not use the results (the first argument). The fix checks if it fails, and if so, returns its error code upstream. Signed-off-by: Aditya Pakki Signed-off-by: Jozsef Kadlecsik --- net/netfilter/ipset/ip_set_core.c | 10 +++--- 1 file change

Re: [PATCH V3 07/10] net: dsa: microchip: Initial SPI regmap support

2019-06-24 Thread Vladimir Oltean
On Tue, 25 Jun 2019 at 01:17, Marek Vasut wrote: > > On 6/24/19 12:35 AM, Marek Vasut wrote: > > Add basic SPI regmap support into the driver. > > > > Previous patches unconver that ksz_spi_write() is always ever called > > with len = 1, 2 or 4. We can thus drop the if (len > SPI_TX_BUF_LEN) > > c

Re: [PATCH] sis900: remove TxIDLE

2019-06-24 Thread Willem de Bruijn
On Mon, Jun 24, 2019 at 6:04 PM Sergej Benilov wrote: > > Before "sis900: fix TX completion" patch, TX completion was done on TxIDLE > interrupt. > TX completion also was the only thing done on TxIDLE interrupt. > Since "sis900: fix TX completion", TX completion is done on TxDESC interrupt. > So

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Alexei Starovoitov
On 6/24/19 3:43 PM, Jakub Kicinski wrote: > On Mon, 24 Jun 2019 22:16:02 +, Andrey Ignatov wrote: >> Jakub Kicinski [Mon, 2019-06-24 14:51 -0700]: >>> This is a cgroup-specific flag, right? It should be a parameter >>> to cgroup show, not a global flag. Can we please drop this patch >>> from

Re: [PATCH net-next v5 2/7] etf: Add skip_sock_check

2019-06-24 Thread Patel, Vedang
> On Jun 24, 2019, at 2:40 PM, Jakub Kicinski > wrote: > > On Fri, 21 Jun 2019 10:28:23 -0700, Vedang Patel wrote: >> diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h >> index 8b2f993cbb77..409d1616472d 100644 >> --- a/include/uapi/linux/pkt_sched.h >> +++ b/include/u

Re: [PATCH] samples: bpf: make the use of xdp samples consistent

2019-06-24 Thread Song Liu
On Mon, Jun 24, 2019 at 6:57 AM Daniel T. Lee wrote: > > Currently, each xdp samples are inconsistent in the use. > Most of the samples fetch the interface with it's name. > (ex. xdp1, xdp2skb, xdp_redirect, xdp_sample_pkts, etc.) > > But only xdp_adjst_tail and xdp_tx_iptunnel fetch the interface

[PATCH v2] samples: bpf: make the use of xdp samples consistent

2019-06-24 Thread Daniel T. Lee
Currently, each xdp samples are inconsistent in the use. Most of the samples fetch the interface with it's name. (ex. xdp1, xdp2skb, xdp_redirect_cpu, xdp_sample_pkts, etc.) But some of the xdp samples are fetching the interface with ifindex by command argument. This commit enables xdp samples to

Re: [PATCH] samples: bpf: make the use of xdp samples consistent

2019-06-24 Thread Daniel T. Lee
Will do right away! :) On Tue, Jun 25, 2019 at 3:24 AM Toke Høiland-Jørgensen wrote: > > "Daniel T. Lee" writes: > > > Currently, each xdp samples are inconsistent in the use. > > Most of the samples fetch the interface with it's name. > > (ex. xdp1, xdp2skb, xdp_redirect, xdp_sample_pkts, etc.)

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Jakub Kicinski
On Mon, 24 Jun 2019 22:16:02 +, Andrey Ignatov wrote: > Jakub Kicinski [Mon, 2019-06-24 14:51 -0700]: > > This is a cgroup-specific flag, right? It should be a parameter > > to cgroup show, not a global flag. Can we please drop this patch > > from the tree? > > Hey Jakub, > > I had sam

Re: [PATCH net-next 02/18] ionic: Add hardware init and device commands

2019-06-24 Thread Shannon Nelson
On 6/24/19 1:53 PM, Jakub Kicinski wrote: On Thu, 20 Jun 2019 13:24:08 -0700, Shannon Nelson wrote: The ionic device has a small set of PCI registers, including a device control and data space, and a large set of message commands. Signed-off-by: Shannon Nelson struct ionic { struct p

Re: [EXT] [PATCH] bnx2x: Prevent ptp_task to be rescheduled indefinitely

2019-06-24 Thread Guilherme Piccoli
V2 submitted here: https://marc.info/?l=linux-netdev&m=156141504615972 Cheers, Guilherme

[PATCH V2] bnx2x: Prevent ptp_task to be rescheduled indefinitely

2019-06-24 Thread Guilherme G. Piccoli
Currently bnx2x ptp worker tries to read a register with timestamp information in case of TX packet timestamping and in case it fails, the routine reschedules itself indefinitely. This was reported as a kworker always at 100% of CPU usage, which was narrowed down to be bnx2x ptp_task. By following

Re: [PATCH V2] net: dsa: microchip: Use gpiod_set_value_cansleep()

2019-06-24 Thread Linus Walleij
On Sun, Jun 23, 2019 at 5:14 PM Marek Vasut wrote: > Replace gpiod_set_value() with gpiod_set_value_cansleep(), as the switch > reset GPIO can be connected to e.g. I2C GPIO expander and it is perfectly > fine for the kernel to sleep for a bit in ksz_switch_register(). > > Signed-off-by: Marek Vas

Re: [PATCH net-next v2 4/8] net: aquantia: make all files GPL-2.0-only

2019-06-24 Thread Andrew Lunn
On Mon, Jun 24, 2019 at 03:10:51PM +, Igor Russkikh wrote: > It was noticed some files had -or-later, however overall driver has > -only license. Clean this up. > > Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Andrew

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Andrey Ignatov
Jakub Kicinski [Mon, 2019-06-24 14:51 -0700]: > On Mon, 24 Jun 2019 16:22:25 +0200, Daniel Borkmann wrote: > > On 06/22/2019 12:33 AM, Takshak Chahande wrote: > > > With different bpf attach_flags available to attach bpf programs specially > > > with BPF_F_ALLOW_OVERRIDE and BPF_F_ALLOW_MULTI, the

Re: [PATCH net-next v2 3/8] maintainers: declare aquantia atlantic driver maintenance

2019-06-24 Thread Andrew Lunn
On Mon, Jun 24, 2019 at 03:10:49PM +, Igor Russkikh wrote: > Aquantia is resposible now for all new features and bugfixes. > Reflect that in MAINTAINERS. > > Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v3 net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-24 Thread Willem de Bruijn
> > > + if (need_wait && !packet_next_frame(po, &po->tx_ring, > > > TP_STATUS_SEND_REQUEST)) { > > > + po->wait_on_complete = 1; > > > + timeo = sock_sndtimeo(&po->sk, msg->msg_flags & > > > MSG_DONTWAIT); > > > > This resets timeout on ev

Re: [PATCH net-next v2 2/8] net: aquantia: add documentation for the atlantic driver

2019-06-24 Thread Andrew Lunn
On Mon, Jun 24, 2019 at 03:10:47PM +, Igor Russkikh wrote: > Document contains configuration options description, > details and examples of driver various settings. > > Signed-off-by: Igor Russkikh > --- > .../device_drivers/aquantia/atlantic.txt | 437 ++ > 1 file chang

[PATCH net-next 2/2] net: sched: protect against stack overflow in TC act_mirred

2019-06-24 Thread John Hurley
TC hooks allow the application of filters and actions to packets at both ingress and egress of the network stack. It is possible, with poor configuration, that this can produce loops whereby an ingress hook calls a mirred egress action that has an egress hook that redirects back to the first ingres

[PATCH net-next 1/2] net: sched: refactor reinsert action

2019-06-24 Thread John Hurley
The TC_ACT_REINSERT return type was added as an in-kernel only option to allow a packet ingress or egress redirect. This is used to avoid unnecessary skb clones in situations where they are not required. If a TC hook returns this code then the packet is 'reinserted' and no skb consume is carried ou

[PATCH net-next 0/2] Track recursive calls in TC act_mirred

2019-06-24 Thread John Hurley
These patches aim to prevent act_mirred causing stack overflow events from recursively calling packet xmit or receive functions. Such events can occur with poor TC configuration that causes packets to travel in loops within the system. Florian Westphal advises that a recursion crash and packets lo

Re: [PATCH V3 05/10] net: dsa: microchip: Use PORT_CTRL_ADDR() instead of indirect function call

2019-06-24 Thread Marek Vasut
On 6/24/19 5:20 AM, Andrew Lunn wrote: > On Mon, Jun 24, 2019 at 12:35:03AM +0200, Marek Vasut wrote: >> The indirect function call to dev->dev_ops->get_port_addr() is expensive >> especially if called for every single register access, and only returns >> the value of PORT_CTRL_ADDR() macro. Use PO

Re: [PATCH V3 07/10] net: dsa: microchip: Initial SPI regmap support

2019-06-24 Thread Marek Vasut
On 6/24/19 12:35 AM, Marek Vasut wrote: > Add basic SPI regmap support into the driver. > > Previous patches unconver that ksz_spi_write() is always ever called > with len = 1, 2 or 4. We can thus drop the if (len > SPI_TX_BUF_LEN) > check and we can also drop the allocation of the txbuf which is

Re: [PATCH net-next v2 1/8] net: aquantia: replace internal driver version code with uts

2019-06-24 Thread Andrew Lunn
On Mon, Jun 24, 2019 at 03:10:45PM +, Igor Russkikh wrote: > As it was discussed some time previously, driver is better to > report kernel version string, as it in a best way identifies > the codebase. > > Signed-off-by: Igor Russkikh Hi Igor You should add any reviewed-by, or acked-by tags

Re: [PATCH mlx5-next] net/mlx5: Convert mkey_table to XArray

2019-06-24 Thread Saeed Mahameed
On Thu, 2019-06-20 at 07:03 +, Saeed Mahameed wrote: > From: Matthew Wilcox > > The lock protecting the data structure does not need to be an > rwlock. The > only read access to the lock is in an error path, and if that's > limiting > your scalability, you have bigger performance problems. >

Re: [PATCH RFC net-next 4/5] dt-bindings: net: dsa: mt7530: Add mediatek,ephy-handle to isolate ext. phy

2019-06-24 Thread Florian Fainelli
On 6/24/19 7:52 AM, René van Dorst wrote: > On some platforum the external phy can only interface to the port 5 of the > switch because the RGMII TX and RX lines are swapped. But it still can be > useful to use the internal phy of the switch to act as a WAN port which > connectes to the 2nd GMAC. T

Re: [PATCH rdma-next v1 00/12] DEVX asynchronous events

2019-06-24 Thread Saeed Mahameed
On Wed, 2019-06-19 at 07:45 +0300, Leon Romanovsky wrote: > On Tue, Jun 18, 2019 at 06:51:45PM +, Saeed Mahameed wrote: > > On Tue, 2019-06-18 at 20:15 +0300, Leon Romanovsky wrote: > > > From: Leon Romanovsky > > > > > > Changelog: > > > v0 -> v1: > > > > Normally 1st submission is V1 and

Re: [PATCH v3 net-next 0/4] cxgb4: Reference count MPS TCAM entries within a PF

2019-06-24 Thread David Miller
From: Raju Rangoju Date: Mon, 24 Jun 2019 23:05:31 +0530 > Firmware reference counts the MPS TCAM entries by PF and VF, > but it does not do it for usage within a PF or VF. This patch > adds the support to track MPS TCAM entries within a PF. > > v2->v3: > Fixed the compiler errors due to incorr

Re: [PATCH iproute2] iproute: Pass RTM_F_CLONED on dump to fetch cached routes to be flushed

2019-06-24 Thread David Ahern
On 6/14/19 7:33 PM, Stefano Brivio wrote: > diff --git a/ip/iproute.c b/ip/iproute.c > index 2b3dcc5dbd53..192442b42062 100644 > --- a/ip/iproute.c > +++ b/ip/iproute.c > @@ -1602,6 +1602,16 @@ static int save_route_prep(void) > return 0; > } > > +static int iproute_flush_flags(struct nlms

Re: [PATCH net-next 01/18] ionic: Add basic framework for IONIC Network device driver

2019-06-24 Thread Shannon Nelson
On 6/24/19 1:07 PM, Jakub Kicinski wrote: On Fri, 21 Jun 2019 15:13:31 -0700, Shannon Nelson wrote: +#define DRV_VERSION"0.11.0-k" DRV_VERSION is pretty useless. What you really want to know is the kernel git tree and commit. The big distributions might backport this version of the

Re: [PATCH RFC net-next 5/5] net: dsa: mt7530: Add mediatek,ephy-handle to isolate external phy

2019-06-24 Thread Andrew Lunn
> +static int mt7530_isolate_ephy(struct dsa_switch *ds, > +struct device_node *ephy_node) > +{ > + struct phy_device *phydev = of_phy_find_device(ephy_node); > + int ret; > + > + if (!phydev) > + return 0; > + > + ret = phy_modify(phydev, MII

Re: [PATCH net-next 00/18] Add ionic driver

2019-06-24 Thread David Miller
From: Jakub Kicinski Date: Mon, 24 Jun 2019 13:19:52 -0700 > On Thu, 20 Jun 2019 13:24:06 -0700, Shannon Nelson wrote: >> 28 files changed, 9970 insertions(+) > > Dave, could we consider setting a LoC limit for series and patches? > I know this is a new driver, but there's gotta be a way to spl

Re: [PATCH v3 net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-24 Thread Neil Horman
On Mon, Jun 24, 2019 at 02:08:43PM -0400, Willem de Bruijn wrote: > On Sun, Jun 23, 2019 at 8:46 PM Neil Horman wrote: > > > > When an application is run that: > > a) Sets its scheduler to be SCHED_FIFO > > and > > b) Opens a memory mapped AF_PACKET socket, and sends frames with the > > MSG_DONTWA

Re: [PATCH iproute2 0/3] do not set IPv6-only options on IPv4 addresses

2019-06-24 Thread David Ahern
On 6/24/19 3:38 PM, Andrea Claudi wrote: > I think that if a script wrongly uses some of these flags on a IPv4 > address, it most probably operates on an unexpected address, since > everyone is aware that these flags are IPv6 only. In other words we > are breaking a scripted setup that is already b

Re: [PATCH bpf-next] bpftool: Add BPF_F_QUERY_EFFECTIVE support in bpftool cgroup [show|tree]

2019-06-24 Thread Jakub Kicinski
On Mon, 24 Jun 2019 16:22:25 +0200, Daniel Borkmann wrote: > On 06/22/2019 12:33 AM, Takshak Chahande wrote: > > With different bpf attach_flags available to attach bpf programs specially > > with BPF_F_ALLOW_OVERRIDE and BPF_F_ALLOW_MULTI, the list of effective > > bpf-programs available to any su

Re: [PATCH net-next 02/18] ionic: Add hardware init and device commands

2019-06-24 Thread Shannon Nelson
On 6/24/19 1:13 PM, Jakub Kicinski wrote: On Fri, 21 Jun 2019 15:22:22 -0700, Shannon Nelson wrote: +static int identity_show(struct seq_file *seq, void *v) +{ + struct ionic *ionic = seq->private; + struct identity *ident = &ionic->ident; + struct ionic_dev *idev = &ionic->ide

Re: [RFC PATCH net-next 1/1] tc-testing: Scapy plugin and JSON verification for tdc

2019-06-24 Thread Alexander Aring
Hi Lucas, On Sun, Jun 09, 2019 at 10:20:32PM -0400, Lucas Bates wrote: > This is a draft version of two new tdc features. > > First, the scapy plugin. This requires the scapy Python module > installed on the system (plugin was tested against v2.4.2). > The intent is to install a given rule (as th

Re: [PATCH net-next 01/18] ionic: Add basic framework for IONIC Network device driver

2019-06-24 Thread Shannon Nelson
On 6/24/19 1:03 PM, Jakub Kicinski wrote: On Thu, 20 Jun 2019 13:24:07 -0700, Shannon Nelson wrote: diff --git a/Documentation/networking/device_drivers/pensando/ionic.rst b/Documentation/networking/device_drivers/pensando/ionic.rst new file mode 100644 index ..84bdf682052b --- /dev

Re: [PATCH net-next 13/18] ionic: Add initial ethtool support

2019-06-24 Thread Shannon Nelson
On 6/24/19 12:26 AM, Michal Kubecek wrote: On Fri, Jun 21, 2019 at 03:30:20PM -0700, Shannon Nelson wrote: On 6/20/19 7:32 PM, Michal Kubecek wrote: On Thu, Jun 20, 2019 at 01:24:19PM -0700, Shannon Nelson wrote: + + if (ch->combined_count > lif->ionic->ntxqs_per_lif) + r

Re: [PATCH net-next v5 2/7] etf: Add skip_sock_check

2019-06-24 Thread Jakub Kicinski
On Fri, 21 Jun 2019 10:28:23 -0700, Vedang Patel wrote: > diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h > index 8b2f993cbb77..409d1616472d 100644 > --- a/include/uapi/linux/pkt_sched.h > +++ b/include/uapi/linux/pkt_sched.h > @@ -990,6 +990,7 @@ struct tc_etf_qopt { >

Re: [PATCH iproute2 0/3] do not set IPv6-only options on IPv4 addresses

2019-06-24 Thread Andrea Claudi
On Mon, Jun 24, 2019 at 7:21 PM Stephen Hemminger wrote: > > On Mon, 24 Jun 2019 19:05:52 +0200 > Andrea Claudi wrote: > > > 'home', 'nodad' and 'mngtmpaddr' options are IPv6-only, but > > it is possible to set them on IPv4 addresses, too. This should > > not be possible. > > > > Fix this adding

Re: [PATCH bpf-next v5 0/3] xdp: Allow lookup into devmaps before redirect

2019-06-24 Thread Toke Høiland-Jørgensen
Andrii Nakryiko writes: > On Mon, Jun 24, 2019 at 12:38 PM Toke Høiland-Jørgensen > wrote: >> >> Andrii Nakryiko writes: >> >> > On Sat, Jun 22, 2019 at 7:19 PM Toke Høiland-Jørgensen >> > wrote: >> >> >> >> When using the bpf_redirect_map() helper to redirect packets from XDP, >> >> the eB

[PATCH] sis900: remove TxIDLE

2019-06-24 Thread Sergej Benilov
Before "sis900: fix TX completion" patch, TX completion was done on TxIDLE interrupt. TX completion also was the only thing done on TxIDLE interrupt. Since "sis900: fix TX completion", TX completion is done on TxDESC interrupt. So it is not necessary any more to set and to check for TxIDLE. Elimi

Re: [PATCH bpf-next v8 1/9] bpf: implement getsockopt and setsockopt hooks

2019-06-24 Thread Andrii Nakryiko
On Mon, Jun 24, 2019 at 1:11 PM Stanislav Fomichev wrote: > > Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and > BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. > > BPF_CGROUP_SETSOCKOPT get a read-only view of the setsockopt arguments. > BPF_CGROUP_GETSOCKOPT can modify the supplied buffer. >

Re: [PATCH net-next 02/18] ionic: Add hardware init and device commands

2019-06-24 Thread Jakub Kicinski
On Thu, 20 Jun 2019 13:24:08 -0700, Shannon Nelson wrote: > The ionic device has a small set of PCI registers, including a > device control and data space, and a large set of message > commands. > > Signed-off-by: Shannon Nelson > struct ionic { > struct pci_dev *pdev; > struct devi

  1   2   3   >