[PATCH] can: flexcan: update hardware feature information for i.MX8QM

2019-08-15 Thread Joakim Zhang
Update hardware feature information for i.MX8QM. Signed-off-by: Joakim Zhang --- drivers/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 58a794c7387b..def8cbbc04e8 100644 --- a/drivers/net/can/flexc

[PATCH] can: flexcan: disable completely the ECC mechanism

2019-08-15 Thread Joakim Zhang
The ECC(memory error detection and correction) mechanism can be activated or not, controlled by the ECCDIS bit in CAN_MECR. When disabled, updates on indications and reporting registers are stopped. So if want to disable ECC completely, had better assert ECCDIS bit, not just mask the related interr

[PATCH] tun: fix use-after-free when register netdev failed

2019-08-15 Thread Yang Yingliang
I got a UAF repport in tun driver when doing fuzzy test: [ 466.269490] == [ 466.271792] BUG: KASAN: use-after-free in tun_chr_read_iter+0x2ca/0x2d0 [ 466.271806] Read of size 8 at addr 888372139250 by task tun-test/2699 [ 466

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

2019-08-15 Thread Björn Töpel
On 2019-08-15 01:17, Daniel Borkmann wrote: Seems reasonable to me, and inc as opposed to inc_not_zero is also fine here since at this point in time we're still holding one reference to the map. Ok, good. But I think there's a catch with the current code that still needs fixing: Imagine you

Re: can: tcan4x5x: spi bits_per_word issue on Raspberry PI

2019-08-15 Thread Marc Kleine-Budde
On 8/14/19 5:01 PM, FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu) wrote: >> Hi all, >> >> I am trying to use a tcan4550 together with a Raspberry PI 3 B. I am using >> the >> tcan4x5x driver from net-next. >> I always get the following error during startup. >> tcan4x5x spi0.0: Probe faile

Re: [patch net-next v2 2/2] selftests: netdevsim: add devlink params tests

2019-08-15 Thread Jiri Pirko
Thu, Aug 15, 2019 at 03:09:00AM CEST, jakub.kicin...@netronome.com wrote: >On Wed, 14 Aug 2019 17:26:04 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Test recently added netdevsim devlink param implementation. >> >> Signed-off-by: Jiri Pirko >> --- >> v1->v2: >> -using cmd_jq helper > >Sti

Re: [patch net-next v2 2/2] selftests: netdevsim: add devlink params tests

2019-08-15 Thread Jiri Pirko
Thu, Aug 15, 2019 at 10:45:45AM CEST, j...@resnulli.us wrote: >Thu, Aug 15, 2019 at 03:09:00AM CEST, jakub.kicin...@netronome.com wrote: >>On Wed, 14 Aug 2019 17:26:04 +0200, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Test recently added netdevsim devlink param implementation. >>> >>> Signed

Re: [PATCH] net: ethernet: mediatek: Add MT7628/88 SoC support

2019-08-15 Thread Stefan Roese
Hi Rene, On 14.08.19 15:08, René van Dorst wrote: Quoting Stefan Roese : Hi Rene, On 14.08.19 11:26, René van Dorst wrote: Great, Thanks for addressing this issue. I hope we can collaborate to also support mt76x8 in my PHYLINK patches [0][1]. I am close to posting V2 of the patches but

Re: [PATCH net] tunnel: fix dev null pointer dereference when send pkg larger than mtu in collect_md mode

2019-08-15 Thread Eric Dumazet
On 8/15/19 8:09 AM, Hangbin Liu wrote: > When we send a packet larger than PMTU, we need to reply with > icmp_send(ICMP_FRAG_NEEDED) or icmpv6_send(ICMPV6_PKT_TOOBIG). > > But in collect_md mode, kernel will crash while accessing the dst dev > as __metadata_dst_init() init dst->dev to NULL by d

Re: [PATCH] tun: fix use-after-free when register netdev failed

2019-08-15 Thread Jason Wang
On 2019/8/15 下午4:18, Yang Yingliang wrote: I got a UAF repport in tun driver when doing fuzzy test: [ 466.269490] == [ 466.271792] BUG: KASAN: use-after-free in tun_chr_read_iter+0x2ca/0x2d0 [ 466.271806] Read of size 8 at add

[PATCH bpf-next v5 0/2] net: xdp: XSKMAP improvements

2019-08-15 Thread Björn Töpel
This series (v5 and counting) add two improvements for the XSKMAP, used by AF_XDP sockets. 1. Automatic cleanup when an AF_XDP socket goes out of scope/is released. Instead of require that the user manually clears the "released" state socket from the map, this is done automatically. Each

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

2019-08-15 Thread Björn Töpel
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 resource, and block newly created sockets from attaching to that queue, but no user application can access the fill/complet

[PATCH bpf-next v5 2/2] xsk: support BPF_EXIST and BPF_NOEXIST flags in XSKMAP

2019-08-15 Thread Björn Töpel
From: Björn Töpel The XSKMAP did not honor the BPF_EXIST/BPF_NOEXIST flags when updating an entry. This patch addresses that. Signed-off-by: Björn Töpel --- kernel/bpf/xskmap.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/xskmap.c b/kernel/bpf/xskmap.c

Re: [PATCH] tun: fix use-after-free when register netdev failed

