[PATCH net-next] mpls: Fix 6PE forwarding

2019-03-18 Thread Vinay K Nallamothu
This patch adds support for 6PE (RFC 4798) which uses IPv4-mapped IPv6 nexthop to connect IPv6 islands over IPv4 only MPLS network core. Prior to this fix, to find the link-layer destination mac address, 6PE enabled host/router was sending IPv6 ND requests for IPv4-mapped IPv6 nexthop address over

[PATCH net] ipv6: make ip6_create_rt_rcu return ip6_null_entry instead of NULL

2019-03-18 Thread Xin Long
Jianlin reported a crash: [ 381.484332] BUG: unable to handle kernel NULL pointer dereference at 0068 [ 381.619802] RIP: 0010:fib6_rule_lookup+0xa3/0x160 [ 382.009615] Call Trace: [ 382.020762] [ 382.030174] ip6_route_redirect.isra.52+0xc9/0xf0 [ 382.050984] ip6_

[PATCHv2 net] sctp: get sctphdr by offset in sctp_compute_cksum

2019-03-18 Thread Xin Long
sctp_hdr(skb) only works when skb->transport_header is set properly. But in Netfilter, skb->transport_header for ipv6 is not guaranteed to be right value for sctphdr. It would cause to fail to check the checksum for sctp packets. So fix it by using offset, which is always right in all places. v1

[PATCH net] sctp: not copy sctp_sock pd_lobby in sctp_copy_descendant

2019-03-18 Thread Xin Long
Now sctp_copy_descendant() copies pd_lobby from old sctp scok to new sctp sock. If sctp_sock_migrate() returns error, it will panic when releasing new sock and trying to purge pd_lobby due to the incorrect pointers in pd_lobby. [ 120.485116] kasan: CONFIG_KASAN_INLINE enabled [ 120.486270] k

[PATCH net 00/13] sctp: fix ignoring asoc_id for tcp-style sockets on some setsockopts

