Re: [PATCH bpf-next v5 1/3] devmap/cpumap: Use flush list instead of bitmap

2019-06-28 Thread Toke Høiland-Jørgensen
Daniel Borkmann writes: > On 06/23/2019 04:17 AM, Toke Høiland-Jørgensen wrote: >> From: Toke Høiland-Jørgensen >> >> The socket map uses a linked list instead of a bitmap to keep track of >> which entries to flush. Do the same for devmap and cpumap, as this means we >> don't have to care about

Re: XDP multi-buffer incl. jumbo-frames (Was: [RFC V1 net-next 1/1] net: ena: implement XDP drop support)

2019-06-28 Thread Eelco Chaudron
On 26 Jun 2019, at 10:38, Jesper Dangaard Brouer wrote: On Tue, 25 Jun 2019 03:19:22 + "Machulsky, Zorik" wrote: 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 l

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

2019-06-28 Thread Toke Høiland-Jørgensen
Daniel Borkmann writes: > On 06/23/2019 04:17 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 progra

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

2019-06-28 Thread Daniel Santos
Hello Andrew, On 6/27/19 2:28 PM, Andrew Lunn wrote: >>> Looking at the data sheet page, you want FORCE_MODE_Pn set. You never >>> want the MAC directly talking to the PHY. Bad things will happen. >> So what exactly do you mean by the MAC directly talking to the PHY?  Do >> you mean setting speed,

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

2019-06-28 Thread Toke Høiland-Jørgensen
Daniel Borkmann writes: > On 06/23/2019 04:17 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 progra

Re: [RFC] longer netdev names proposal

2019-06-28 Thread Jiri Pirko
Thu, Jun 27, 2019 at 07:14:31PM CEST, dsah...@gmail.com wrote: >On 6/27/19 3:43 AM, Jiri Pirko wrote: >> Hi all. >> >> In the past, there was repeatedly discussed the IFNAMSIZ (16) limit for >> netdevice name length. Now when we have PF and VF representors >> with port names like "pfXvfY", it beca

[PATCH net-next v2 10/10] net: stmmac: Update Kconfig entry

2019-06-28 Thread Jose Abreu
We support more speeds now. Update the Kconfig entry. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ether

Re: [RFC] longer netdev names proposal

2019-06-28 Thread Jiri Pirko
Thu, Jun 27, 2019 at 09:35:27PM CEST, d...@redhat.com wrote: >On Thu, 2019-06-27 at 12:20 -0700, Stephen Hemminger wrote: >> On Thu, 27 Jun 2019 20:39:48 +0200 >> Michal Kubecek wrote: >> >> > > $ ip li set dev enp3s0 alias "Onboard Ethernet" >> > > # ip link show "Onboard Ethernet" >> > > Device

Re: XDP multi-buffer incl. jumbo-frames (Was: [RFC V1 net-next 1/1] net: ena: implement XDP drop support)

2019-06-28 Thread Toke Høiland-Jørgensen
"Eelco Chaudron" writes: > On 26 Jun 2019, at 10:38, Jesper Dangaard Brouer wrote: > >> On Tue, 25 Jun 2019 03:19:22 + >> "Machulsky, Zorik" wrote: >> >>> On 6/23/19, 7:21 AM, "Jesper Dangaard Brouer" >>> wrote: >>> >>> On Sun, 23 Jun 2019 10:06:49 +0300 wrote: >>> >>> > This com

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

2019-06-28 Thread Daniel Borkmann
On 06/28/2019 09:17 AM, Toke Høiland-Jørgensen wrote: > Daniel Borkmann writes: > >> On 06/23/2019 04:17 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

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

2019-06-28 Thread Toke Høiland-Jørgensen
Daniel Borkmann writes: > On 06/28/2019 09:17 AM, Toke Høiland-Jørgensen wrote: >> Daniel Borkmann writes: >> >>> On 06/23/2019 04:17 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 indicat

Re: XDP multi-buffer incl. jumbo-frames (Was: [RFC V1 net-next 1/1] net: ena: implement XDP drop support)

2019-06-28 Thread Jesper Dangaard Brouer
On Fri, 28 Jun 2019 09:14:39 +0200 "Eelco Chaudron" wrote: > On 26 Jun 2019, at 10:38, Jesper Dangaard Brouer wrote: > > > On Tue, 25 Jun 2019 03:19:22 + > > "Machulsky, Zorik" wrote: > > > >> On 6/23/19, 7:21 AM, "Jesper Dangaard Brouer" > >> wrote: > >> > >> On Sun, 23 Jun 2019 1

Re: XDP multi-buffer incl. jumbo-frames (Was: [RFC V1 net-next 1/1] net: ena: implement XDP drop support)

2019-06-28 Thread Jesper Dangaard Brouer
On Wed, 26 Jun 2019 11:20:45 -0400 Willem de Bruijn wrote: > On Wed, Jun 26, 2019 at 11:01 AM Toke Høiland-Jørgensen > wrote: > > Jesper Dangaard Brouer writes: > > > On Wed, 26 Jun 2019 13:52:16 +0200 > > > Toke Høiland-Jørgensen wrote: > > > > > >> Jesper Dangaard Brouer writes: > > >>

Re: [PATCH net-next 10/16] qlge: Factor out duplicated expression