2019-08-15 Thread Eric Dumazet
On 8/15/19 10:18 AM, Yang Yingliang wrote: > I got a UAF repport in tun driver when doing fuzzy test: > > > [ 466.368604] page:ea000dc84e00 refcount:1 mapcount:0 > mapping:8883df1b4f00 index:0x0 compound_mapcount: 0 > [ 466.371582] flags: 0x2f80010200(slab|head) > [ 466.372910]

[PATCH net-next] net/rds: Add RDS6_INFO_SOCKETS and RDS6_INFO_RECV_MESSAGES options

2019-08-15 Thread Ka-Cheong Poon
Add support of the socket options RDS6_INFO_SOCKETS and RDS6_INFO_RECV_MESSAGES which update the RDS_INFO_SOCKETS and RDS_INFO_RECV_MESSAGES options respectively. The old options work for IPv4 sockets only. Signed-off-by: Ka-Cheong Poon --- net/rds/af_rds.c | 93

Re: [PATCH 08/16] mips: prefer __section from compiler_attributes.h

2019-08-15 Thread Paul Burton
Hi Nick, On Mon, Aug 12, 2019 at 02:50:41PM -0700, Nick Desaulniers wrote: > Reported-by: Sedat Dilek > Suggested-by: Josh Poimboeuf > Signed-off-by: Nick Desaulniers It would be good to add a commit message, even if it's just a line repeating the subject & preferably describing the motivation

[PATCH net-next 0/2] net: phy: realtek: map vendor-specific EEE registers to standard MMD registers

2019-08-15 Thread Heiner Kallweit
EEE-related registers on newer integrated PHY's have the standard layout, but are accessible not via MMD but via vendor-specific registers. Emulating the standard MMD registers allows to use the generic functions for EEE control and to significantly simplify the r8169 driver. Heiner Kallweit (2):

[PATCH net-next 1/2] net: phy: realtek: add support for EEE registers on integrated PHY's

2019-08-15 Thread Heiner Kallweit
EEE-related registers on newer integrated PHY's have the standard layout, but are accessible not via MMD but via vendor-specific registers. Emulating the standard MMD registers allows to use the generic functions for EEE control. Signed-off-by: Heiner Kallweit --- drivers/net/phy/realtek.c | 43

[PATCH net-next 2/2] r8169: use the generic EEE management functions

2019-08-15 Thread Heiner Kallweit
Now that the Realtek PHY driver maps the vendor-specific EEE registers to the standard MMD registers, we can remove all special handling and use the generic functions phy_ethtool_get/set_eee. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 172 +++--

Re: [PATCH] net: hns: hns_enet: Add of_node_put in hns_nic_dev_probe()

2019-08-15 Thread Yonglong Liu
On 2019/8/15 14:28, Nishka Dasgupta wrote: > The local variable ae_node in function hns_nic_dev_probe takes the > return value of of_parse_phandle, which gets a node but does not put it. > This may cause a memory leak. Hence put ae_node after the last time it > is invoked. > Issue found with Coc

Re: [RFC PATCH bpf-next 00/14] xdp_flow: Flow offload to XDP

2019-08-15 Thread Toshiaki Makita
On 2019/08/15 2:07, Stanislav Fomichev wrote: On 08/13, Toshiaki Makita wrote: * Implementation xdp_flow makes use of UMH to load an eBPF program for XDP, similar to bpfilter. The difference is that xdp_flow does not generate the eBPF program dynamically but a prebuilt program is embedded in UM

Re: [RFC PATCH bpf-next 00/14] xdp_flow: Flow offload to XDP

2019-08-15 Thread Toshiaki Makita
On 2019/08/14 16:33, Toshiaki Makita wrote:    bpf, hashtab: Compare keys in long 3Mpps vs 4Mpps just from this patch ? or combined with i40 prefech patch ? Combined.   drivers/net/ethernet/intel/i40e/i40e_txrx.c  |    1 + Could you share "perf report" for just hash tab optimization and f

Re: [PATCH bpf-next 0/5] Add support for SKIP_BPF flag for AF_XDP sockets

2019-08-15 Thread Toke Høiland-Jørgensen
Sridhar Samudrala writes: > This patch series introduces XDP_SKIP_BPF flag that can be specified > during the bind() call of an AF_XDP socket to skip calling the BPF > program in the receive path and pass the buffer directly to the socket. > > When a single AF_XDP socket is associated with a que

[PATCH net-next] net: phy: read MII_CTRL1000 in genphy_read_status only if needed

2019-08-15 Thread Heiner Kallweit
Value of MII_CTRL1000 is needed only if LPA_1000MSFAIL is set. Therefore move reading this register. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy_device.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_

[PATCH net-next] net: phy: swphy: emulate register MII_ESTATUS

2019-08-15 Thread Heiner Kallweit
When the genphy driver binds to a swphy it will call genphy_read_abilites that will try to read MII_ESTATUS if BMSR_ESTATEN is set in MII_BMSR. So far this would read the default value 0x and 1000FD and 1000HD are reported as supported just by chance. Better add explicit support for emulating M

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

2019-08-15 Thread Jordan Glover
On Wednesday, August 14, 2019 10:05 PM, Alexei Starovoitov wrote: > On Wed, Aug 14, 2019 at 10:51:23AM -0700, Andy Lutomirski wrote: > > > If eBPF is genuinely not usable by programs that are not fully trusted > > by the admin, then no kernel changes at all are needed. Programs that > > want to

