Re: [PATCH net v4 1/8] ipv4/fib_frontend: Rename ip_valid_fib_dump_req, provide non-strict version

2019-06-14 Thread Stefano Brivio
On Fri, 14 Jun 2019 21:16:54 -0600 David Ahern wrote: > On 6/14/19 9:13 PM, Stefano Brivio wrote: > > On Fri, 14 Jun 2019 20:54:49 -0600 > > David Ahern wrote: > > > >> On 6/14/19 7:32 PM, Stefano Brivio wrote: > >>> ip_valid_fib_dump_req() does two things: performs strict checking on > >>>

Re: [PATCH net v4 2/8] ipv4: Honour NLM_F_MATCH, make semantics of NETLINK_GET_STRICT_CHK consistent

2019-06-14 Thread Stefano Brivio
On Fri, 14 Jun 2019 21:13:38 -0600 David Ahern wrote: > On 6/14/19 7:32 PM, Stefano Brivio wrote: > > Socket option NETLINK_GET_STRICT_CHK, quoting from commit 89d35528d17d > > ("netlink: Add new socket option to enable strict checking on dumps"), > > is used to "request strict checking of header

Re: [PATCH net 0/4] tcp: add three static keys

2019-06-14 Thread David Miller
From: Eric Dumazet Date: Fri, 14 Jun 2019 16:22:17 -0700 > Recent addition of per TCP socket rx/tx cache brought > regressions for some workloads, as reported by Feng Tang. > > It seems better to make them opt-in, before we adopt better > heuristics. > > The last patch adds high_order_alloc_dis

Re: [PATCH net v4 1/8] ipv4/fib_frontend: Rename ip_valid_fib_dump_req, provide non-strict version

2019-06-14 Thread David Ahern
On 6/14/19 9:13 PM, Stefano Brivio wrote: > On Fri, 14 Jun 2019 20:54:49 -0600 > David Ahern wrote: > >> On 6/14/19 7:32 PM, Stefano Brivio wrote: >>> ip_valid_fib_dump_req() does two things: performs strict checking on >>> netlink attributes for dump requests, and sets a dump filter if netlink >

Re: [PATCH net v4 2/8] ipv4: Honour NLM_F_MATCH, make semantics of NETLINK_GET_STRICT_CHK consistent

2019-06-14 Thread David Ahern
On 6/14/19 7:32 PM, Stefano Brivio wrote: > Socket option NETLINK_GET_STRICT_CHK, quoting from commit 89d35528d17d > ("netlink: Add new socket option to enable strict checking on dumps"), > is used to "request strict checking of headers and attributes on dump > requests". > > If some attributes ar

Re: [PATCH net v4 1/8] ipv4/fib_frontend: Rename ip_valid_fib_dump_req, provide non-strict version

2019-06-14 Thread Stefano Brivio
On Fri, 14 Jun 2019 20:54:49 -0600 David Ahern wrote: > On 6/14/19 7:32 PM, Stefano Brivio wrote: > > ip_valid_fib_dump_req() does two things: performs strict checking on > > netlink attributes for dump requests, and sets a dump filter if netlink > > attributes require it. > > > > We might want

Re: [PATCH net v4 1/8] ipv4/fib_frontend: Rename ip_valid_fib_dump_req, provide non-strict version

2019-06-14 Thread David Ahern
On 6/14/19 7:32 PM, Stefano Brivio wrote: > ip_valid_fib_dump_req() does two things: performs strict checking on > netlink attributes for dump requests, and sets a dump filter if netlink > attributes require it. > > We might want to just set a filter, without performing strict validation. > > Ren

Re: [net-next v2 00/12][pull request] 40GbE Intel Wired LAN Driver Updates 2019-06-14

2019-06-14 Thread David Miller
From: Jeff Kirsher Date: Fri, 14 Jun 2019 13:15:58 -0700 > This series contains updates to i40e only. Pulled, thanks Jeff.

Re: [PATCH net next 1/2] udp: Remove unused parameter (exact_dif)

2019-06-14 Thread David Miller
From: Tim Beale Date: Fri, 14 Jun 2019 16:41:26 +1200 > Originally this was used by the VRF logic in compute_score(), but that > was later replaced by udp_sk_bound_dev_eq() and the parameter became > unused. > > Note this change adds an 'unused variable' compiler warning that will be > removed i

Re: [PATCH net next 2/2] udp: Remove unused variable/function (exact_dif)

2019-06-14 Thread David Miller
From: Tim Beale Date: Fri, 14 Jun 2019 16:41:27 +1200 > This was originally passed through to the VRF logic in compute_score(). > But that logic has now been replaced by udp_sk_bound_dev_eq() and so > this code is no longer used or needed. > > Signed-off-by: Tim Beale Applied.

Re: [PATCH net-next] ipv4: tcp: fix ACK/RST sent with a transmit delay

2019-06-14 Thread David Miller
From: Eric Dumazet Date: Thu, 13 Jun 2019 21:22:35 -0700 > If we want to set a EDT time for the skb we want to send > via ip_send_unicast_reply(), we have to pass a new parameter > and initialize ipc.sockc.transmit_time with it. > > This fixes the EDT time for ACK/RST packets sent on behalf of >

Re: [PATCH][net-next] net: remove empty netlink_tap_exit_net