2019-06-28 Thread Benjamin Poirier
On 2019/06/25 18:32, Manish Chopra wrote: [...] > > > > What I inferred from the presence of that expression though is that in the > > places where it is used, the device interprets a value of 0 as 65536. > > Manish, > > can you confirm that? As David points out, the expression is useless. A > >

Re: [PATCH iproute2-next v3 1/2] ipaddress: correctly print a VF hw address in the IPoIB case

2019-06-28 Thread Denis Kirjanov
On 6/24/19, David Ahern wrote: > On 6/22/19 12:00 PM, Denis Kirjanov wrote: >> @@ -365,13 +367,45 @@ static void print_vfinfo(FILE *fp, struct rtattr >> *vfinfo) >> parse_rtattr_nested(vf, IFLA_VF_MAX, vfinfo); >> >> vf_mac = RTA_DATA(vf[IFLA_VF_MAC]); >> +vf_broadcast = RTA_DATA(vf[

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

2019-06-28 Thread Toke Høiland-Jørgensen
Toke Høiland-Jørgensen writes: > Daniel Borkmann writes: > >> On 06/28/2019 09:17 AM, Toke Høiland-Jørgensen wrote: >>> Daniel Borkmann writes: >>> On 06/23/2019 04:17 AM, Toke Høiland-Jørgensen wrote: > From: Toke Høiland-Jørgensen > > The bpf_redirect_map() helper used by X

Re: [EXT] [PATCH net-next 03/16] qlge: Deduplicate lbq_buf_size

2019-06-28 Thread Benjamin Poirier
On 2019/06/26 11:42, Willem de Bruijn wrote: > On Wed, Jun 26, 2019 at 7:37 AM Benjamin Poirier wrote: > > > > On 2019/06/26 09:24, Manish Chopra wrote: > > > > -Original Message- > > > > From: Benjamin Poirier > > > > Sent: Monday, June 17, 2019 1:19 PM > > > > To: Manish Chopra ; GR-Lin

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-06-28 Thread Lorenz Bauer
On Thu, 27 Jun 2019 at 21:19, Song Liu wrote: > > This patch introduce unprivileged BPF access. The access control is > achieved via device /dev/bpf. Users with write access to /dev/bpf are able > to call sys_bpf(). > > Two ioctl command are added to /dev/bpf: > > The two commands enable/disable p

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-06-28 Thread Lorenz Bauer
On Fri, 28 Jun 2019 at 00:40, Andy Lutomirski wrote: > > I have a bigger issue with this patch, though: it's a really awkward way > to pretend to have capabilities. For bpf, it seems like you could make > this be a *real* capability without too much pain since there's only one > syscall there. J

[PATCH bpf-next v6 4/5] bpf_xdp_redirect_map: Perform map lookup in eBPF helper

2019-06-28 Thread Toke Høiland-Jørgensen
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 themselves, leading to programs using duplicate maps to track which entries

[PATCH bpf-next v6 2/5] devmap/cpumap: Use flush list instead of bitmap

2019-06-28 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen The socket map uses a linked list instead of a bitmap to keep track of which entries to flush. Do the same for devmap and cpumap, as this means we don't have to care about the map index when enqueueing things into the map (and so we can cache the map lookup). Signed-

[PATCH bpf-next v6 0/5] xdp: Allow lookup into devmaps before redirect

2019-06-28 Thread Toke Høiland-Jørgensen
When using the bpf_redirect_map() helper to redirect packets from XDP, the eBPF program cannot currently know whether the redirect will succeed, which makes it impossible to gracefully handle errors. To properly fix this will probably require deeper changes to the way TX resources are allocated, bu

[PATCH bpf-next v6 1/5] xskmap: Move non-standard list manipulation to helper

2019-06-28 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen Add a helper in list.h for the non-standard way of clearing a list that is used in xskmap. This makes it easier to reuse it in the other map types, and also makes sure this usage is not forgotten in any list refactorings in the future. Signed-off-by: Toke Høiland-Jør

[PATCH bpf-next v6 3/5] devmap: Rename ifindex member in bpf_redirect_info

2019-06-28 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen The bpf_redirect_info struct has an 'ifindex' member which was named back when the redirects could only target egress interfaces. Now that we can also redirect to sockets and CPUs, this is a bit misleading, so rename the member to tgt_index. Reorder the struct member

[PATCH bpf-next v6 5/5] devmap: Allow map lookups from eBPF

2019-06-28 Thread Toke Høiland-Jørgensen
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 to do lookups in devmaps is useful to know (e.g.) whether forwarding to a spe

[PATCH 1/4 nf-next v2] netfilter:nf_flow_table: Refactor flow_offload_tuple to destination

2019-06-28 Thread wenxu
From: wenxu Add struct flow_offload_dst to support more offload method to replace dst_cache which only work for route offload. Signed-off-by: wenxu --- include/net/netfilter/nf_flow_table.h | 12 ++-- net/netfilter/nf_flow_table_core.c| 22 +++--- net/netfilter/nf_f

[PATCH 2/4 nf-next v2] netfilter:nf_flow_table: Separate inet operation to single function

2019-06-28 Thread wenxu
From: wenxu This patch separate the inet family operation to single function. Prepare for supporting the bridge family. Signed-off-by: wenxu --- net/netfilter/nf_flow_table_core.c | 52 -- net/netfilter/nf_flow_table_ip.c | 34 +++-- n

[PATCH 3/4 nf-next v2] netfilter:nf_flow_table: Support bridge family flow offload

2019-06-28 Thread wenxu
From: wenxu With nf_conntrack_bridge function. The bridge family can do conntrack it self. The flow offload function based on the conntrack. So the flow in the bridge wih conntrack can be offloaded. Signed-off-by: wenxu --- include/net/netfilter/nf_flow_table.h | 31 +++- net/bridge/br_vl

[PATCH 4/4 nf-next v2] netfilter: Flow table support for the bridge family

2019-06-28 Thread wenxu
From: wenxu This patch adds the bridge flow table type, that implements the datapath flow table to forward IPv4 traffic through bridge. Signed-off-by: wenxu --- net/bridge/netfilter/Kconfig| 8 + net/bridge/netfilter/Makefile | 1 + net/bridge/netfilter/nf_f

Re: [PATCH 2/3 nf-next] netfilter:nf_flow_table: Support bridge type flow offload

2019-06-28 Thread wenxu
On 6/28/2019 2:06 PM, Florian Westphal wrote: > wenxu wrote: >> ns21 iperf to 10.0.0.8 with dport 22 in ns22 >> first time with OFFLOAD enable >> >> nft add flowtable bridge firewall fb2 { hook ingress priority 0 \; devices = >> { veth21, veth22 } \; } >> nft add chain bridge firewall ftb-all {

[PATCH iproute2-next v4 2/2] uapi: update if_link.h

2019-06-28 Thread Denis Kirjanov
update if_link.h to commit 75345f888f700c4ab2448287e35d48c760b202e6 ("ipoib: show VF broadcast address") Signed-off-by: Denis Kirjanov --- include/uapi/linux/if_link.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index bfe7f

[PATCH iproute2-next v4 1/2] ipaddress: correctly print a VF hw address in the IPoIB case

2019-06-28 Thread Denis Kirjanov
Current code assumes that we print ethernet mac and that doesn't work in the IPoIB case with SRIOV-enabled hardware Before: 11: ib1: mtu 2044 qdisc pfifo_fast state UP mode DEFAULT group default qlen 256 link/infiniband 80:00:00:66:fe:80:00:00:00:00:00:00:24:8a:07:03:00:a4:3e:7c brd 00:ff

Re: [PATCH v2 net-next 0/3] Better PHYLINK compliance for SJA1105 DSA

2019-06-28 Thread Russell King - ARM Linux admin
On Fri, Jun 28, 2019 at 12:46:34AM +0300, Vladimir Oltean wrote: > After discussing with Russell King, it appears this driver is making a > few confusions and not performing some checks for consistent operation. > > Changes in v2: > - Removed redundant print in the phylink_validate callback (in 2/

Re: [PATCH bpf-next v2] libbpf: add xsk_ring_prod__nb_free() function

2019-06-28 Thread Magnus Karlsson
On Wed, Jun 26, 2019 at 10:33 AM Eelco Chaudron wrote: > > When an AF_XDP application received X packets, it does not mean X > frames can be stuffed into the producer ring. To make it easier for > AF_XDP applications this API allows them to check how many frames can > be added into the ring. > > S

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-06-28 Thread Christian Brauner
On Thu, Jun 27, 2019 at 04:42:18PM -0700, Andy Lutomirski wrote: > [sigh, I finally set up lore nntp, and I goofed some addresses. Hi > Kees and linux-api.] Love it or hate it but that should probably also Cc linux-security... > > On Thu, Jun 27, 2019 at 4:40 PM Andy Lutomirski wrote: > > > >

[PATCH 2/3, net-next] net: page_pool: add helper function for retrieving dma direction

2019-06-28 Thread Ilias Apalodimas
Since the dma direction is stored in page pool params, offer an API helper for driver that choose not to keep track of it locally Signed-off-by: Ilias Apalodimas --- include/net/page_pool.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/net/page_pool.h b/include/net/page_po

[PATCH 1/3, net-next] net: netsec: Use page_pool API

2019-06-28 Thread Ilias Apalodimas
Use page_pool and it's DMA mapping capabilities for Rx buffers instead of netdev/napi_alloc_frag() Although this will result in a slight performance penalty on small sized packets (~10%) the use of the API will allow to easily add XDP support. The penalty won't be visible in network testing i.e ip

[PATCH 0/3, net-next] net: netsec: Add XDP Support

2019-06-28 Thread Ilias Apalodimas
This is a respin of https://www.spinics.net/lists/netdev/msg526066.html Since page_pool API fixes are merged into net-next we can now safely use it's DMA mapping capabilities. First patch changes the buffer allocation from napi/netdev_alloc_frag() to page_pool API. Although this will lead to sli

[PATCH 3/3, net-next] net: netsec: add XDP support

2019-06-28 Thread Ilias Apalodimas
The interface only supports 1 Tx queue so locking is introduced on the Tx queue if XDP is enabled to make sure .ndo_start_xmit and .ndo_xdp_xmit won't corrupt Tx ring - Performance (SMMU off) Benchmark XDP_SKB XDP_DRV xdp1291kpps 344kpps rxdrop 282kpps 342kpps - Perfor

Re: [PATCH net] sctp: fix error handling on stream scheduler initialization

2019-06-28 Thread Neil Horman
On Thu, Jun 27, 2019 at 07:48:10PM -0300, Marcelo Ricardo Leitner wrote: > It allocates the extended area for outbound streams only on sendmsg > calls, if they are not yet allocated. When using the priority > stream scheduler, this initialization may imply into a subsequent > allocation, which may

Re: [RFC] longer netdev names proposal

2019-06-28 Thread Jiri Pirko
Thu, Jun 27, 2019 at 09:20:41PM CEST, step...@networkplumber.org wrote: >On Thu, 27 Jun 2019 20:39:48 +0200 >Michal Kubecek wrote: > >> > >> > $ ip li set dev enp3s0 alias "Onboard Ethernet" >> > # ip link show "Onboard Ethernet" >> > Device "Onboard Ethernet" does not exist. >> > >> > So it doe

Re: [RFC] longer netdev names proposal

2019-06-28 Thread Michal Kubecek
On Fri, Jun 28, 2019 at 01:12:16PM +0200, Jiri Pirko wrote: > > I think that it is desired for kernel to work with "real alias" as a > handle. Userspace could either pass ifindex, IFLA_NAME or "real alias". > Userspace mapping like you did here might be perhaps okay for iproute2, > but I think tha

Re: [RFC PATCH 1/1] Documentation: net: dsa: b53: Describe b53 configuration

2019-06-28 Thread Kurt Kanzenbach
Hi, On Thu, Jun 27, 2019 at 09:38:16AM -0700, Florian Fainelli wrote: > On 6/27/19 3:15 AM, Benedikt Spranger wrote: > > Document the different needs of documentation for the b53 driver. > > > > Signed-off-by: Benedikt Spranger > > --- > > Documentation/networking/dsa/b53.rst | 300 +

Re: XDP multi-buffer incl. jumbo-frames (Was: [RFC V1 net-next 1/1] net: ena: implement XDP drop support)

2019-06-28 Thread Eelco Chaudron
On 28 Jun 2019, at 9:46, Toke Høiland-Jørgensen wrote: "Eelco Chaudron" writes: On 26 Jun 2019, at 10:38, Jesper Dangaard Brouer wrote: On Tue, 25 Jun 2019 03:19:22 + "Machulsky, Zorik" wrote: On 6/23/19, 7:21 AM, "Jesper Dangaard Brouer" wrote: On Sun, 23 Jun 2019 10:06:4

Re: [RFC] longer netdev names proposal

2019-06-28 Thread Jiri Pirko
Fri, Jun 28, 2019 at 01:42:12PM CEST, mkube...@suse.cz wrote: >On Fri, Jun 28, 2019 at 01:12:16PM +0200, Jiri Pirko wrote: >> >> I think that it is desired for kernel to work with "real alias" as a >> handle. Userspace could either pass ifindex, IFLA_NAME or "real alias". >> Userspace mapping like

Re: What to do when a bridge port gets its pvid deleted?

2019-06-28 Thread Ido Schimmel
On Tue, Jun 25, 2019 at 11:49:29PM +0300, Vladimir Oltean wrote: > A number of DSA drivers (BCM53XX, Microchip KSZ94XX, Mediatek MT7530 > at the very least), as well as Mellanox Spectrum (I didn't look at all > the pure switchdev drivers) try to restore the pvid to a default value > on .port_vlan_d

Re: What to do when a bridge port gets its pvid deleted?

2019-06-28 Thread Vladimir Oltean
On Fri, 28 Jun 2019 at 15:30, Ido Schimmel wrote: > > On Tue, Jun 25, 2019 at 11:49:29PM +0300, Vladimir Oltean wrote: > > A number of DSA drivers (BCM53XX, Microchip KSZ94XX, Mediatek MT7530 > > at the very least), as well as Mellanox Spectrum (I didn't look at all > > the pure switchdev drivers)

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

2019-06-28 Thread Guilherme G. Piccoli
On 28/06/2019 02:22, Sudarsana Reddy Kalluru wrote: > [...] > Thanks for the changes. > > Acked-by: Sudarsana Reddy Kalluru > Thanks a lot Sudarsana! David, do you think it's still possible to get this merged as a fix in 5.2 cycle, or it's gonna go in 5.3? Thanks, Guilherme

[PATCH 4/4] ipvs: reduce kernel stack usage

2019-06-28 Thread Arnd Bergmann
With the new CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL option, the stack usage in the ipvs debug output grows because each instance of IP_VS_DBG_BUF() now has its own buffer of 160 bytes that add up rather than reusing the stack slots: net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_sched_persist

Re: [PATCH 1/3, net-next] net: netsec: Use page_pool API

2019-06-28 Thread Jesper Dangaard Brouer
On Fri, 28 Jun 2019 13:39:13 +0300 Ilias Apalodimas wrote: > @@ -1079,11 +1095,22 @@ static int netsec_setup_rx_dring(struct netsec_priv > *priv) > } > > netsec_rx_fill(priv, 0, DESC_NUM); > + err = xdp_rxq_info_reg(&dring->xdp_rxq, priv->ndev, 0); > + if (err) > +

Re: [PATCH 1/3, net-next] net: netsec: Use page_pool API

2019-06-28 Thread Jesper Dangaard Brouer
On Fri, 28 Jun 2019 13:39:13 +0300 Ilias Apalodimas wrote: > Use page_pool and it's DMA mapping capabilities for Rx buffers instead > of netdev/napi_alloc_frag() > > Although this will result in a slight performance penalty on small sized > packets (~10%) the use of the API will allow to easily

Re: [PATCH 2/3, net-next] net: page_pool: add helper function for retrieving dma direction

2019-06-28 Thread Jesper Dangaard Brouer
On Fri, 28 Jun 2019 13:39:14 +0300 Ilias Apalodimas wrote: > Since the dma direction is stored in page pool params, offer an API > helper for driver that choose not to keep track of it locally > > Signed-off-by: Ilias Apalodimas > --- > include/net/page_pool.h | 9 + > 1 file changed,

macvtap vlan and tcp header overhead (and mtu size)

2019-06-28 Thread Marc Roos
I hope this is the right place to ask. I have a host setup for libvirt kvm/qemu vms. And I wonder a bit about the overhead of the macvtap and how to configure the mtu's properly. To be able to communicate with the host, I have moved the ip address of the host from the adapter to a macvtap to

Re: [RFC] longer netdev names proposal

2019-06-28 Thread Andrew Lunn
On Fri, Jun 28, 2019 at 01:12:16PM +0200, Jiri Pirko wrote: > Thu, Jun 27, 2019 at 09:20:41PM CEST, step...@networkplumber.org wrote: > >On Thu, 27 Jun 2019 20:39:48 +0200 > >Michal Kubecek wrote: > > > >> > > >> > $ ip li set dev enp3s0 alias "Onboard Ethernet" > >> > # ip link show "Onboard Eth

Re: [PATCH 3/3, net-next] net: netsec: add XDP support

2019-06-28 Thread Jesper Dangaard Brouer
On Fri, 28 Jun 2019 13:39:15 +0300 Ilias Apalodimas wrote: > +static int netsec_xdp_setup(struct netsec_priv *priv, struct bpf_prog *prog, > + struct netlink_ext_ack *extack) > +{ > + struct net_device *dev = priv->ndev; > + struct bpf_prog *old_prog; > + > + /

Re: [PATCH v4 03/13] dt-bindings: net: Add a YAML schemas for the generic MDIO options

2019-06-28 Thread Maxime Ripard
On Thu, Jun 27, 2019 at 10:06:57AM -0600, Rob Herring wrote: > On Thu, Jun 27, 2019 at 9:57 AM Maxime Ripard > wrote: > > > > + > > > > +reset-gpios = <&gpio2 5 1>; > > > > +reset-delay-us = <2>; > > > > + > > > > +ethphy0: ethernet-phy@1 { > > > > +reg = <1>;

Re: [RFC] longer netdev names proposal

2019-06-28 Thread Jiri Pirko
Fri, Jun 28, 2019 at 03:14:01PM CEST, and...@lunn.ch wrote: >On Fri, Jun 28, 2019 at 01:12:16PM +0200, Jiri Pirko wrote: >> Thu, Jun 27, 2019 at 09:20:41PM CEST, step...@networkplumber.org wrote: >> >On Thu, 27 Jun 2019 20:39:48 +0200 >> >Michal Kubecek wrote: >> > >> >> > >> >> > $ ip li set dev

[PATCH 02/10] batman-adv: Fix includes for *_MAX constants

2019-06-28 Thread Simon Wunderlich
From: Sven Eckelmann The commit 54d50897d544 ("linux/kernel.h: split *_MAX and *_MIN macros into ") moved the U32_MAX/INT_MAX/ULONG_MAX from linux/kernel.h to linux/limits.h. Adjust the includes accordingly. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/gate

[PATCH 01/10] batman-adv: Start new development cycle

2019-06-28 Thread Simon Wunderlich
Signed-off-by: Simon Wunderlich --- net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index c59afcba31e0..11d051dbbda4 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -13,7 +13,7 @@ #define BA

Re: [PATCH 1/2] tls: remove close callback sock unlock/lock and flush_sync

2019-06-28 Thread John Fastabend
Jakub Kicinski wrote: > On Thu, 27 Jun 2019 10:36:42 -0700, John Fastabend wrote: > > The tls close() callback currently drops the sock lock, makes a > > cancel_delayed_work_sync() call, and then relocks the sock. This > > seems suspect at best. The lock_sock() is applied to stop concurrent > > ope

[PATCH net-next] af_packet: convert pending frame counter to atomic_t

2019-06-28 Thread Neil Horman
The AF_PACKET protocol, when running as a memory mapped socket uses a pending frame counter to track the number of skbs in flight during transmission. It is incremented during the sendmsg call (via tpacket_snd), and decremented (possibly asynchronously) in the skb desructor during skb_free. The c

Re: [EXT] [PATCH net-next 03/16] qlge: Deduplicate lbq_buf_size

2019-06-28 Thread Willem de Bruijn
On Fri, Jun 28, 2019 at 4:57 AM Benjamin Poirier wrote: > > On 2019/06/26 11:42, Willem de Bruijn wrote: > > On Wed, Jun 26, 2019 at 7:37 AM Benjamin Poirier wrote: > > > > > > On 2019/06/26 09:24, Manish Chopra wrote: > > > > > -Original Message- > > > > > From: Benjamin Poirier > > > >

[net-next 1/1] tipc: embed jiffies in macro TIPC_BC_RETR_LIM

2019-06-28 Thread Jon Maloy
The macro TIPC_BC_RETR_LIM is always used in combination with 'jiffies', so we can just as well perform the addition in the macro itself. This way, we get a few shorter code lines and one less line break. Signed-off-by: Jon Maloy --- net/tipc/link.c | 9 - 1 file changed, 4 insertions(+)

Re: [PATCH net-next] af_packet: convert pending frame counter to atomic_t

2019-06-28 Thread Willem de Bruijn
On Fri, Jun 28, 2019 at 10:53 AM Neil Horman wrote: > > The AF_PACKET protocol, when running as a memory mapped socket uses a > pending frame counter to track the number of skbs in flight during > transmission. It is incremented during the sendmsg call (via > tpacket_snd), and decremented (possib

[PATCH v2 bpf-next 0/4] capture integers in BTF type info for map defs

2019-06-28 Thread Andrii Nakryiko
This patch set implements an update to how BTF-defined maps are specified. The change is in how integer attributes, e.g., type, max_entries, map_flags, are specified: now they are captured as part of map definition struct's BTF type information (using array dimension), eliminating the need for comp

[PATCH v2 bpf-next 1/4] libbpf: capture value in BTF type info for BTF-defined map defs

2019-06-28 Thread Andrii Nakryiko
Change BTF-defined map definitions to capture compile-time integer values as part of BTF type definition, to avoid split of key/value type information and actual type/size/flags initialization for maps. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 58 --

[PATCH v2 bpf-next 4/4] selftests/bpf: convert legacy BPF maps to BTF-defined ones

2019-06-28 Thread Andrii Nakryiko
Convert selftests that were originally left out and new ones added recently to consistently use BTF-defined maps. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/progs/get_cgroup_id_kern.c | 26 ++--- tools/testing/selftests/bpf/progs/pyperf.h| 90 +++--- .../selftests/bpf/pr

[PATCH v2 bpf-next 3/4] selftests/bpf: convert selftests using BTF-defined maps to new syntax

2019-06-28 Thread Andrii Nakryiko
Convert all the existing selftests that are already using BTF-defined maps to use new syntax (with no static data initialization). Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/progs/bpf_flow.c | 28 +++ .../testing/selftests/bpf/progs/netcnt_prog.c | 20 ++--- .../selftest

[PATCH v2 bpf-next 2/4] selftests/bpf: add __int and __type macro for BTF-defined maps

2019-06-28 Thread Andrii Nakryiko
Add simple __int and __type macro that hide details of how type and integer values are captured in BTF-defined maps. Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/bpf_helpers.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/to

Re: [PATCH 0/5] net: dsa: microchip: Further regmap cleanups

2019-06-28 Thread Vivien Didelot
Hi Marek, On Thu, 27 Jun 2019 23:55:51 +0200, Marek Vasut wrote: > This patchset cleans up KSZ9477 switch driver by replacing various > ad-hoc polling implementations and register RMW with regmap functions. > > Each polling function is replaced separately to make it easier to review > and possib

Re: [RFC] longer netdev names proposal

2019-06-28 Thread Stephen Hemminger
On Fri, 28 Jun 2019 15:55:53 +0200 Jiri Pirko wrote: > Fri, Jun 28, 2019 at 03:14:01PM CEST, and...@lunn.ch wrote: > >On Fri, Jun 28, 2019 at 01:12:16PM +0200, Jiri Pirko wrote: > >> Thu, Jun 27, 2019 at 09:20:41PM CEST, step...@networkplumber.org wrote: > >> >On Thu, 27 Jun 2019 20:39:48 +02

Re: [RFC] longer netdev names proposal

2019-06-28 Thread Jiri Pirko
Fri, Jun 28, 2019 at 05:44:47PM CEST, step...@networkplumber.org wrote: >On Fri, 28 Jun 2019 15:55:53 +0200 >Jiri Pirko wrote: > >> Fri, Jun 28, 2019 at 03:14:01PM CEST, and...@lunn.ch wrote: >> >On Fri, Jun 28, 2019 at 01:12:16PM +0200, Jiri Pirko wrote: >> >> Thu, Jun 27, 2019 at 09:20:41PM CE

Re: [PATCH v3 bpf-next 2/9] libbpf: introduce concept of bpf_link

2019-06-28 Thread Stanislav Fomichev
On 06/27, Andrii Nakryiko wrote: > bpf_link is and abstraction of an association of a BPF program and one > of many possible BPF attachment points (hooks). This allows to have > uniform interface for detaching BPF programs regardless of the nature of > link and how it was created. Details of creati

[PATCH iproute2-next] utils: move parse_percent() to tc_util

2019-06-28 Thread Andrea Claudi
As parse_percent() is used only in tc. This reduces ip, bridge and genl binaries size: $ bloat-o-meter -t bridge/bridge bridge/bridge.new add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-109 (-109) Total: Before=50973, After=50864, chg -0.21% $ bloat-o-meter -t genl/genl genl/genl.new add/remove: 0/

Re: [PATCH v3 bpf-next 3/9] libbpf: add ability to attach/detach BPF program to perf event

2019-06-28 Thread Stanislav Fomichev
On 06/27, Andrii Nakryiko wrote: > bpf_program__attach_perf_event allows to attach BPF program to existing > perf event hook, providing most generic and most low-level way to attach BPF > programs. It returns struct bpf_link, which should be passed to > bpf_link__destroy to detach and free resource

Re: [PATCH 00/11] XDP unaligned chunk placement support

2019-06-28 Thread Laatz, Kevin
On 27/06/2019 22:25, Jakub Kicinski wrote: On Thu, 27 Jun 2019 12:14:50 +0100, Laatz, Kevin wrote: On the application side (xdpsock), we don't have to worry about the user defined headroom, since it is 0, so we only need to account for the XDP_PACKET_HEADROOM when computing the original address

[PATCH bpf-next] bpf: fix precision tracking

2019-06-28 Thread Alexei Starovoitov
When equivalent state is found the current state needs to propagate precision marks. Otherwise the verifier will prune the search incorrectly. There is a price for correctness: before beforebrokenfixed cnst spill precise precise bpf_lb-D

Re: [RFC iproute2 1/1] ip: netns: add mounted state file for each netns

2019-06-28 Thread David Howells
Nicolas Dichtel wrote: > David Howells was working on a mount notification mechanism: > https://lwn.net/Articles/760714/ > https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=notifications > > I don't know what is the status of this series. It's still alive. I just pos

Re: [RFC] longer netdev names proposal

2019-06-28 Thread Michal Kubecek
On Fri, Jun 28, 2019 at 03:55:53PM +0200, Jiri Pirko wrote: > Fri, Jun 28, 2019 at 03:14:01PM CEST, and...@lunn.ch wrote: > > > >What is your user case for having multiple IFLA_ALT_NAME for the same > >IFLA_NAME? > > I don't know about specific usecase for having more. Perhaps Michal > does. One

Re: [PATCH v2 net-next 0/3] Better PHYLINK compliance for SJA1105 DSA

2019-06-28 Thread David Miller
From: Russell King - ARM Linux admin Date: Fri, 28 Jun 2019 11:05:42 +0100 > On Fri, Jun 28, 2019 at 12:46:34AM +0300, Vladimir Oltean wrote: >> After discussing with Russell King, it appears this driver is making a >> few confusions and not performing some checks for consistent operation. >> >>

Re: [PATCH 0/5] net: dsa: microchip: Further regmap cleanups

2019-06-28 Thread Marek Vasut
On 6/28/19 5:31 PM, Vivien Didelot wrote: > Hi Marek, > > On Thu, 27 Jun 2019 23:55:51 +0200, Marek Vasut wrote: >> This patchset cleans up KSZ9477 switch driver by replacing various >> ad-hoc polling implementations and register RMW with regmap functions. >> >> Each polling function is replaced

Re: [PATCH v3 bpf-next 2/9] libbpf: introduce concept of bpf_link

2019-06-28 Thread Andrii Nakryiko
On Fri, Jun 28, 2019 at 9:02 AM Stanislav Fomichev wrote: > > On 06/27, Andrii Nakryiko wrote: > > bpf_link is and abstraction of an association of a BPF program and one > > of many possible BPF attachment points (hooks). This allows to have > > uniform interface for detaching BPF programs regardl

Re: [PATCH 1/3, net-next] net: netsec: Use page_pool API

2019-06-28 Thread David Miller
From: Jesper Dangaard Brouer Date: Fri, 28 Jun 2019 15:04:34 +0200 > On Fri, 28 Jun 2019 13:39:13 +0300 > Ilias Apalodimas wrote: > >> Use page_pool and it's DMA mapping capabilities for Rx buffers instead >> of netdev/napi_alloc_frag() >> >> Although this will result in a slight performance p

Re: [PATCH 3/3, net-next] net: netsec: add XDP support

2019-06-28 Thread David Miller
From: Jesper Dangaard Brouer Date: Fri, 28 Jun 2019 15:35:52 +0200 > On Fri, 28 Jun 2019 13:39:15 +0300 > Ilias Apalodimas wrote: > >> +static int netsec_xdp_setup(struct netsec_priv *priv, struct bpf_prog *prog, >> +struct netlink_ext_ack *extack) >> +{ >> +struct n

Re: What to do when a bridge port gets its pvid deleted?

2019-06-28 Thread Florian Fainelli
On 6/28/19 5:37 AM, Vladimir Oltean wrote: > On Fri, 28 Jun 2019 at 15:30, Ido Schimmel wrote: >> >> On Tue, Jun 25, 2019 at 11:49:29PM +0300, Vladimir Oltean wrote: >>> A number of DSA drivers (BCM53XX, Microchip KSZ94XX, Mediatek MT7530 >>> at the very least), as well as Mellanox Spectrum (I did

Re: [PATCH 3/3, net-next] net: netsec: add XDP support

2019-06-28 Thread Ilias Apalodimas
On Fri, Jun 28, 2019 at 03:35:52PM +0200, Jesper Dangaard Brouer wrote: > On Fri, 28 Jun 2019 13:39:15 +0300 > Ilias Apalodimas wrote: > > > +static int netsec_xdp_setup(struct netsec_priv *priv, struct bpf_prog > > *prog, > > + struct netlink_ext_ack *extack) > > +{ > > +

Re: [PATCH v3 bpf-next 3/9] libbpf: add ability to attach/detach BPF program to perf event

2019-06-28 Thread Andrii Nakryiko
On Fri, Jun 28, 2019 at 9:04 AM Stanislav Fomichev wrote: > > On 06/27, Andrii Nakryiko wrote: > > bpf_program__attach_perf_event allows to attach BPF program to existing > > perf event hook, providing most generic and most low-level way to attach BPF > > programs. It returns struct bpf_link, whic

Re: [PATCH 00/11] XDP unaligned chunk placement support

2019-06-28 Thread Björn Töpel
On 2019-06-28 18:19, Laatz, Kevin wrote: On 27/06/2019 22:25, Jakub Kicinski wrote: On Thu, 27 Jun 2019 12:14:50 +0100, Laatz, Kevin wrote: On the application side (xdpsock), we don't have to worry about the user defined headroom, since it is 0, so we only need to account for the XDP_PACKET_HEA

Re: [RFC PATCH 1/1] Documentation: net: dsa: b53: Describe b53 configuration

2019-06-28 Thread Benedikt Spranger
Am Thu, 27 Jun 2019 09:38:16 -0700 schrieb Florian Fainelli : > On 6/27/19 3:15 AM, Benedikt Spranger wrote: > > Document the different needs of documentation for the b53 driver. > > > > Signed-off-by: Benedikt Spranger > > --- > > Documentation/networking/dsa/b53.rst | 300 > >

Re: [RFC iproute2 1/1] ip: netns: add mounted state file for each netns

2019-06-28 Thread Matteo Croce
On Fri, Jun 28, 2019 at 6:27 PM David Howells wrote: > > Nicolas Dichtel wrote: > > > David Howells was working on a mount notification mechanism: > > https://lwn.net/Articles/760714/ > > https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=notifications > > > > I don't kn

[PATCH 0/1] Disable all ports on b53 setup

2019-06-28 Thread Benedikt Spranger
Hi, while working on a Banana Pi R1 based system I faced inconsistent switch configurations. The switch is attached to an EEPROM which feeds additional configuration which is applied after the reset of the chip. As a result all ports remained active while the DSA subsystem assumed that those port

[PATCH 1/1] net: dsa: b53: Disable all ports on setup

2019-06-28 Thread Benedikt Spranger
A b53 device may configured through an external EEPROM like the switch device on the Lamobo R1 router board. The configuration of a port may therefore differ from the reset configuration of the switch. The switch configuration reported by the DSA subsystem is different until the port is configured

Re: [PATCH 1/3, net-next] net: netsec: Use page_pool API

2019-06-28 Thread Ilias Apalodimas
Hi David, > >> Use page_pool and it's DMA mapping capabilities for Rx buffers instead > >> of netdev/napi_alloc_frag() > >> > >> Although this will result in a slight performance penalty on small sized > >> packets (~10%) the use of the API will allow to easily add XDP support. > >> The penalty

Re: [PATCH 1/1] net: dsa: b53: Disable all ports on setup

2019-06-28 Thread Florian Fainelli
On 6/28/19 9:58 AM, Benedikt Spranger wrote: > A b53 device may configured through an external EEPROM like the switch > device on the Lamobo R1 router board. The configuration of a port may > therefore differ from the reset configuration of the switch. > > The switch configuration reported by the

Re: [PATCH 3/3, net-next] net: netsec: add XDP support

2019-06-28 Thread Maciej Fijalkowski
On Fri, 28 Jun 2019 19:47:41 +0300 Ilias Apalodimas wrote: > On Fri, Jun 28, 2019 at 03:35:52PM +0200, Jesper Dangaard Brouer wrote: > > On Fri, 28 Jun 2019 13:39:15 +0300 > > Ilias Apalodimas wrote: > > > > > +static int netsec_xdp_setup(struct netsec_priv *priv, struct bpf_prog > > > *prog

Re: [PATCH bpf-next v3 1/2] xsk: remove AF_XDP socket from map when the socket is released

2019-06-28 Thread Björn Töpel
On Fri, 28 Jun 2019 at 02:33, Daniel Borkmann wrote: > > On 06/20/2019 12:06 PM, Björn Töpel wrote: > > From: Björn Töpel > > > > When an AF_XDP socket is released/closed the XSKMAP still holds a > > reference to the socket in a "released" state. The socket will still > > use the netdev queue res

Re: [PATCH 1/3, net-next] net: netsec: Use page_pool API

2019-06-28 Thread Jesper Dangaard Brouer
On Fri, 28 Jun 2019 20:19:34 +0300 Ilias Apalodimas wrote: > Hi David, > > > >> Use page_pool and it's DMA mapping capabilities for Rx buffers instead > > >> of netdev/napi_alloc_frag() > > >> > > >> Although this will result in a slight performance penalty on small sized > > >> packets (~10%)

[PATCH 2/4] ipvs: fix tinfo memory leak in start_sync_thread

2019-06-28 Thread Pablo Neira Ayuso
From: Julian Anastasov syzkaller reports for memory leak in start_sync_thread [1] As Eric points out, kthread may start and stop before the threadfn function is called, so there is no chance the data (tinfo in our case) to be released in thread. Fix this by releasing tinfo in the controlling co

[PATCH 1/4] ipvs: defer hook registration to avoid leaks

2019-06-28 Thread Pablo Neira Ayuso
From: Julian Anastasov syzkaller reports for memory leak when registering hooks [1] As we moved the nf_unregister_net_hooks() call into __ip_vs_dev_cleanup(), defer the nf_register_net_hooks() call, so that hooks are allocated and freed from same pernet_operations (ipvs_core_dev_ops). [1] BUG:

[PATCH 4/4] netfilter: Fix remainder of pseudo-header protocol 0

2019-06-28 Thread Pablo Neira Ayuso
From: He Zhe Since v5.1-rc1, some types of packets do not get unreachable reply with the following iptables setting. Fox example, $ iptables -A INPUT -p icmp --icmp-type 8 -j REJECT $ ping 127.0.0.1 -c 1 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. — 127.0.0.1 ping statistics — 1 packets tra

  1   2   3   4   >