[PATCH net-next 0/3] net: phy: remove genphy_config_init

2019-08-15 Thread Heiner Kallweit
Supported PHY features are either auto-detected or explicitly set. In both cases calling genphy_config_init isn't needed. All that genphy_config_init does is removing features that are set as supported but can't be auto-detected. Basically it duplicates the code in genphy_read_abilities. Therefore

[PATCH net-next 1/3] net: phy: remove calls to genphy_config_init

2019-08-15 Thread Heiner Kallweit
Supported PHY features are either auto-detected or explicitly set. In both cases calling genphy_config_init isn't needed. All that genphy_config_init does is removing features that are set as supported but can't be auto-detected. Basically it duplicates the code in genphy_read_abilities. Therefore

[PATCH net-next 2/3] net: dsa: remove calls to genphy_config_init

2019-08-15 Thread Heiner Kallweit
Supported PHY features are either auto-detected or explicitly set. In both cases calling genphy_config_init isn't needed. Signed-off-by: Heiner Kallweit --- net/dsa/port.c | 5 - 1 file changed, 5 deletions(-) diff --git a/net/dsa/port.c b/net/dsa/port.c index f071acf28..f75301456 100644 --

[PATCH net-next 3/3] net: phy: remove genphy_config_init

2019-08-15 Thread Heiner Kallweit
Now that all users have been removed we can remove genphy_config_init. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy_device.c | 51 include/linux/phy.h | 1 - 2 files changed, 52 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/dri

RE: [v2, 4/4] ocelot: add VCAP IS2 rule to trap PTP Ethernet frames

2019-08-15 Thread Y.b. Lu
Hi Allan, > -Original Message- > From: Allan W . Nielsen > Sent: Wednesday, August 14, 2019 5:17 PM > To: Y.b. Lu > Cc: Andrew Lunn ; netdev@vger.kernel.org; David S . Miller > ; Alexandre Belloni ; > Microchip Linux Driver Support > Subject: Re: [v2, 4/4] ocelot: add VCAP IS2 rule to t

[PATCH net-next v2 0/2] net: phy: realtek: map vendor-specific EEE registers to standard MMD registers

2019-08-15 Thread Heiner Kallweit
EEE-related registers on newer integrated PHY's have the standard layout, but are accessible not via MMD but via vendor-specific registers. Emulating the standard MMD registers allows to use the generic functions for EEE control and to significantly simplify the r8169 driver. v2: - rebase patch 2

Re: Fyi

2019-08-15 Thread Karen Ngui
Hello netdev@vger.kernel.org I am Karen Ngui by name got your details based on recommendations from LinkedIn 5 star marketers and its feels good to be part of your professional network. I sent you a proposal via email on the 10th of this month did you get it ? Do reply to my message so I c

[PATCH net-next v2 1/2] net: phy: realtek: add support for EEE registers on integrated PHY's

2019-08-15 Thread Heiner Kallweit
EEE-related registers on newer integrated PHY's have the standard layout, but are accessible not via MMD but via vendor-specific registers. Emulating the standard MMD registers allows to use the generic functions for EEE control. Signed-off-by: Heiner Kallweit --- drivers/net/phy/realtek.c | 43

[PATCH net-next v2 2/2] r8169: use the generic EEE management functions

2019-08-15 Thread Heiner Kallweit
Now that the Realtek PHY driver maps the vendor-specific EEE registers to the standard MMD registers, we can remove all special handling and use the generic functions phy_ethtool_get/set_eee. Signed-off-by: Heiner Kallweit --- v2. - rebased --- drivers/net/ethernet/realtek/r8169_main.c | 172 +++

[PATCH bpf-next v2 0/3] xdpsock: allow mmap2 usage for 32bits

2019-08-15 Thread Ivan Khoronzhuk
This patchset contains several improvements for af_xdp socket umem mappings for 32bit systems. Also, there is one more patch outside of this series that on linux-next tree and related to mmap2 af_xdp umem offsets: "mm: mmap: increase sockets maximum memory size pgoff for 32bits" https://lkml.org/lk

[PATCH net-next] r8169: sync EEE handling for RTL8168h with vendor driver

2019-08-15 Thread Heiner Kallweit
Sync EEE init for RTL8168h with vendor driver and add two writes to vendor-specific registers. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c

Re: [PATCH net-next 2/2] r8169: use the generic EEE management functions

2019-08-15 Thread Andrew Lunn
On Thu, Aug 15, 2019 at 11:47:33AM +0200, Heiner Kallweit wrote: > Now that the Realtek PHY driver maps the vendor-specific EEE registers > to the standard MMD registers, we can remove all special handling and > use the generic functions phy_ethtool_get/set_eee. Hi Heiner I think you should also

Re: [PATCH net-next] net: phy: read MII_CTRL1000 in genphy_read_status only if needed

2019-08-15 Thread Andrew Lunn
On Thu, Aug 15, 2019 at 01:15:19PM +0200, Heiner Kallweit wrote: > Value of MII_CTRL1000 is needed only if LPA_1000MSFAIL is set. > Therefore move reading this register. > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

RE: [PATCH 3/3] ocelot_ace: fix action of trap

