Re: [PATCH iproute2-next] Introduce ip-brctl shell script

2019-01-27 Thread Stefano Brivio
On Sun, 27 Jan 2019 21:08:13 -0800 Roopa Prabhu wrote: > On Fri, Jan 25, 2019 at 2:05 AM Stefano Brivio wrote: > > > > Hi Roopa, > > > > On Wed, 23 Jan 2019 08:33:27 -0800 > > Roopa Prabhu wrote: > > > > > On Wed, Jan 23, 2019 at 7:09 AM Nikolay Aleksandrov > > > wrote: > > > > > > > Hi, >

TCP/IPv4 sending using MSG_ZEROCOPY and closing the socket

2019-01-27 Thread mathias_koehrer
Hi all, I have one question on the behavior of TCP/IPv4 sending using the MSG_ZEROCOPY flag, the kernel version is 4.19.18. What happens if I close the sending socket immediately after performing a socket send() or sendmsg() call (called with the MSG_ZEROCOPY flag)? I.e. in this situation not

Re: [PATCH RFC 0/3] Support fraglist GRO/GSO

2019-01-27 Thread Steffen Klassert
On Fri, Jan 25, 2019 at 08:57:00AM -0500, Willem de Bruijn wrote: > On Fri, Jan 25, 2019 at 3:14 AM Steffen Klassert > wrote: > > > > On Mon, Jan 14, 2019 at 12:09:22PM -0500, Willem de Bruijn wrote: > > > On Mon, Jan 14, 2019 at 7:50 AM Steffen Klassert > > > wrote: > > > > On Sun, Dec 23, 2018

Re: [PATCH] PCI / ACPI: Don't clear pme_poll on device that has unreliable ACPI wake

2019-01-27 Thread Kai Heng Feng
> On Jan 25, 2019, at 4:05 AM, Bjorn Helgaas wrote: > > On Thu, Jan 24, 2019 at 11:29:37PM +0800, Kai Heng Feng wrote: >>> On Jan 24, 2019, at 11:15 PM, Bjorn Helgaas wrote: >>> On Wed, Jan 23, 2019 at 03:17:37PM +0800, Kai Heng Feng wrote: > On Jan 23, 2019, at 7:51 AM, Bjorn Helgaas wr

Re: [PATCH net-next] remove TWKilled counter

2019-01-27 Thread peng yu
Hi, David and Cong I don't quite understand where this patch to go. This patch wants to delete the LINUX_MIB_TIMEWAITKILLED counter. Moving snmp.h out of the uapi directory is a difference thing. Do we really need to do it? On Tue, Jan 22, 2019 at 10:58 PM Cong Wang wrote: > > On Mon, Jan 21, 20

Re: WoL broken in r8169.c since kernel 4.19

2019-01-27 Thread Marc Haber
On Sun, Jan 27, 2019 at 10:09:51PM +0100, Heiner Kallweit wrote: > Yes. All you have to do after each "git bisect good/bad" is build again, > test, and make current build as good or bad. Will report back if I get any results. When I bisected last time, I ended up with a kernel that didn't even boo

Re: [PATCH net] net: dsa: mv88e6xxx: Fix serdes irq setup going recursive

