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

2019-06-27 Thread Rob Herring
On Thu, Jun 27, 2019 at 9:57 AM Maxime Ripard wrote: > > Hi Rob, > > On Thu, Jun 27, 2019 at 09:48:06AM -0600, Rob Herring wrote: > > On Thu, Jun 27, 2019 at 9:32 AM Maxime Ripard > > wrote: > > > > > > The MDIO buses have a number of available device tree properties that can > > > be used in th

Re: [RFC] longer netdev names proposal

2019-06-27 Thread Dan Williams
On Thu, 2019-06-27 at 08:29 -0700, Stephen Hemminger wrote: > On Thu, 27 Jun 2019 11:43:27 +0200 > 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

Re: [PATCH net-next v3 1/4] net: sched: em_ipt: match only on ip/ipv6 traffic

2019-06-27 Thread nikolay
On 27 June 2019 19:02:37 EEST, Eyal Birger wrote: >Hi Nik, > >On Thu, 27 Jun 2019 11:10:44 +0300 >Nikolay Aleksandrov wrote: > >> Restrict matching only to ip/ipv6 traffic and make sure we can use >the >> headers, otherwise matches will be attempted on any protocol which >can >> be unexpected by

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

2019-06-27 Thread Guilherme G. Piccoli
Thanks again Sudarsana for the good review and advice. I'll send V4 soon. Discussions about your points are in-line below: On 27/06/2019 07:09, Sudarsana Reddy Kalluru wrote: > >> [...] >> if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) { >> if (!(bp->flags & TX_TIME

Re: [PATCH net] sctp: not bind the socket in sctp_connect

2019-06-27 Thread David Miller
From: Marcelo Ricardo Leitner Date: Wed, 26 Jun 2019 23:59:15 -0300 > Please give me another day to review this one. Thanks. Sure, no problem.

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

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

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