2019-08-15 Thread Y.b. Lu
Hi Andrew and Allan, I add Richard in email for help and some suggestions. And please see my comments inline. Thanks. Hi Richard, We are discussing problem of PTP message trapping to CPU on switch. Hope for your suggestions since you are the expert. Here are the two versions patch-set. V2: http

Re: [v2, 4/4] ocelot: add VCAP IS2 rule to trap PTP Ethernet frames

2019-08-15 Thread Andrew Lunn
> [Y.b. Lu] Actually I couldn’t find reasons why make some ports PTP > unaware, if there is software stack for PTP aware... Maybe because i have not yet done apt-get install linuxptp $EDITOR /etc/defaults/ptp4l systemctl restart ptp4l Just because it exists does not mean it is installed. A

Re: [PATCH bpf-next 0/5] Add support for SKIP_BPF flag for AF_XDP sockets

2019-08-15 Thread Björn Töpel
On 2019-08-15 05:46, Sridhar Samudrala wrote: This patch series introduces XDP_SKIP_BPF flag that can be specified during the bind() call of an AF_XDP socket to skip calling the BPF program in the receive path and pass the buffer directly to the socket. When a single AF_XDP socket is associated

Re: [PATCH] tun: fix use-after-free when register netdev failed

2019-08-15 Thread Yang Yingliang
On 2019/8/15 17:35, Eric Dumazet wrote: On 8/15/19 10:18 AM, Yang Yingliang wrote: I got a UAF repport in tun driver when doing fuzzy test: [ 466.368604] page:ea000dc84e00 refcount:1 mapcount:0 mapping:8883df1b4f00 index:0x0 compound_mapcount: 0 [ 466.371582] flags: 0x2f8001

Re: [PATCH net-next 2/2] r8169: use the generic EEE management functions

2019-08-15 Thread Heiner Kallweit
On 15.08.2019 14:35, Andrew Lunn wrote: > On Thu, Aug 15, 2019 at 11:47:33AM +0200, Heiner Kallweit wrote: >> Now that the Realtek PHY driver maps the vendor-specific EEE registers >> to the standard MMD registers, we can remove all special handling and >> use the generic functions phy_ethtool_get/

Re: [PATCH] tun: fix use-after-free when register netdev failed

2019-08-15 Thread Yang Yingliang
On 2019/8/15 17:21, Jason Wang wrote: On 2019/8/15 下午4:18, Yang Yingliang wrote: I got a UAF repport in tun driver when doing fuzzy test: [ 466.269490] == [ 466.271792] BUG: KASAN: use-after-free in tun_chr_read_iter+0x2ca/

[patch net-next v3 2/2] selftests: netdevsim: add devlink params tests

2019-08-15 Thread Jiri Pirko
From: Jiri Pirko Test recently added netdevsim devlink param implementation. Signed-off-by: Jiri Pirko --- v1->v2: -using cmd_jq helper --- .../drivers/net/netdevsim/devlink.sh | 62 ++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/tools/testing/selfte

[patch net-next v3 1/2] selftests: net: push jq workaround into separate helper

2019-08-15 Thread Jiri Pirko
From: Jiri Pirko Push the jq return value workaround code into a separate helper so it could be used by the rest of the code. Signed-off-by: Jiri Pirko --- v2->v3: -remove -e jq option and rather check for empty output and return error v1->v2: -new patch --- tools/testing/selftests/net/forward

[patch net-next v3 0/2] selftests: netdevsim: add devlink paramstests

2019-08-15 Thread Jiri Pirko
From: Jiri Pirko The first patch is just a helper addition as a dependency of the actual test in patch number two. Jiri Pirko (2): selftests: net: push jq workaround into separate helper selftests: netdevsim: add devlink params tests .../drivers/net/netdevsim/devlink.sh | 62 +

[patch net-next v4 2/2] selftests: netdevsim: add devlink regions tests

2019-08-15 Thread Jiri Pirko
From: Jiri Pirko Test netdevsim devlink region implementation. Signed-off-by: Jiri Pirko --- v1->v2: - new patch --- .../drivers/net/netdevsim/devlink.sh | 54 ++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/drivers/net/netdevs

[patch net-next v4 1/2] netdevsim: implement support for devlink region and snapshots

2019-08-15 Thread Jiri Pirko
From: Jiri Pirko Implement dummy region of size 32K and allow user to create snapshots or random data using debugfs file trigger. Signed-off-by: Jiri Pirko --- v3->v4: - sorted nsim_dev_take_snapshot_write() variables. v2->v3: - return -ENOMEM in case dummy_data cannot be allocated and don't

[patch net-next v4 0/2] netdevsim: implement support for devlink region and snapshots

2019-08-15 Thread Jiri Pirko
From: Jiri Pirko Implement devlink region support for netdevsim and test it. --- Note the selftest patch depends on "[patch net-next] selftests: netdevsim: add devlink params tests" patch sent earlier today. Jiri Pirko (2): netdevsim: implement support for devlink region and snapshots selft

RE: [net-next 1/1] tipc: clean up skb list lock handling on send path

2019-08-15 Thread Jon Maloy
> -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of Xin Long > Sent: 15-Aug-19 01:58 > To: Jon Maloy > Cc: da...@davemloft.net; netdev@vger.kernel.org; Tung Quang Nguyen > ; Hoang Huu Le > ; shu...@redhat.com; ying xue > ; eduma...@google.com; tipc- > discuss...@lis