2019-03-18 Thread Xin Long
This is a patchset to fix ignoring asoc_id for tcp-style sockets on some setsockopts, introduced by SCTP_CURRENT_ASSOC of the patchset: [net-next,00/24] sctp: support SCTP_FUTURE/CURRENT/ALL_ASSOC (https://patchwork.ozlabs.org/cover/1031706/) As Marcelo suggested, we fix it on each setsockopt

[PATCH net 01/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt

2019-03-18 Thread Xin Long
From: Marcelo Ricardo Leitner Currently if the user pass an invalid asoc_id to SCTP_DEFAULT_SEND_PARAM on a TCP-style socket, it will silently ignore the new parameters. That's because after not finding an asoc, it is checking asoc_id against the known values of CURRENT/FUTURE/ALL values and that

[PATCH net 02/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DELAYED_SACK sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_DELAYED_SACK sockopt. Fixes: 9c5829e1c49e ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_DELAYED_SACK sockopt") Signed-off-by: Xin Long --- net/sctp/socket.c |

[PATCH net 03/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SNDINFO sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_DEFAULT_SNDINFO sockopt. Fixes: 92fc3bd928c9 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_DEFAULT_SNDINFO sockopt") Signed-off-by: Xin Long --- net/sctp/sock

[PATCH net 04/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_CONTEXT sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_CONTEXT sockopt. Fixes: 49b037acca8c ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_CONTEXT sockopt") Signed-off-by: Xin Long --- net/sctp/socket.c | 3 +++ 1

[PATCH net 05/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_MAX_BURST sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_MAX_BURST sockopt. Fixes: e0651a0dc877 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_MAX_BURST sockopt") Signed-off-by: Xin Long --- net/sctp/socket.c | 3 +++

[PATCH net 08/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_DELETE_KEY sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_AUTH_DELETE_KEY sockopt. Fixes: 3adcc300603e ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_DELETE_KEY sockopt") Signed-off-by: Xin Long --- net/sctp/sock

[PATCH net 06/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_KEY sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_AUTH_KEY sockopt. Fixes: 7fb3be13a236 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_KEY sockopt") Signed-off-by: Xin Long --- net/sctp/socket.c | 3 +++

[PATCH net 07/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_ACTIVE_KEY sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_AUTH_ACTIVE_KEY sockopt. Fixes: bf9fb6ad4f29 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_ACTIVE_KEY sockopt") Signed-off-by: Xin Long --- net/sctp/sock

[PATCH net 09/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_AUTH_DEACTIVATE_KEY sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_AUTH_DEACTIVATE_KEY sockopt. Fixes: 2af66ff3edc7 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_DEACTIVATE_KEY sockopt") Signed-off-by: Xin Long --- net/s

[PATCH net 11/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_ENABLE_STREAM_RESET sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_ENABLE_STREAM_RESET sockopt. Fixes: 99a62135e127 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_ENABLE_STREAM_RESET sockopt") Signed-off-by: Xin Long --- net/s

[PATCH net 10/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_PRINFO sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_DEFAULT_PRINFO sockopt. Fixes: 3a583059d187 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_DEFAULT_PRINFO sockopt") Signed-off-by: Xin Long --- net/sctp/socket

[PATCH net 12/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_EVENT sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_EVENT sockopt. Fixes: d251f05e3ba2 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_EVENT sockopt") Signed-off-by: Xin Long --- net/sctp/socket.c | 3 +++ 1 file

[PATCH net 13/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_STREAM_SCHEDULER sockopt

2019-03-18 Thread Xin Long
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_STREAM_SCHEDULER sockopt. Fixes: 7efba10d6bd2 ("sctp: add SCTP_FUTURE_ASOC and SCTP_CURRENT_ASSOC for SCTP_STREAM_SCHEDULER sockopt") Signed-off-by: Xin Long --- net/sctp/socket.

Re: [RFC PATCH net-next 0/3] RTNL: Add link-down reason reporting

2019-03-18 Thread Petr Machata
Andrew Lunn writes: >> The party with visibility into details of this process is the driver. > > In the general case, i would disagree with this. It is the PHY layer > which knows about these things. phylib and phylink. The MAC driver has > no idea, it just sees that the carrier is off. > > The

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-18 Thread Petr Machata
Roopa Prabhu writes: > This looks good and will be use-full. But i have some comments on the > implementation below. > Also, carrier can go down due to protocol down (IFLA_PROTODOWN). And I > get asked about supporting > reason codes or protocol owner for such protodown reason (I have not > giv

Re: [PATCH net] ipv6: make ip6_create_rt_rcu return ip6_null_entry instead of NULL

2019-03-18 Thread Paolo Abeni
On Mon, 2019-03-18 at 19:36 +0800, Xin Long wrote: > Jianlin reported a crash: > > [ 381.484332] BUG: unable to handle kernel NULL pointer dereference at > 0068 > [ 381.619802] RIP: 0010:fib6_rule_lookup+0xa3/0x160 > [ 382.009615] Call Trace: > [ 382.020762] > [ 382.0

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Jiri Pirko
Fri, Mar 15, 2019 at 09:44:54PM CET, jakub.kicin...@netronome.com wrote: >On Fri, 15 Mar 2019 21:08:14 +0100, Jiri Pirko wrote: >> >> IIUC, Jiri/Jakub are proposing creation of 2 devlink objects for each >> >> port - >> >> host facing ports and switch facing ports. This is in addition to the >> >

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Jiri Pirko
Fri, Mar 15, 2019 at 10:59:33PM CET, pa...@mellanox.com wrote: > > >> -Original Message- >> From: Jiri Pirko >> Sent: Friday, March 15, 2019 3:08 PM >> To: Parav Pandit >> Cc: Samudrala, Sridhar ; Jakub Kicinski >> ; da...@davemloft.net; >> netdev@vger.kernel.org; oss-driv...@netronome.co

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-18 Thread Petr Machata
Jakub Kicinski writes: > On Fri, 15 Mar 2019 17:56:07 +, Petr Machata wrote: >> diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h >> index e2091bb2b3a8..cfd9e86ff0ca 100644 >> --- a/include/net/rtnetlink.h >> +++ b/include/net/rtnetlink.h >> @@ -110,6 +110,9 @@ struct rtnl_link

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-18 Thread Michal Kubecek
On Mon, Mar 18, 2019 at 12:34:55PM +, Petr Machata wrote: > Jakub Kicinski writes: > > Also perhaps this would be a ethtool-nl candidate (which would > > hopefully land soon after the merge window)? > > Is this the repository with the patches? I'll take a look. > > https://github.com/mku

selftests: bpf: test_align Failed to find match 1: R1=ctx(id=0,off=0,imm=0) func#0 @0

2019-03-18 Thread Naresh Kamboju
selftests: bpf: test_align failed on all devices ( arm64, armv7, x86_64 and i386) running Linux -next kernel 5.1.0-rc1 tag: next-20190318. Here is the log from arm64, selftests: bpf: test_align Test 0: mov ... Failed to find match 1: R1=ctx(id=0,off=0,imm=0) func#0 @0 0: R1=ctx(id=0 ref_obj_id

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-18 Thread Andrew Lunn
> This copies how other fill APIs are done, in that the responsibility for > filling up the message is deferred to the driver. I think it makes the > API easier to extend: if there ever is richer information available, the > drivers that want to support it just opt in and provide those attributes.

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-18 Thread Petr Machata
Andrew Lunn writes: >> +enum rtnl_link_down_reason_major { >> +RTNL_LDR_OTHER, > > Does 'other' make any sense? Seem better to just not report anything > at all, or add a comment that more reasons should be added at the end > to reflect whatever the hardware or software can determine. You

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-18 Thread Andrew Lunn
On Mon, Mar 18, 2019 at 01:15:41PM +, Petr Machata wrote: > > Andrew Lunn writes: > > >> +enum rtnl_link_down_reason_major { > >> + RTNL_LDR_OTHER, > > > > Does 'other' make any sense? Seem better to just not report anything > > at all, or add a comment that more reasons should be added at

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-18 Thread Petr Machata
Andrew Lunn writes: > On Mon, Mar 18, 2019 at 01:15:41PM +, Petr Machata wrote: >> >> Andrew Lunn writes: >> >> >> +enum rtnl_link_down_reason_major { >> >> + RTNL_LDR_OTHER, >> > >> > Does 'other' make any sense? Seem better to just not report anything >> > at all, or add a comment that

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-18 Thread Andrew Lunn
On Mon, Mar 18, 2019 at 01:15:41PM +, Petr Machata wrote: > > Andrew Lunn writes: > > >> +enum rtnl_link_down_reason_major { > >> + RTNL_LDR_OTHER, > > > > Does 'other' make any sense? Seem better to just not report anything > > at all, or add a comment that more reasons should be added at

Re: [PATCH net] af_packet: fix the tx skb protocol in raw sockets with ETH_P_ALL

2019-03-18 Thread Willem de Bruijn
On Mon, Mar 18, 2019 at 1:41 AM Yoshiki Komachi wrote: > > I am using "protocol ip" filters in TC to manipulate TC flower > classifiers, which are only available with "protocol ip". However, > I faced an issue that packets sent via raw sockets with ETH_P_ALL > did not match the ip filters even if

[PATCH v3 bpf] bpf: Try harder when allocating memory for large maps

2019-03-18 Thread Martynas Pumputis
It has been observed that sometimes a higher order memory allocation for BPF maps fails when there is no obvious memory pressure in a system. E.g. the map (BPF_MAP_TYPE_LRU_HASH, key=38, value=56, max_elems=524288) could not be created due to vmalloc unable to allocate 75497472B, when the system's

Re: [PATCH v3 bpf] bpf: Try harder when allocating memory for large maps

2019-03-18 Thread Michal Hocko
On Mon 18-03-19 16:10:26, Martynas Pumputis wrote: > It has been observed that sometimes a higher order memory allocation > for BPF maps fails when there is no obvious memory pressure in a system. > > E.g. the map (BPF_MAP_TYPE_LRU_HASH, key=38, value=56, max_elems=524288) > could not be created d

[PATCH net 2/3] s390/qeth: fix race when initializing the IP address table

2019-03-18 Thread Julian Wiedmann
The ucast IP table is utilized by some of the L3-specific sysfs attributes that qeth_l3_create_device_attributes() provides. So initialize the table _before_ registering the attributes. Fixes: ebccc7397e4a ("s390/qeth: add missing hash table initializations") Signed-off-by: Julian Wiedmann --- d

[PATCH net 3/3] s390/qeth: be drop monitor friendly

2019-03-18 Thread Julian Wiedmann
As part of the TX completion path, qeth_release_skbs() frees the completed skbs with __skb_queue_purge(). This ends in kfree_skb(), reporting every completed skb as dropped. On the other hand when dropping an skb in .ndo_start_xmit, we end up calling consume_skb()... where we should be using kfree_

[PATCH net 0/3] s390/qeth: fixes 2019-03-18

2019-03-18 Thread Julian Wiedmann
Hi Dave, please apply the following three patches to -net. The first two are fixes for minor race conditions in the probe code, while the third one gets dropwatch working (again). Thanks, Julian Julian Wiedmann (3): s390/qeth: don't erase configuration while probing s390/qeth: fix race when

[PATCH net 1/3] s390/qeth: don't erase configuration while probing

2019-03-18 Thread Julian Wiedmann
The HW trap and VNICC configuration is exposed via sysfs, and may have already been modified when qeth_l?_probe_device() attempts to initialize them. So (1) initialize the VNICC values a little earlier, and (2) don't bother about the HW trap mode, it was already initialized before. Signed-off-by:

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Parav Pandit
> -Original Message- > From: Jakub Kicinski > Sent: Friday, March 15, 2019 8:16 PM > To: Parav Pandit > Cc: Jiri Pirko ; Samudrala, Sridhar > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on dev

Re: [PATCH v3 bpf] bpf: Try harder when allocating memory for large maps

2019-03-18 Thread Daniel Borkmann
On 03/18/2019 04:39 PM, Michal Hocko wrote: > On Mon 18-03-19 16:10:26, Martynas Pumputis wrote: >> It has been observed that sometimes a higher order memory allocation >> for BPF maps fails when there is no obvious memory pressure in a system. >> >> E.g. the map (BPF_MAP_TYPE_LRU_HASH, key=38, val

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-03-18 Thread Stephen Hemminger
On Mon, 18 Mar 2019 15:02:53 +0100 Andrew Lunn wrote: > On Mon, Mar 18, 2019 at 01:15:41PM +, Petr Machata wrote: > > > > Andrew Lunn writes: > > > > >> +enum rtnl_link_down_reason_major { > > >> +RTNL_LDR_OTHER, > > > > > > Does 'other' make any sense? Seem better to just not

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Parav Pandit
> -Original Message- > From: Jiri Pirko > Sent: Monday, March 18, 2019 7:21 AM > To: Parav Pandit > Cc: Samudrala, Sridhar ; Jakub Kicinski > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on dev

[PATCH v2 01/13] enc28j60: Use device_get_mac_address()

2019-03-18 Thread Andy Shevchenko
Replace the DT-specific of_get_mac_address() function with device_get_mac_address, which works on both DT and ACPI platforms. This change makes it easier to add ACPI support. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 7 +++ 1 file changed, 3 insertions(+)

[PATCH v2 04/13] enc28j60: Drop driver name duplication from messages

2019-03-18 Thread Andy Shevchenko
When dev_() macros are used against SPI device, the driver's name is printed as well. No need to duplicate this explicitly. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/e

[PATCH v2 10/13] enc28j60: Remove linux/init.h

2019-03-18 Thread Andy Shevchenko
There is no need to include linux/init.h when at the same time we include linux/module.h. Remove redundant inclusion. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/driv

[PATCH v2 11/13] enc28j60: Amend comments by fixing typos, adding periods, etc

2019-03-18 Thread Andy Shevchenko
Amend comments in the code: - adding periods to the multi-line comments - fixing typos - capitalize first word in the sentences - etc Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-)

[PATCH v2 12/13] enc28j60: Fix indentation splats

2019-03-18 Thread Andy Shevchenko
Fix few indentation splats. No functional change intended. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 58 --- 1 file changed, 21 insertions(+), 37 deletions(-) diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/

[PATCH v2 08/13] enc28j60: Convert HW related printk() to dev_printk()

2019-03-18 Thread Andy Shevchenko
The debug prints of hardware status and operations will look better if SPI device name is printed. The benefit of that is a possibility to distinguish the actual hardware when more than one is installed on the system. Convert appropriate printk(KERN_DEBUG) to dev_print(KERN_DEBUG, &spi->dev). Sig

[PATCH v2 07/13] enc28j60: Switch to dev_ from pr_

2019-03-18 Thread Andy Shevchenko
Instead of using open coded printk(KERN_) switch the driver to use dev_ macros. Note, the device name will be printed in full, which is beneficial when more than one card installed on the system. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 29 +

[PATCH v2 05/13] enc28j60: Switch to use module_spi_driver() macro

2019-03-18 Thread Andy Shevchenko
Eliminate some boilerplate code by using module_spi_driver() instead of ->init() / ->exit(), moving the salient bits from ->init() into ->probe(). Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 21 ++--- 1 file changed, 2 insertions(+), 19 deletion

[PATCH v2 09/13] enc28j60: Convert printk() to netdev_printk()

2019-03-18 Thread Andy Shevchenko
The debug prints of network operations will look better if network device name is printed. The benefit of that is a possibility to distinguish the actual hardware when more than one is installed on the system. Convert appropriate printk(KERN_DEBUG) to netdev_print(KERN_DEBUG, ndev). Signed-off-by

[PATCH v2 03/13] enc28j60: Replace dev_*(&netdev->dev, ...) with netdev_*()

2019-03-18 Thread Andy Shevchenko
Replace open coded netdev_() macros. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 42 ++- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c i

[PATCH v2 13/13] enc28j60: Convert to use SPDX identifier

2019-03-18 Thread Andy Shevchenko
Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/driver

[PATCH v2 06/13] enc28j60: Use ether_addr_copy() in enc28j60_set_mac_address()

2019-03-18 Thread Andy Shevchenko
Use ether_addr_copy() instead of memcpy() to copy the mac address. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60

[PATCH v2 02/13] enc28j60: Remove duplicate messaging

2019-03-18 Thread Andy Shevchenko
The ->probe() and ->remove() stages can be easily debugged with initcall_debug or function tracer. There is no need to repeat the same explicitly in the driver. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/microchip/enc28j60.c | 20 1 file changed, 20 deletions(-)

Re: r8169 driver from kernel 5.0 crashing - napi_consume_skb

2019-03-18 Thread VDR User
Just a quick check-in... I was able to do a decent amount of testing yesterday after applying Heiner's patches that "removes an extra PCI register read in the interrupt handler" and adds some debug logging. So far I haven't seen any crashes, everything has been smooth. It may be worth noting that

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Parav Pandit
> -Original Message- > From: netdev-ow...@vger.kernel.org On > Behalf Of Parav Pandit > Sent: Monday, March 18, 2019 10:57 AM > To: Jiri Pirko > Cc: Samudrala, Sridhar ; Jakub Kicinski > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: RE: [PATCH ne

Re: selftests: bpf: test_align Failed to find match 1: R1=ctx(id=0,off=0,imm=0) func#0 @0

2019-03-18 Thread Y Song
On Mon, Mar 18, 2019 at 6:03 AM Naresh Kamboju wrote: > > selftests: bpf: test_align failed on all devices ( arm64, armv7, > x86_64 and i386) running Linux -next kernel 5.1.0-rc1 tag: > next-20190318. > > Here is the log from arm64, > > selftests: bpf: test_align >

Re: [PATCH net-next] mpls: Fix 6PE forwarding

2019-03-18 Thread David Miller
Bug fixes should target 'net', not 'net-next'.

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-18 Thread Florian Fainelli
On 3/17/19 7:11 PM, Phil Reid wrote: > On 16/03/2019 5:58 am, Florian Fainelli wrote: >> On 3/15/19 1:52 AM, Phil Reid wrote: >>> G'day All, >>> >>> I've just update from kernel 4.19 to 5.0 on a custom board that has a >>> marvell >>> dsa mv88e6085 and the phy on the mv88e6085 will only connect at

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-18 Thread Andrew Lunn
> Thanks, you mentioned a mv88e6085 but that chip is a 10/100 switch, did > you mean that the mv88e6085 compatible string is used in Device Tree to > designate that chip? While the 88E1540 driver is picked up, that driver > is originally for external PHY packages (AFAICT), so there could be some >

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-18 Thread Chris Healy
> Some of the older Marvell switches use the 1540 for its internal > PHYs. Same OUI as the external PHY. I don't remember which > switches. Maybe the mv88e6161 in the RDU1? > I'm using a Marvell 88E6161 with 5.0.1 and I get the following output which I think indicates that the 6161 does not use th

[PATCH v12 06/13] fs, arm64: untag user pointers in copy_mount_options

2019-03-18 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. In copy_mount_options a user address is being subtracted from TASK_SIZE. If the address is lower than TASK_SIZE, the

[PATCH iproute2 1/2] ip route: print route type in JSON output

2019-03-18 Thread Matteo Croce
ip route generates an invalid JSON if the route type has to be printed, eg. when detailed mode is active, or the type is different that unicast: $ ip -d -j -p route show [ {"unicast", "dst": "192.168.122.0/24", "dev": "virbr0", "protocol": "kernel",

[PATCH v12 05/13] mm, arm64: untag user pointers in mm/gup.c

2019-03-18 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. mm/gup.c provides a kernel interface that accepts user addresses and manipulates user pages directly (for example get

[PATCH v12 00/13] arm64: untag user pointers passed to the kernel

2019-03-18 Thread Andrey Konovalov
=== Overview arm64 has a feature called Top Byte Ignore, which allows to embed pointer tags into the top byte of each pointer. Userspace programs (such as HWASan, a memory debugging tool [1]) might use this feature and pass tagged user pointers to the kernel through syscalls or other interfaces.

[PATCH v12 01/13] uaccess: add untagged_addr definition for other arches

2019-03-18 Thread Andrey Konovalov
To allow arm64 syscalls to accept tagged pointers from userspace, we must untag them when they are passed to the kernel. Since untagging is done in generic parts of the kernel, the untagged_addr macro needs to be defined for all architectures. Define it as a noop for architectures other than arm64

[PATCH iproute2 2/2] ip route: get: print JSON output when -j is given

2019-03-18 Thread Matteo Croce
The ip -j option to print output as JSON is ignored when using 'route get': $ ip -j route get 127.0.0.1 local 127.0.0.1 dev lo src 127.0.0.1 uid 1000 cache Enable JSON output in iproute_get(), and don't let print_cache_flags() close the JSON output, as it's not always the last ca

[PATCH v12 03/13] lib, arm64: untag user pointers in strn*_user

2019-03-18 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. strncpy_from_user and strnlen_user accept user addresses as arguments, and do not go through the same path as copy_fr

[PATCH v12 09/13] kernel, arm64: untag user pointers in prctl_set_mm*

2019-03-18 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. prctl_set_mm() and prctl_set_mm_map() use provided user pointers for vma lookups and do some pointer comparisons to p

[PATCH v12 04/13] mm, arm64: untag user pointers passed to memory syscalls

2019-03-18 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. This patch allows tagged pointers to be passed to the following memory syscalls: madvise, mbind, get_mempolicy, minco

[PATCH iproute2 0/2] iproute JSON fixes

2019-03-18 Thread Matteo Croce
ip route can produce invalid JSON under certain circumstances, here there are two fixes for this. Matteo Croce (2): ip route: print route type in JSON output ip route: get: print JSON output when -j is given ip/iproute.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) -- 2

[PATCH v12 07/13] fs, arm64: untag user pointers in fs/userfaultfd.c

2019-03-18 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. userfaultfd_register() and userfaultfd_unregister() use provided user pointers for vma lookups, which can only by don

Re: selftests: bpf: test_align Failed to find match 1: R1=ctx(id=0,off=0,imm=0) func#0 @0

2019-03-18 Thread Martin Lau
On Mon, Mar 18, 2019 at 06:31:53PM +0530, Naresh Kamboju wrote: > selftests: bpf: test_align > Test 0: mov ... Failed to find match 1: R1=ctx(id=0,off=0,imm=0) Thanks for the report. I will post a fix.

[PATCH bpf] bpf: Only print ref_obj_id for refcounted reg

2019-03-18 Thread Martin KaFai Lau
Naresh reported that test_align fails because of the mismatch at the verbose printout of the register states. The reason is due to the newly added ref_obj_id. ref_obj_id is only useful for refcounted reg. Thus, this patch fixes it by only printing ref_obj_id for refcounted reg. While at it, it

Re: regression from: net: phy: marvell: Avoid unnecessary soft reset

2019-03-18 Thread Andrew Lunn
> I'm using a Marvell 88E6161 with 5.0.1 and I get the following output > which I think indicates that the 6161 does not use the 1540 PHY: Correct. Maybe it is the 6172? I know it is one of the devices i have. Yes, i mv88e6172 uses 88E1540. Andrew

[PATCH net] Documentation: networking: Update netdev-FAQ regarding patches

2019-03-18 Thread Florian Fainelli
Provide an explanation of what is expected with respect to sending new versions of specific patches within a patch series, as well as what happens if an earlier patch series accidentally gets merged). Signed-off-by: Florian Fainelli --- Documentation/networking/netdev-FAQ.rst | 13 +

[PATCH v9 4/6] dt-bindings: anybus-controller: document devicetree binding

2019-03-18 Thread Sven Van Asbroeck
This patch adds devicetree binding documentation for the Arcx anybus controller. Signed-off-by: Sven Van Asbroeck --- .../fieldbus/arcx,anybus-controller.txt | 71 +++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/fieldbus/arcx,anyb

[PATCH v9 0/6] Add Fieldbus subsystem + support HMS Profinet card

2019-03-18 Thread Sven Van Asbroeck
This patch: 1. adds a Fieldbus subsystem 2. adds support for the HMS Industrial Networks AB Profinet card. 1. Fieldbus subsystem - Fieldbus device (client) adapters allow data exchange with a PLC aka. "Fieldbus Controller" over a fieldbus (Profinet, FLNet, etc.) They are t

[PATCH v9 2/6] anybus-s: support HMS Anybus-S bus

2019-03-18 Thread Sven Van Asbroeck
The Anybus-S/Anybus-M is a series of interchangeable fieldbus communication modules featuring on board memory and processing power. All software and hardware functionality required to communicate on the fieldbus is incorporated in the module itself, allowing the application to focus on other tasks.

[PATCH v9 6/6] fieldbus_dev: support HMS Profinet IRT industrial controller

2019-03-18 Thread Sven Van Asbroeck
The Anybus-S PROFINET IRT communication module provides instant integration to any Ethernet based LAN via SMTP, FTP, HTTP as well as PROFINET and Modbus-TCP. Additional protocols can be implemented on top of TCP/IP or UDP using the transparent socket interface. Official documentation: https://www.

[PATCH v9 1/6] fieldbus_dev: add Fieldbus Device subsystem.

2019-03-18 Thread Sven Van Asbroeck
Fieldbus device (client) adapters allow data exchange with a PLC aka. "Fieldbus Controller" over a fieldbus (Profinet, FLNet, etc.) They are typically used when a Linux device wants to expose itself as an actuator, motor, console light, switch, etc. over the fieldbus. This framework is designed t

[PATCH v9 3/6] anybus-s: support the Arcx anybus controller

2019-03-18 Thread Sven Van Asbroeck
Add a driver for the Arcx anybus controller. This device implements two Anybus-S hosts (buses), and connects to the SoC via a parallel memory bus. There is also a CAN power readout, unrelated to the Anybus, modelled as a regulator. Signed-off-by: Sven Van Asbroeck --- drivers/staging/fieldbus/M

[PATCH v9 5/6] dt-bindings: Add vendor prefix for arcx / Archronix

2019-03-18 Thread Sven Van Asbroeck
arcx Inc. is an engineering company which provides advanced embedded systems and consulting services. Archronix is a technology design and product engineering firm specializing in hardware control systems and enabling software. Clients include OEM's in the transportation, aerospace, medical and co

Re: r8169 driver from kernel 5.0 crashing - napi_consume_skb

2019-03-18 Thread Heiner Kallweit
On 18.03.2019 17:17, VDR User wrote: > Just a quick check-in... I was able to do a decent amount of testing > yesterday after applying Heiner's patches that "removes an extra PCI > register read in the > interrupt handler" and adds some debug logging. So far I haven't seen > any crashes, everythin

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Jakub Kicinski
On Mon, 18 Mar 2019 13:11:54 +0100, Jiri Pirko wrote: > >> >2. flavour should not be vf/pf, flavour should be hostport, switchport. > >> >Because switch is flat and agnostic of pf/vf/mdev. > >> > >> Not sure. It's good to have this kind of visibility. > > > >Yes, this subthread honestly make

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Jakub Kicinski
On Mon, 18 Mar 2019 13:21:05 +0100, Jiri Pirko wrote: > >First two entries shows the link between hostport and switchport. > >$ devlink port show > >pci/:05:00.0/10002 eth netdev flavour switchport switch_id 00154d130d2f > >peer pci/:05:00.0/1 > > > >pci/:05:00.0/1 eth netdev flavour h

Re: [PATCH bpf] bpf: Only print ref_obj_id for refcounted reg

2019-03-18 Thread Andrii Nakryiko
On Mon, Mar 18, 2019 at 10:37 AM Martin KaFai Lau wrote: > > Naresh reported that test_align fails because of the mismatch at the > verbose printout of the register states. The reason is due to the newly > added ref_obj_id. > > ref_obj_id is only useful for refcounted reg. Thus, this patch fixes

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Jakub Kicinski
On Mon, 18 Mar 2019 15:43:20 +, Parav Pandit wrote: > > -Original Message- > > From: Jakub Kicinski > > Sent: Friday, March 15, 2019 8:16 PM > > To: Parav Pandit > > Cc: Jiri Pirko ; Samudrala, Sridhar > > ; da...@davemloft.net; > > netdev@vger.kernel.org; oss-driv...@netronome.com >

[PATCH net] mpls: Fix 6PE forwarding

2019-03-18 Thread Vinay K Nallamothu
This patch adds support for 6PE (RFC 4798) which uses IPv4-mapped IPv6 nexthop to connect IPv6 islands over IPv4 only MPLS network core. Prior to this fix, to find the link-layer destination mac address, 6PE enabled host/router was sending IPv6 ND requests for IPv4-mapped IPv6 nexthop address ove

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Jakub Kicinski
On Mon, 18 Mar 2019 16:22:33 +, Parav Pandit wrote: >>2. flavour should not be vf/pf, flavour should be hostport, switchport. >>> >Because switch is flat and agnostic of pf/vf/mdev. > > Not sure. It's good to have this kind of visibility. > port can have label/attribut

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Parav Pandit
> -Original Message- > From: Jakub Kicinski > Sent: Monday, March 18, 2019 2:19 PM > To: Jiri Pirko > Cc: Parav Pandit ; Samudrala, Sridhar > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on dev

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Parav Pandit
> -Original Message- > From: Jakub Kicinski > Sent: Monday, March 18, 2019 2:37 PM > To: Parav Pandit > Cc: Jiri Pirko ; Samudrala, Sridhar > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: Re: [PATCH net-next v2 4/7] devlink: allow subports on dev

Re: [PATCH net] ipv6: make ip6_create_rt_rcu return ip6_null_entry instead of NULL

2019-03-18 Thread David Ahern
On 3/18/19 12:36 PM, Xin Long wrote: > diff --git a/net/ipv6/route.c b/net/ipv6/route.c > index 4ef4bbd..754777d 100644 > --- a/net/ipv6/route.c > +++ b/net/ipv6/route.c > @@ -1040,13 +1040,17 @@ static struct rt6_info *ip6_create_rt_rcu(struct > fib6_info *rt) > struct rt6_info *nrt; > >

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Jakub Kicinski
On Mon, 18 Mar 2019 19:44:21 +, Parav Pandit wrote: > > -Original Message- > > From: Jakub Kicinski > > Sent: Monday, March 18, 2019 2:37 PM > > To: Parav Pandit > > Cc: Jiri Pirko ; Samudrala, Sridhar > > ; da...@davemloft.net; > > netdev@vger.kernel.org; oss-driv...@netronome.com >

RE: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Parav Pandit
> -Original Message- > From: Jakub Kicinski > Sent: Monday, March 18, 2019 3:00 PM > To: Parav Pandit > Cc: Jiri Pirko ; Samudrala, Sridhar > ; da...@davemloft.net; > netdev@vger.kernel.org; oss-driv...@netronome.com > Subject: RE: [PATCH net-next v2 4/7] devlink: allow subports on dev

[Patch net] bluetooth: validate HCI_EVENT_PKT packet carefully

2019-03-18 Thread Cong Wang
hci_event_packet() blindly assumes all packets are sane, at least for packets allocated via vhci_get_user() path this is not true. We have to check if we access skb data out-of-bound with pskb_may_pull() before each skb->data dereference on RX path. Probably we need to same check for other hci_eve

Re: [PATCH net V3 1/2] net/sched: taprio: fix picos_per_byte miscalculation

2019-03-18 Thread Leandro Dorileo
Hi Florian, Florian Fainelli writes: > On 3/15/19 2:16 PM, Leandro Dorileo wrote: >> The Time Aware Priority Scheduler is heavily dependent to link speed, >> it relies on it to calculate transmission bytes per cycle, we can't >> properly calculate the so called budget if the device has failed

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-18 Thread Jakub Kicinski
On Mon, 18 Mar 2019 20:35:02 +, Parav Pandit wrote: > > > > > physical and pf has some overlapping definitions. > > > > > > > > What "overlapping definitions" do physical and PF have? > > > PF has physically user facing port. > > > > PF doesn't "have a user facing port" in switchdev mode

Re: [PATCH net] ipv6: make ip6_create_rt_rcu return ip6_null_entry instead of NULL

2019-03-18 Thread Wei Wang
On Mon, Mar 18, 2019 at 12:48 PM David Ahern wrote: > > On 3/18/19 12:36 PM, Xin Long wrote: > > diff --git a/net/ipv6/route.c b/net/ipv6/route.c > > index 4ef4bbd..754777d 100644 > > --- a/net/ipv6/route.c > > +++ b/net/ipv6/route.c > > @@ -1040,13 +1040,17 @@ static struct rt6_info *ip6_create_r

  1   2   >