2019-06-14 Thread David Miller
From: Li RongQing Date: Fri, 14 Jun 2019 09:29:09 +0800 > Pointer members of an object with static storage duration, if not > explicitly initialized, will be initialized to a NULL pointer. The > net namespace API checks if this pointer is not NULL before using it, > it are safe to remove the func

Re: [PATCH net-next 0/3] nfp: flower: loosen L4 checks and add extack to flower offload

2019-06-14 Thread David Miller
From: Jakub Kicinski Date: Thu, 13 Jun 2019 14:17:08 -0700 > Pieter says: > > This set allows the offload of filters that make use of an unknown > ip protocol, given that layer 4 is being wildcarded. The set then > aims to make use of extack messaging for flower offloads. It adds > about 70 exta

Re: [pull request][net-next v2 00/15] Mellanox, mlx5 Firmware devlink health and sw reset

2019-06-14 Thread David Miller
From: Saeed Mahameed Date: Thu, 13 Jun 2019 20:39:13 + > This series provides the support for mlx5 Firmware devlink health and > sw reset. > > For more information please see tag log below. > > Please pull and let me know if there is any problem. > > This is a re-spin of a previously sent

Re: [PATCH net-next v3] ipv4: Support multipath hashing on inner IP pkts for GRE tunnel

2019-06-14 Thread David Miller
From: Stephen Suryaputra Date: Thu, 13 Jun 2019 14:38:58 -0400 > Multipath hash policy value of 0 isn't distributing since the outer IP > dest and src aren't varied eventhough the inner ones are. Since the flow > is on the inner ones in the case of tunneled traffic, hashing on them is > desired.

Re: [PATCH net-next v1 00/11] xdp: page_pool fixes and in-flight accounting

2019-06-14 Thread David Miller
From: Jesper Dangaard Brouer Date: Thu, 13 Jun 2019 20:28:01 +0200 > This patchset fix page_pool API and users, such that drivers can use it for > DMA-mapping. ... Please address the minor nits and respin and I'll apply this. Thanks.

Re: [PATCH net-next] virtio_net: enable napi_tx by default

2019-06-14 Thread David Miller
From: Willem de Bruijn Date: Thu, 13 Jun 2019 12:24:57 -0400 > From: Willem de Bruijn > > NAPI tx mode improves TCP behavior by enabling TCP small queues (TSQ). > TSQ reduces queuing ("bufferbloat") and burstiness. > > Previous measurements have shown significant improvement for > TCP_STREAM s

Re: [PATCH net-next] net: sched: ingress: set 'unlocked' flag for clsact Qdisc ops

2019-06-14 Thread David Miller
From: Vlad Buslov Date: Thu, 13 Jun 2019 19:12:05 +0300 > To remove rtnl lock dependency in tc filter update API when using clsact > Qdisc, set QDISC_CLASS_OPS_DOIT_UNLOCKED flag in clsact Qdisc_class_ops. > > Clsact Qdisc ops don't require any modifications to be used without rtnl > lock on tc

Re: [PATCH net] net: sched: flower: don't call synchronize_rcu() on mask creation

2019-06-14 Thread David Miller
From: Vlad Buslov Date: Thu, 13 Jun 2019 17:54:04 +0300 > Current flower mask creating code assumes that temporary mask that is used > when inserting new filter is stack allocated. To prevent race condition > with data patch synchronize_rcu() is called every time fl_create_new_mask() > replaces t

Re: [PATCH v5 net] sctp: Free cookie before we memdup a new one

2019-06-14 Thread David Miller
From: Neil Horman Date: Thu, 13 Jun 2019 06:35:59 -0400 > Based on comments from Xin, even after fixes for our recent syzbot > report of cookie memory leaks, its possible to get a resend of an INIT > chunk which would lead to us leaking cookie memory. > > To ensure that we don't leak cookie memo

Re: [PATCH net-next 0/4] qed: iWARP fixes

2019-06-14 Thread David Miller
From: Michal Kalderon Date: Thu, 13 Jun 2019 11:29:39 +0300 > This series contains a few small fixes related to iWARP. Series applied.

Re: [PATCH net] net: phy: sfp: clean up a condition

2019-06-14 Thread David Miller
From: Dan Carpenter Date: Thu, 13 Jun 2019 09:51:02 +0300 > The acpi_node_get_property_reference() doesn't return ACPI error codes, > it just returns regular negative kernel error codes. This patch doesn't > affect run time, it's just a clean up. > > Signed-off-by: Dan Carpenter Applied to ne

Re: [PATCH net-next] vsock: correct removal of socket from the list

2019-06-14 Thread David Miller
From: Sunil Muthuswamy Date: Thu, 13 Jun 2019 03:52:27 + > The current vsock code for removal of socket from the list is both > subject to race and inefficient. It takes the lock, checks whether > the socket is in the list, drops the lock and if the socket was on the > list, deletes it from t

Re: [PATCH net-next 0/2] nfp: add two user friendly errors

2019-06-14 Thread David Miller
From: Jakub Kicinski Date: Wed, 12 Jun 2019 16:59:01 -0700 > This small series adds two error messages based on recent > bug reports which turned out not to be bugs.. Series applied.

Re: [PATCH net-next 0/2] Microchip KSZ driver enhancements

2019-06-14 Thread David Miller
From: Robert Hancock Date: Wed, 12 Jun 2019 14:49:04 -0600 > A couple of enhancements to the Microchip KSZ switch driver: one to add > PHY register settings for errata workarounds for more stable operation, and > another to add a device tree option to change the output clock rate as > required by