2019-01-27 Thread David Miller
From: Andrew Lunn Date: Sun, 27 Jan 2019 22:48:00 +0100 > Duec to a typo, mv88e6390_serdes_irq_setup() calls itself, rather than > mv88e6390x_serdes_irq_setup(). It then blows the stack, and shortly > after the machine blows up. > > Fixes: 2defda1f4b91 ("net: dsa: mv88e6xxx: Add support for SERD

Re: [PATCH net] ip6mr: Fix notifiers call on mroute_clean_tables()

2019-01-27 Thread David Miller
From: Nir Dotan Date: Sun, 27 Jan 2019 09:26:22 +0200 > When the MC route socket is closed, mroute_clean_tables() is called to > cleanup existing routes. Mistakenly notifiers call was put on the cleanup > of the unresolved MC route entries cache. > In a case where the MC socket closes before an u

Re: [PATCH] decnet: fix DN_IFREQ_SIZE

2019-01-27 Thread David Miller
From: Johannes Berg Date: Sat, 26 Jan 2019 21:12:19 +0100 > From: Johannes Berg > > Digging through the ioctls with Al because of the previous > patches, we found that on 64-bit decnet's dn_dev_ioctl() > is wrong, because struct ifreq::ifr_ifru is actually 24 > bytes (not 16 as expected from st

[PATCH net-next 23/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_EVENT sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_event and check with SCTP_FUTURE_ASSOC instead in sctp_getsockopt_event, it's compatible with 0. SCTP_CURRENT_ASSOC is supported for SCTP_EVENT in this patch. It also adds sctp_assoc_ulpevent_type_set() to make code more readable. Signed-off-b

[PATCH net-next 21/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_DEFAULT_PRINFO sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_default_prinfo and check with SCTP_FUTURE_ASSOC instead in sctp_getsockopt_default_prinfo, it's compatible with 0. SCTP_CURRENT_ASSOC is supported for SCTP_DEFAULT_PRINFO in this patch. Signed-off-by: Xin Long --- net/sctp/socket.c | 34 +

[PATCH net-next 24/24] sctp: add SCTP_FUTURE_ASOC and SCTP_CURRENT_ASSOC for SCTP_STREAM_SCHEDULER sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_scheduler and check with SCTP_FUTURE_ASSOC instead in sctp_getsockopt_scheduler, it's compatible with 0. SCTP_CURRENT_ASSOC is supported for SCTP_STREAM_SCHEDULER in this patch. It also adds default_ss in sctp_sock to support SCTP_FUTURE_ASSOC.

[PATCH net-next 20/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_DEACTIVATE_KEY sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_deactivate_key. SCTP_CURRENT_ASSOC is supported for SCTP_AUTH_DEACTIVATE_KEY in this patch. Signed-off-by: Xin Long --- net/sctp/socket.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/net/sc

[PATCH net-next 17/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_KEY sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_auth_key. SCTP_CURRENT_ASSOC is supported for SCTP_AUTH_KEY in this patch. Signed-off-by: Xin Long --- net/sctp/socket.c | 37 - 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/net/sctp/socket

[PATCH net-next 22/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_ENABLE_STREAM_RESET sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_enable_strreset and check with SCTP_FUTURE_ASSOC instead in sctp_getsockopt_enable_strreset, it's compatible with 0. SCTP_CURRENT_ASSOC is supported for SCTP_ENABLE_STREAM_RESET in this patch. It also adjusts some code to keep a same check form

[PATCH net-next 19/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_DELETE_KEY sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_del_key. SCTP_CURRENT_ASSOC is supported for SCTP_AUTH_DELETE_KEY in this patch. Signed-off-by: Xin Long --- net/sctp/socket.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/net/sctp/socket.c

[PATCH net-next 16/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_MAX_BURST sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_maxburst and check with SCTP_FUTURE_ASSOC instead in sctp_getsockopt_maxburst, it's compatible with 0. SCTP_CURRENT_ASSOC is supported for SCTP_CONTEXT in this patch. It also adjusts some code to keep a same check form as other functions. Signe

[PATCH net-next 18/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_AUTH_ACTIVE_KEY sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_auth_key. SCTP_CURRENT_ASSOC is supported for SCTP_AUTH_ACTIVE_KEY in this patch. Signed-off-by: Xin Long --- net/sctp/socket.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/net/sctp/socket.

[PATCH net-next 14/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_DEFAULT_SNDINFO sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_default_sndinfo and check with SCTP_FUTURE_ASSOC instead in sctp_getsockopt_default_sndinfo, it's compatible with 0. SCTP_CURRENT_ASSOC is supported for SCTP_DEFAULT_SNDINFO in this patch. Signed-off-by: Xin Long --- net/sctp/socket.c | 25 ++

[PATCH net-next 15/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_CONTEXT sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_context and check with SCTP_FUTURE_ASSOC instead in sctp_getsockopt_context, it's compatible with 0. SCTP_CURRENT_ASSOC is supported for SCTP_CONTEXT in this patch. It also adjusts some code to keep a same check form as other functions. Signed-

[PATCH net-next 13/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_DEFAULT_SEND_PARAM sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_default_send_param and check with SCTP_FUTURE_ASSOC instead in sctp_getsockopt_default_send_param, it's compatible with 0. SCTP_CURRENT_ASSOC is supported for SCTP_DEFAULT_SEND_PARAM in this patch. Signed-off-by: Xin Long --- net/sctp/socket.

[PATCH net-next 12/24] sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_DELAYED_SACK sockopt

2019-01-27 Thread Xin Long
Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_delayed_ack and check with SCTP_FUTURE_ASSOC instead in sctp_getsockopt_delayed_ack, it's compatible with 0. SCTP_CURRENT_ASSOC is supported for SCTP_DELAYED_SACK in this patch. It also adds sctp_apply_asoc_delayed_ack() to make code more reada

[PATCH net-next 01/24] sctp: introduce SCTP_FUTURE/CURRENT/ALL_ASSOC

2019-01-27 Thread Xin Long
This patch is to add 3 constants SCTP_FUTURE_ASSOC, SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC for reserved assoc_ids, as defined in rfc6458#section-7.2. And add the process for them when doing lookup and inserting in sctp_id2assoc and sctp_assoc_set_id. Signed-off-by: Xin Long --- include/uapi/linu

[PATCH net-next 05/24] sctp: use SCTP_FUTURE_ASSOC for SCTP_MAXSEG sockopt

2019-01-27 Thread Xin Long
Check with SCTP_FUTURE_ASSOC instead in sctp_set/getsockopt_maxseg, it's compatible with 0. Also check asoc_id early as other sctp setsockopts does. Signed-off-by: Xin Long --- net/sctp/socket.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/net/sctp/socket.c b/

[PATCH net-next 08/24] sctp: use SCTP_FUTURE_ASSOC for SCTP_PR_SUPPORTED sockopt

2019-01-27 Thread Xin Long
Check with SCTP_FUTURE_ASSOC instead in sctp_set/getsockopt_pr_supported, it's compatible with 0. It also adjusts some code to keep a same check form as other functions. Signed-off-by: Xin Long --- net/sctp/socket.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff

[PATCH net-next 09/24] sctp: use SCTP_FUTURE_ASSOC for SCTP_RECONFIG_SUPPORTED sockopt

2019-01-27 Thread Xin Long
Check with SCTP_FUTURE_ASSOC instead in sctp_set/getsockopt_reconfig_supported, it's compatible with 0. It also adjusts some code to keep a same check form as other functions. Signed-off-by: Xin Long --- net/sctp/socket.c | 27 --- 1 file changed, 12 insertions(+), 15 de

[PATCH net-next 04/24] sctp: use SCTP_FUTURE_ASSOC for SCTP_ASSOCINFO sockopt

2019-01-27 Thread Xin Long
Check with SCTP_FUTURE_ASSOC instead in sctp_set/getsockopt_associnfo, it's compatible with 0. Signed-off-by: Xin Long --- net/sctp/socket.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 48d6be8..e505e18 100644 --- a/net/sct

[PATCH net-next 10/24] sctp: use SCTP_FUTURE_ASSOC for SCTP_INTERLEAVING_SUPPORTED sockopt

2019-01-27 Thread Xin Long
Check with SCTP_FUTURE_ASSOC instead in sctp_set/getsockopt_reconfig_supported, it's compatible with 0. It also adjusts some code to keep a same check form as other functions. Signed-off-by: Xin Long --- net/sctp/socket.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions

[PATCH net-next 11/24] sctp: add SCTP_CURRENT_ASSOC for SCTP_STREAM_SCHEDULER_VALUE sockopt

2019-01-27 Thread Xin Long
SCTP_STREAM_SCHEDULER_VALUE is a special one, as its value is not save in sctp_sock, but only in asoc. So only SCTP_CURRENT_ASSOC reserved assoc_id can be used in sctp_setsockopt_scheduler_value. This patch adds SCTP_CURRENT_ASOC support for SCTP_STREAM_SCHEDULER_VALUE. Signed-off-by: Xin Long -

[PATCH net-next 07/24] sctp: add SCTP_FUTURE_ASSOC for SCTP_PEER_ADDR_THLDS sockopt

2019-01-27 Thread Xin Long
Check with SCTP_FUTURE_ASSOC instead in sctp_set/getsockopt_paddr_thresholds, it's compatible with 0. It also adds pf_retrans in sctp_sock to support SCTP_FUTURE_ASSOC. Signed-off-by: Xin Long --- include/net/sctp/structs.h | 2 ++ net/sctp/associola.c | 2 +- net/sctp/socket.c

[PATCH net-next 03/24] sctp: use SCTP_FUTURE_ASSOC for SCTP_RTOINFO sockopt

2019-01-27 Thread Xin Long
Check with SCTP_FUTURE_ASSOC instead in sctp_set/getsockopt_rtoinfo, it's compatible with 0. Signed-off-by: Xin Long --- net/sctp/socket.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 4c43b95..48d6be8 100644 --- a/net/sctp/

[PATCH net-next 06/24] sctp: use SCTP_FUTURE_ASSOC for SCTP_LOCAL_AUTH_CHUNKS sockopt

2019-01-27 Thread Xin Long
Check with SCTP_FUTURE_ASSOC instead in sctp_getsockopt_local_auth_chunks, it's compatible with 0. Signed-off-by: Xin Long --- net/sctp/socket.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index f38c912..7df2123 100644 ---

[PATCH net-next 02/24] sctp: use SCTP_FUTURE_ASSOC for SCTP_PEER_ADDR_PARAMS sockopt

2019-01-27 Thread Xin Long
Check with SCTP_FUTURE_ASSOC instead in sctp_/setgetsockopt_peer_addr_params, it's compatible with 0. Signed-off-by: Xin Long --- net/sctp/socket.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index a52d132..4c43b95

[PATCH net-next 00/24] sctp: support SCTP_FUTURE/CURRENT/ALL_ASSOC

2019-01-27 Thread Xin Long
This patchset adds the support for 3 assoc_id constants: SCTP_FUTURE_ASSOC SCTP_CURRENT_ASSOC, SCTP_ALL_ASSOC, described in rfc6458#section-7.2: All socket options set on a one-to-one style listening socket also apply to all future accepted sockets. For one-to-many style sockets, often a

Re: [PATCH] : net : hso : unregister_netdev only if it has been registered

2019-01-27 Thread Greg KH
On Sun, Jan 27, 2019 at 08:14:33PM +, Yavuz, Tuba wrote: > > On an error path inside the hso_create_net_device function of the hso  > driver, hso_free_net_device gets called. This causes potentially a  > negative reference count in the net device if register_netdev has not  > been called

[PATCH net] vhost: fix OOB in get_rx_bufs()

2019-01-27 Thread Jason Wang
After batched used ring updating was introduced in commit e2b3b35eb989 ("vhost_net: batch used ring update in rx"). We tend to batch heads in vq->heads for more than one packet. But the quota passed to get_rx_bufs() was not correctly limited, which can result a OOB write in vq->heads. head

Re: [PATCH] net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup()

2019-01-27 Thread David Miller
From: Alexey Khoroshilov Date: Sat, 26 Jan 2019 22:48:57 +0300 > If phy_power_on() fails in rk_gmac_powerup(), clocks are left enabled. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Alexey Khoroshilov Applied, thank you.

Re: [PATCH net 0/3] net: hns: code optimizations & bugfixes for HNS driver

2019-01-27 Thread David Miller
From: Peng Li Date: Sat, 26 Jan 2019 17:18:24 +0800 > This patchset includes bugfixes and code optimizations for the HNS > ethernet controller driver Series applied, thank you. There are only bug fixes in here, so please do not use the word "optimizations" in such situations. Thanks.

Re: [PATCH] Revert "net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x"

2019-01-27 Thread David Miller
From: Russell King Date: Fri, 25 Jan 2019 23:27:57 + > This reverts commit 6623c0fba10ef45b64ca213ad5dec926f37fa9a0. > > The original diagnosis was incorrect: it appears that the NIC had > PHY polling mode enabled, which meant that it overwrote the PHYs > advertisement register during negoti

[PATCH 2/2] iwlwifi: Use struct_size() in kzalloc

2019-01-27 Thread YueHaibing
Use struct_size() in kzalloc instead of the 'regd_to_copy' Signed-off-by: YueHaibing --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel

[PATCH 1/2] iwlwifi: Use kmemdup instead of duplicating its function

2019-01-27 Thread YueHaibing
Use kmemdup rather than duplicating its implementation Signed-off-by: YueHaibing --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwl

[PATCH 0/2] cleanup for iwlwifi

2019-01-27 Thread YueHaibing
YueHaibing (2): iwlwifi: Use kmemdup instead of duplicating its function iwlwifi: Use struct_size() in kzalloc drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) -- 2.7.4

Re: Packets being dropped somewhere in the kernel, between iptables and packet capture layers

2019-01-27 Thread Florian Westphal
Niklas Hambüchen wrote: > I'm sending this to netdev@vger.kernel.org even though > http://vger.kernel.org/lkml/ still suggests linux-...@vger.kernel.org, > because the latter seems to be inactive since 2011 and full of spam, and I > got "unresolvable address" for it. Perhaps somebody should upd

Re: [PATCH net-next v2] net: l2tp: fix reading optional fields of L2TPv3

2019-01-27 Thread Jacob Wen
On 1/25/19 12:01 AM, Guillaume Nault wrote: On Thu, Jan 24, 2019 at 03:49:17PM +0800, Jacob Wen wrote: Use pskb_may_pull() to make sure the optional fields are in skb linear parts, so we can safely read them later. It's easy to reproduce the issue with a net driver that supports paged skb da

Re: [PATCH] iwlwifi: Use kmemdup instead of duplicating its function

2019-01-27 Thread YueHaibing
On 2019/1/27 5:24, Joe Perches wrote: > On Sat, 2019-01-26 at 20:42 +0800, YueHaibing wrote: >> Use kmemdup rather than duplicating its implementation > [] >> diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c >> b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c > [] >> @@ -1196,13

Re: [PATCH bpf-next v2 0/3] selftests: bpf: break up test_verifier

2019-01-27 Thread Alexei Starovoitov
On Sun, Jan 27, 2019 at 08:54:13PM -0800, Jakub Kicinski wrote: > On Sun, 27 Jan 2019 12:56:39 -0800, Alexei Starovoitov wrote: > > On Sun, Jan 27, 2019 at 10:33 AM Jakub Kicinski wrote: > > > > > > Looks like v2 just applies cleanly again, should I repost? > > > > v2 set: > > https://patchwork.

[PATCH] bpf/core.c - silence warning messages

2019-01-27 Thread valdis . kletnieks
Compiling kernel/bpf/core.c with W=1 causes a flood of warnings: kernel/bpf/core.c:1198:65: warning: initialized field overwritten [-Woverride-init] 1198 | #define BPF_INSN_3_TBL(x, y, z) [BPF_##x | BPF_##y | BPF_##z] = true |

Re: [PATCH iproute2-next] Introduce ip-brctl shell script

2019-01-27 Thread Roopa Prabhu
On Fri, Jan 25, 2019 at 2:05 AM Stefano Brivio wrote: > > Hi Roopa, > > On Wed, 23 Jan 2019 08:33:27 -0800 > Roopa Prabhu wrote: > > > On Wed, Jan 23, 2019 at 7:09 AM Nikolay Aleksandrov > > wrote: > > > > > Hi, > > > IMO the effort should be towards improving iproute2 to be > > > easier to use

Re: [PATCH net-next v7 0/8] devlink: Add configuration parameters support for devlink_port

2019-01-27 Thread David Miller
From: Michal Kubecek Date: Mon, 28 Jan 2019 00:07:30 +0100 > What I like is that this approach would not require knowing (or > rather guessing) which attributes are going to allow persistent > settings in the future. +1

Re: [PATCH net-next v2 0/2] mv88e6xxx DSA suspend to RAM support

2019-01-27 Thread David Miller
From: Andrew Lunn Date: Sun, 27 Jan 2019 22:46:52 +0100 > I think you are replying to the wrong patch? This comment fits to > > https://www.spinics.net/lists/netdev/msg546662.html I noticed that right after I hit send, you are right. Sorry for the confusion. > Although i don't like it, i think

[PATCH v5 bpf-next 7/9] tools/bpf: sync uapi/bpf.h

2019-01-27 Thread Alexei Starovoitov
add BPF_F_LOCK definition to tools/include/uapi/linux/bpf.h Signed-off-by: Alexei Starovoitov --- 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/linux/bpf.h index 86f7c438d40f..1777fa0c61e4 100644 --- a/tools

[PATCH v5 bpf-next 8/9] libbpf: introduce bpf_map_lookup_elem_flags()

2019-01-27 Thread Alexei Starovoitov
Introduce int bpf_map_lookup_elem_flags(int fd, const void *key, void *value, __u64 flags) helper to lookup array/hash/cgroup_local_storage elements with BPF_F_LOCK flag. Signed-off-by: Alexei Starovoitov --- tools/lib/bpf/bpf.c | 13 + tools/lib/bpf/bpf.h | 2 ++ tools/li

[PATCH v5 bpf-next 5/9] selftests/bpf: add bpf_spin_lock C test

2019-01-27 Thread Alexei Starovoitov
add bpf_spin_lock C based test that requires latest llvm with BTF support Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/bpf_helpers.h| 4 + tools/testing/selftests/bpf/test_progs.c | 43 +++- tools/testing/

[PATCH v5 bpf-next 4/9] selftests/bpf: add bpf_spin_lock tests

2019-01-27 Thread Alexei Starovoitov
add bpf_spin_lock tests to test_verifier.c that don't require latest llvm with BTF support Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/test_verifier.c | 459 +++- 1 file changed, 458 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test

[PATCH v5 bpf-next 3/9] tools/bpf: sync include/uapi/linux/bpf.h

2019-01-27 Thread Alexei Starovoitov
sync bpf.h Signed-off-by: Alexei Starovoitov --- tools/include/uapi/linux/bpf.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 60b99b730a41..86f7c438d40f 100644 --- a/tools/include/uapi/linux/bpf.h +

[PATCH v5 bpf-next 6/9] bpf: introduce BPF_F_LOCK flag

2019-01-27 Thread Alexei Starovoitov
Introduce BPF_F_LOCK flag for map_lookup and map_update syscall commands and for map_update() helper function. In all these cases take a lock of existing element (which was provided in BTF description) before copying (in or out) the rest of map value. Implementation details that are part of uapi:

[PATCH v5 bpf-next 0/9] introduce bpf_spin_lock

2019-01-27 Thread Alexei Starovoitov
Many algorithms need to read and modify several variables atomically. Until now it was hard to impossible to implement such algorithms in BPF. Hence introduce support for bpf_spin_lock. The api consists of 'struct bpf_spin_lock' that should be placed inside hash/array/cgroup_local_storage element

[PATCH v5 bpf-next 9/9] selftests/bpf: test for BPF_F_LOCK

2019-01-27 Thread Alexei Starovoitov
Add C based test that runs 4 bpf programs in parallel that update the same hash and array maps. And another 2 threads that read from these two maps via lookup(key, value, BPF_F_LOCK) api to make sure the user space sees consistent value in both hash and array elements while user space races with ke

[PATCH v5 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-27 Thread Alexei Starovoitov
Introduce 'struct bpf_spin_lock' and bpf_spin_lock/unlock() helpers to let bpf program serialize access to other variables. Example: struct hash_elem { int cnt; struct bpf_spin_lock lock; }; struct hash_elem * val = bpf_map_lookup_elem(&hash_map, &key); if (val) { bpf_spin_lock(&val->l

[PATCH v5 bpf-next 2/9] bpf: add support for bpf_spin_lock to cgroup local storage

2019-01-27 Thread Alexei Starovoitov
Allow 'struct bpf_spin_lock' to reside inside cgroup local storage. Signed-off-by: Alexei Starovoitov --- kernel/bpf/local_storage.c | 2 ++ kernel/bpf/syscall.c | 3 ++- kernel/bpf/verifier.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/local_stora

Re: [PATCH V2] net: i825xx: replace dev_kfree_skb_irq bydev_consume_skb_irq

2019-01-27 Thread Andrew Lunn
On Mon, Jan 28, 2019 at 09:50:42AM +0800, yang.w...@zte.com.cn wrote: > > It is normal to include here, under the ---, what has changed since > > the previous version of the patch. > > > > Please also read > > > > https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html > > > > Your patche

Packets being dropped somewhere in the kernel, between iptables and packet capture layers

2019-01-27 Thread Niklas Hambüchen
Hello network developers, I'm sending this to netdev@vger.kernel.org even though http://vger.kernel.org/lkml/ still suggests linux-...@vger.kernel.org, because the latter seems to be inactive since 2011 and full of spam, and I got "unresolvable address" for it. Perhaps somebody should update th

Re: [PATCH net-next v7 0/8] devlink: Add configuration parameters support for devlink_port

2019-01-27 Thread Michal Kubecek
On Tue, Jan 22, 2019 at 02:18:42PM -0800, Jakub Kicinski wrote: > > I think reusing new netlink ethtool with a special flag would be a nice, > complete solution. We could also address link settings this way (which > are a pre-requisite for WoL). > > I have no strong preference on the mechanism,

[PATCH net] net: dsa: mv88e6xxx: Fix serdes irq setup going recursive

2019-01-27 Thread Andrew Lunn
Duec to a typo, mv88e6390_serdes_irq_setup() calls itself, rather than mv88e6390x_serdes_irq_setup(). It then blows the stack, and shortly after the machine blows up. Fixes: 2defda1f4b91 ("net: dsa: mv88e6xxx: Add support for SERDES on ports 2-8 for 6390X") Signed-off-by: Andrew Lunn --- driver

Re: [PATCH net-next v2 0/2] mv88e6xxx DSA suspend to RAM support

2019-01-27 Thread Andrew Lunn
On Sun, Jan 27, 2019 at 01:22:50PM -0800, David Miller wrote: > From: Miquel Raynal > Date: Fri, 25 Jan 2019 10:55:05 +0100 > > > After a first attempt of bringing S2RAM support to the DSA switch, it > > has been reported that a part of the configuration was lost during the > > cycle. This second

Re: KASAN: use-after-free Read in br_mdb_ip_get

2019-01-27 Thread Nikolay Aleksandrov
On 27/01/2019 22:26, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:    ba6069759381 Merge tag 'mmc-v5.0-rc2' of git://git.kernel... > git tree:   upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=17b342c4c0 > kernel config:  https://syz

Re: [PATCH net-next 0/2] tcp: change pingpong to 3 in delayed ack logic

2019-01-27 Thread David Miller
From: Wei Wang Date: Fri, 25 Jan 2019 10:53:18 -0800 > TCP receiver today tries not to delay the ACKs to speed up the initial > slow start (a.k.a QUICK ACK mechanism). However the previous design > does not work well with modern TCP applications that starts with an > application-level handshake.

Re: [PATCH v2] net: ipv4: ip_input: fix blank line coding style issues

2019-01-27 Thread David Miller
From: Yang Wei Date: Fri, 25 Jan 2019 22:41:50 +0800 > Fix blank line coding style issues, make the code cleaner. > Remove a redundant blank line in ip_rcv_core(). > Insert a blank line in ip_rcv() between different statement blocks. > > Signed-off-by: Yang Wei Applied to net-next.

Re: [PATCH] net: phy: at803x: Use helpers to access MMD PHY registers

2019-01-27 Thread David Miller
From: Carlo Caione Date: Fri, 25 Jan 2019 12:35:10 + > Libphy provides a standard set of helpers to access the MMD PHY > registers. Use those instead of relying on custom driver-specific > functions. > > Signed-off-by: Carlo Caione Applied to net-next.

Re: stable request: ipv6: Consider sk_bound_dev_if when binding a socket to an address

2019-01-27 Thread David Miller
From: David Ahern Date: Sun, 27 Jan 2019 09:17:17 -0700 > Hi Dave: > > Request for c5ee066333eb("ipv6: Consider sk_bound_dev_if when binding a > socket to an address") to be backported. > > The v4-mapped version - ec90ad334986 ("ipv6: Consider sk_bound_dev_if > when binding a socket to a v4 map

Re: [PATCH net-next v2 0/2] mv88e6xxx DSA suspend to RAM support

2019-01-27 Thread David Miller
From: Miquel Raynal Date: Fri, 25 Jan 2019 10:55:05 +0100 > After a first attempt of bringing S2RAM support to the DSA switch, it > has been reported that a part of the configuration was lost during the > cycle. This second version adds a first patch that saves the rules in > a per-chip list when

Re: WoL broken in r8169.c since kernel 4.19

2019-01-27 Thread Heiner Kallweit
On 27.01.2019 21:55, Marc Haber wrote: > On Sat, Jan 26, 2019 at 08:22:33PM +0100, Heiner Kallweit wrote: >> You could go with this range: >> from 4ff364662814 ("r8169: replace get_protocol with vlan_get_protocol") >> to 649f0837a8cc ("r8169: fix broken Wake-on-LAN from S5 (poweroff)") > > I am qu

Re: WoL broken in r8169.c since kernel 4.19

2019-01-27 Thread Marc Haber
On Sat, Jan 26, 2019 at 08:22:33PM +0100, Heiner Kallweit wrote: > You could go with this range: > from 4ff364662814 ("r8169: replace get_protocol with vlan_get_protocol") > to 649f0837a8cc ("r8169: fix broken Wake-on-LAN from S5 (poweroff)") I am quite inexperienced with bisecting and am therefor

Re: [PATCH bpf-next v2 0/3] selftests: bpf: break up test_verifier

2019-01-27 Thread Alexei Starovoitov
On Sun, Jan 27, 2019 at 10:33 AM Jakub Kicinski wrote: > > Looks like v2 just applies cleanly again, should I repost? v2 set: https://patchwork.ozlabs.org/series/88320/mbox/ doesn't apply cleanly. Pls report.

Re: Error in the hso driver

2019-01-27 Thread Yavuz, Tuba
I agree and it would be much easier to track cleanup operations. I think this is happening because probe function calls hso_create_net_device, which performs the cleaning. The driver may need some revision to achieve cleanup inside the probe, Best, Tuba Yavuz, Ph.D. Assistant Professor Electri

KASAN: use-after-free Read in br_mdb_ip_get

2019-01-27 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:ba6069759381 Merge tag 'mmc-v5.0-rc2' of git://git.kernel... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=17b342c4c0 kernel config: https://syzkaller.appspot.com/x/.config?x=505743eba4e4f68 das

Re: Error in the hso driver

2019-01-27 Thread Andrew Lunn
On Sun, Jan 27, 2019 at 07:49:52PM +, Yavuz, Tuba wrote: > Here is a proposed patch: > > --- drivers/net/usb/hso.c.orig2019-01-27 14:45:58.232683119 -0500 > +++ drivers/net/usb/hso.c 2019-01-27 14:47:43.592683629 -0500 > @@ -2377,7 +2377,7 @@ static void hso_free_net_device(struct

[PATCH] : net : hso : unregister_netdev only if it has been registered

2019-01-27 Thread Yavuz, Tuba
On an error path inside the hso_create_net_device function of the hso  driver, hso_free_net_device gets called. This causes potentially a  negative reference count in the net device if register_netdev has not  been called yet as hso_free_net_device calls unregister_netdev  regardless. I think

Re: Error in the hso driver

2019-01-27 Thread Greg KH
On Sun, Jan 27, 2019 at 07:49:52PM +, Yavuz, Tuba wrote: > Here is a proposed patch: > > --- drivers/net/usb/hso.c.orig2019-01-27 14:45:58.232683119 -0500 > +++ drivers/net/usb/hso.c 2019-01-27 14:47:43.592683629 -0500 > @@ -2377,7 +2377,7 @@ static void hso_free_net_device(struct

Re: Error in the hso driver

2019-01-27 Thread Yavuz, Tuba
Here is a proposed patch: --- drivers/net/usb/hso.c.orig 2019-01-27 14:45:58.232683119 -0500 +++ drivers/net/usb/hso.c 2019-01-27 14:47:43.592683629 -0500 @@ -2377,7 +2377,7 @@ static void hso_free_net_device(struct h remove_net_device(hso_net->parent); - if (hso_net->net)

Re: [pull request][net 0/6] Mellanox, mlx5 fixes 2019-01-25

2019-01-27 Thread David Miller
From: Saeed Mahameed Date: Fri, 25 Jan 2019 12:01:34 -0800 > This series introduces some fixes to mlx5 driver. > For more information please see tag log below. > > Please pull and let me know if there is any problem. Pulled. > For -stable v4.13 > ('net/mlx5e: Allow MAC invalidation while spoof

Re: Error in the hso driver

2019-01-27 Thread Greg KH
On Sun, Jan 27, 2019 at 06:38:41PM +, Yavuz, Tuba wrote: > Hello, > > > On an error path inside the hso_create_net_device function of the hso driver > (drivers/net/usb/hso), hso_free_net_device gets called. This causes a > negative reference count in the net device if register_netdev has no

Re: [PATCH] [stable pre-4.8] can: bcm: check timer values before ktime conversion

2019-01-27 Thread Greg KH
On Sun, Jan 27, 2019 at 07:22:38PM +0100, Oliver Hartkopp wrote: > Hi Sasha, > > On 26.01.19 19:17, Sasha Levin wrote: > > On Thu, Jan 24, 2019 at 10:08:42AM +0100, Oliver Hartkopp wrote: > > > Kyungtae Kim detected a potential integer overflow in bcm_[rx|tx]_setup() > > > when the conversion into

RE: [EXT] Re: [PATCH net-next 0/3] qed*: Error recovery process

2019-01-27 Thread Michal Kalderon
> From: David Miller > Sent: Sunday, January 27, 2019 8:17 PM > > >> From: David Miller > >> Sent: Wednesday, January 23, 2019 3:37 AM > >> > >> > Parity errors might happen in the device's memories due to > >> > momentary bit flips which are caused by radiation. > >> > Errors that are not corre

Re: [PATCH] net/rose: fix NULL ax25_cb kernel panic

2019-01-27 Thread David Miller
From: Dmitry Vyukov Date: Fri, 25 Jan 2019 11:46:40 +0100 > From: Bernard Pidoux > > When an internally generated frame is handled by rose_xmit(), > rose_route_frame() is called: > > if (!rose_route_frame(skb, NULL)) { > dev_kfree_skb(skb); > stats->tx_e

Re: [PATCH v2] net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case

2019-01-27 Thread David Miller
From: Atsushi Nemoto Date: Fri, 25 Jan 2019 11:02:22 +0900 > From: Tomonori Sakita > > If fill_level was not zero and status was not BUSY, > result of "tx_prod - tx_cons - inuse" might be zero. > Subtracting 1 unconditionally results invalid negative return value > on this case. > Make sure not

Re: [Patch net] netrom: switch to sock timer API

2019-01-27 Thread David Miller
From: Cong Wang Date: Thu, 24 Jan 2019 14:18:18 -0800 > sk_reset_timer() and sk_stop_timer() properly handle > sock refcnt for timer function. Switching to them > could fix a refcounting bug reported by syzbot. > > Reported-and-tested-by: syzbot+defa700d16f1bd1b9...@syzkaller.appspotmail.com > C

Re: [PATCH bpf-next v2 0/3] selftests: bpf: break up test_verifier

2019-01-27 Thread Jakub Kicinski
On Fri, 25 Jan 2019 22:21:22 -0800, Alexei Starovoitov wrote: > On Fri, Jan 25, 2019 at 10:17:28PM -0800, Jakub Kicinski wrote: > > On Fri, 25 Jan 2019 21:55:30 -0800, Alexei Starovoitov wrote: > > > On Fri, Jan 25, 2019 at 03:24:41PM -0800, Jakub Kicinski wrote: > > > > Hi! > > > > > > > > Th

Re: pull request (net): ipsec 2019-01-25

2019-01-27 Thread David Miller
From: Steffen Klassert Date: Fri, 25 Jan 2019 08:44:16 +0100 > 1) Several patches to fix the fallout from the recent >tree based policy lookup work. From Florian Westphal. > > 2) Fix VTI for IPCOMP for 'not compressed' IPCOMP packets. >We need an extra IPIP handler to process these packe

Re: [PATCH] [stable pre-4.8] can: bcm: check timer values before ktime conversion

2019-01-27 Thread Oliver Hartkopp
Hi Sasha, On 26.01.19 19:17, Sasha Levin wrote: On Thu, Jan 24, 2019 at 10:08:42AM +0100, Oliver Hartkopp wrote: Kyungtae Kim detected a potential integer overflow in bcm_[rx|tx]_setup() when the conversion into ktime multiplies the given value with NSEC_PER_USEC (1000). Reference: https://m

Re: [GIT] Networking

2019-01-27 Thread David Miller
From: Linus Torvalds Date: Sun, 27 Jan 2019 09:02:17 -0800 > I'm trying to be a bit stricter about the rc pulls, even if I normally > don't even look at yours much. > > So let's try to keep it to fixes only, or at least when you sneak in > new stuff, make them small enough that I don't go "Hmm..

Re: [PATCH net-next 0/3] qed*: Error recovery process

2019-01-27 Thread David Miller
From: Michal Kalderon Date: Sun, 27 Jan 2019 13:42:35 + >> From: David Miller >> Sent: Wednesday, January 23, 2019 3:37 AM >> >> > Parity errors might happen in the device's memories due to momentary >> > bit flips which are caused by radiation. >> > Errors that are not correctable initiate

Re: [PATCH 0/7] sh_eth: implement simple RX checksum offload

2019-01-27 Thread Heiner Kallweit
On 27.01.2019 18:33, Sergei Shtylyov wrote: > Hello! > > Here's a set of 7 patches against DaveM's 'net-next.git' repo. I'm implemeting > the simple RX checksum offload (like was done for the 'ravb' driver by Simon > Horman); it was only tested on the R8A77980 SoC, the other SoCs should just > wor

[PATCH 7/7] sh_eth: offload RX checksum on SH7763

2019-01-27 Thread Sergei Shtylyov
The SH7763 SoC manual describes the Ether MAC's RX checksum offload the same way as it's implemented in the EtherAVB MACs... Signed-off-by: Sergei Shtylyov --- drivers/net/ethernet/renesas/sh_eth.c |1 + 1 file changed, 1 insertion(+) Index: net-next/drivers/net/ethernet/renesas/sh_eth.c =

[PATCH 6/7] sh_eth: offload RX checksum on SH7734

2019-01-27 Thread Sergei Shtylyov
The SH7734 SoC manual describes the Ether MAC's RX checksum offload the same way as it's implemented in the EtherAVB MACs... Signed-off-by: Sergei Shtylyov --- drivers/net/ethernet/renesas/sh_eth.c |1 + 1 file changed, 1 insertion(+) Index: net-next/drivers/net/ethernet/renesas/sh_eth.c =

[PATCH 5/7] sh_eth: offload RX checksum on R8A77980

2019-01-27 Thread Sergei Shtylyov
The R-Car V3H (R8A77980) SoC manual describes the Ether MAC's RX checksum offload the same way as it's implemented in the EtherAVB MAC... Signed-off-by: Sergei Shtylyov --- drivers/net/ethernet/renesas/sh_eth.c |1 + 1 file changed, 1 insertion(+) Index: net-next/drivers/net/ethernet/renes

[PATCH 4/7] sh_eth: offload RX checksum on R8A7740

2019-01-27 Thread Sergei Shtylyov
The R-Mobile A1 (R8A7740) SoC manual describes the Ether MAC's RX checksum offload the same way as it's implemented in the EtherAVB MAC... Signed-off-by: Sergei Shtylyov --- drivers/net/ethernet/renesas/sh_eth.c |1 + 1 file changed, 1 insertion(+) Index: net-next/drivers/net/ethernet/rene

[PATCH 3/7] sh_eth: offload RX checksum on R7S72100

2019-01-27 Thread Sergei Shtylyov
The RZ/A1H (R7S721000) SoC manual describes the Ether MAC's RX checksum offload the same way as it's implemented in the EtherAVB MACs... Signed-off-by: Sergei Shtylyov --- drivers/net/ethernet/renesas/sh_eth.c |1 + 1 file changed, 1 insertion(+) Index: net-next/drivers/net/ethernet/renesa

[PATCH 2/7] sh_eth: RX checksum offload support

2019-01-27 Thread Sergei Shtylyov
Add support for the RX checksum offload. This is enabled by default and may be disabled and re-enabled using 'ethtool': # ethtool -K eth0 rx {on|off} Some Ether MACs provide a simple checksumming scheme which appears to be completely compatible with CHECKSUM_COMPLETE: sum of all packet data after

[PATCH 1/7] sh_eth: rename sh_eth_cpu_data::hw_checksum

2019-01-27 Thread Sergei Shtylyov
Commit 62e04b7e0e3c ("sh_eth: rename 'sh_eth_cpu_data::hw_crc'") renamed the field to 'hw_checksum' for the Ether DMAC "intelligent checksum", however some Ether MACs implement a simpler checksumming scheme, so that name now seems misleading. Rename that filed to 'csmr' as the "intelligent checkmum

  1   2   >