Re: [RFC bpf-next 0/3] tools: bpftool: add subcommand to count map entries

2019-08-15 Thread Quentin Monnet
2019-08-14 13:18 UTC-0700 ~ Andrii Nakryiko > On Wed, Aug 14, 2019 at 10:12 AM Quentin Monnet > wrote: >> >> 2019-08-14 09:58 UTC-0700 ~ Alexei Starovoitov >> >>> On Wed, Aug 14, 2019 at 9:45 AM Edward Cree wrote: On 14/08/2019 10:42, Quentin Monnet wrote: > 2019-08-13 18:51 UTC-0

Re: [RFC bpf-next 0/3] tools: bpftool: add subcommand to count map entries

2019-08-15 Thread Quentin Monnet
2019-08-14 18:14 UTC+0100 ~ Edward Cree > On 14/08/2019 17:58, Quentin Monnet wrote: >> 2019-08-14 17:45 UTC+0100 ~ Edward Cree >>> This might be a really dumb suggestion, but: you're wanting to collect a >>>  summary statistic over an in-kernel data structure in a single syscall, >>>  because ma

[PATCH -next] btf: fix return value check in btf_vmlinux_init()

2019-08-15 Thread Wei Yongjun
In case of error, the function kobject_create_and_add() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 341dfcf8d78e ("btf: expose BTF info through sysfs") Signed-off-by: Wei Yongjun --- kernel/bpf/sysfs_btf.c | 7 ++-

[PATCH bpf] tools: bpftool: close prog FD before exit on showing a single program

2019-08-15 Thread Quentin Monnet
When showing metadata about a single program by invoking "bpftool prog show PROG", the file descriptor referring to the program is not closed before returning from the function. Let's close it. Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool") Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicins

[PATCH bpf 0/6] tools: bpftool: fix printf()-like functions

2019-08-15 Thread Quentin Monnet
Hi, Because the "__printf()" attributes were used only where the functions are implemented, and not in header files, the checks have not been enforced on all the calls to printf()-like functions, and a number of errors slipped in bpftool over time. This set cleans up such errors, and then moves th

[PATCH bpf 3/6] tools: bpftool: fix argument for p_err() in BTF do_dump()

2019-08-15 Thread Quentin Monnet
The last argument passed to one call to the p_err() function is not correct, it should be "*argv" instead of "**argv". This may lead to a segmentation fault error if BTF id cannot be parsed correctly. Let's fix this. Fixes: c93cc69004dt ("bpftool: add ability to dump BTF types") Signed-off-by: Que

[PATCH bpf 6/6] tools: bpftool: move "__printf()" attributes to header file

2019-08-15 Thread Quentin Monnet
Some functions in bpftool have a "__printf()" format attributes to tell the compiler they should expect printf()-like arguments. But because these attributes are not used for the function prototypes in the header files, the compiler does not run the checks everywhere the functions are used, and som

[PATCH bpf 1/6] tools: bpftool: fix arguments for p_err() in do_event_pipe()

2019-08-15 Thread Quentin Monnet
The last argument passed to some calls to the p_err() functions is not correct, it should be "*argv" instead of "**argv". This may lead to a segmentation fault error if CPU IDs or indices from the command line cannot be parsed correctly. Let's fix this. Fixes: f412eed9dfde ("tools: bpftool: add si

[PATCH bpf 4/6] tools: bpftool: fix format string for p_err() in query_flow_dissector()

2019-08-15 Thread Quentin Monnet
The format string passed to one call to the p_err() function in query_flow_dissector() does not match the value that should be printed, resulting in some garbage integer being printed instead of strerror(errno) if /proc/self/ns/net cannot be open. Let's fix the format string. Fixes: 7f0c57fec80f (

[PATCH bpf 5/6] tools: bpftool: fix format string for p_err() in detect_common_prefix()

2019-08-15 Thread Quentin Monnet
There is one call to the p_err() function in detect_common_prefix() where the message to print is passed directly as the first argument, without using a format string. This is harmless, but may trigger warnings if the "__printf()" attribute is used correctly for the p_err() function. Let's fix it b

[PATCH bpf 2/6] tools: bpftool: fix format strings and arguments for jsonw_printf()

2019-08-15 Thread Quentin Monnet
There are some mismatches between format strings and arguments passed to jsonw_printf() in the BTF dumper for bpftool, which seems harmless but may result in warnings if the "__printf()" attribute is used correctly for jsonw_printf(). Let's fix relevant format strings and type cast. Fixes: b12d6ec

[PATCH net-next v2 0/4] net/rds: Fixes from internal Oracle repo

2019-08-15 Thread Gerd Rausch
This is the first set of (mostly old) patches from our internal repository in an effort to synchronize what Oracle had been using internally with what is shipped with the Linux kernel. Andy Grover (1): rds: check for excessive looping in rds_send_xmit Chris Mason (2): RDS: limit the number of

[PATCH net-next v2 1/4] RDS: limit the number of times we loop in rds_send_xmit

2019-08-15 Thread Gerd Rausch
From: Chris Mason Date: Fri, 3 Feb 2012 11:07:54 -0500 This will kick the RDS worker thread if we have been looping too long. Original commit from 2012 updated to include a change by Venkat Venkatsubra that triggers "must_wake" if "rds_ib_recv_refill_one" fails. Signed-off-by: Gerd Rausch ---