Re: [PATCH bpf-next v4 07/17] libbpf: Support drivers with non-combined channels

2019-06-14 Thread Jakub Kicinski
On Fri, 14 Jun 2019 13:25:05 +, Maxim Mikityanskiy wrote: > Imagine you have configured the NIC to have the maximum supported amount > of channels. Then your formula in ethtool.c returns some value. Exactly > the same value should also be returned from libbpf's > xsk_get_max_queues(). It's a

Re: [PATCH net] net: dsa: microchip: Don't try to read stats for unused ports

2019-06-14 Thread David Miller
From: Robert Hancock Date: Wed, 12 Jun 2019 14:33:32 -0600 > If some of the switch ports were not listed in the device tree, due to > being unused, the ksz_mib_read_work function ended up accessing a NULL > dp->slave pointer and causing an oops. Skip checking statistics for any > unused ports. >

Re: [PATCH net] net: netem: fix use after free and double free with packet corruption

2019-06-14 Thread David Miller
From: Jakub Kicinski Date: Wed, 12 Jun 2019 11:51:21 -0700 > Brendan reports that the use of netem's packet corruption capability > leads to strange crashes. This seems to be caused by > commit d66280b12bd7 ("net: netem: use a list in addition to rbtree") > which uses skb->next pointer to constr

Re: [PATCH 0/4] qmi_wwan: fix QMAP handling

2019-06-14 Thread David Miller
From: Bjørn Mork Date: Thu, 13 Jun 2019 19:54:40 +0200 > Reinhard Speyerer writes: > >> This series addresses the following issues observed when using the >> QMAP support of the qmi_wwan driver: > > Really nice work! Thanks. > > Acked-by: Bjørn Mork Series applied.

Re: [PATCH net-next 0/8] net/packet: better behavior under DDOS

2019-06-14 Thread David Miller
From: Eric Dumazet Date: Wed, 12 Jun 2019 09:52:25 -0700 > Using tcpdump (or other af_packet user) on a busy host can lead to > catastrophic consequences, because suddenly, potentially all cpus > are spinning on a contended spinlock. > > Both packet_rcv() and tpacket_rcv() grab the spinlock > to

Re: [PATCH net-next] net: phy: Add more 1000BaseX support detection

2019-06-14 Thread David Miller
From: Robert Hancock Date: Tue, 11 Jun 2019 16:06:09 -0600 > Commit "net: phy: Add detection of 1000BaseX link mode support" added > support for not filtering out 1000BaseX mode from the PHY's supported > modes in genphy_config_init, but we have to make a similar change in > genphy_read_abilities

Re: [PATCH bpf-next v4 05/17] xsk: Change the default frame size to 4096 and allow controlling it

2019-06-14 Thread Jakub Kicinski
On Fri, 14 Jun 2019 13:25:28 +, Maxim Mikityanskiy wrote: > On 2019-06-13 20:29, Jakub Kicinski wrote: > > On Thu, 13 Jun 2019 14:01:39 +, Maxim Mikityanskiy wrote: > > > > Yes, okay, I get that. But I still don't know what's the exact use you > > have for AF_XDP buffers being 4k.. Cou

[PATCH net-next 1/2] selftests: pmtu: Introduce list_flush_ipv4_exception test case

2019-06-14 Thread Stefano Brivio
This test checks that route exceptions can be successfully listed and flushed using ip -6 route {list,flush} cache. Signed-off-by: Stefano Brivio --- tools/testing/selftests/net/pmtu.sh | 62 + 1 file changed, 62 insertions(+) diff --git a/tools/testing/selftests/net

[PATCH net-next 0/2] selftests: pmtu: List/flush IPv4 cached routes, improve IPv6 test

2019-06-14 Thread Stefano Brivio
This series introduce a new test, list_flush_ipv4_exception, and improves the existing list_flush_ipv6_exception test by making it as demanding as the IPv4 one. Stefano Brivio (2): selftests: pmtu: Introduce list_flush_ipv4_exception test case selftests: pmtu: Make list_flush_ipv6_exception te

[PATCH net-next 2/2] selftests: pmtu: Make list_flush_ipv6_exception test more demanding

2019-06-14 Thread Stefano Brivio
Instead of just listing and flushing two cached exceptions, create a relatively big number of them, and count how many are listed. Single netlink dump messages contain approximately 25 entries each, and this way we can make sure the partial dump tracking mechanism is working properly. While at it,

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

2019-06-14 Thread Stefano Brivio
With a current (5.1) kernel version, IPv6 exception routes can't be listed (ip -6 route list cache) or flushed (ip -6 route flush cache). I'm re-introducing kernel support for this, but, to allow the kernel to filter routes based on the RTM_F_CLONED flag, we need to make sure this flag is always pa

[PATCH 5/8] Revert "net/ipv6: Bail early if user only wants cloned entries"

2019-06-14 Thread Stefano Brivio
This reverts commit 08e814c9e8eb5a982cbd1e8f6bd255d97c51026f: as we are preparing to fix listing and dumping of IPv6 cached routes, we need to allow RTM_F_CLONED as a flag to match routes against while dumping them. Signed-off-by: Stefano Brivio --- v4: New patch, split from 6/8 net/ipv6/ip6_fi

[PATCH 4/8] ipv4: Dump routed caches if requested

