Re: [PATCH net-next] net/neigh: Extend dump filter to proxy neighbor dumps

2018-10-05 Thread David Miller
From: David Ahern Date: Wed, 3 Oct 2018 15:33:12 -0700 > From: David Ahern > > Move the attribute parsing from neigh_dump_table to neigh_dump_info, and > pass the filter arguments down to neigh_dump_table in a new struct. Add > the filter option to proxy neigh dumps as well to make them consis

Re: [PATCH net-next 20/20] net/bridge: Update br_mdb_dump for strict data checking

2018-10-05 Thread David Miller
From: David Ahern Date: Thu, 4 Oct 2018 14:33:55 -0700 > @@ -162,6 +162,28 @@ static int br_mdb_fill_info(struct sk_buff *skb, struct > netlink_callback *cb, > return err; > } > > +static int br_mdb_valid_dump_req(const struct nlmsghdr *nlh, > + struct netl

Re: [PATCH bpf-next v2 0/5] xsk: fix bug when trying to use both copy and zero-copy mode

2018-10-05 Thread Daniel Borkmann
On 10/01/2018 02:51 PM, Magnus Karlsson wrote: > Previously, the xsk code did not record which umem was bound to a > specific queue id. This was not required if all drivers were zero-copy > enabled as this had to be recorded in the driver anyway. So if a user > tried to bind two umems to the same q

Re: [Patch net-next] net_sched: convert idrinfo->lock from spinlock to a mutex

2018-10-05 Thread David Miller
From: Cong Wang Date: Tue, 2 Oct 2018 12:50:19 -0700 > In commit ec3ed293e766 ("net_sched: change tcf_del_walker() to take > idrinfo->lock") > we move fl_hw_destroy_tmplt() to a workqueue to avoid blocking > with the spinlock held. Unfortunately, this causes a lot of > troubles here: > > 1. tc

Re: [PATCH 1/3] bpf: allow zero-initializing hash map seed

2018-10-05 Thread Lorenz Bauer
On Tue, 2 Oct 2018 at 21:00, Jann Horn wrote: > > If this is for testing only, you can slap a capable(CAP_SYS_ADMIN) > check in here, right? I doubt it matters, but I don't really like > seeing something like this exposed to unprivileged userspace just > because you need it for kernel testing. Th

Re: [PATCH net] be2net: don't flip hw_features when VXLANs are added/deleted

2018-10-05 Thread David Miller
From: Davide Caratti Date: Wed, 3 Oct 2018 15:20:58 +0200 > the be2net implementation of .ndo_tunnel_{add,del}() changes the value of > NETIF_F_GSO_UDP_TUNNEL bit in 'features' and 'hw_features', but it forgets > to call netdev_features_change(). Moreover, ethtool setting for that bit > can pote

Re: [PATCH v2] net: phy: phylink: fix SFP interface autodetection

2018-10-05 Thread David Miller
From: Baruch Siach Date: Wed, 3 Oct 2018 19:04:49 +0300 > When connecting SFP PHY to phylink use the detected interface. > Otherwise, the link fails to come up when the configured 'phy-mode' > differs from the SFP detected mode. > > Move most of phylink_connect_phy() into __phylink_connect_phy(

[PATCH net-next] selftests: net: Clean up an unused variable

2018-10-05 Thread Jakub Sitnicki
Address compiler warning: ip_defrag.c: In function 'send_udp_frags': ip_defrag.c:206:16: warning: unused variable 'udphdr' [-Wunused-variable] struct udphdr udphdr; ^~ Signed-off-by: Jakub Sitnicki --- tools/testing/selftests/net/ip_defrag.c | 1 - 1 file changed, 1 deleti

Re: [PATCH iproute2 net-next v2 2/6] include: Add helper to retrieve a __s64 from a netlink msg

2018-10-05 Thread Ilias Apalodimas
On Thu, Oct 04, 2018 at 04:17:07PM -0700, Vinicius Costa Gomes wrote: > This allows signed 64-bit integers to be retrieved from a netlink > message. > --- > include/libnetlink.h | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/include/libnetlink.h b/include/libnetlink.h > index 9d9

question regarding Linux kernel handling of packets received that has src address of interface address

2018-10-05 Thread Mikael Abrahamsson
Hi, in the context of this IETF draft: https://tools.ietf.org/html/draft-patterson-intarea-ipoe-health-05 we're looking into being able to do internet access health check, by sending a packet to ourself via the upstream ISP router, to check if everything is still alive. Deployment scenari

[PATCH net-next] cxgb4: use FW_PORT_ACTION_L1_CFG32 for 32 bit capability

2018-10-05 Thread Ganesh Goudar
when 32 bit port capability is in use, use FW_PORT_ACTION_L1_CFG32 rather than FW_PORT_ACTION_L1_CFG. Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/ne

Re: question regarding Linux kernel handling of packets received that has src address of interface address

2018-10-05 Thread Ido Schimmel
On Fri, Oct 05, 2018 at 10:50:24AM +0200, Mikael Abrahamsson wrote: > So my question is where in the Linux kernel is this check performed that > disallows incoming packets that have src IP address the same as an interface > address? Can it be turned off? Is there a way to "hack around it", for > in

[PATCH bpf-next] xsk: proper AF_XDP socket teardown ordering

2018-10-05 Thread Björn Töpel
From: Björn Töpel The AF_XDP socket struct can exist in three different, implicit states: setup, bound and released. Setup is prior the socket has been bound to a device. Bound is when the socket is active for receive and send. Released is when the process/userspace side of the socket is released

Re: [PATCH v2 0/5] Introducing ixgbe AF_XDP ZC support

2018-10-05 Thread Björn Töpel
On 2018-10-05 06:59, Björn Töpel wrote: On 2018-10-04 23:18, Jesper Dangaard Brouer wrote: I see similar performance numbers, but my system can crash with 'txonly'. Thanks for finding this, Jesper! Can you give me your "lspci -vvv" dump of your NIC, so I know what ixgbe flavor you've got? I'

Re: question regarding Linux kernel handling of packets received that has src address of interface address

2018-10-05 Thread Mikael Abrahamsson
On Fri, 5 Oct 2018, Ido Schimmel wrote: Did you set 'accept_local' [1] ? I did not. Thanks for the pointer, looks like exactly what I was looking for! -- Mikael Abrahamssonemail: swm...@swm.pp.se

Re: [PATCH net-next 0/5] net: Consolidate metrics handling for ipv4 and ipv6

2018-10-05 Thread Eric Dumazet
On 10/04/2018 09:55 PM, David Miller wrote: > From: David Ahern > Date: Thu, 4 Oct 2018 20:07:50 -0700 > >> From: David Ahern >> >> As part of the IPv6 fib info refactoring, the intent was to make metrics >> handling for ipv6 identical to ipv4. One oversight in ip6_dst_destroy >> led to conf

Re: [PATCH net-next,v2] IPv6 ifstats separation

2018-10-05 Thread Stephen Suryaputra
On Thu, Oct 4, 2018 at 4:42 PM Eric Dumazet wrote: > > How have you decided some counters can be 'slow' and other 'fast' ? > > I can tell you I see many ultra-fast candidates in your 'slow' list :/ Based on what others have categorized based on what's in the code and IMHO they make sense: enum {

Re: [PATCH net-next 0/5] net: Consolidate metrics handling for ipv4 and ipv6

2018-10-05 Thread Eric Dumazet
On 10/05/2018 05:17 AM, Eric Dumazet wrote: > > > On 10/04/2018 09:55 PM, David Miller wrote: >> From: David Ahern >> Date: Thu, 4 Oct 2018 20:07:50 -0700 >> >>> From: David Ahern >>> >>> As part of the IPv6 fib info refactoring, the intent was to make metrics >>> handling for ipv6 identica

Re: [PATCH net-next,v2] IPv6 ifstats separation

2018-10-05 Thread Eric Dumazet
On 10/05/2018 06:00 AM, Stephen Suryaputra wrote: > On Thu, Oct 4, 2018 at 4:42 PM Eric Dumazet wrote: >> >> How have you decided some counters can be 'slow' and other 'fast' ? >> >> I can tell you I see many ultra-fast candidates in your 'slow' list :/ > > Based on what others have categorize

Re: [RFC PATCH] skb: Define NET_IP_ALIGN based on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS

2018-10-05 Thread Will Deacon
On Thu, Oct 04, 2018 at 07:43:59PM +0200, Ard Biesheuvel wrote: > (+ Arnd, Russell, Catalin, Will) > > On 4 October 2018 at 19:36, Ben Hutchings > wrote: > > NET_IP_ALIGN is supposed to be defined as 0 if DMA writes to an > > unaligned buffer would be more expensive than CPU access to unaligned

Re: [PATCH 2/2] netdev/phy: add MDIO bus multiplexer driven by a regmap

2018-10-05 Thread Andrew Lunn
> > > + ret = regmap_update_bits_check(s->regmap, > > > +s->mux_reg, > > > +s->mask, > > > +desired_child, > > > +&change); > > > > When getting the mask from DT, you use

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-05 Thread Paolo Abeni
Hi all, On Fri, 2018-09-14 at 13:59 -0400, Willem de Bruijn wrote: > This is a *very rough* draft. Mainly for discussion while we also > look at another partially overlapping approach [1]. I'm wondering how we go on from this ? I'm fine with either approaches. Also, I'm interested in [try to] en

Re: [PATCH 1/3] bpf: allow zero-initializing hash map seed

2018-10-05 Thread Jann Horn
On Fri, Oct 5, 2018 at 9:42 AM Lorenz Bauer wrote: > On Tue, 2 Oct 2018 at 21:00, Jann Horn wrote: > > > > If this is for testing only, you can slap a capable(CAP_SYS_ADMIN) > > check in here, right? I doubt it matters, but I don't really like > > seeing something like this exposed to unprivilege

Re: [PATCH 1/3] bpf: allow zero-initializing hash map seed

2018-10-05 Thread Lorenz Bauer
On Fri, 5 Oct 2018 at 15:12, Jann Horn wrote: > > On Fri, Oct 5, 2018 at 9:42 AM Lorenz Bauer wrote: > > On Tue, 2 Oct 2018 at 21:00, Jann Horn wrote: > > > > > > If this is for testing only, you can slap a capable(CAP_SYS_ADMIN) > > > check in here, right? I doubt it matters, but I don't really

Re: [PATCH 0/3] bpf: allow zero-initialising hash map seed

2018-10-05 Thread Lorenz Bauer
On Mon, 1 Oct 2018 at 20:12, Daniel Borkmann wrote: > > On 10/01/2018 12:45 PM, Lorenz Bauer wrote: > > This patch set adds a new flag BPF_F_ZERO_SEED, which allows > > forcing the seed used by hash maps to zero. This makes > > it possible to write deterministic tests. > > > > Based on an off-list

Re: [PATCH 1/3] bpf: allow zero-initializing hash map seed

2018-10-05 Thread Jann Horn
On Fri, Oct 5, 2018 at 4:21 PM Lorenz Bauer wrote: > On Fri, 5 Oct 2018 at 15:12, Jann Horn wrote: > > On Fri, Oct 5, 2018 at 9:42 AM Lorenz Bauer wrote: > > > On Tue, 2 Oct 2018 at 21:00, Jann Horn wrote: > > > > If this is for testing only, you can slap a capable(CAP_SYS_ADMIN) > > > > check

Re: [PATCH 0/3] bpf: allow zero-initialising hash map seed

2018-10-05 Thread Jann Horn
On Fri, Oct 5, 2018 at 4:27 PM Lorenz Bauer wrote: > > On Mon, 1 Oct 2018 at 20:12, Daniel Borkmann wrote: > > > > On 10/01/2018 12:45 PM, Lorenz Bauer wrote: > > > This patch set adds a new flag BPF_F_ZERO_SEED, which allows > > > forcing the seed used by hash maps to zero. This makes > > > it p

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-05 Thread Willem de Bruijn
On Fri, Oct 5, 2018 at 9:53 AM Paolo Abeni wrote: > > Hi all, > > On Fri, 2018-09-14 at 13:59 -0400, Willem de Bruijn wrote: > > This is a *very rough* draft. Mainly for discussion while we also > > look at another partially overlapping approach [1]. > > I'm wondering how we go on from this ? I'm

[PATCH net-next] net: dsa: mc88e6xxx: Fix 88E6141/6341 2500mbps SERDES speed

2018-10-05 Thread Marek Behún
The port_set_speed method for the Topaz family must not be the same as for Peridot family, since on Topaz port 5 is the SERDES port and it can be set to 2500mbps speed mode. This patch adds a new method for the Topaz family, allowing the alt_bit mode only for port 0 and the 2500 mbps mode for port

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-05 Thread Paolo Abeni
Hi, Thank you for the prompt reply! On Fri, 2018-10-05 at 10:41 -0400, Willem de Bruijn wrote: > On Fri, Oct 5, 2018 at 9:53 AM Paolo Abeni wrote: > > > > Hi all, > > > > On Fri, 2018-09-14 at 13:59 -0400, Willem de Bruijn wrote: > > > This is a *very rough* draft. Mainly for discussion while

[PATCH net-next] udp: gro behind static key

2018-10-05 Thread Willem de Bruijn
From: Willem de Bruijn Avoid the socket lookup cost in udp_gro_receive if no socket has a udp tunnel callback configured. udp_sk(sk)->gro_receive requires a registration with setup_udp_tunnel_sock, which enables the static key. Signed-off-by: Willem de Bruijn --- include/net/udp.h | 2 ++

Re: [PATCH net-next 0/5] net: Consolidate metrics handling for ipv4 and ipv6

2018-10-05 Thread David Ahern
On 10/5/18 7:08 AM, Eric Dumazet wrote: > Commit 767a2217533fed6 ("net: common metrics init helper for FIB entries") > is not correct because we need to better deal with error paths. > > I will submit this more formally when I can reach my workstation in a few > minutes : > > diff --git a/net/ip

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-05 Thread Willem de Bruijn
On Fri, Oct 5, 2018 at 11:30 AM Paolo Abeni wrote: > > Hi, > > Thank you for the prompt reply! > Not at all. Thanks for moving this forward :) > On Fri, 2018-10-05 at 10:41 -0400, Willem de Bruijn wrote: > > On Fri, Oct 5, 2018 at 9:53 AM Paolo Abeni wrote: > > > > > > Hi all, > > > > > > On Fr

Re: [PATCH net-next 20/20] net/bridge: Update br_mdb_dump for strict data checking

2018-10-05 Thread David Ahern
On 10/5/18 1:34 AM, David Miller wrote: > From: David Ahern > Date: Thu, 4 Oct 2018 14:33:55 -0700 > >> @@ -162,6 +162,28 @@ static int br_mdb_fill_info(struct sk_buff *skb, struct >> netlink_callback *cb, >> return err; >> } >> >> +static int br_mdb_valid_dump_req(const struct nlmsghdr

Re: [PATCH net-next] udp: gro behind static key

2018-10-05 Thread Paolo Abeni
On Fri, 2018-10-05 at 11:31 -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > Avoid the socket lookup cost in udp_gro_receive if no socket has a > udp tunnel callback configured. > > udp_sk(sk)->gro_receive requires a registration with > setup_udp_tunnel_sock, which enables the static

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-05 Thread Paolo Abeni
On Fri, 2018-10-05 at 11:45 -0400, Willem de Bruijn wrote: > On Fri, Oct 5, 2018 at 11:30 AM Paolo Abeni wrote: > > Would love that. We need to care of key decr, too (and possibly don't > > be fooled by encap_rcv() users). > > I just sent http://patchwork.ozlabs.org/patch/979525/ > > Right now

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-05 Thread Willem de Bruijn
On Fri, Oct 5, 2018 at 12:05 PM Paolo Abeni wrote: > > On Fri, 2018-10-05 at 11:45 -0400, Willem de Bruijn wrote: > > On Fri, Oct 5, 2018 at 11:30 AM Paolo Abeni wrote: > > > Would love that. We need to care of key decr, too (and possibly don't > > > be fooled by encap_rcv() users). > > > > I jus

[PATCH net] ipv6: do not leave garbage in rt->fib6_metrics

2018-10-05 Thread Eric Dumazet
In case ip_fib_metrics_init() returns an error, we better rewrite rt->fib6_metrics with &dst_default_metrics so that we do not crash later in ip_fib_metrics_put() Fixes: 767a2217533f ("net: common metrics init helper for FIB entries") Signed-off-by: Eric Dumazet Reported-by: syzbot --- net/ipv6

Re: [PATCH net] ipv6: do not leave garbage in rt->fib6_metrics

2018-10-05 Thread David Ahern
On 10/5/18 10:17 AM, Eric Dumazet wrote: > In case ip_fib_metrics_init() returns an error, we better > rewrite rt->fib6_metrics with &dst_default_metrics so that > we do not crash later in ip_fib_metrics_put() > > Fixes: 767a2217533f ("net: common metrics init helper for FIB entries") > Signed-off

Re: [PATCH net] ipv6: do not leave garbage in rt->fib6_metrics

2018-10-05 Thread Eric Dumazet
On Fri, Oct 5, 2018 at 9:29 AM David Ahern wrote: > > On 10/5/18 10:17 AM, Eric Dumazet wrote: > > In case ip_fib_metrics_init() returns an error, we better > > rewrite rt->fib6_metrics with &dst_default_metrics so that > > we do not crash later in ip_fib_metrics_put() > > > > Fixes: 767a2217533f

Re: [PATCH bpf-next] xsk: proper AF_XDP socket teardown ordering

2018-10-05 Thread Song Liu
On Fri, Oct 5, 2018 at 4:28 AM Björn Töpel wrote: > > From: Björn Töpel > > The AF_XDP socket struct can exist in three different, implicit > states: setup, bound and released. Setup is prior the socket has been > bound to a device. Bound is when the socket is active for receive and > send. Relea

RE: [RFC PATCH] skb: Define NET_IP_ALIGN based on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS

2018-10-05 Thread David Laight
From: Ben Hutchings > Sent: 04 October 2018 18:37 > > NET_IP_ALIGN is supposed to be defined as 0 if DMA writes to an > unaligned buffer would be more expensive than CPU access to unaligned > header fields, and otherwise defined as 2. > > Currently only ppc64 and x86 configurations define it to b

[PATCH net-next] fib_tests: Add tests for invalid metric on route

2018-10-05 Thread David Ahern
From: David Ahern Add ipv4 and ipv6 test cases with an invalid metrics option causing ip_metrics_convert to fail. Tests clean up path during route add. Also, add nodad to to ipv6 address add. When running ipv6_route_metrics directly seeing an occasional failure on the "Using route with mtu metri

Re: [PATCH iproute2 net-next v2 2/6] include: Add helper to retrieve a __s64 from a netlink msg

2018-10-05 Thread Vinicius Costa Gomes
Hi Ilias, Ilias Apalodimas writes: > On Thu, Oct 04, 2018 at 04:17:07PM -0700, Vinicius Costa Gomes wrote: >> This allows signed 64-bit integers to be retrieved from a netlink >> message. >> --- >> include/libnetlink.h | 7 +++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/include/

Re: [PATCH net-next 20/20] net/bridge: Update br_mdb_dump for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:55PM -0700, David Ahern wrote: > From: David Ahern > > Update br_mdb_dump for strict data checking. If the flag is set, > the dump request is expected to have a br_port_msg struct as the > header. All elements of the struct are expected to be 0 and no > attributes ca

Re: [PATCH v3] net/ncsi: Add NCSI OEM command support

2018-10-05 Thread Vijay Khemka
On 10/4/18, 9:48 PM, "Samuel Mendoza-Jonas" wrote: On Wed, 2018-10-03 at 16:32 -0700, Vijay Khemka wrote: > This patch adds OEM commands and response handling. It also defines OEM > command and response structure as per NCSI specification along with its > handlers. > >

Re: [PATCH net-next] cxgb4: use FW_PORT_ACTION_L1_CFG32 for 32 bit capability

2018-10-05 Thread David Miller
From: Ganesh Goudar Date: Fri, 5 Oct 2018 15:04:45 +0530 > when 32 bit port capability is in use, use FW_PORT_ACTION_L1_CFG32 > rather than FW_PORT_ACTION_L1_CFG. > > Signed-off-by: Casey Leedom > Signed-off-by: Ganesh Goudar Applied.

Re: [PATCH net-next 05/20] netlink: Add new socket option to enable strict checking on dumps

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:40PM -0700, David Ahern wrote: > From: David Ahern > > Add a new socket option, NETLINK_DUMP_STRICT_CHK, that userspace > can use via setsockopt to request strict checking of headers and > attributes on dump requests. > > To get dump features such as kernel side fil

Re: [PATCH net-next 03/20] net: Add extack to nlmsg_parse

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:38PM -0700, David Ahern wrote: > From: David Ahern > > Make sure extack is passed to nlmsg_parse where easy to do so. > Most of these are dump handlers and leveraging the extack in > the netlink_callback. > > Signed-off-by: David Ahern Yeah, having extack in dump

Re: [PATCH net-next 02/19] net: usb: aqc111: Add bind and empty unbind callbacks

2018-10-05 Thread David Miller
From: Igor Russkikh Date: Fri, 5 Oct 2018 10:24:42 + > +static int aqc111_bind(struct usbnet *dev, struct usb_interface *intf) > +{ > + int ret; > + struct usb_device *udev = interface_to_usbdev(intf); Please always order local variable declarations from longest to shortest line (rev

Re: [PATCH net-next 01/20] netlink: Pass extack to dump handlers

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:36PM -0700, David Ahern wrote: > From: David Ahern > > Declare extack in netlink_dump and pass to dump handlers via > netlink_callback. Add any extack message after the dump_done_errno > allowing error messages to be returned. This will be useful when > strict checki

Re: [PATCH net-next 02/20] netlink: Add extack message to nlmsg_parse for invalid header length

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:37PM -0700, David Ahern wrote: > From: David Ahern > > Give a user a reason why EINVAL is returned in nlmsg_parse. > > Signed-off-by: David Ahern Acked-by: Christian Brauner > --- > include/net/netlink.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-

Re: [PATCH net-next 16/20] net/namespace: Update rtnl_net_dumpid for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:51PM -0700, David Ahern wrote: > From: David Ahern > > Update rtnl_net_dumpid for strict data checking. If the flag is set, > the dump request is expected to have an rtgenmsg struct as the header > which has the family as the only element. No data may be appended. >

Re: [PATCH] bpf: 32-bit RSH verification must truncate input before the ALU op

2018-10-05 Thread Edward Cree
On 05/10/18 17:17, Jann Horn wrote: > When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I > assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it > is sufficient to just truncate the output to 32 bits; and so I just moved > the register size coercion that

pull-request: bpf 2018-10-05

2018-10-05 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix to truncate input on ALU operations in 32 bit mode, from Jann. 2) Fixes for cgroup local storage to reject reserved flags on element update and rejection of map allocation with zero-si

Re: [PATCH net-next 11/20] rtnetlink: Update inet6_dump_ifinfo for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:46PM -0700, David Ahern wrote: > From: David Ahern > > Update inet6_dump_ifinfo for strict data checking. If the flag is > set, the dump request is expected to have an ifinfomsg struct as > the header. All elements of the struct are expected to be 0 and no > attribut

Re: [PATCH net-next 11/20] rtnetlink: Update inet6_dump_ifinfo for strict data checking

2018-10-05 Thread Christian Brauner
On Fri, Oct 05, 2018 at 07:48:27PM +0200, Christian Brauner wrote: > On Thu, Oct 04, 2018 at 02:33:46PM -0700, David Ahern wrote: > > From: David Ahern > > > > Update inet6_dump_ifinfo for strict data checking. If the flag is > > set, the dump request is expected to have an ifinfomsg struct as >

Re: [PATCH net-next 0/5] net: Consolidate metrics handling for ipv4 and ipv6

2018-10-05 Thread David Miller
From: Eric Dumazet Date: Fri, 5 Oct 2018 06:08:57 -0700 > For some reason I have not received the patch series in my inbox, I > only got your "series applied" message. I see what happened. I did something stupid on vger.kernel.org yesterday which ran a partition out of disk space, and some post

Re: [PATCH net-next 07/20] net/ipv6: Update inet6_dump_addr for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:42PM -0700, David Ahern wrote: > From: David Ahern > > Update inet6_dump_addr for strict data checking. If the flag is set, the > dump request is expected to have an ifaddrmsg struct as the header > potentially followed by one or more attributes. Any data passed in t

Re: [PATCH net-next 11/20] rtnetlink: Update inet6_dump_ifinfo for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:46PM -0700, David Ahern wrote: > From: David Ahern > > Update inet6_dump_ifinfo for strict data checking. If the flag is > set, the dump request is expected to have an ifinfomsg struct as > the header. All elements of the struct are expected to be 0 and no > attribut

Re: pull-request: bpf 2018-10-05

2018-10-05 Thread David Miller
From: Daniel Borkmann Date: Fri, 5 Oct 2018 19:47:13 +0200 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) Fix to truncate input on ALU operations in 32 bit mode, from Jann. > > 2) Fixes for cgroup local storage to reject reserved flags

Re: [PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:43PM -0700, David Ahern wrote: > From: David Ahern > > Update rtnl_dump_ifinfo for strict data checking. If the flag is set, > the dump request is expected to have an ifinfomsg struct as the header > potentially followed by one or more attributes. Any data passed in

Re: [PATCH net-next 06/20] net/ipv4: Update inet_dump_ifaddr for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:41PM -0700, David Ahern wrote: > From: David Ahern > > Update inet_dump_ifaddr for strict data checking. If the flag is set, > the dump request is expected to have an ifaddrmsg struct as the header > potentially followed by one or more attributes. Any data passed in

[PATCH ipsec-next] Clear secpath on loopback_xmit

2018-10-05 Thread Benedict Wong
This patch clears the skb->sp when transmitted over loopback. This ensures that the loopback-ed packet does not have any secpath information from the outbound transforms. At present, this causes XFRM tunnel mode packets to be dropped with XFRMINNOPOLS, due to the outbound state being in the secpat

Re: [PATCH bpf-next 0/6] Error handling when map lookup isn't supported

2018-10-05 Thread Alexei Starovoitov
On Fri, Oct 05, 2018 at 12:35:55PM +0900, Prashant Bhole wrote: > Currently when map a lookup fails, user space API can not make any > distinction whether given key was not found or lookup is not supported > by particular map. > > In this series we modify return value of maps which do not support

Re: [RFC PATCH bpf-next v4 4/7] bpf: add bpf queue and stack maps

2018-10-05 Thread Alexei Starovoitov
On Thu, Oct 04, 2018 at 10:40:55PM -0500, Mauricio Vasquez wrote: > > > > + /* Round up queue size to nearest power of 2 */ > > > + max_entries = index_mask + 1; > > what's the point of roundup ? > > If the size of the buffer is power of two we can wrap the indexes with an > AND operation instead

Re: [PATCH net-next 03/20] net: Add extack to nlmsg_parse

2018-10-05 Thread David Ahern
On 10/5/18 11:39 AM, Christian Brauner wrote: > On Thu, Oct 04, 2018 at 02:33:38PM -0700, David Ahern wrote: >> From: David Ahern >> >> Make sure extack is passed to nlmsg_parse where easy to do so. >> Most of these are dump handlers and leveraging the extack in >> the netlink_callback. >> >> Sign

Re: [PATCH net-next 05/20] netlink: Add new socket option to enable strict checking on dumps

2018-10-05 Thread David Ahern
On 10/5/18 11:36 AM, Christian Brauner wrote: >> diff --git a/include/linux/netlink.h b/include/linux/netlink.h >> index 88c8a2d83eb3..36bdca2aa42d 100644 >> --- a/include/linux/netlink.h >> +++ b/include/linux/netlink.h >> @@ -179,6 +179,8 @@ struct netlink_callback { >> struct netlink_ext_ac

Re: [PATCH bpf-next] bpf: emit audit messages upon successful prog load and unload

2018-10-05 Thread Alexei Starovoitov
On Fri, Oct 05, 2018 at 08:14:09AM +0200, Jiri Olsa wrote: > On Thu, Oct 04, 2018 at 03:10:15PM -0700, Alexei Starovoitov wrote: > > On Thu, Oct 04, 2018 at 10:22:31PM +0200, Jesper Dangaard Brouer wrote: > > > On Thu, 4 Oct 2018 21:41:17 +0200 Daniel Borkmann > > > wrote: > > > > > > > On 10/04

Re: [PATCH net-next 05/20] netlink: Add new socket option to enable strict checking on dumps

2018-10-05 Thread Christian Brauner
On October 5, 2018 8:43:55 PM GMT+02:00, David Ahern wrote: >On 10/5/18 11:36 AM, Christian Brauner wrote: >>> diff --git a/include/linux/netlink.h b/include/linux/netlink.h >>> index 88c8a2d83eb3..36bdca2aa42d 100644 >>> --- a/include/linux/netlink.h >>> +++ b/include/linux/netlink.h >>> @@ -179,

Re: [PATCH net-next 06/20] net/ipv4: Update inet_dump_ifaddr for strict data checking

2018-10-05 Thread David Ahern
On 10/5/18 12:02 PM, Christian Brauner wrote: >> + >> +err = nlmsg_parse(nlh, sizeof(struct ifaddrmsg), tb, IFA_MAX, >> + ifa_ipv4_policy, extack); >> +if (err < 0) >> +return err; >> >> -tgt_net = rtnl_g

Re: [PATCH net-next] udp: gro behind static key

2018-10-05 Thread David Miller
From: Willem de Bruijn Date: Fri, 5 Oct 2018 11:31:40 -0400 > From: Willem de Bruijn > > Avoid the socket lookup cost in udp_gro_receive if no socket has a > udp tunnel callback configured. > > udp_sk(sk)->gro_receive requires a registration with > setup_udp_tunnel_sock, which enables the sta

Re: [PATCH net] ipv6: do not leave garbage in rt->fib6_metrics

2018-10-05 Thread David Miller
From: Eric Dumazet Date: Fri, 5 Oct 2018 09:17:50 -0700 > In case ip_fib_metrics_init() returns an error, we better > rewrite rt->fib6_metrics with &dst_default_metrics so that > we do not crash later in ip_fib_metrics_put() > > Fixes: 767a2217533f ("net: common metrics init helper for FIB entr

Re: [PATCH net-next] fib_tests: Add tests for invalid metric on route

2018-10-05 Thread David Miller
From: David Ahern Date: Fri, 5 Oct 2018 10:01:19 -0700 > From: David Ahern > > Add ipv4 and ipv6 test cases with an invalid metrics option causing > ip_metrics_convert to fail. Tests clean up path during route add. > > Also, add nodad to to ipv6 address add. When running ipv6_route_metrics >

Re: [PATCH net] ipv6: do not leave garbage in rt->fib6_metrics

2018-10-05 Thread Eric Dumazet
On Fri, Oct 5, 2018 at 11:57 AM David Miller wrote: > Applied to net-next, thanks Eric. > > Subject should have said net-next instead of net btw. Oops, sorry for that, I used the wrong script. Thanks.

Re: [PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-05 Thread David Ahern
On 10/5/18 11:59 AM, Christian Brauner wrote: >> +err = nlmsg_parse(nlh, hdrlen, tb, IFLA_MAX, ifla_policy, extack); >> +if (err < 0) { >> +if (cb->strict_check) >> +return -EINVAL; >> +goto walk_entries; >> +} >> >> -if (master_

Re: [PATCH net-next 11/20] rtnetlink: Update inet6_dump_ifinfo for strict data checking

2018-10-05 Thread David Ahern
On 10/5/18 11:48 AM, Christian Brauner wrote: > On Thu, Oct 04, 2018 at 02:33:46PM -0700, David Ahern wrote: >> From: David Ahern >> >> Update inet6_dump_ifinfo for strict data checking. If the flag is >> set, the dump request is expected to have an ifinfomsg struct as >> the header. All elements

Re: [PATCH net-next 11/20] rtnetlink: Update inet6_dump_ifinfo for strict data checking

2018-10-05 Thread David Ahern
On 10/5/18 11:54 AM, Christian Brauner wrote: >> +static int inet6_valid_dump_ifinfo(const struct nlmsghdr *nlh, >> + struct netlink_ext_ack *extack) >> +{ >> +struct ifinfomsg *ifm; >> + >> +if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ifm))) { >> +

Re: [PATCH bpf-next] bpf: emit audit messages upon successful prog load and unload

2018-10-05 Thread Arnaldo Carvalho de Melo
Em Fri, Oct 05, 2018 at 11:44:35AM -0700, Alexei Starovoitov escreveu: > On Fri, Oct 05, 2018 at 08:14:09AM +0200, Jiri Olsa wrote: > > On Thu, Oct 04, 2018 at 03:10:15PM -0700, Alexei Starovoitov wrote: > > > On Thu, Oct 04, 2018 at 10:22:31PM +0200, Jesper Dangaard Brouer wrote: > > > > My use-ca

Re: [PATCH iproute2-next] libnetlink: Use NLMSG_LENGTH to set nlmsg_len

2018-10-05 Thread David Ahern
On 10/4/18 3:37 PM, David Ahern wrote: > From: David Ahern > > Some of the inner headers are not 4-byte aligned, so use > NLMSG_LENGTH instead of sizeof(req) to set nlmsg_len. > this patch is wrong; headers are supposed to be 4-bytes aligned.

Re: [PATCH bpf-next] bpf: emit audit messages upon successful prog load and unload

2018-10-05 Thread Alexei Starovoitov
On Fri, Oct 05, 2018 at 04:42:49PM -0300, Arnaldo Carvalho de Melo wrote: > > Is there a way for us to synthesize those prog load/unload for > preexisting loaded bpf objects? see 'bpftool prog show'. get_next_id + get_fd_by_id solve it race free.

Re: [PATCH 1/3] bpf: allow zero-initializing hash map seed

2018-10-05 Thread Alexei Starovoitov
On Fri, Oct 05, 2018 at 04:27:58PM +0200, Jann Horn wrote: > > Can you please describe exactly why something that is not a kernel > unit test needs deterministic BPF hash map behavior? my use case for deterministic hashing is performance analysis. Both while developing and tuning bpf program and

Re: [PATCH net-next 00/20] rtnetlink: Add support for rigid checking of data in dump request

2018-10-05 Thread David Ahern
On 10/4/18 3:33 PM, David Ahern wrote: > From: David Ahern ... > This patch set addresses the problem by adding a new socket flag, > NETLINK_DUMP_STRICT_CHK, that userspace can use with setsockopt to > request strict checking of headers and attributes on dump requests and > hence unlock the abil

Re: [PATCH net-next] net: dsa: mc88e6xxx: Fix 88E6141/6341 2500mbps SERDES speed

2018-10-05 Thread Andrew Lunn
On Fri, Oct 05, 2018 at 04:42:27PM +0200, Marek Behún wrote: > The port_set_speed method for the Topaz family must not be the same > as for Peridot family, since on Topaz port 5 is the SERDES port and it > can be set to 2500mbps speed mode. > > This patch adds a new method for the Topaz family, al

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Miller
From: Mauricio Faria de Oliveira Date: Mon, 1 Oct 2018 22:50:32 -0300 > On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira > wrote: >> Ok, thanks for your suggestions. >> I'll do some research/learning on them, and give it a try for a v2. > > FYI, that is "[PATCH v2 net-next] rtnetlink:

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Ahern
On 10/5/18 3:22 PM, David Miller wrote: > From: Mauricio Faria de Oliveira > Date: Mon, 1 Oct 2018 22:50:32 -0300 > >> On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira >> wrote: >>> Ok, thanks for your suggestions. >>> I'll do some research/learning on them, and give it a try for a v2.

Re: [PATCH net] net: sched: Add policy validation for tc attributes

2018-10-05 Thread David Miller
From: David Ahern Date: Wed, 3 Oct 2018 15:05:36 -0700 > From: David Ahern > > A number of TC attributes are processed without proper validation > (e.g., length checks). Add a tca policy for all input attributes and use > when invoking nlmsg_parse. > > The 2 Fixes tags below cover the latest

Re: [PATCH net-next] socket: Tighten no-error check in bind()

2018-10-05 Thread David Miller
From: Jakub Sitnicki Date: Thu, 4 Oct 2018 11:09:40 +0200 > move_addr_to_kernel() returns only negative values on error, or zero on > success. Rewrite the error check to an idiomatic form to avoid confusing > the reader. > > Signed-off-by: Jakub Sitnicki Applied.

Re: [PATCH net-next v3 0/9] vrf: allow simultaneous service instances in default and other VRFs

2018-10-05 Thread David Miller
David, please review this series. Thanks.

Re: [PATCH v2] typo fix in Documentation/networking/af_xdp.rst

2018-10-05 Thread Konrad Djimeli
On 2018-10-04 19:38, Björn Töpel wrote: > Den tors 4 okt. 2018 kl 19:03 skrev Konrad Djimeli : >> >> Fix a simple typo: Completetion -> Completion >> >> Signed-off-by: Konrad Djimeli >> --- >> Changes in v2: >> - Update line below to be same length as text above >> >> Documentation/networking/af_

Re: [PATCH net] ipv6: take rcu lock in rawv6_send_hdrinc()

2018-10-05 Thread David Miller
From: Wei Wang Date: Thu, 4 Oct 2018 10:12:37 -0700 > From: Wei Wang > > In rawv6_send_hdrinc(), in order to avoid an extra dst_hold(), we > directly assign the dst to skb and set passed in dst to NULL to avoid > double free. > However, in error case, we free skb and then do stats update with

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread Mauricio Faria de Oliveira
On Fri, Oct 5, 2018 at 6:24 PM David Ahern wrote: > > On 10/5/18 3:22 PM, David Miller wrote: > > From: Mauricio Faria de Oliveira > > Date: Mon, 1 Oct 2018 22:50:32 -0300 > > > >> On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira > >> wrote: > >>> Ok, thanks for your suggestions. > >>>

Re: [PATCH v6 04/15] octeontx2-af: Add mailbox support infra

2018-10-05 Thread David Miller
From: sunil.kovv...@gmail.com Date: Thu, 4 Oct 2018 23:51:47 +0530 > +int otx2_mbox_init(struct otx2_mbox *mbox, void *hwbase, struct pci_dev > *pdev, > +void *reg_base, int direction, int ndevs) > +{ > + int devid; > + struct otx2_mbox_dev *mdev; Please order local vari

Re: [PATCH net-next] selftests: net: Clean up an unused variable

2018-10-05 Thread David Miller
From: Jakub Sitnicki Date: Fri, 5 Oct 2018 10:19:57 +0200 > Address compiler warning: > > ip_defrag.c: In function 'send_udp_frags': > ip_defrag.c:206:16: warning: unused variable 'udphdr' [-Wunused-variable] > struct udphdr udphdr; > ^~ > > Signed-off-by: Jakub Sitnicki

Re: [PATCH net-next 00/20] rtnetlink: Add support for rigid checking of data in dump request

2018-10-05 Thread David Miller
From: David Ahern Date: Fri, 5 Oct 2018 15:18:11 -0600 > One thing I missed in the rfc and v1 versions is strict attribute > parsing -- ie., there should be nothing remaining after nla_parse is > done. I have a new patch that adds an nlmsg_parse_strict and > nla_parse_strict that returns -EINVAL

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Miller
From: David Ahern Date: Fri, 5 Oct 2018 15:24:29 -0600 > On 10/5/18 3:22 PM, David Miller wrote: >> From: Mauricio Faria de Oliveira >> Date: Mon, 1 Oct 2018 22:50:32 -0300 >> >>> On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira >>> wrote: Ok, thanks for your suggestions. I

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Miller
From: Mauricio Faria de Oliveira Date: Fri, 5 Oct 2018 18:46:47 -0300 > On Fri, Oct 5, 2018 at 6:24 PM David Ahern wrote: >> >> On 10/5/18 3:22 PM, David Miller wrote: >> > From: Mauricio Faria de Oliveira >> > Date: Mon, 1 Oct 2018 22:50:32 -0300 >> > >> >> On Mon, Oct 1, 2018 at 12:38 PM Maur

Re: [PATCH bpf-next] bpf: emit audit messages upon successful prog load and unload

2018-10-05 Thread Jiri Olsa
On Fri, Oct 05, 2018 at 11:44:35AM -0700, Alexei Starovoitov wrote: > On Fri, Oct 05, 2018 at 08:14:09AM +0200, Jiri Olsa wrote: > > On Thu, Oct 04, 2018 at 03:10:15PM -0700, Alexei Starovoitov wrote: > > > On Thu, Oct 04, 2018 at 10:22:31PM +0200, Jesper Dangaard Brouer wrote: > > > > On Thu, 4 Oc

Re: [PATCH bpf-next 1/6] bpf: introduce BPF_PROG_TYPE_FILE_FILTER

2018-10-05 Thread Alexei Starovoitov
On Fri, Oct 05, 2018 at 05:46:59AM +0100, Al Viro wrote: > On Wed, Oct 03, 2018 at 07:57:45PM -0700, Alexei Starovoitov wrote: > > > @@ -15,6 +15,7 @@ > > #include > > #include > > #include > > +#include <../fs/mount.h> > > No. I've considered splitting cgroup_file_filter_ctx_access() int

[PATCH iproute2 net-next v3 6/6] taprio: Add manpage for tc-taprio(8)

2018-10-05 Thread Vinicius Costa Gomes
This documents the parameters and provides an example of usage. Signed-off-by: Vinicius Costa Gomes --- man/man8/tc-taprio.8 | 142 +++ 1 file changed, 142 insertions(+) create mode 100644 man/man8/tc-taprio.8 diff --git a/man/man8/tc-taprio.8 b/man/man8

  1   2   >