[PATCH net-next v2 2/4] RDS: don't use GFP_ATOMIC for sk_alloc in rds_create

2019-08-15 Thread Gerd Rausch
From: Chris Mason Date: Fri, 3 Feb 2012 11:08:51 -0500 Signed-off-by: Chris Mason Signed-off-by: Bang Nguyen Signed-off-by: Gerd Rausch Signed-off-by: Somasundaram Krishnasamy --- net/rds/af_rds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/af_rds.c b/net/rds/

[net-next v2 1/1] tipc: clean up skb list lock handling on send path

2019-08-15 Thread Jon Maloy
The policy for handling the skb list locks on the send and receive paths is simple. - On the send path we never need to grab the lock on the 'xmitq' list when the destination is an exernal node. - On the receive path we always need to grab the lock on the 'inputq' list, irrespective of source

[PATCH net-next v2 3/4] net/rds: Add a few missing rds_stat_names entries

2019-08-15 Thread Gerd Rausch
From: Gerd Rausch Date: Thu, 11 Jul 2019 12:15:50 -0700 In a previous commit, fields were added to "struct rds_statistics" but array "rds_stat_names" was not updated accordingly. Please note the inconsistent naming of the string representations that is done in the name of compatibility with the

[PATCH net-next v2 4/4] rds: check for excessive looping in rds_send_xmit

2019-08-15 Thread Gerd Rausch
From: Andy Grover Date: Thu, 13 Jan 2011 11:40:31 -0800 Original commit from 2011 updated to include a change by Yuval Shaia that adds a new statistic counter "send_stuck_rm" to capture the messages looping exessively in the send path. Signed-off-by: Gerd Rausch --- net/rds/rds.h | 2 +- n

[PATCH bpf-next 2/5] tools: bpf: synchronise BPF UAPI header with tools

2019-08-15 Thread Quentin Monnet
Synchronise the bpf.h header under tools, to report the addition of the new BPF_BTF_GET_NEXT_ID syscall command for bpf(). Signed-off-by: Quentin Monnet --- tools/include/uapi/linux/bpf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linu

[PATCH bpf-next 3/5] libbpf: refactor bpf_*_get_next_id() functions

2019-08-15 Thread Quentin Monnet
In preparation for the introduction of a similar function for retrieving the id of the next BTF object, consolidate the code from bpf_prog_get_next_id() and bpf_map_get_next_id() in libbpf. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- tools/lib/bpf/bpf.c | 21 --

[PATCH bpf-next 1/5] bpf: add new BPF_BTF_GET_NEXT_ID syscall command

2019-08-15 Thread Quentin Monnet
Add a new command for the bpf() system call: BPF_BTF_GET_NEXT_ID is used to cycle through all BTF objects loaded on the system. The motivation is to be able to inspect (list) all BTF objects presents on the system. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- include/linux/bpf

[PATCH bpf-next 0/5] bpf: list BTF objects loaded on system

2019-08-15 Thread Quentin Monnet
Hi, This set adds a new command BPF_BTF_GET_NEXT_ID to the bpf() system call, adds the relevant API function in libbpf, and uses it in bpftool to list all BTF objects loaded on the system (and to dump the ids of maps and programs associated with them, if any). The main motivation of listing BTF ob

[PATCH bpf-next 4/5] libbpf: add bpf_btf_get_next_id() to cycle through BTF objects

2019-08-15 Thread Quentin Monnet
Add an API function taking a BTF object id and providing the id of the next BTF object in the kernel. This can be used to list all BTF objects loaded on the system. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- tools/lib/bpf/Makefile | 2 +- tools/lib/bpf/bpf.c | 5 +

[PATCH bpf-next 5/5] tools: bpftool: implement "bpftool btf show|list"

2019-08-15 Thread Quentin Monnet
Add a "btf list" (alias: "btf show") subcommand to bpftool in order to dump all BTF objects loaded on a system. When running the command, hash tables are built in bpftool to retrieve all the associations between BTF objects and BPF maps and programs. This allows for printing all such associations

Re: [RFC PATCH bpf-next 00/14] xdp_flow: Flow offload to XDP

2019-08-15 Thread Stanislav Fomichev
On 08/15, Toshiaki Makita wrote: > On 2019/08/15 2:07, Stanislav Fomichev wrote: > > On 08/13, Toshiaki Makita wrote: > > > * Implementation > > > > > > xdp_flow makes use of UMH to load an eBPF program for XDP, similar to > > > bpfilter. The difference is that xdp_flow does not generate the eBPF

Re: [PATCH net-next] net: phy: swphy: emulate register MII_ESTATUS

2019-08-15 Thread Florian Fainelli
On 8/15/2019 4:19 AM, Heiner Kallweit wrote: > When the genphy driver binds to a swphy it will call > genphy_read_abilites that will try to read MII_ESTATUS if BMSR_ESTATEN > is set in MII_BMSR. So far this would read the default value 0x > and 1000FD and 1000HD are reported as supported jus

Re: [PATCH net-next] net: phy: read MII_CTRL1000 in genphy_read_status only if needed