2019-06-14 Thread Stefano Brivio
Since commit 4895c771c7f0 ("ipv4: Add FIB nexthop exceptions."), cached exception routes are stored as a separate entity, so they are not dumped on a FIB dump, even if the RTM_F_CLONED flag is passed. This implies that the command 'ip route list cache' doesn't return any result anymore. If the RT

[PATCH 6/8] ipv6: Honour NLM_F_MATCH, make semantics of NETLINK_GET_STRICT_CHK consistent

2019-06-14 Thread Stefano Brivio
Socket option NETLINK_GET_STRICT_CHK, quoting from commit 89d35528d17d ("netlink: Add new socket option to enable strict checking on dumps"), is used to "request strict checking of headers and attributes on dump requests". If some attributes are set (including flags), setting this option causes du

[PATCH net v4 0/8] Fix listing (IPv4, IPv6) and flushing (IPv6) of cached route exceptions

2019-06-14 Thread Stefano Brivio
For IPv6 cached routes, the commands 'ip -6 route list cache' and 'ip -6 route flush cache' don't work at all after route exceptions have been moved to a separate hash table in commit 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache"). For IPv4 cached routes, the command 'ip route l

[PATCH net v4 1/8] ipv4/fib_frontend: Rename ip_valid_fib_dump_req, provide non-strict version

2019-06-14 Thread Stefano Brivio
ip_valid_fib_dump_req() does two things: performs strict checking on netlink attributes for dump requests, and sets a dump filter if netlink attributes require it. We might want to just set a filter, without performing strict validation. Rename it to ip_filter_fib_dump_req(), and add a 'strict' b

[PATCH net v4 3/8] ipv4/fib_frontend: Allow RTM_F_CLONED flag to be used for filtering

2019-06-14 Thread Stefano Brivio
This functionally reverts the check introduced by commit e8ba330ac0c5 ("rtnetlink: Update fib dumps for strict data checking") as modified by commit e4e92fb160d7 ("net/ipv4: Bail early if user only wants prefix entries"). As we are preparing to fix listing of IPv4 cached routes, we need to give us

[PATCH 7/8] ipv6: Dump route exceptions too in rt6_dump_route()

2019-06-14 Thread Stefano Brivio
Since commit 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache"), route exceptions reside in a separate hash table, and won't be found by walking the FIB, so they won't be dumped to userspace on a RTM_GETROUTE message. This causes 'ip -6 route list cache' and 'ip -6 route flush cache

[PATCH 8/8] ip6_fib: Don't discard nodes with valid routing information in fib6_locate_1()

2019-06-14 Thread Stefano Brivio
When we perform an inexact match on FIB nodes via fib6_locate_1(), longer prefixes will be preferred to shorter ones. However, it might happen that a node, with higher fn_bit value than some other, has no valid routing information. In this case, we'll pick that node, but it will be discarded by th

[PATCH net v4 2/8] ipv4: Honour NLM_F_MATCH, make semantics of NETLINK_GET_STRICT_CHK consistent

2019-06-14 Thread Stefano Brivio
Socket option NETLINK_GET_STRICT_CHK, quoting from commit 89d35528d17d ("netlink: Add new socket option to enable strict checking on dumps"), is used to "request strict checking of headers and attributes on dump requests". If some attributes are set (including flags), setting this option causes du

Re: [iproute2 net-next PATCH] ip: add a new parameter -Numeric

2019-06-14 Thread David Ahern
On 6/14/19 1:00 PM, Roman Mashak wrote: > On the 2nd thought: there already exists argument "-raw" for tc which > currently instructs printing handles in hex representation. Why not to > adopt this for ip and ss as well rather then adding new key? show_raw seems to mean dump extra data as opposed

Re: [PATCH] ipv4: fix inet_select_addr() when enable route_localnet

2019-06-14 Thread David Ahern
On 6/14/19 10:55 AM, luoshijie wrote: > From: Shijie Luo > > Suppose we have two interfaces eth0 and eth1 in two hosts, follow > the same steps in the two hosts: > # sysctl -w net.ipv4.conf.eth1.route_localnet=1 > # sysctl -w net.ipv4.conf.eth1.arp_announce=2 > # ip route del 127.0.0.0/8 dev lo

Re: [PATCH net next 1/2] udp: Remove unused parameter (exact_dif)