2019-06-27 Thread Greg KH
On Thu, Jun 27, 2019 at 01:00:03AM +, Song Liu wrote: > > > > On Jun 26, 2019, at 5:08 PM, Greg KH wrote: > > > > On Wed, Jun 26, 2019 at 03:17:47PM +, Song Liu wrote: > +static struct miscdevice bpf_dev = { > +.minor = MISC_DYNAMIC_MINOR, > +.nam

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

2019-06-27 Thread 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 +++ > 1 file changed, 300 insertions(+) > create mode 100644 Document

Re: [PATCH net-next 00/16] mlxsw: PTP timestamping support

2019-06-27 Thread Richard Cochran
On Thu, Jun 27, 2019 at 04:52:43PM +0300, Ido Schimmel wrote: > From: Ido Schimmel > > This is the second patchset adding PTP support in mlxsw. Next patchset > will add PTP shapers which are required to maintain accuracy under rates > lower than 40Gb/s, while subsequent patchsets will add tracepo

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

2019-06-27 Thread Song Liu
> On Jun 27, 2019, at 9:37 AM, Greg KH wrote: > > On Thu, Jun 27, 2019 at 01:00:03AM +, Song Liu wrote: >> >> >>> On Jun 26, 2019, at 5:08 PM, Greg KH wrote: >>> >>> On Wed, Jun 26, 2019 at 03:17:47PM +, Song Liu wrote: >> +static struct miscdevice bpf_dev = { >> +.

Re: [PATCH net-next 0/2] net: ipv4: fix circular-list infinite loop

2019-06-27 Thread David Miller
From: Florian Westphal Date: Thu, 27 Jun 2019 14:03:31 +0200 > Tariq and Ran reported a regression caused by net-next commit > 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list"). > > This happens when net.ipv4.conf.$dev.promote_secondaries sysctl is > enabled -- we can arrange for

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

2019-06-27 Thread Greg KH
On Thu, Jun 27, 2019 at 04:51:20PM +, Song Liu wrote: > > > > On Jun 27, 2019, at 9:37 AM, Greg KH wrote: > > > > On Thu, Jun 27, 2019 at 01:00:03AM +, Song Liu wrote: > >> > >> > >>> On Jun 26, 2019, at 5:08 PM, Greg KH wrote: > >>> > >>> On Wed, Jun 26, 2019 at 03:17:47PM +, S

Re: [PATCH] net/smc: common release code for non-accepted sockets

2019-06-27 Thread David Miller
From: Karsten Graul Date: Thu, 27 Jun 2019 15:04:52 +0200 > From: Ursula Braun > > There are common steps when releasing an accepted or unaccepted socket. > Move this code into a common routine. > > Signed-off-by: Ursula Braun > Signed-off-by: Karsten Graul Applied.

Re: [PATCH net-next 12/16] mlxsw: spectrum: PTP: Support timestamping on Spectrum-1

2019-06-27 Thread David Miller
From: Ido Schimmel Date: Thu, 27 Jun 2019 16:52:55 +0300 > + for (i = 0; i < num_rec; ++i) { Please use the more canonical "i++" here, thank you.

Re: [RFC] longer netdev names proposal

2019-06-27 Thread David Ahern
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 became quite common to hit this limit: > 0123456789012345 > enp131s0f1npf

Re: [PATCH net-next 00/12] s390/qeth: updates 2019-06-27

2019-06-27 Thread David Miller
From: Julian Wiedmann Date: Thu, 27 Jun 2019 17:01:21 +0200 > please apply another round of qeth updates for net-next. > This completes the conversion of the control path to use dynamically > allocated cmd buffers, along with some fine-tuning for the route > validation fix that recently went into

Re: [PATCH bpf-next 0/3] capture integers in BTF type info for map defs

2019-06-27 Thread Song Liu
> On Jun 26, 2019, at 4:21 PM, Andrii Nakryiko wrote: > > 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

Re: [PATCH v4 00/13] net: Add generic and Allwinner YAML bindings

2019-06-27 Thread David Miller
From: Maxime Ripard Date: Thu, 27 Jun 2019 17:31:42 +0200 > This is an attempt at getting the main generic DT bindings for the ethernet > (and related) devices, and convert some DT bindings for the Allwinner DTs > to YAML as well. > > This should provide some DT validation coverage. I don't thi

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

2019-06-27 Thread Song Liu
> On Jun 26, 2019, at 4:21 PM, Andrii Nakryiko wrote: > > 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. If I have an old bpf program

Re: [PATCH net-next 00/16] mlxsw: PTP timestamping support

2019-06-27 Thread Ido Schimmel
On Thu, Jun 27, 2019 at 09:51:34AM -0700, Richard Cochran wrote: > On Thu, Jun 27, 2019 at 04:52:43PM +0300, Ido Schimmel wrote: > > From: Ido Schimmel > > > > This is the second patchset adding PTP support in mlxsw. Next patchset > > will add PTP shapers which are required to maintain accuracy u

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

2019-06-27 Thread John Fastabend
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 operations on the socket while tearing the sock down. Further we will need to add support for unhash(

[PATCH 2/2] bpf: tls, implement unhash to avoid transition out of ESTABLISHED

2019-06-27 Thread John Fastabend
It is possible (via shutdown()) for TCP socks to go through TCP_CLOSE state via tcp_disconnect() without calling into close callback. This would allow a kTLS enabled socket to exist outside of ESTABLISHED state which is not supported. Solve this the same way we solved the sock{map|hash} case by ad

[PATCH 0/2] tls, add unhash callback

2019-06-27 Thread John Fastabend
Resolve a series of splats discovered by syzbot and noted by Eric Dumazet. The primary problem here is we resolved an issue on the BPF sockmap side by adding an unhash callback. This is required to ensure sockmap sockets do not transition out of ESTABLISHED state into a LISTEN state. When we did th

Re: [PATCH net-next 2/3] net: dsa: sja1105: Check for PHY mode mismatches with what PHYLINK reports

2019-06-27 Thread Russell King - ARM Linux admin
On Wed, Jun 26, 2019 at 02:20:13PM +0300, Vladimir Oltean wrote: > PHYLINK being designed with PHYs in mind that can change MII protocol, > for correct operation it is necessary to ensure that the PHY interface > mode stays the same (otherwise clear the supported bit mask, as > required). > > Beca

Re: [PATCH net-next 00/16] mlxsw: PTP timestamping support

2019-06-27 Thread David Miller
From: Ido Schimmel Date: Thu, 27 Jun 2019 20:35:25 +0300 > On Thu, Jun 27, 2019 at 09:51:34AM -0700, Richard Cochran wrote: >> On Thu, Jun 27, 2019 at 04:52:43PM +0300, Ido Schimmel wrote: >> > From: Ido Schimmel >> > >> > This is the second patchset adding PTP support in mlxsw. Next patchset >

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

2019-06-27 Thread Andrii Nakryiko
On Thu, Jun 27, 2019 at 10:27 AM Song Liu wrote: > > > > > On Jun 26, 2019, at 4:21 PM, Andrii Nakryiko wrote: > > > > 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/siz

Re: [RFC] longer netdev names proposal

2019-06-27 Thread Jakub Kicinski
On Thu, 27 Jun 2019 11:43:27 +0200, 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 became quite common to hit this limit: > 0123456789012345

Re: [net-next 00/10][pull request] Intel Wired LAN Driver Updates 2019-06-26

2019-06-27 Thread David Miller
From: Jeff Kirsher Date: Wed, 26 Jun 2019 12:30:53 -0700 > This series contains updates to ixgbe and i40e only. Pulled, thanks Jeff.

Re: [RFC] longer netdev names proposal

2019-06-27 Thread Stephen Hemminger
On Thu, 27 Jun 2019 10:48:08 -0700 Jakub Kicinski wrote: > On Thu, 27 Jun 2019 11:43:27 +0200, 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

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

2019-06-27 Thread Song Liu
> On Jun 27, 2019, at 10:47 AM, Andrii Nakryiko > wrote: > > On Thu, Jun 27, 2019 at 10:27 AM Song Liu wrote: >> >> >> >>> On Jun 26, 2019, at 4:21 PM, Andrii Nakryiko wrote: >>> >>> Change BTF-defined map definitions to capture compile-time integer >>> values as part of BTF type defini

Re: [PATCH net-next 12/16] mlxsw: spectrum: PTP: Support timestamping on Spectrum-1

2019-06-27 Thread Petr Machata
David Miller writes: > From: Ido Schimmel > Date: Thu, 27 Jun 2019 16:52:55 +0300 > >> +for (i = 0; i < num_rec; ++i) { > > Please use the more canonical "i++" here, thank you. OK.

Re: [PATCH net-next v3 0/8] net: aquantia: implement vlan offloads

2019-06-27 Thread David Miller
From: Igor Russkikh Date: Wed, 26 Jun 2019 12:35:30 + > This patchset introduces hardware VLAN offload support and also does some > maintenance: we replace driver version with uts version string, add > documentation file for atlantic driver, and update maintainers > adding Igor as a maintaine

Re: [PATCH V4 00/10] net: dsa: microchip: Convert to regmap

2019-06-27 Thread David Miller
From: Marek Vasut Date: Wed, 26 Jun 2019 01:43:38 +0200 > This patchset converts KSZ9477 switch driver to regmap. > > This was tested with extra patches on KSZ8795. This was also tested > on KSZ9477 on Microchip KSZ9477EVB board, which I now have. > > Signed-off-by: Marek Vasut Series applied

Re: [PATCH net-next 00/10] FDB, VLAN and PTP fixes for SJA1105 DSA

2019-06-27 Thread David Miller
From: Vladimir Oltean Date: Wed, 26 Jun 2019 02:39:32 +0300 > This patchset is an assortment of fixes for the net-next version of the > sja1105 DSA driver: > - Avoid a kernel panic when the driver fails to probe or unregisters > - Finish Arnd Bermann's idea of compiling PTP support as part of the

Re: [RFC] longer netdev names proposal

2019-06-27 Thread Michal Kubecek
On Thu, Jun 27, 2019 at 11:14:31AM -0600, David Ahern wrote: > > 4) There are two cases that can happen during rename: > >A) The name is shorter than IFNAMSIZ > > -> both IFLA_NAME and IFLA_NAME_EXT would contain the same string: > > original IFLA_NAME = eth0 > > ori

Re: [PATCH V33 24/30] bpf: Restrict bpf when kernel lockdown is in confidentiality mode

2019-06-27 Thread James Morris
On Thu, 27 Jun 2019, Stephen Smalley wrote: > There are two scenarios where finer-grained distinctions make sense: > > - Users may need to enable specific functionality that falls under the > umbrella of "confidentiality" or "integrity" lockdown. Finer-grained lockdown > reasons free them from h

Re: [PATCH next 3/3] blackhole_dev: add a selftest

2019-06-27 Thread David Miller
From: Mahesh Bandewar Date: Fri, 21 Jun 2019 17:45:39 -0700 > --- a/tools/testing/selftests/net/Makefile > +++ b/tools/testing/selftests/net/Makefile > @@ -4,8 +4,9 @@ > CFLAGS = -Wall -Wl,--no-as-needed -O2 -g > CFLAGS += -I../../../../usr/include/ > > +<<< HEAD > TEST_PROGS := run_net

Re: [PATCH v2 net-next] ipv6: Convert gateway validation to use fib6_info

2019-06-27 Thread David Miller
From: David Ahern Date: Mon, 24 Jun 2019 13:44:51 -0700 > From: David Ahern > > Gateway validation does not need a dst_entry, it only needs the fib > entry to validate the gateway resolution and egress device. So, > convert ip6_nh_lookup_table from ip6_pol_route to fib6_table_lookup > and ip6_r

RE: [PATCH 0/2] tls, add unhash callback

2019-06-27 Thread John Fastabend
John Fastabend wrote: > Resolve a series of splats discovered by syzbot and noted by > Eric Dumazet. The primary problem here is we resolved an issue on > the BPF sockmap side by adding an unhash callback. This is > required to ensure sockmap sockets do not transition out of > ESTABLISHED state int

Re: [PATCH v1 2/2] net: dsa: qca8k: introduce reset via gpio feature

2019-06-27 Thread David Miller
From: Christian Lamparter Date: Tue, 25 Jun 2019 10:41:51 +0200 > The QCA8337(N) has a RESETn signal on Pin B42 that > triggers a chip reset if the line is pulled low. > The datasheet says that: "The active low duration > must be greater than 10 ms". > > This can hopefully fix some of the issues

Re: [PATCH v1 1/2] dt-bindings: net: dsa: qca8k: document reset-gpios property

2019-06-27 Thread David Miller
From: Christian Lamparter Date: Tue, 25 Jun 2019 10:41:50 +0200 > This patch documents the qca8k's reset-gpios property that > can be used if the QCA8337N ends up in a bad state during > reset. > > Signed-off-by: Christian Lamparter Applied.

[PATCH v2] net: dsa: mv88e6xxx: wait after reset deactivation

2019-06-27 Thread Baruch Siach
Add a 1ms delay after reset deactivation. Otherwise the chip returns bogus ID value. This is observed with 88E6390 (Peridot) chip. Signed-off-by: Baruch Siach --- v2: Address Andrew Lunn's comments: Use usleep_range. Delay only when reset line is valid. --- drivers/net/dsa/mv88e6xxx/chip.c |

Re: [PATCH next 3/3] blackhole_dev: add a selftest

2019-06-27 Thread महेश बंडेवार
On Thu, Jun 27, 2019 at 11:08 AM David Miller wrote: > > From: Mahesh Bandewar > Date: Fri, 21 Jun 2019 17:45:39 -0700 > > > --- a/tools/testing/selftests/net/Makefile > > +++ b/tools/testing/selftests/net/Makefile > > @@ -4,8 +4,9 @@ > > CFLAGS = -Wall -Wl,--no-as-needed -O2 -g > > CFLAGS +=

Re: [RFC] longer netdev names proposal

2019-06-27 Thread Stephen Hemminger
On Thu, 27 Jun 2019 20:08:03 +0200 Michal Kubecek wrote: > It often feels as a deficiency that unlike block devices where we can > keep one name and create multiple symlinks based on different naming > schemes, network devices can have only one name. There are aliases but > AFAIK they are only us

Re: [PATCH v2] net: dsa: mv88e6xxx: wait after reset deactivation

2019-06-27 Thread Andrew Lunn
On Thu, Jun 27, 2019 at 09:17:39PM +0300, Baruch Siach wrote: > Add a 1ms delay after reset deactivation. Otherwise the chip returns > bogus ID value. This is observed with 88E6390 (Peridot) chip. > > Signed-off-by: Baruch Siach Reviewed-by: Andrew Lunn Andrew

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

2019-06-27 Thread Roopa Prabhu
On Thu, Jun 27, 2019 at 7:50 AM Taehee Yoo wrote: > > __vxlan_dev_create() destroys FDB using specific pointer which indicates > a fdb when error occurs. > But that pointer should not be used when register_netdevice() fails because > register_netdevice() internally destroys fdb when error occurs.

Re: [RFC] longer netdev names proposal

2019-06-27 Thread Andrew Lunn
On Thu, Jun 27, 2019 at 11:23:05AM -0700, Stephen Hemminger wrote: > On Thu, 27 Jun 2019 20:08:03 +0200 > Michal Kubecek wrote: > > > It often feels as a deficiency that unlike block devices where we can > > keep one name and create multiple symlinks based on different naming > > schemes, network

[PATCH iproute2 v2 1/2] devlink: fix format string warning for 32bit targets

2019-06-27 Thread Baruch Siach
32bit targets define uint64_t as long long unsigned. This leads to the following build warning: devlink.c: In function ‘pr_out_u64’: devlink.c:1729:11: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t {aka long long unsigned int}’ [-Wformat=]

[PATCH iproute2 v2 2/2] devlink: fix libc and kernel headers collision

2019-06-27 Thread Baruch Siach
Since commit 2f1242efe9d ("devlink: Add devlink health show command") we use the sys/sysinfo.h header for the sysinfo(2) system call. But since iproute2 carries a local version of the kernel struct sysinfo, this causes a collision with libc that do not rely on kernel defined sysinfo like musl libc:

Re: [RFC] longer netdev names proposal

2019-06-27 Thread Michal Kubecek
On Thu, Jun 27, 2019 at 08:35:38PM +0200, Andrew Lunn wrote: > On Thu, Jun 27, 2019 at 11:23:05AM -0700, Stephen Hemminger wrote: > > On Thu, 27 Jun 2019 20:08:03 +0200 Michal Kubecek wrote: > > > > > It often feels as a deficiency that unlike block devices where we can > > > keep one name and cr

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

2019-06-27 Thread Daniel Santos
On 6/25/19 3:41 PM, Andrew Lunn wrote: > On Tue, Jun 25, 2019 at 02:27:55PM -0500, Daniel Santos wrote: >> On 6/25/19 2:02 PM, Andrew Lunn wrote: But will there still be a mechanism to ignore link partner's advertising and force these parameters? >>> >From man 1 ethtool: >>> >>>

Re: [PATCH 1/2 nf-next v2] netfilter: nft_meta: add NFT_META_BRI_O/IIFVPROTO support

2019-06-27 Thread Pablo Neira Ayuso
On Thu, Jun 27, 2019 at 09:07:14PM +0800, we...@ucloud.cn wrote: > From: wenxu > > This patch provide a meta to get the bridge vlan proto > > nft add rule bridge firewall zones counter meta br_iifvproto 0x8100 > > Signed-off-by: wenxu > --- > include/uapi/linux/netfilter/nf_tables.h | 4

Re: [PATCH 2/2 nf-next] netfilter:nft_meta: add NFT_META_VLAN support

2019-06-27 Thread Pablo Neira Ayuso
On Thu, Jun 27, 2019 at 09:37:53PM +0800, wenxu wrote: > > 在 2019/6/27 20:35, Pablo Neira Ayuso 写道: > > On Thu, Jun 27, 2019 at 10:09:17AM +0800, we...@ucloud.cn wrote: > >> From: wenxu > >> > >> This patch provide a meta vlan to set the vlan tag of the packet. > >> > >> for q-in-q vlan id 20: >

Re: [PATCH v4 00/13] net: Add generic and Allwinner YAML bindings

2019-06-27 Thread Rob Herring
On Thu, Jun 27, 2019 at 11:22 AM David Miller wrote: > > From: Maxime Ripard > Date: Thu, 27 Jun 2019 17:31:42 +0200 > > > This is an attempt at getting the main generic DT bindings for the ethernet > > (and related) devices, and convert some DT bindings for the Allwinner DTs > > to YAML as well.

Re: [RFC] longer netdev names proposal

2019-06-27 Thread Stephen Hemminger
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 does not really appear to be an alias, it is a label. To be > > truly useful, it nee

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

2019-06-27 Thread Andrew Lunn
> > 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, duplex, etc. via the MAC registers instead of > via

Re: [RFC] longer netdev names proposal

2019-06-27 Thread Dan Williams
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 "Onboard Ethernet" does not exist. > > > > > > So it does not real

[PATCHv2 next 2/3] blackhole_netdev: use blackhole_netdev to invalidate dst entries

2019-06-27 Thread Mahesh Bandewar
Use blackhole_netdev instead of 'lo' device with lower MTU when marking dst "dead". Signed-off-by: Mahesh Bandewar --- v1 -> v2 no change net/core/dst.c | 2 +- net/ipv4/route.c | 3 +-- net/ipv6/route.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/net/core/dst.c b

Re: [pull request][for-next V2 0/7] Generic DIM lib for netdev and RDMA

2019-06-27 Thread David Miller
From: Saeed Mahameed Date: Tue, 25 Jun 2019 20:57:27 + > Once we are all happy with the series, please pull to net-next and > rdma-next trees. Pulled into net-next, thanks. I'll push it back out once I am done build testing.

[PATCHv2 next 1/3] loopback: create blackhole net device similar to loopack.

2019-06-27 Thread Mahesh Bandewar
Create a blackhole net device that can be used for "dead" dst entries instead of loopback device. This blackhole device differs from loopback in few aspects: (a) It's not per-ns. (b) MTU on this device is ETH_MIN_MTU (c) The xmit function is essentially kfree_skb(). and (d) since it's not register

[PATCHv2 next 3/3] blackhole_dev: add a selftest

2019-06-27 Thread Mahesh Bandewar
Since this is not really a device with all capabilities, this test ensures that it has *enough* to make it through the data path without causing unwanted side-effects (read crash!). Signed-off-by: Mahesh Bandewar --- v1 -> v2 fixed the conflict resolution in selftests Makefile lib/Kconfig.deb

[PATCHv2 next 0/3] blackhole device to invalidate dst

2019-06-27 Thread Mahesh Bandewar
When we invalidate dst or mark it "dead", we assign 'lo' to dst->dev. First of all this assignment is racy and more over, it has MTU implications. The standard dev MTU is 1500 while the Loopback MTU is 64k. TCP code when dereferencing the dst don't check if the dst is valid or not. TCP when derefe

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

2019-06-27 Thread David Miller
From: Paul Blakey Date: Thu, 20 Jun 2019 16:42:18 +0300 > +struct tcf_ct_params { ... > + struct rcu_head rcu; > + > +}; Please get ride of that empty line after the 'rcu' member. > + switch (skb->protocol) { > + case htons(ETH_P_IP): > + family = NFPROTO_IPV4; > +

[PATCH v2 bpf-next 2/4] bpf: sync tools/include/uapi/linux/bpf.h

2019-06-27 Thread Song Liu
Sync changes for bpf_dev_ioctl. Signed-off-by: Song Liu --- tools/include/uapi/linux/bpf.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index b077507efa3f..13e148bd6c7c 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/

[PATCH v2 bpf-next 0/4] sys_bpf() access control via /dev/bpf

2019-06-27 Thread Song Liu
Changes v1 => v2: 1. Make default mode of /dev/bpf 0220 (Greg); 2. Rename ioctl commands as BPF_DEV_IOCTL_ENABLE_SYS_BPF and BPF_DEV_IOCTL_DISABLE_SYS_BPF (Daniel); 3. Save space for task_struct by reusing free bit (Daniel); 4. Make the permission per process (Lorenz). Currently, most access to

[PATCH v2 bpf-next 4/4] bpftool: use libbpf_[enable|disable]_sys_bpf()

2019-06-27 Thread Song Liu
This patch calls libbpf_[enable|disable]_sys_bpf() from bpftool. This allows users with access to /dev/bpf to perform operations like root. Signed-off-by: Song Liu --- tools/bpf/bpftool/feature.c | 2 +- tools/bpf/bpftool/main.c| 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff

[PATCH v2 bpf-next 3/4] libbpf: add libbpf_[enable|disable]_sys_bpf()

2019-06-27 Thread Song Liu
This patch adds two more API to libbpf: libbpf_enable_sys_bpf() and libbpf_disable_sys_bpf(). For root, these two APIs are no-op. Signed-off-by: Song Liu --- tools/lib/bpf/libbpf.c | 54 tools/lib/bpf/libbpf.h | 7 ++ tools/lib/bpf/libbpf.map |

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

2019-06-27 Thread Andrii Nakryiko
On Thu, Jun 27, 2019 at 10:56 AM Song Liu wrote: > > > > > On Jun 27, 2019, at 10:47 AM, Andrii Nakryiko > > wrote: > > > > On Thu, Jun 27, 2019 at 10:27 AM Song Liu wrote: > >> > >> > >> > >>> On Jun 26, 2019, at 4:21 PM, Andrii Nakryiko wrote: > >>> > >>> Change BTF-defined map definitions t

[PATCH bpf-next v9 0/9] bpf: getsockopt and setsockopt hooks

2019-06-27 Thread Stanislav Fomichev
This series implements two new per-cgroup hooks: getsockopt and setsockopt along with a new sockopt program type. The idea is pretty similar to recently introduced cgroup sysctl hooks, but implementation is simpler (no need to convert to/from strings). What this can be applied to: * move business

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

2019-06-27 Thread Stanislav Fomichev
Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. BPF_CGROUP_SETSOCKOPT can modify user setsockopt arguments before passing them down to the kernel or bypass kernel completely. BPF_CGROUP_GETSOCKOPT can can inspect/modify getsockopt arguments that

[PATCH bpf-next v9 3/9] libbpf: support sockopt hooks

2019-06-27 Thread Stanislav Fomichev
Make libbpf aware of new sockopt hooks so it can derive prog type and hook point from the section names. Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev --- tools/lib/bpf/libbpf.c| 5 + tools/lib/bpf/libbpf_probes.c | 1 + 2 files changed, 6 insertions(+) diff

[PATCH bpf-next v9 2/9] bpf: sync bpf.h to tools/

2019-06-27 Thread Stanislav Fomichev
Export new prog type and hook points to the libbpf. Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev --- tools/include/uapi/linux/bpf.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index

[PATCH bpf-next v9 4/9] selftests/bpf: test sockopt section name

2019-06-27 Thread Stanislav Fomichev
Add tests that make sure libbpf section detection works. Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/test_section_names.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tools/testing/selftests/bpf/test_section_names.c b

[PATCH bpf-next v9 8/9] bpf: add sockopt documentation

2019-06-27 Thread Stanislav Fomichev
Provide user documentation about sockopt prog type and cgroup hooks. v9: * add details about setsockopt context and inheritance v7: * add description for retval=0 and optlen=-1 v6: * describe cgroup chaining, add example v2: * use return code 2 for kernel bypass Cc: Andrii Nakryiko Cc: Martin

[PATCH bpf-next v9 9/9] bpftool: support cgroup sockopt

2019-06-27 Thread Stanislav Fomichev
Support sockopt prog type and cgroup hooks in the bpftool. Cc: Andrii Nakryiko Cc: Martin Lau Acked-by: Jakub Kicinski Signed-off-by: Stanislav Fomichev --- tools/bpf/bpftool/Documentation/bpftool-cgroup.rst | 7 +-- tools/bpf/bpftool/Documentation/bpftool-prog.rst | 3 ++- tools/bpf/bp

[PATCH bpf-next v9 5/9] selftests/bpf: add sockopt test

2019-06-27 Thread Stanislav Fomichev
Add sockopt selftests: * require proper expected_attach_type * enforce context field read/write access * test bpf_sockopt_handled handler * test EPERM * test limiting optlen from getsockopt * test out-of-bounds access v9: * add tests for setsockopt argument mangling v7: * remove return 2; test re

[PATCH bpf-next v9 7/9] selftests/bpf: add sockopt test that exercises BPF_F_ALLOW_MULTI

2019-06-27 Thread Stanislav Fomichev
sockopt test that verifies chaining behavior. v9: * setsockopt chaining example v7: * rework the test to verify cgroup getsockopt chaining Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/.gitignore| 1 + tools/testing/selftests/b

[PATCH bpf-next v9 6/9] selftests/bpf: add sockopt test that exercises sk helpers

2019-06-27 Thread Stanislav Fomichev
socktop test that introduces new SOL_CUSTOM sockopt level and stores whatever users sets in sk storage. Whenever getsockopt is called, the original value is retrieved. v9: * SO_SNDBUF example to override user-supplied buffer v7: * use retval=0 and optlen-1 v6: * test 'ret=1' use-case as well (Al

Re: [PATCH v2 bpf-next 1/3] libbpf: add perf buffer API

2019-06-27 Thread Daniel Borkmann
On 06/26/2019 08:12 AM, Andrii Nakryiko wrote: > BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF program > to user space for additional processing. libbpf already has very low-level API > to read single CPU perf buffer, bpf_perf_event_read_simple(), but it's hard to > use and

[PATCH net-next] r8169: improve handling VLAN tag

2019-06-27 Thread Heiner Kallweit
The VLAN tag is stored in the descriptor in network byte order. Using swab16 works on little endian host systems only. Better play safe and use ntohs or htons respectively. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[PATCH net-next] r8169: consider that 32 Bit DMA is the default

2019-06-27 Thread Heiner Kallweit
Documentation/DMA-API-HOWTO.txt states: By default, the kernel assumes that your device can address 32-bits of DMA addressing. For a 64-bit capable device, this needs to be increased, and for a device with limitations, it needs to be decreased. Therefore we don't need the 32 Bit DMA fallback confi

Re: [PATCH v2 bpf-next 3/7] libbpf: add kprobe/uprobe attach API

2019-06-27 Thread Daniel Borkmann
On 06/27/2019 12:15 AM, Andrii Nakryiko wrote: > On Wed, Jun 26, 2019 at 7:25 AM Daniel Borkmann wrote: [...] >> What this boils down to is that this should get a proper abstraction, e.g. as >> in struct libbpf_event which holds the event object. There should be helper >> functions like libbpf_eve

[PATCH net-next] r8169: remove not needed call to dma_sync_single_for_device

2019-06-27 Thread Heiner Kallweit
DMA_API_HOWTO.txt includes an example explaining when dma_sync_single_for_device() is not needed, and that example matches our use case. The buffer isn't changed by the CPU and direction is DMA_FROM_DEVICE, so we can remove the call to dma_sync_single_for_device(). Signed-off-by: Heiner Kallweit

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

2019-06-27 Thread Jakub Kicinski
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 (in the default > scenario). That as

[Patch net] netrom: fix a memory leak in nr_rx_frame()

2019-06-27 Thread Cong Wang
When the skb is associated with a new sock, just assigning it to skb->sk is not sufficient, we have to set its destructor to free the sock properly too. Reported-by: syzbot+d6636a36d3c34bd88...@syzkaller.appspotmail.com Signed-off-by: Cong Wang --- net/netrom/af_netrom.c | 3 ++- 1 file changed,

Re: [PATCH v2 bpf-next 3/7] libbpf: add kprobe/uprobe attach API

2019-06-27 Thread Andrii Nakryiko
On Thu, Jun 27, 2019 at 2:16 PM Daniel Borkmann wrote: > > On 06/27/2019 12:15 AM, Andrii Nakryiko wrote: > > On Wed, Jun 26, 2019 at 7:25 AM Daniel Borkmann > > wrote: > [...] > >> What this boils down to is that this should get a proper abstraction, e.g. > >> as > >> in struct libbpf_event wh

Re: [PATCH v2 bpf-next 1/3] libbpf: add perf buffer API

2019-06-27 Thread Andrii Nakryiko
On Thu, Jun 27, 2019 at 2:04 PM Daniel Borkmann wrote: > > On 06/26/2019 08:12 AM, Andrii Nakryiko wrote: > > BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF > > program > > to user space for additional processing. libbpf already has very low-level > > API > > to read singl

[PATCH v2 net-next 1/3] net: dsa: sja1105: Don't check state->link in phylink_mac_config

2019-06-27 Thread Vladimir Oltean
It has been pointed out that PHYLINK can call mac_config only to update the phy_interface_type and without knowing what the AN results are. Experimentally, when this was observed to happen, state->link was also unset, and therefore was used as a proxy to ignore this call. However it is also sugges

[PATCH v2 net-next 3/3] net: dsa: sja1105: Mark in-band AN modes not supported for PHYLINK

2019-06-27 Thread Vladimir Oltean
We need a better way to signal this, perhaps in phylink_validate, but for now just print this error message as guidance for other people looking at this driver's code while trying to rework PHYLINK. Cc: Russell King Signed-off-by: Vladimir Oltean --- drivers/net/dsa/sja1105/sja1105_main.c | 5 +

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

2019-06-27 Thread Vladimir Oltean
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/3). Vladimir Oltean (3): net: dsa: sja1105: Don't check state->link in p

[PATCH v2 net-next 2/3] net: dsa: sja1105: Check for PHY mode mismatches with what PHYLINK reports

2019-06-27 Thread Vladimir Oltean
PHYLINK being designed with PHYs in mind that can change MII protocol, for correct operation it is necessary to ensure that the PHY interface mode stays the same (otherwise clear the supported bit mask, as required). Because this is just a hypothetical situation for now, we don't bother to check w

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

2019-06-27 Thread Daniel Borkmann
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 programs have to track this themselves,

[PATCH 1/5] net: dsa: microchip: Replace ad-hoc polling with regmap

2019-06-27 Thread Marek Vasut
Regmap provides polling function to poll for bits in a register, use in instead of reimplementing it. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh --- drivers/net/dsa/microchip/ksz9477.c| 14 +- drivers/net/dsa/microchip/ksz_

[PATCH 2/5] net: dsa: microchip: Replace ksz9477_wait_vlan_ctrl_ready polling with regmap

2019-06-27 Thread Marek Vasut
Regmap provides polling function to poll for bits in a register. This function is another reimplementation of polling for bit being clear in a register. Replace this with regmap polling function. Moreover, inline the function parameters, as the function is never called with any other parameter valu

[PATCH 4/5] net: dsa: microchip: Replace ksz9477_wait_alu_sta_ready polling with regmap

2019-06-27 Thread Marek Vasut
Regmap provides polling function to poll for bits in a register. This function is another reimplementation of polling for bit being clear in a register. Replace this with regmap polling function. Moreover, inline the function parameters, as the function is never called with any other parameter valu

[PATCH 5/5] net: dsa: microchip: Replace bit RMW with regmap

2019-06-27 Thread Marek Vasut
Regmap provides read-modify-write function to update bitfields in registers. Replace ad-hoc read-modify-write with regmap_update_bits() where applicable. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh --- drivers/net/dsa/microchip/ksz9477.c |

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

2019-06-27 Thread Marek Vasut
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 possibly bisect, but maybe the patches can be squashed. Signed-off-by: Marek Vasut

[PATCH 3/5] net: dsa: microchip: Replace ksz9477_wait_alu_ready polling with regmap

2019-06-27 Thread Marek Vasut
Regmap provides polling function to poll for bits in a register. This function is another reimplementation of polling for bit being clear in a register. Replace this with regmap polling function. Moreover, inline the function parameters, as the function is never called with any other parameter valu

[PATCH 3/6 bpf-next] Always check the recycle stack when using the umem fq.

2019-06-27 Thread Jonathan Lemon
The specific _rq variants are deprecated, and will be removed next. Signed-off-by: Jonathan Lemon --- include/net/xdp_sock.h | 22 +++--- net/xdp/xsk.c | 22 +++--- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/include/net/xdp_sock.h b/

[PATCH 5/6 bpf-next] Remove use of umem _rq variants from Mellanox driver.

2019-06-27 Thread Jonathan Lemon
Signed-off-by: Jonathan Lemon --- drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c index 8d24eaa660a8..e116b1fde7

<    1   2   3   >