2019-08-15 Thread Florian Fainelli
On 8/15/2019 4:15 AM, Heiner Kallweit wrote: > Value of MII_CTRL1000 is needed only if LPA_1000MSFAIL is set. > Therefore move reading this register. > > Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next v2 1/2] net: phy: realtek: add support for EEE registers on integrated PHY's

2019-08-15 Thread Florian Fainelli
On 8/15/2019 5:12 AM, Heiner Kallweit wrote: > EEE-related registers on newer integrated PHY's have the standard > layout, but are accessible not via MMD but via vendor-specific > registers. Emulating the standard MMD registers allows to use the > generic functions for EEE control. > > Signed-o

Re: [PATCH net-next 2/2] r8169: use the generic EEE management functions

2019-08-15 Thread Florian Fainelli
On 8/15/2019 6:02 AM, Heiner Kallweit wrote: > On 15.08.2019 14:35, Andrew Lunn wrote: >> On Thu, Aug 15, 2019 at 11:47:33AM +0200, Heiner Kallweit wrote: >>> Now that the Realtek PHY driver maps the vendor-specific EEE registers >>> to the standard MMD registers, we can remove all special handl

Re: [PATCH net-next 0/1] Add BASE-T1 PHY support

2019-08-15 Thread Andrew Lunn
On Thu, Aug 15, 2019 at 03:32:27PM +, Christian Herber wrote: > This patch adds basic support for BASE-T1 PHYs in the framework. > BASE-T1 PHYs main area of application are automotive and industrial. > BASE-T1 is standardized in IEEE 802.3, namely > - IEEE 802.3bw: 100BASE-T1 > - IEEE 802.3bp 1

Re: [PATCH net-next v2 2/2] r8169: use the generic EEE management functions

2019-08-15 Thread Florian Fainelli
On 8/15/2019 5:14 AM, Heiner Kallweit wrote: > Now that the Realtek PHY driver maps the vendor-specific EEE registers > to the standard MMD registers, we can remove all special handling and > use the generic functions phy_ethtool_get/set_eee. > > Signed-off-by: Heiner Kallweit Reviewed-by: Fl

Re: [RFC PATCH bpf-next 00/14] xdp_flow: Flow offload to XDP

2019-08-15 Thread William Tu
On Tue, Aug 13, 2019 at 5:07 AM Toshiaki Makita wrote: > > This is a rough PoC for an idea to offload TC flower to XDP. > > > * Motivation > > The purpose is to speed up software TC flower by using XDP. > > I chose TC flower because my current interest is in OVS. OVS uses TC to > offload flow tabl

Re: [PATCH net-next 2/2] r8169: use the generic EEE management functions

2019-08-15 Thread Heiner Kallweit
On 15.08.2019 17:43, Florian Fainelli wrote: > > > On 8/15/2019 6:02 AM, Heiner Kallweit wrote: >> On 15.08.2019 14:35, Andrew Lunn wrote: >>> On Thu, Aug 15, 2019 at 11:47:33AM +0200, Heiner Kallweit wrote: Now that the Realtek PHY driver maps the vendor-specific EEE registers to the s

[PATCH net-next 2/3] tcp: ulp: add functions to dump ulp-specific information

2019-08-15 Thread Davide Caratti
currently, only getsockopt(TCP_ULP) can be invoked to know if a ULP is on top of a TCP socket. Extend idiag_get_aux() and idiag_get_aux_size(), introduced by commit b37e88407c1d ("inet_diag: allow protocols to provide additional data"), to report the ULP name and other information that can be made

[PATCH net-next 1/3] net/tls: use RCU protection on icsk->icsk_ulp_data

2019-08-15 Thread Davide Caratti
From: Jakub Kicinski We need to make sure context does not get freed while diag code is interrogating it. Free struct tls_context with kfree_rcu(). We add the __rcu annotation directly in icsk, and cast it away in the datapath accessor. Presumably all ULPs will do a similar thing. Signed-off-by

[PATCH net-next 0/3] net: tls: add socket diag