2019-06-14 Thread David Ahern
On 6/13/19 10:41 PM, Tim Beale wrote: > Originally this was used by the VRF logic in compute_score(), but that > was later replaced by udp_sk_bound_dev_eq() and the parameter became > unused. > > Note this change adds an 'unused variable' compiler warning that will be > removed in the next patch (

Re: [PATCH net next 2/2] udp: Remove unused variable/function (exact_dif)

2019-06-14 Thread David Ahern
On 6/13/19 10:41 PM, Tim Beale wrote: > This was originally passed through to the VRF logic in compute_score(). > But that logic has now been replaced by udp_sk_bound_dev_eq() and so > this code is no longer used or needed. > > Signed-off-by: Tim Beale > --- > net/ipv4/udp.c | 12 >

Re: [PATCH net] net: netem: fix use after free and double free with packet corruption

2019-06-14 Thread Jakub Kicinski
On Fri, 14 Jun 2019 09:40:18 -0700, Cong Wang wrote: > On Wed, Jun 12, 2019 at 11:52 AM Jakub Kicinski wrote: > > > > Brendan reports that the use of netem's packet corruption capability > > leads to strange crashes. This seems to be caused by > > commit d66280b12bd7 ("net: netem: use a list in ad

Re: [PATCH bpf-next v4 3/3] devmap: Allow map lookups from eBPF

2019-06-14 Thread Andrii Nakryiko
On Thu, Jun 13, 2019 at 8:31 AM Toke Høiland-Jørgensen wrote: > > From: Toke Høiland-Jørgensen > > We don't currently allow lookups into a devmap from eBPF, because the map > lookup returns a pointer directly to the dev->ifindex, which shouldn't be > modifiable from eBPF. > > However, being able

Re: [PATCH net 1/4] sysctl: define proc_do_static_key()

2019-06-14 Thread Alexei Starovoitov
On Fri, Jun 14, 2019 at 4:55 PM Eric Dumazet wrote: > > On 6/14/19 4:45 PM, Alexei Starovoitov wrote: > > On Fri, Jun 14, 2019 at 04:22:18PM -0700, Eric Dumazet wrote: > > > maxlen is ignored by proc_do_static_key(), right? > > That is right, I was not sure putting a zero or sizeof(int) > would ma

Re: [PATCH bpf-next 8/8] selftests/bpf: switch tests to BTF-defined map definitions

2019-06-14 Thread Stanislav Fomichev
On 06/14, Andrii Nakryiko wrote: > On Fri, Jun 14, 2019 at 4:23 PM Stanislav Fomichev wrote: > > > > On 06/10, Andrii Nakryiko wrote: > > > Switch test map definition to new BTF-defined format. > > Reiterating my concerns on non-RFC version: > > > > Pretty please, let's not convert everything at o

Re: [PATCH net 1/4] sysctl: define proc_do_static_key()

2019-06-14 Thread Eric Dumazet
On 6/14/19 4:45 PM, Alexei Starovoitov wrote: > On Fri, Jun 14, 2019 at 04:22:18PM -0700, Eric Dumazet wrote: > maxlen is ignored by proc_do_static_key(), right? That is right, I was not sure putting a zero or sizeof(int) would make sense here. Using sizeof(...key) is consistent with other sy

Re: [PATCH net-next v3 1/2] net: sched: add mpls manipulation actions to TC

2019-06-14 Thread David Ahern
On 6/14/19 5:22 PM, John Hurley wrote: > On Fri, Jun 14, 2019 at 6:22 PM David Ahern wrote: >> >> On 6/14/19 8:58 AM, John Hurley wrote: >>> Currently, TC offers the ability to match on the MPLS fields of a packet >>> through the use of the flow_dissector_key_mpls struct. However, as yet, TC >>> a

Re: [PATCH net 1/4] sysctl: define proc_do_static_key()

2019-06-14 Thread Alexei Starovoitov
On Fri, Jun 14, 2019 at 04:22:18PM -0700, Eric Dumazet wrote: > Convert proc_dointvec_minmax_bpf_stats() into a more generic > helper, since we are going to use jump labels more often. > > Note that sysctl_bpf_stats_enabled is removed, since > it is no longer needed/used. > > Signed-off-by: Eric

Re: [PATCH bpf-next 8/8] selftests/bpf: switch tests to BTF-defined map definitions

2019-06-14 Thread Andrii Nakryiko
On Fri, Jun 14, 2019 at 4:23 PM Stanislav Fomichev wrote: > > On 06/10, Andrii Nakryiko wrote: > > Switch test map definition to new BTF-defined format. > Reiterating my concerns on non-RFC version: > > Pretty please, let's not convert everything at once. Let's start > with stuff that explicitly d

Re: [PATCH bpf-next 8/8] selftests/bpf: switch tests to BTF-defined map definitions

2019-06-14 Thread Stanislav Fomichev
On 06/10, Andrii Nakryiko wrote: > Switch test map definition to new BTF-defined format. Reiterating my concerns on non-RFC version: Pretty please, let's not convert everything at once. Let's start with stuff that explicitly depends on BTF (spinlocks?). One good argument (aside from the one that

Re: [PATCH bpf-next 1/4] bpf: export bpf_sock for BPF_PROG_TYPE_CGROUP_SOCK_ADDR prog type

2019-06-14 Thread Daniel Borkmann
On 06/12/2019 07:30 PM, Stanislav Fomichev wrote: > And let it use bpf_sk_storage_{get,delete} helpers to access socket > storage. Kernel context (struct bpf_sock_addr_kern) already has sk > member, so I just expose it to the BPF hooks. Using PTR_TO_SOCKET > instead of PTR_TO_SOCK_COMMON should be

Re: [PATCH net-next v3 1/2] net: sched: add mpls manipulation actions to TC

2019-06-14 Thread John Hurley
On Fri, Jun 14, 2019 at 6:22 PM David Ahern wrote: > > On 6/14/19 8:58 AM, John Hurley wrote: > > Currently, TC offers the ability to match on the MPLS fields of a packet > > through the use of the flow_dissector_key_mpls struct. However, as yet, TC > > actions do not allow the modification or man

[PATCH net 2/4] tcp: add tcp_rx_skb_cache sysctl

2019-06-14 Thread Eric Dumazet
Instead of relying on rps_needed, it is safer to use a separate static key, since we do not want to enable TCP rx_skb_cache by default. This feature can cause huge increase of memory usage on hosts with millions of sockets. Signed-off-by: Eric Dumazet --- Documentation/networking/ip-sysctl.txt |

[PATCH net 0/4] tcp: add three static keys

2019-06-14 Thread Eric Dumazet
Recent addition of per TCP socket rx/tx cache brought regressions for some workloads, as reported by Feng Tang. It seems better to make them opt-in, before we adopt better heuristics. The last patch adds high_order_alloc_disable sysctl to ask TCP sendmsg() to exclusively use order-0 allocations,

Re: [PATCH v3 bpf-next 0/3] bpf: net: Detach BPF prog from reuseport sk

2019-06-14 Thread Daniel Borkmann
On 06/13/2019 11:59 PM, Martin KaFai Lau wrote: > v3: > - Use rcu_swap_protected (Stanislav Fomichev) > - Use 0x0047 for SO_DETACH_REUSEPORT_BPF for sparc (kbuild test robot > ) > > v2: > - Copy asm-generic/socket.h to tools/ in the new patch 2 (Stanislav Fomichev) > > This patch adds SO_DETACH_

[PATCH net 1/4] sysctl: define proc_do_static_key()

2019-06-14 Thread Eric Dumazet
Convert proc_dointvec_minmax_bpf_stats() into a more generic helper, since we are going to use jump labels more often. Note that sysctl_bpf_stats_enabled is removed, since it is no longer needed/used. Signed-off-by: Eric Dumazet --- include/linux/bpf.h| 1 - include/linux/sysctl.h | 3 +++

[PATCH net 3/4] tcp: add tcp_tx_skb_cache sysctl

2019-06-14 Thread Eric Dumazet
Feng Tang reported a performance regression after introduction of per TCP socket tx/rx caches, for TCP over loopback (netperf) There is high chance the regression is caused by a change on how well the 32 KB per-thread page (current->task_frag) can be recycled, and lack of pcp caches for order-3 pa

[PATCH net 4/4] net: add high_order_alloc_disable sysctl/static key

2019-06-14 Thread Eric Dumazet
>From linux-3.7, (commit 5640f7685831 "net: use a per task frag allocator") TCP sendmsg() has preferred using order-3 allocations. While it gives good results for most cases, we had reports that heavy uses of TCP over loopback were hitting a spinlock contention in page allocations/freeing. This c

Re: [PATCH bpf-next] samples/bpf: fix include path in Makefile

2019-06-14 Thread Daniel Borkmann
On 06/14/2019 08:43 AM, Prashant Bhole wrote: > Recent commit included libbpf.h in selftests/bpf/bpf_util.h. > Since some samples use bpf_util.h and samples/bpf/Makefile doesn't > have libbpf.h path included, build was failing. Let's add the path > in samples/bpf/Makefile. > > Signed-off-by: Prash

Re: [PATCH bpf 1/3] devmap: Fix premature entry free on destroying map

2019-06-14 Thread Daniel Borkmann
On 06/14/2019 03:09 PM, Toke Høiland-Jørgensen wrote: > Toshiaki Makita writes: [...] >>> Alternatively, since this entire series should probably go to stable, I >>> can respin mine on top of it? >> >> Indeed conflict will happen, as this is for 'bpf' not 'bpf-next'. >> Sorry for disturbing your w

Re: [PATCH bpf-next v4 2/3] bpf_xdp_redirect_map: Perform map lookup in eBPF helper

2019-06-14 Thread Andrii Nakryiko
On Thu, Jun 13, 2019 at 8:31 AM Toke Høiland-Jørgensen wrote: > > From: Toke Høiland-Jørgensen > > The bpf_redirect_map() helper used by XDP programs doesn't return any > indication of whether it can successfully redirect to the map index it was > given. Instead, BPF programs have to track this t

Re: [PATCH net-next v2 1/3] net: sched: add mpls manipulation actions to TC

2019-06-14 Thread John Hurley
On Fri, Jun 14, 2019 at 5:59 PM Cong Wang wrote: > > On Thu, Jun 13, 2019 at 10:44 AM John Hurley > wrote: > > +static inline void tcf_mpls_set_eth_type(struct sk_buff *skb, __be16 > > ethertype) > > +{ > > + struct ethhdr *hdr = eth_hdr(skb); > > + > > + skb_postpull_rcsum(skb, &hd

Understanding Ethernet Architecture (I/O --> MDIO --> MII vs I/O --> MAC) for mt7620 (OpenWRT)

2019-06-14 Thread Daniel Santos
Hello, I'm still fairly new to Ethernet drivers and there are a lot of interesting pieces.  What I need help with is understanding MDIO --> (R)MII vs direct I/O to the MAC (e.g., via ioread32, iowrite32).  Why is there not always a struct mii_bus to talk to this hardware?  Is it because the PHY an

Re: [PATCH net-next v3 0/2] net/mlx5: use indirect call wrappers

2019-06-14 Thread David Miller
From: Paolo Abeni Date: Wed, 12 Jun 2019 12:18:34 +0200 > The mlx5_core driver uses several indirect calls in fast-path, some of them > are invoked on each ingress packet, even for the XDP-only traffic. > > This series leverage the indirect call wrappers infrastructure the avoid > the expansive

Re: [PATCH] bpf: optimize constant blinding

2019-06-14 Thread Andrii Nakryiko
On Fri, Jun 14, 2019 at 10:06 AM Alexei Starovoitov wrote: > > On Fri, Jun 14, 2019 at 8:13 AM Jiong Wang wrote: > > > > > > Alexei Starovoitov writes: > > > > > On Wed, Jun 12, 2019 at 8:25 AM Jiong Wang > > > wrote: > > >> > > >> > > >> Jiong Wang writes: > > >> > > >> > Alexei Starovoitov wr

Re: [PATCH v2 bpf-next 9/9] bpf: precise scalar_value tracking

2019-06-14 Thread Andrii Nakryiko
On Fri, Jun 14, 2019 at 12:26 AM Alexei Starovoitov wrote: > > Introduce precision tracking logic that > helps cilium programs the most: > old clang old clangnew clang new clang > with all patches with all patches > bpf_lb-DLB_L3.o 183

Re: [PATCH net-next] gso: enable udp gso for virtual devices

2019-06-14 Thread Jason Baron
On 6/13/19 5:20 PM, Willem de Bruijn wrote: @@ -237,6 +237,7 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start) NETIF_F_GSO_GRE_CSUM | \ NETIF_F_GSO_IPXIP4 |

[net-next v2 03/12] i40e: add constraints for accessing veb array

2019-06-14 Thread Jeff Kirsher
From: Piotr Kwapulinski Add veb array access boundary checks. Ensure veb array index is smaller than I40E_MAX_VEB. Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_main.c | 12 +++- 1 file changed, 7 insert

[net-next v2 11/12] i40e: Missing response checks in driver when starting/stopping FW LLDP

2019-06-14 Thread Jeff Kirsher
From: Aleksandr Loktionov Driver updated pf->flags before calling i40e_aq_start_lldp(). This patch moved down updating pf->flags down so flags will be updated only in case of successful i40e_aq_start_lldp() call. Also was introduced is_reset_needed local flag to avoid unnecessary h/w reset in cas

[net-next v2 12/12] i40e: mark expected switch fall-through

2019-06-14 Thread Jeff Kirsher
From: "Gustavo A. R. Silva" In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/intel/i40e/i40e_xsk.c: In function ‘i40e_run_xdp_zc’: drivers/net/ethernet/intel/i40e/i40e_xsk.c:

[net-next v2 10/12] i40e: remove duplicate stat calculation for tx_errors

2019-06-14 Thread Jeff Kirsher
From: Jacob Keller The tx_errors statistic was being calculated twice in i40e_update_eth_stats. This appears to be as of commit 201db2898f2c ("i40e: add missing VSI statistics", 2014-03-25). Remove the extra i40e_stat_update32 call for GLV_TEPC. Signed-off-by: Jacob Keller Tested-by: Andrew B

[net-next v2 07/12] i40e: add input validation for virtchnl handlers

2019-06-14 Thread Jeff Kirsher
From: Sergey Nemov Change some data to unsigned int instead of integer when we compare. Check LUT values in VIRTCHNL_OP_CONFIG_RSS_LUT handler. Also enhance error/warning messages to print the real values of I40E_MAX_VF_QUEUES, I40E_MAX_VF_VSI and I40E_DEFAULT_QUEUES_PER_VF instead of plain tex

[net-next v2 06/12] i40e: Improve AQ log granularity

2019-06-14 Thread Jeff Kirsher
From: Doug Dziggel This patch makes it possible to log only AQ descriptors, without the entire AQ message buffers being dumped too. It should greatly reduce kernel log size in cases where a full AQ dump is not needed. Selection is made by setting flags in hw->debug_mask. Additionally, some debug

[net-next v2 01/12] i40e: add functions stubs to support EEE

2019-06-14 Thread Jeff Kirsher
From: Aleksandr Loktionov This patch adds functions stubs to support EEE on/off. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 12 1 file changed, 12 insertions(+) diff --git a/driver

[net-next v2 05/12] i40e: Add bounds check for ch[] array

2019-06-14 Thread Jeff Kirsher
From: Piotr Kwapulinski Add bounds check for ch[] array. Use ARRAY_SIZE() to ensure that idx is within the range. Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 ++- 1 file changed, 10

[net-next v2 09/12] i40e: Check if the BAR size is large enough before writing to registers

2019-06-14 Thread Jeff Kirsher
From: Adam Ludkiewicz This patch fixes the problem with a kernel panic occurring when trying to bind the i40e driver to a non-i40e port. The problem is fixed by checking if the BAR size in the device is large enough by reading the highest register. Signed-off-by: Adam Ludkiewicz Tested-by: Andr

[net-next v2 02/12] i40e: let untrusted VF to create up to 16 VLANs

2019-06-14 Thread Jeff Kirsher
From: Piotr Kwapulinski This patch lets untrusted VF to create up to 16 VLANs. It was implemented by increasing I40E_VC_MAX_VLAN_PER_VF up to 16. Without this patch untrusted VF could create only up to 8 VLANs. Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsh

[net-next v2 04/12] i40e: Use signed variable

2019-06-14 Thread Jeff Kirsher
From: Mitch Williams The counter variable in i40e_clean_tx_irq starts out negative and climbs to 0. So it should not be defined as a u16. This was working by accident due to the fact the u16 overflows and underflows predictably. Replace the u16 with int, which is signed and can handle the negati

[net-next v2 08/12] i40e: Missing response checks in driver when starting/stopping FW LLDP

2019-06-14 Thread Jeff Kirsher
From: Piotr Marczak Driver did not check response on LLDP flag change and always returned SUCCESS. This patch now checks for an error and returns an error code and has additional information in the log. Signed-off-by: Piotr Marczak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- ..

[net-next v2 00/12][pull request] 40GbE Intel Wired LAN Driver Updates 2019-06-14

2019-06-14 Thread Jeff Kirsher
This series contains updates to i40e only. Aleksandr adds stub functions for Energy Efficient Ethernet (EEE) to currently report that it is not supported in i40e. Fixed up the Link Layer Detection Protocol (LLDP) code to ensure we do not set the LLDP flag too early before we ensure that we have a

[PATCH net v2] net: handle 802.1P vlan 0 packets properly

2019-06-14 Thread Govindarajulu Varadarajan
When stack receives pkt: [802.1P vlan 0][802.1AD vlan 100][IPv4], vlan_do_receive() returns false if it does not find vlan_dev. Later __netif_receive_skb_core() fails to find packet type handler for skb->protocol 801.1AD and drops the packet. 801.1P header with vlan id 0 should be handled as untag

Re: [PATCH bpf-next v4 07/17] libbpf: Support drivers with non-combined channels

2019-06-14 Thread Björn Töpel
On 2019-06-14 19:15, Maciej Fijalkowski wrote: Why would I want to run AF_XDP without ZC? The main reason for having AF_XDP support in drivers is the zero copy, right? In general I agree with you on this point. Short-term, I see copy-mode useful for API adoption reasons (as XDP_SKB), so from th

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-14 Thread Marcelo Ricardo Leitner
On Fri, Jun 14, 2019 at 11:07:37AM -0700, Cong Wang wrote: > On Tue, Jun 11, 2019 at 9:44 AM Marcelo Ricardo Leitner > wrote: > > I had suggested to let act_ct handle the above as well, as there is a > > big chunk of code on both that is pretty similar. There is quite some > > boilerplate for inte

Re: [iproute2 net-next PATCH] ip: add a new parameter -Numeric

2019-06-14 Thread Roman Mashak
David Ahern writes: > On 6/12/19 10:01 AM, Roman Mashak wrote: >> Hangbin Liu writes: >> >>> Add a new parameter '-Numeric' to show the number of protocol, scope, >>> dsfield, etc directly instead of converting it to human readable name. >>> Do the same on tc and ss. >>> >>> This patch is based

Re: [PATCH ethtool] ethtool.spec: Use standard file location macros

2019-06-14 Thread John W. Linville
On Mon, May 20, 2019 at 11:09:40AM +0300, Tariq Toukan wrote: > From: Mikhael Goikhman > > Use _prefix and _sbindir macros to allow building the package under a > different prefix. > > Signed-off-by: Mikhael Goikhman > Signed-off-by: Tzafrir Cohen > Signed-off-by: Tariq Toukan > --- > ethtoo

Re: [PATCH v2 0/2] Add 100BaseT1 and 1000BaseT1

2019-06-14 Thread John W. Linville
On Fri, May 31, 2019 at 03:57:46PM +0200, Andrew Lunn wrote: > Import the latest ethtool.h and add two new links modes. > > v2: > Move the new speeds to the end of the all_advertised_modes_bits[]. > Remove the same_line bit for the new moved > Add the new modes to the man page. > > Andrew Lunn (2

Re: [PATCH net-next v3 2/2] net/mlx5e: use indirect calls wrapper for the rx packet handler

2019-06-14 Thread Saeed Mahameed
On Wed, 2019-06-12 at 12:18 +0200, Paolo Abeni wrote: > We can avoid another indirect call per packet wrapping the rx > handler call with the proper helper. > > To ensure that even the last listed direct call experience > measurable gain, despite the additional conditionals we must > traverse befo

Re: [PATCH net-next v3 1/2] net/mlx5e: use indirect calls wrapper for skb allocation

2019-06-14 Thread Saeed Mahameed
On Wed, 2019-06-12 at 12:18 +0200, Paolo Abeni wrote: > We can avoid an indirect call per packet wrapping the skb creation > with the appropriate helper. > > Signed-off-by: Paolo Abeni Acked-by: Saeed Mahameed

Re: [net-next 12/12] i40e: mark expected switch fall-through

2019-06-14 Thread Sergei Shtylyov
On 06/14/2019 12:36 PM, Sergei Shtylyov wrote: >> From: "Gustavo A. R. Silva" >> >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. >> >> This patch fixes the following warning: >> >> drivers/net/ethernet/intel/i40e/i40e_xsk.c: In fu

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-14 Thread Cong Wang
On Tue, Jun 11, 2019 at 9:44 AM Marcelo Ricardo Leitner wrote: > I had suggested to let act_ct handle the above as well, as there is a > big chunk of code on both that is pretty similar. There is quite some > boilerplate for interfacing with conntrack which is duplicated. Why do you want to mix r

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-14 Thread Cong Wang
On Tue, Jun 11, 2019 at 7:05 AM Paul Blakey wrote: > > Allow sending a packet to conntrack and set conntrack zone, mark, > labels and nat parameters. > This is too short to justify why you want to play with L3 stuff in L2. Please be as specific as you can. Also, please document its use case too.

[no subject]

2019-06-14 Thread DR ALBERT ZONGO
-- Greetings, I have an intending proposal for you please i need you to contact my private E-mail (dralbertddzo...@gmail.com) for more updates, Best Wishes. DR ALBERT ZONGO --

  1   2   >