2019-08-15 Thread Davide Caratti
The current kernel does not provide any diagnostic tool, except getsockopt(TCP_ULP), to know more about TCP sockets that have an upper layer protocol (ULP) on top of them. This series extends the set of information exported by INET_DIAG_INFO, to include data that are specific to the ULP (and that m

[PATCH net-next 3/3] net: tls: export protocol version, cipher, tx_conf/rx_conf to socket diag

2019-08-15 Thread Davide Caratti
When an application configures kernel TLS on top of a TCP socket, it's now possible for inet_diag_handler() to collect information regarding the protocol version, the cipher type and TX / RX configuration, in case INET_DIAG_INFO is requested. Signed-off-by: Davide Caratti --- include/net/tls.h

Re: [PATCH net 1/2] igb: Enable media autosense for the i350.

2019-08-15 Thread Jeff Kirsher
On Wed, 2019-08-14 at 13:59 +0200, Manfred Rudigier wrote: > This patch enables the hardware feature "Media Auto Sense" also on > the > i350. It works in the same way as on the 82850 devices. Hardware > designs > using dual PHYs (fiber/copper) can enable this feature by setting the > MAS > enable b

Re: [PATCH net-next v2 1/4] RDS: limit the number of times we loop in rds_send_xmit

2019-08-15 Thread santosh . shilimkar
On 8/15/19 7:42 AM, Gerd Rausch wrote: From: Chris Mason Date: Fri, 3 Feb 2012 11:07:54 -0500 This will kick the RDS worker thread if we have been looping too long. Original commit from 2012 updated to include a change by Venkat Venkatsubra that triggers "must_wake" if "rds_ib_recv_refill_one

Re: [PATCH net-next v2 2/4] RDS: don't use GFP_ATOMIC for sk_alloc in rds_create

2019-08-15 Thread santosh . shilimkar
On 8/15/19 7:42 AM, Gerd Rausch wrote: From: Chris Mason Date: Fri, 3 Feb 2012 11:08:51 -0500 Signed-off-by: Chris Mason Signed-off-by: Bang Nguyen Signed-off-by: Gerd Rausch Signed-off-by: Somasundaram Krishnasamy --- Acked-by: Santosh Shilimkar

Re: [PATCH net-next v2 3/4] net/rds: Add a few missing rds_stat_names entries

2019-08-15 Thread santosh . shilimkar
On 8/15/19 7:42 AM, Gerd Rausch wrote: From: Gerd Rausch Date: Thu, 11 Jul 2019 12:15:50 -0700 In a previous commit, fields were added to "struct rds_statistics" but array "rds_stat_names" was not updated accordingly. Please note the inconsistent naming of the string representations that is do

Re: [PATCH net-next v2 4/4] rds: check for excessive looping in rds_send_xmit

2019-08-15 Thread santosh . shilimkar
On 8/15/19 7:43 AM, Gerd Rausch wrote: From: Andy Grover Date: Thu, 13 Jan 2011 11:40:31 -0800 Original commit from 2011 updated to include a change by Yuval Shaia that adds a new statistic counter "send_stuck_rm" to capture the messages looping exessively in the send path. Signed-off-by: Ger

Re: [PATCH bpf-next 0/5] Add support for SKIP_BPF flag for AF_XDP sockets

2019-08-15 Thread Samudrala, Sridhar
On 8/15/2019 4:12 AM, Toke Høiland-Jørgensen wrote: Sridhar Samudrala writes: This patch series introduces XDP_SKIP_BPF flag that can be specified during the bind() call of an AF_XDP socket to skip calling the BPF program in the receive path and pass the buffer directly to the socket. When

Re: [PATCH net-next] net/rds: Add RDS6_INFO_SOCKETS and RDS6_INFO_RECV_MESSAGES options

2019-08-15 Thread santosh . shilimkar
On 8/15/19 2:36 AM, Ka-Cheong Poon wrote: Add support of the socket options RDS6_INFO_SOCKETS and RDS6_INFO_RECV_MESSAGES which update the RDS_INFO_SOCKETS and RDS_INFO_RECV_MESSAGES options respectively. The old options work for IPv4 sockets only. Signed-off-by: Ka-Cheong Poon --- Thanks Ka-

Re: [PATCH bpf-next 0/5] Add support for SKIP_BPF flag for AF_XDP sockets

2019-08-15 Thread Samudrala, Sridhar
On 8/15/2019 5:51 AM, Björn Töpel wrote: On 2019-08-15 05:46, Sridhar Samudrala wrote: This patch series introduces XDP_SKIP_BPF flag that can be specified during the bind() call of an AF_XDP socket to skip calling the BPF program in the receive path and pass the buffer directly to the socket.

Re: [PATCH] arm64: do_csum: implement accelerated scalar version

2019-08-15 Thread Will Deacon
On Thu, May 16, 2019 at 11:14:35AM +0800, Zhangshaokun wrote: > On 2019/5/15 17:47, Will Deacon wrote: > > On Mon, Apr 15, 2019 at 07:18:22PM +0100, Robin Murphy wrote: > >> On 12/04/2019 10:52, Will Deacon wrote: > >>> I'm waiting for Robin to come back with numbers for a C implementation. > >>> >

Re: [PATCH -next] btf: fix return value check in btf_vmlinux_init()

2019-08-15 Thread Andrii Nakryiko
On Thu, Aug 15, 2019 at 7:21 AM Wei Yongjun wrote: > > In case of error, the function kobject_create_and_add() returns NULL > pointer not ERR_PTR(). The IS_ERR() test in the return value check > should be replaced with NULL test. > > Fixes: 341dfcf8d78e ("btf: expose BTF info through sysfs") > Sig

Re: [PATCH bpf] tools: bpftool: close prog FD before exit on showing a single program

2019-08-15 Thread Andrii Nakryiko
On Thu, Aug 15, 2019 at 7:24 AM Quentin Monnet wrote: > > When showing metadata about a single program by invoking > "bpftool prog show PROG", the file descriptor referring to the program > is not closed before returning from the function. Let's close it. > > Fixes: 71bb428fe2c1 ("tools: bpf: add

Re: [PATCH bpf-next 0/5] Add support for SKIP_BPF flag for AF_XDP sockets

2019-08-15 Thread Toke Høiland-Jørgensen
"Samudrala, Sridhar" writes: > On 8/15/2019 4:12 AM, Toke Høiland-Jørgensen wrote: >> Sridhar Samudrala writes: >> >>> This patch series introduces XDP_SKIP_BPF flag that can be specified >>> during the bind() call of an AF_XDP socket to skip calling the BPF >>> program in the receive path and

  1   2   3   >