[PATCH net] sctp: fix pr_warn max_data argument type mismatch

2018-12-05 Thread Jakub Audykowicz
My previous patch introduced a compilation warning regarding a type mismatch (int vs size_t). This is a one-letter fix for good housekeeping. Signed-off-by: Jakub Audykowicz --- net/sctp/chunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/chunk.c b/net/sctp/chunk

Re: [PATCH 1/2] vmalloc: New flag for flush before releasing pages

2018-12-05 Thread Ard Biesheuvel
On Thu, 6 Dec 2018 at 00:16, Andy Lutomirski wrote: > > On Wed, Dec 5, 2018 at 3:41 AM Will Deacon wrote: > > > > On Tue, Dec 04, 2018 at 12:09:49PM -0800, Andy Lutomirski wrote: > > > On Tue, Dec 4, 2018 at 12:02 PM Edgecombe, Rick P > > > wrote: > > > > > > > > On Tue, 2018-12-04 at 16:03 +000

Re: [PATCH net-next RFC 1/7] devlink: Add devlink_param for port register and unregister

2018-12-05 Thread Vasundhara Volam
On Thu, Dec 6, 2018 at 12:43 PM Jiri Pirko wrote: > > Thu, Dec 06, 2018 at 07:02:59AM CET, vasundhara-v.vo...@broadcom.com wrote: > >Thank you reviewing the patches. > > > >On Wed, Dec 5, 2018 at 5:24 PM Jiri Pirko wrote: > >> > >> Wed, Dec 05, 2018 at 06:56:54AM CET, vasundhara-v.vo...@broadcom.

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

2018-12-05 Thread Xin Long
On Thu, Dec 6, 2018 at 3:32 AM syzbot wrote: > > syzbot has found a reproducer for the following crash on: > > HEAD commit:0072a0c14d5b Merge tag 'media/v4.20-4' of git://git.kernel.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=16abfdeb40 > kernel

Re: [PATCH net-next RFC 1/7] devlink: Add devlink_param for port register and unregister

2018-12-05 Thread Jiri Pirko
Thu, Dec 06, 2018 at 07:02:59AM CET, vasundhara-v.vo...@broadcom.com wrote: >Thank you reviewing the patches. > >On Wed, Dec 5, 2018 at 5:24 PM Jiri Pirko wrote: >> >> Wed, Dec 05, 2018 at 06:56:54AM CET, vasundhara-v.vo...@broadcom.com wrote: >> >Add functions to register and unregister for the d

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-05 Thread Jakub Kicinski
On Wed, 5 Dec 2018 22:41:43 -0800, Michael Chan wrote: > > > We do have a parameter in NVRAM that controls default WoL. I think > > > this is to expose that parameter so it can be set one way or the > > > other. There are scenarios where Linux has not booted yet (and so > > > there is no opportuni

Re: [PATCH net] sctp: frag_point sanity check

2018-12-05 Thread kbuild test robot
Hi Jakub, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/Jakub-Audykowicz/sctp-frag_point-sanity-check/20181206-011917 config: x86_64-randconfig-x015-12051035 (attached as .config) compiler: gcc-7 (

Re: [PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2018-12-05 Thread Leon Romanovsky
On Thu, Dec 06, 2018 at 03:19:51PM +1100, David Gibson wrote: > Mellanox ConnectX-5 IB cards (MT27800) seem to cause a call trace when > unbound from their regular driver and attached to vfio-pci in order to pass > them through to a guest. > > This goes away if the disable_idle_d3 option is used, s

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-05 Thread Michael Chan
On Wed, Dec 5, 2018 at 10:00 PM Jakub Kicinski wrote: > > On Wed, 5 Dec 2018 17:18:52 -0800, Michael Chan wrote: > > On Wed, Dec 5, 2018 at 4:42 PM Jakub Kicinski wrote: > > > On Wed, 5 Dec 2018 16:01:08 -0800, Michael Chan wrote: > > > > On Wed, Dec 5, 2018 at 3:33 PM Jakub Kicinski wrote: > > >

Re: [PATCH net-next RFC 1/7] devlink: Add devlink_param for port register and unregister

2018-12-05 Thread Vasundhara Volam
Thank you reviewing the patches. On Wed, Dec 5, 2018 at 5:24 PM Jiri Pirko wrote: > > Wed, Dec 05, 2018 at 06:56:54AM CET, vasundhara-v.vo...@broadcom.com wrote: > >Add functions to register and unregister for the driver supported > >configuration parameters table per port. > > > >Cc: Jiri Pirko

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-05 Thread Jakub Kicinski
On Wed, 5 Dec 2018 17:18:52 -0800, Michael Chan wrote: > On Wed, Dec 5, 2018 at 4:42 PM Jakub Kicinski wrote: > > On Wed, 5 Dec 2018 16:01:08 -0800, Michael Chan wrote: > > > On Wed, Dec 5, 2018 at 3:33 PM Jakub Kicinski wrote: > > > > On Wed, 5 Dec 2018 11:27:00 +0530, Vasundhara Volam wrote:

Re: [PATCH net 1/3] flex_array: make FLEX_ARRAY_BASE_SIZE the same value of FLEX_ARRAY_PART_SIZE

2018-12-05 Thread Xin Long
On Thu, Dec 6, 2018 at 1:38 PM David Miller wrote: > > From: Xin Long > Date: Wed, 5 Dec 2018 14:49:40 +0800 > > > This patch is to separate the base data memory from struct flex_array and > > save it into a page. With this change, total_nr_elements of a flex_array > > can grow or shrink without

Re: [PATCH net-next] neighbor: Add extack messages for add and delete commands

2018-12-05 Thread David Miller
From: David Ahern Date: Wed, 5 Dec 2018 20:02:29 -0800 > From: David Ahern > > Add extack messages for failures in neigh_add and neigh_delete. > > Signed-off-by: David Ahern Looks good, applied, thanks David.

Re: [net-next] tipc: fix node keep alive interval calculation

2018-12-05 Thread David Miller
From: Hoang Le Date: Thu, 6 Dec 2018 09:00:09 +0700 > When setting LINK tolerance, node timer interval will be calculated > base on the LINK with lowest tolerance. > > But when calculated, the old node timer interval only updated if current > setting value (tolerance/4) less than old ones regar

Re: [PATCH] net: Use of_node_name_eq for node name comparisons

2018-12-05 Thread David Miller
From: Rob Herring Date: Wed, 5 Dec 2018 13:50:32 -0600 > Convert string compares of DT node names to use of_node_name_eq helper > instead. This removes direct access to the node name pointer. > > For instances using of_node_cmp, this has the side effect of now using > case sensitive comparisons

Re: [PATCH net-next v2 0/4] net: mitigate retpoline overhead

2018-12-05 Thread David Miller
From: Paolo Abeni Date: Wed, 5 Dec 2018 19:13:38 +0100 ... > This may lead to some uglification around the indirect calls. In netconf 2018 > Eric Dumazet described a technique to hide the most relevant part of the > needed > boilerplate with some macro help. > > This series is a [re-]implemen

Re: [PATCH v2 bpf-next 2/7] ppc: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_*

2018-12-05 Thread Sandipan Das
On 06/12/18 12:22 AM, Jiong Wang wrote: > This patch implements code-gen for BPF_ALU | BPF_ARSH | BPF_*. > > Cc: Naveen N. Rao > Cc: Sandipan Das > Signed-off-by: Jiong Wang > --- > arch/powerpc/include/asm/ppc-opcode.h | 2 ++ > arch/powerpc/net/bpf_jit.h| 4 > arch/powerpc

Re: [PATCH net] ipv4: ipv6: netfilter: Adjust the frag mem limit when truesize changes

2018-12-05 Thread David Miller
From: Jiri Wiesner Date: Wed, 5 Dec 2018 16:55:29 +0100 > The *_frag_reasm() functions are susceptible to miscalculating the byte > count of packet fragments in case the truesize of a head buffer changes. > The truesize member may be changed by the call to skb_unclone(), leaving > the fragment me

[PATCH bpf 1/2] selftests/bpf: use thoff instead of nhoff in BPF flow dissector

2018-12-05 Thread Stanislav Fomichev
We are returning thoff from the flow dissector, not the nhoff. Pass thoff along with nhoff to the bpf program (initially thoff == nhoff) and expect flow dissector amend/return thoff, not nhoff. This avoids confusion, when by the time bpf flow dissector exits, nhoff == thoff, which doesn't make muc

[PATCH bpf 2/2] net/flow_dissector: correctly cap nhoff and thoff in case of BPF

2018-12-05 Thread Stanislav Fomichev
We want to make sure that the following condition holds: 0 <= nhoff <= thoff <= skb->len BPF program can set out-of-bounds nhoff and thoff, which is dangerous, see recent commit d0c081b49137 ("flow_dissector: properly cap thoff field")'. Signed-off-by: Stanislav Fomichev --- net/core/flow_disse

Re: [PATCH net 1/3] flex_array: make FLEX_ARRAY_BASE_SIZE the same value of FLEX_ARRAY_PART_SIZE

2018-12-05 Thread David Miller
From: Xin Long Date: Wed, 5 Dec 2018 14:49:40 +0800 > This patch is to separate the base data memory from struct flex_array and > save it into a page. With this change, total_nr_elements of a flex_array > can grow or shrink without having the old element's memory changed when > the new size of t

[PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2018-12-05 Thread David Gibson
Mellanox ConnectX-5 IB cards (MT27800) seem to cause a call trace when unbound from their regular driver and attached to vfio-pci in order to pass them through to a guest. This goes away if the disable_idle_d3 option is used, so it looks like a problem with the hardware handling D3 state. To fix

Re: [PATCH v2 net-next 1/1] net: netem: use a list in addition to rbtree

2018-12-05 Thread David Miller
From: Peter Oskolkov Date: Tue, 4 Dec 2018 11:55:56 -0800 > When testing high-bandwidth TCP streams with large windows, > high latency, and low jitter, netem consumes a lot of CPU cycles > doing rbtree rebalancing. > > This patch uses a linear list/queue in addition to the rbtree: > if an incom

Re: [PATCH net] sctp: frag_point sanity check

2018-12-05 Thread David Miller
From: Jakub Audykowicz Date: Tue, 4 Dec 2018 20:27:41 +0100 > If for some reason an association's fragmentation point is zero, > sctp_datamsg_from_user will try to endlessly try to divide a message > into zero-sized chunks. This eventually causes kernel panic due to > running out of memory. > >

Re: [PATCH net-next 01/12] vxlan: Add a function to init switchdev_notifier_vxlan_fdb_info

2018-12-05 Thread David Miller
From: Ido Schimmel Date: Wed, 5 Dec 2018 15:50:23 + > +static struct switchdev_notifier_vxlan_fdb_info > +vxlan_fdb_switchdev_notifier_info(const struct vxlan_dev *vxlan, > + const struct vxlan_fdb *fdb, > + const struct vxlan_rdst *

[PATCH net-next] neighbor: Add extack messages for add and delete commands

2018-12-05 Thread David Ahern
From: David Ahern Add extack messages for failures in neigh_add and neigh_delete. Signed-off-by: David Ahern --- net/core/neighbour.c | 55 +--- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/net/core/neighbour.c b/net/core/neigh

Re: [PATCH bpf-next] tools: bpftool: add a command to dump the trace pipe

2018-12-05 Thread Alexei Starovoitov
On Wed, Dec 05, 2018 at 06:15:23PM +, Quentin Monnet wrote: > > > + > > > + /* Allow room for NULL terminating byte and pipe file name */ > > > + snprintf(format, sizeof(format), "%%*s %%%zds %%99s %%*s %%*d %%*d\\n", > > > + PATH_MAX - strlen(pipe_name) - 1); > > > > before scanning

Re: [PATCH bpf-next] bpf: relax verifier restriction on BPF_MOV | BPF_ALU

2018-12-05 Thread Alexei Starovoitov
On Wed, Dec 05, 2018 at 03:32:50PM +, Jiong Wang wrote: > On 05/12/2018 14:52, Edward Cree wrote: > > On 05/12/18 09:46, Jiong Wang wrote: > > > There is NO processed instruction number regression, either with or > > > without > > > -mattr=+alu32. > > > > > Cilium bpf > > > === > > > bpf_lb-D

[Patch v2 net-next] call sk_dst_reset when set SO_DONTROUTE

2018-12-05 Thread yupeng
after set SO_DONTROUTE to 1, the IP layer should not route packets if the dest IP address is not in link scope. But if the socket has cached the dst_entry, such packets would be routed until the sk_dst_cache expires. So we should clean the sk_dst_cache when a user set SO_DONTROUTE option. Below are

Re: [PATCH bpf-next 0/4] Misc improvements on bpf_func_info

2018-12-05 Thread Alexei Starovoitov
On Wed, Dec 05, 2018 at 05:35:43PM -0800, Martin KaFai Lau wrote: > The patchset has a few improvements on bpf_func_info: > 1. Improvements on the behaviors of info.func_info, info.func_info_cnt >and info.func_info_rec_size. > 2. Name change: s/insn_offset/insn_off/ > > Please see individual p

Re: [PATCH bpf-next v2 3/5] selftests/bpf: use thoff instead of nhoff in BPF flow dissector

2018-12-05 Thread Alexei Starovoitov
On Tue, Dec 04, 2018 at 03:26:15PM -0800, Stanislav Fomichev wrote: > On 12/04, Song Liu wrote: > > On Mon, Dec 3, 2018 at 8:01 PM Stanislav Fomichev wrote: > > > > > > We are returning thoff from the flow dissector, not the nhoff. Pass > > > thoff along with nhoff to the bpf program (initially th

[net-next] tipc: fix node keep alive interval calculation

2018-12-05 Thread Hoang Le
When setting LINK tolerance, node timer interval will be calculated base on the LINK with lowest tolerance. But when calculated, the old node timer interval only updated if current setting value (tolerance/4) less than old ones regardless of number of links as well as links' lowest tolerance value

[iproute2-next] tipc: fix misalignment printout in non-JSON output

2018-12-05 Thread Hoang Le
In the commit 1304f50a5be0ed ("tipc: JSON support for showing nametable"), introduced misalignment in the columns of the printout in non-JSON mode compare to the list header. Add one space per column to make alignment with the list header. before: $tipc name show Type Lower Upper S

[PATCH bpf-next 1/4] bpf: Improve the info.func_info and info.func_info_rec_size behavior

2018-12-05 Thread Martin KaFai Lau
1) When bpf_dump_raw_ok() == false and the kernel can provide >=1 func_info to the userspace, the current behavior is setting the info.func_info_cnt to 0 instead of setting info.func_info to 0. It is different from the behavior in jited_func_lens/nr_jited_func_lens, jited_ksyms/nr_j

[PATCH bpf-next 4/4] bpf: Expect !info.func_info and insn_off name changes in test_btf/libbpf/bpftool

2018-12-05 Thread Martin KaFai Lau
Similar to info.jited_*, info.func_info could be 0 if bpf_dump_raw_ok() == false. This patch makes changes to test_btf and bpftool to expect info.func_info could be 0. This patch also makes the needed changes for s/insn_offset/insn_off/. Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song

[PATCH bpf-next 2/4] bpf: Change insn_offset to insn_off in bpf_func_info

2018-12-05 Thread Martin KaFai Lau
The later patch will introduce "struct bpf_line_info" which has member "line_off" and "file_off" referring back to the string section in btf. The line_"off" and file_"off" are more consistent to the naming convention in btf.h that means "offset" (e.g. name_off in "struct btf_type"). The to-be-add

[PATCH bpf-next 3/4] bpf: tools: Sync uapi bpf.h for the name changes in bpf_func_info

2018-12-05 Thread Martin KaFai Lau
This patch sync the name changes in bpf_func_info to the tools/. Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song --- tools/include/uapi/linux/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 6

[PATCH bpf-next 0/4] Misc improvements on bpf_func_info

2018-12-05 Thread Martin KaFai Lau
The patchset has a few improvements on bpf_func_info: 1. Improvements on the behaviors of info.func_info, info.func_info_cnt and info.func_info_rec_size. 2. Name change: s/insn_offset/insn_off/ Please see individual patch for details. Martin KaFai Lau (4): bpf: Improve the info.func_info and

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-05 Thread Michael Chan
On Wed, Dec 5, 2018 at 4:42 PM Jakub Kicinski wrote: > > On Wed, 5 Dec 2018 16:01:08 -0800, Michael Chan wrote: > > On Wed, Dec 5, 2018 at 3:33 PM Jakub Kicinski > > wrote: > > > > > > On Wed, 5 Dec 2018 11:27:00 +0530, Vasundhara Volam wrote: > > > > Register devlink_port with devlink and creat

Re: [PATCH net-next v3 0/4] net: bridge: convert multicast to generic rhashtable

2018-12-05 Thread David Miller
From: Nikolay Aleksandrov Date: Wed, 5 Dec 2018 15:14:23 +0200 > The current bridge multicast code uses a custom rhashtable > implementation which predates the generic rhashtable API. Patch 01 > converts it to use the generic kernel rhashtable which simplifies the > code a lot and removes duplic

Re: [PATCH net-next 0/8] Pass extack to NETDEV_PRE_UP

2018-12-05 Thread Petr Machata
David Miller writes: > Your CC list is so huge that vger.kernel.org dropped all of your postings. > > That CC list is not reasonable at all, trim it down to the most minimum > set. Probably 2 or 3 mailing lists, primarily netdev, and maybe a small > handful of specific developers. > > Nothing mo

Re: [PATCH net-next 2/7] neighbor: Fold ___neigh_lookup_noref into __neigh_lookup_noref

2018-12-05 Thread David Miller
From: David Ahern Date: Wed, 5 Dec 2018 17:46:37 -0700 > ok. patches 5-7 are not dependent on 1-4. Should I re-send outside of > this set? Yes, please respin. Thanks David.

Re: [pull request][net-next V2 0/7] Mellanox, mlx5e updates 2018-12-04

2018-12-05 Thread David Miller
From: Saeed Mahameed Date: Wed, 5 Dec 2018 16:12:58 -0800 > The following series is for mlx5e netdevice driver, it adds ethtool > support for RX hash fields configuration and some misc updates, please > see tag log below. > > Please pull and let me know if there's any problem. > > v1->v2: > -

Re: [PATCH net-next 2/7] neighbor: Fold ___neigh_lookup_noref into __neigh_lookup_noref

2018-12-05 Thread David Ahern
On 12/5/18 5:46 PM, David Ahern wrote: > ok. patches 5-7 are not dependent on 1-4. Should I re-send outside of > this set? bleh. 5 is. I'll re-send.

Re: [PATCH net-next 2/7] neighbor: Fold ___neigh_lookup_noref into __neigh_lookup_noref

2018-12-05 Thread David Ahern
On 12/5/18 5:44 PM, David Miller wrote: > From: David Ahern > Date: Wed, 5 Dec 2018 15:34:09 -0800 > >> @@ -270,37 +270,25 @@ static inline bool neigh_key_eq128(const struct >> neighbour *n, const void *pkey) >> (n32[2] ^ p32[2]) | (n32[3] ^ p32[3])) == 0; >> } >> >> -static inl

[Patch v2 net-next] call sk_dst_reset when set SO_DONTROUTE

2018-12-05 Thread yupeng
after set SO_DONTROUTE to 1, the IP layer should not route packets if the dest IP address is not in link scope. But if the socket has cached the dst_entry, such packets would be routed until the sk_dst_cache expires. So we should clean the sk_dst_cache when a user set SO_DONTROUTE option. Below are

Re: [PATCH net-next 2/7] neighbor: Fold ___neigh_lookup_noref into __neigh_lookup_noref

2018-12-05 Thread David Miller
From: David Ahern Date: Wed, 5 Dec 2018 15:34:09 -0800 > @@ -270,37 +270,25 @@ static inline bool neigh_key_eq128(const struct > neighbour *n, const void *pkey) > (n32[2] ^ p32[2]) | (n32[3] ^ p32[3])) == 0; > } > > -static inline struct neighbour *___neigh_lookup_noref( > -

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-05 Thread Jakub Kicinski
On Wed, 5 Dec 2018 16:01:08 -0800, Michael Chan wrote: > On Wed, Dec 5, 2018 at 3:33 PM Jakub Kicinski > wrote: > > > > On Wed, 5 Dec 2018 11:27:00 +0530, Vasundhara Volam wrote: > > > Register devlink_port with devlink and create initial port params > > > table for bnxt_en. The table consists

[Patch v2 net-next] call sk_dst_reset when set SO_DONTROUTE

2018-12-05 Thread yupeng
after set SO_DONTROUTE to 1, the IP layer should not route packets if the dest IP address is not in link scope. But if the socket has cached the dst_entry, such packets would be routed until the sk_dst_cache expires. So we should clean the sk_dst_cache when a user set SO_DONTROUTE option. Below are

Re: [Patch net-next] call sk_dst_reset when set SO_DONTROUTE

2018-12-05 Thread peng yu
In fack, my customer's issue is that he set SO_DONTROUTE by mistake. He shouldn't do that. But after he set this flag, the connection has no problem at first. After the sk_dst_cache expired for some reasons, the connection stucked. I think the correct behavior is that the connection should stuck im

Re: [PATCH net] tcp: fix NULL ref in tail loss probe

2018-12-05 Thread David Miller
From: Yuchung Cheng Date: Wed, 5 Dec 2018 14:38:38 -0800 > TCP loss probe timer may fire when the retranmission queue is empty but > has a non-zero tp->packets_out counter. tcp_send_loss_probe will call > tcp_rearm_rto which triggers NULL pointer reference by fetching the > retranmission queue h

Re: [PATCH 1/2] net: linkwatch: send change uevent on link changes

2018-12-05 Thread David Miller
From: Jouke Witteveen Date: Wed, 5 Dec 2018 23:38:17 +0100 > Can you elaborate a bit? I may not be aware of the policy you have in > mind. When we have a user facing interface to do something, we don't create another one unless it is absolutely, positively, unavoidable.

Re: [PATCH net] tcp: Do not underestimate rwnd_limited

2018-12-05 Thread David Miller
From: Eric Dumazet Date: Wed, 5 Dec 2018 14:24:31 -0800 > If available rwnd is too small, tcp_tso_should_defer() > can decide it is worth waiting before splitting a TSO packet. > > This really means we are rwnd limited. > > Fixes: 5615f88614a4 ("tcp: instrument how long TCP is limited by recei

Re: pull-request: bpf 2018-12-05

2018-12-05 Thread David Miller
From: Alexei Starovoitov Date: Wed, 5 Dec 2018 13:23:22 -0800 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) fix bpf uapi pointers for 32-bit architectures, from Daniel. > > 2) improve verifer ability to handle progs with a lot of branch

Re: [Patch net-next] call sk_dst_reset when set SO_DONTROUTE

2018-12-05 Thread Eric Dumazet
On 12/05/2018 04:13 PM, peng yu wrote: > The SO_DONTROUTE doesn't impact the TCP receiving path, but it should > block the ACK of the receiving packet. When there are too many packets > which are not ACKed, the client will stop to send packets, so the > sock.recv on the server side won't receive

Re: [PATCH net-next 0/6] u32 to linkmode fixes

2018-12-05 Thread David Miller
From: Andrew Lunn Date: Wed, 5 Dec 2018 21:49:39 +0100 > This patchset fixes issues found in the last patchset which converted > the phydev advertise etc, from a u32 to a linux bitmap. Most of the > issues are the result of clearing bits which should not of been > cleared. To make the API cleare

Re: [PATCH net] net: use skb_list_del_init() to remove from RX sublists

2018-12-05 Thread David Miller
From: Edward Cree Date: Tue, 4 Dec 2018 17:37:57 + > list_del() leaves the skb->next pointer poisoned, which can then lead to > a crash in e.g. OVS forwarding. For example, setting up an OVS VXLAN > forwarding bridge on sfc as per: ... > So, in all listified-receive handling, instead pull

[net-next V2 6/7] net/mlx5e: ethtool, Support user configuration for RX hash fields

2018-12-05 Thread Saeed Mahameed
From: Aya Levin Enable user configuration of RX hash fields that are used for traffic spreading into RX queues. User can change built-in RSS (Receive Side Scaling) profiles on the following traffic types: UDP4, UDP6, TCP4 and TCP6. This configuration effects both outer and inner headers. Added

[net-next V2 5/7] net/mlx5e: Move RSS params to a dedicated struct

2018-12-05 Thread Saeed Mahameed
From: Aya Levin Remove RSS params from params struct under channels, and introduce a new struct with RSS configuration params under priv struct. There is no functional change here. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mella

Re: [Patch net-next] call sk_dst_reset when set SO_DONTROUTE

2018-12-05 Thread peng yu
The SO_DONTROUTE doesn't impact the TCP receiving path, but it should block the ACK of the receiving packet. When there are too many packets which are not ACKed, the client will stop to send packets, so the sock.recv on the server side won't receive data after it received some data. I extracted the

[net-next V2 4/7] net/mlx5e: Refactor TIR configuration function

2018-12-05 Thread Saeed Mahameed
From: Aya Levin Refactor mlx5e_build_indir_tir_ctx_hash for better code re-use. TIR stands for Transport Interface Receive, which is responsible for all transport related operations on the receive side. Added a static array with TIR default configuration values. This separates configuration value

[net-next V2 3/7] net/mlx5e: Move modify tirs hash functionality

2018-12-05 Thread Saeed Mahameed
From: Aya Levin Move modify tirs hash functionality (mlx5e_modify_tirs_hash) from en_ethtool.c to en_main.c. This allows future use of this fuctionality from en_fs_ethtool.c, while keeping current convention: en_ethtool.c doesn't have an API. There is no functional change here. Signed-off-by: A

[pull request][net-next V2 0/7] Mellanox, mlx5e updates 2018-12-04

2018-12-05 Thread Saeed Mahameed
Hi Dave, The following series is for mlx5e netdevice driver, it adds ethtool support for RX hash fields configuration and some misc updates, please see tag log below. Please pull and let me know if there's any problem. v1->v2: - Move static const array to c file. - Remove unnecessary blank lin

[net-next V2 2/7] net/mlx5e: Cleanup unused defines

2018-12-05 Thread Saeed Mahameed
From: Gal Pressman Remove couple of defines that are no longer used. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/eth

[net-next V2 7/7] net/mlx5e: Improve ethtool private-flags code structure

2018-12-05 Thread Saeed Mahameed
From: Tariq Toukan Refactor the code of private-flags setter. Replace consecutive calls to mlx5e_handle_pflag with a loop that uses a preset set of parameters. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 18 +++-- .../ethernet/

[net-next V2 1/7] net/mlx5e: Remove trailing space of tx_pause ethtool counter name

2018-12-05 Thread Saeed Mahameed
tx_pause_storm_warning_events ethtool counter name has a trailing space, remove it. Signed-off-by: Saeed Mahameed Reviewed-by: Eran Ben Elisha --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-05 Thread Michael Chan
On Wed, Dec 5, 2018 at 3:33 PM Jakub Kicinski wrote: > > On Wed, 5 Dec 2018 11:27:00 +0530, Vasundhara Volam wrote: > > Register devlink_port with devlink and create initial port params > > table for bnxt_en. The table consists of a generic parameter: > > > > wake-on-lan: Enables Wake on Lan for

Re: [net-next 7/7] net/mlx5e: Improve ethtool private-flags code structure

2018-12-05 Thread Saeed Mahameed
On Wed, 2018-12-05 at 11:28 -0800, Cong Wang wrote: > Hello, Saeed > > On Tue, Dec 4, 2018 at 10:27 PM Saeed Mahameed > wrote: > > static int mlx5e_handle_pflag(struct net_device *netdev, > > u32 wanted_flags, > > - enum mlx5e_priv_flag f

Re: [net-next 7/7] net/mlx5e: Improve ethtool private-flags code structure

2018-12-05 Thread Saeed Mahameed
On Wed, 2018-12-05 at 10:36 -0800, Cong Wang wrote: > On Tue, Dec 4, 2018 at 10:27 PM Saeed Mahameed > wrote: > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h > > b/drivers/net/ethernet/mellanox/mlx5/core/en.h > > index a429553002a6..49e90ac5dc8b 100644 > > --- a/drivers/net/ethernet/

Re: [net-next 6/7] net/mlx5e: ethtool, Support user configuration for RX hash fields

2018-12-05 Thread Saeed Mahameed
On Wed, 2018-12-05 at 11:19 -0800, Cong Wang wrote: > Hello, Saeed > > > On Tue, Dec 4, 2018 at 10:26 PM Saeed Mahameed > wrote: > > +static int mlx5e_get_rss_hash_opt(struct mlx5e_priv *priv, > > + struct ethtool_rxnfc *nfc) > ... > > + tt = flow_type_to_tr

Re: [net-next 4/7] net/mlx5e: Refactor TIR configuration function

2018-12-05 Thread Saeed Mahameed
On Wed, 2018-12-05 at 10:56 -0800, Cong Wang wrote: > On Tue, Dec 4, 2018 at 10:26 PM Saeed Mahameed > wrote: > > +static const struct mlx5e_tirc_config > > +tirc_default_config[MLX5E_NUM_INDIR_TIRS] = { > > Is it okay to define an array in a header??? No link error??? > > I must be dumb... Yes

Re: [PATCH v4 1/2] bpf: add __weak hook for allocating executable memory

2018-12-05 Thread Kees Cook
On Mon, Nov 26, 2018 at 9:02 AM Edgecombe, Rick P wrote: > > On Fri, 2018-11-23 at 23:18 +0100, Ard Biesheuvel wrote: > > By default, BPF uses module_alloc() to allocate executable memory, > > but this is not necessary on all arches and potentially undesirable > > on some of them. > > > > So break

Re: Re: [Bug] net/ipv6: skb_over_panic in mld_newpack

2018-12-05 Thread Benjamin Poirier
On 2018/12/05 16:57, Nicolas Belouin wrote: [...] > > Thanks for your help, using your debug patch I got the value of > needed_headroom: > USHRT_MAX - 64 > And tracked it down to a legacy out of tree patch of ours I then fixed. > The patch was increasing/decreasing the needed_headroom without che

[PATCH net-next 2/7] neighbor: Fold ___neigh_lookup_noref into __neigh_lookup_noref

2018-12-05 Thread David Ahern
From: David Ahern There are no more direct callers of ___neigh_lookup_noref so no need for it to be a standalone helper. Signed-off-by: David Ahern --- include/net/neighbour.h | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/include/net/neighbour.h b/

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-05 Thread Jakub Kicinski
On Wed, 5 Dec 2018 11:27:00 +0530, Vasundhara Volam wrote: > Register devlink_port with devlink and create initial port params > table for bnxt_en. The table consists of a generic parameter: > > wake-on-lan: Enables Wake on Lan for this port when magic packet > is received with this port's MAC ad

[PATCH net-next 5/7] neighbor: Create a neigh_hash helper

2018-12-05 Thread David Ahern
From: David Ahern Consolidate calculations of the neighbor hash into a single helper. Signed-off-by: David Ahern --- include/net/neighbour.h | 10 +- net/core/neighbour.c| 15 +-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/include/net/neighbour.h b

[PATCH net-next 6/7] neighbor: Skip the duplicate lookup in neigh_add

2018-12-05 Thread David Ahern
From: David Ahern When adding a new neighbor via rtnetlink, neigh_add does a lookup and if the result is NULL calls __neigh_lookup_errno to create a new entry if the NLM_F_CREATE flag is set. But, __neigh_lookup_errno calls neigh_lookup again before neigh_create; the neigh_lookup is redundant. R

[PATCH net-next 0/7] neighbor: cleanups plus extack for add and delete

2018-12-05 Thread David Ahern
From: David Ahern cleanups: - remove open coding of key and hash functions for ipv4 and ipv6 and then collapse hash functions - collapse now unnecessary ___neigh_lookup_noref helper - create helper for neigh hash computation - remove duplicate lookup in neigh_add After that add extack messages

[PATCH net-next 7/7] neighbor: Add extack messages for add and delete commands

2018-12-05 Thread David Ahern
From: David Ahern Add extack messages for failures in neigh_add and neigh_delete. Also, require NDA_DST length to be exactly the key length for the table otherwise it is an unexpected address and can lead to unexpected entries. e.g., IPv4 table sent and IPv6 address (using a modi

[PATCH net-next 3/7] net/ipv4: Move arp_hashfn into arp_hash

2018-12-05 Thread David Ahern
From: David Ahern There are no more direct references to arp_hashfn so fold it into arp_hash, the hash callback for arp. Signed-off-by: David Ahern --- include/net/arp.h | 8 net/ipv4/arp.c| 5 - 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/net/arp.h

[PATCH net-next 1/7] neighbor: Remove open coding of key and hash functions

2018-12-05 Thread David Ahern
From: David Ahern ___neigh_lookup_noref takes the key and hash functions as inputs, yet those are part of the operations listed in the neigh_table which is also passed as an arugment. Remove the open coding of these internal implementations by converting uses of ___neigh_lookup_noref to __neigh_l

[PATCH net-next 4/7] net/ipv6: Move ndisc_hashfn to ndisc_hash

2018-12-05 Thread David Ahern
From: David Ahern There are no more direct references to ndisc_hashfn so fold it into ndisc_hash, the hash callback for ndisc. Signed-off-by: David Ahern --- include/net/ndisc.h | 10 -- net/ipv6/ndisc.c| 7 ++- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/i

Re: [Patch net-next] call sk_dst_reset when set SO_DONTROUTE

2018-12-05 Thread Eric Dumazet
On Wed, Dec 5, 2018 at 3:07 PM yupeng wrote: > > after set SO_DONTROUTE to 1, the IP layer should not route packets if > the dest IP address is not in link scope. But if the socket has cached > the dst_entry, such packets would be routed until the sk_dst_cache > expires. So we should clean the sk_

Re: [PATCH 1/2] vmalloc: New flag for flush before releasing pages

2018-12-05 Thread Andy Lutomirski
On Wed, Dec 5, 2018 at 3:41 AM Will Deacon wrote: > > On Tue, Dec 04, 2018 at 12:09:49PM -0800, Andy Lutomirski wrote: > > On Tue, Dec 4, 2018 at 12:02 PM Edgecombe, Rick P > > wrote: > > > > > > On Tue, 2018-12-04 at 16:03 +, Will Deacon wrote: > > > > On Mon, Dec 03, 2018 at 05:43:11PM -080

[PATCH V2 mlx5-next 1/4] net/mlx5: When fetching CQEs return CQE instead of void pointer

2018-12-05 Thread Saeed Mahameed
From: Daniel Jurgens The function is only used to retrieve CQEs, use the proper type as the return value. Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/wq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ne

[PATCH V2 mlx5-next 3/4] IB/mlx5: Use helper to get CQE opcode

2018-12-05 Thread Saeed Mahameed
From: Tariq Toukan Use the new helper that extracts the opcode from a CQE (completion queue entry) structure. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/infiniband/hw/mlx5/cq.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infin

[PATCH V2 mlx5-next 4/4] net/mlx5: Move flow counters data structures from flow steering header

2018-12-05 Thread Saeed Mahameed
After the following flow counters API refactoring: ("net/mlx5: Use flow counter IDs and not the wrapping cache object") flow counters private data structures mlx5_fc_cache and mlx5_fc are redundantly exposed in fs_core.h, they have nothing to do with flow steering core and they are private to fs_co

[PATCH V2 mlx5-next 2/4] net/mlx5: Use helper to get CQE opcode

2018-12-05 Thread Saeed Mahameed
From: Tariq Toukan Introduce and use a helper that extracts the opcode from a CQE (completion queue entry) structure. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 10 +- drivers/net/ethernet/mellanox/mlx5/core/en_t

[PATCH V2 mlx5-next 0/4] mlx5 core CQE API and misc updates

2018-12-05 Thread Saeed Mahameed
Hi This patchset is for mlx5-next shared branch, and will be applied there once the review is done. Patches 1,2,3 are trivial improvements to CQE API 1. return CQE pointer instead of void pointer in get_cqe function 2. helper function for retrieving the CQE opcode, used in rdma and netdev Patch

[Patch net-next] call sk_dst_reset when set SO_DONTROUTE

2018-12-05 Thread yupeng
after set SO_DONTROUTE to 1, the IP layer should not route packets if the dest IP address is not in link scope. But if the socket has cached the dst_entry, such packets would be routed until the sk_dst_cache expires. So we should clean the sk_dst_cache when a user set SO_DONTROUTE option. Below are

[PATCH RFC 2/2] virtio_net: bulk free tx skbs

2018-12-05 Thread Michael S. Tsirkin
Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is safe to call in a non-napi context as long as the napi_budget flag is correct. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/vi

[PATCH RFC 1/2] virtio-net: bql support

2018-12-05 Thread Michael S. Tsirkin
When use_napi is set, let's enable BQLs. Note: some of the issues are similar to wifi. It's worth considering whether something similar to commit 36148c2bbfbe ("mac80211: Adjust TSQ pacing shift") might be benefitial. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 27

[PATCH RFC 0/2] virtio-net: interrupt related improvements

2018-12-05 Thread Michael S. Tsirkin
Now that we have brought the virtio overhead way down with a fast packed ring implementation, we seem to be actually observing TCP drops indicative of bufferbloat. So let's try to enable TSQ. Note: it isn't clear that the default pacing is great for the virt usecase. It's worth trying to play with

[PATCH net] tcp: fix NULL ref in tail loss probe

2018-12-05 Thread Yuchung Cheng
TCP loss probe timer may fire when the retranmission queue is empty but has a non-zero tp->packets_out counter. tcp_send_loss_probe will call tcp_rearm_rto which triggers NULL pointer reference by fetching the retranmission queue head in its sub-routines. Add a more detailed warning to help catch

Re: [PATCH 1/2] net: linkwatch: send change uevent on link changes

2018-12-05 Thread Jouke Witteveen
On Wed, Dec 5, 2018 at 8:45 PM David Miller wrote: > > From: Jouke Witteveen > Date: Wed, 5 Dec 2018 14:50:31 +0100 > > > For example, I maintain a network manager that delegates the actual > > networking work to specialized programs. > > Basically "I've implemented things using separate programs

Re: [PATCH mlx5-next 2/4] net/mlx5: Use helper to get CQE opcode

2018-12-05 Thread Saeed Mahameed
On Tue, 2018-12-04 at 20:55 -0800, Cong Wang wrote: > On Tue, Dec 4, 2018 at 6:06 PM Saeed Mahameed > wrote: > > +static inline u8 get_cqe_opcode(struct mlx5_cqe64 *cqe) > > Make it const please. Please be specific I can do: static inline u8 get_cqe_opcode(struct mlx5_cqe64 const *cqe) if that

Re: [PATCH net] tcp: Do not underestimate rwnd_limited

2018-12-05 Thread Yuchung Cheng
On Wed, Dec 5, 2018 at 2:28 PM Soheil Hassas Yeganeh wrote: > > On Wed, Dec 5, 2018 at 5:24 PM Eric Dumazet wrote: > > > > If available rwnd is too small, tcp_tso_should_defer() > > can decide it is worth waiting before splitting a TSO packet. > > > > This really means we are rwnd limited. > > >

Re: [PATCH net] tcp: Do not underestimate rwnd_limited

2018-12-05 Thread Soheil Hassas Yeganeh
On Wed, Dec 5, 2018 at 5:24 PM Eric Dumazet wrote: > > If available rwnd is too small, tcp_tso_should_defer() > can decide it is worth waiting before splitting a TSO packet. > > This really means we are rwnd limited. > > Fixes: 5615f88614a4 ("tcp: instrument how long TCP is limited by receive > w

Re: [PATCH mlx5-next 3/4] IB/mlx5: Use helper to get CQE opcode

2018-12-05 Thread Saeed Mahameed
On Wed, 2018-12-05 at 08:09 +, Leon Romanovsky wrote: > On Tue, Dec 04, 2018 at 06:03:02PM -0800, Saeed Mahameed wrote: > > From: Tariq Toukan > > > > Use the new helper that extracts the opcode > > from a CQE (completion queue entry) structure. > > > > Signed-off-by: Tariq Toukan > > Signe

Re: [PATCH mlx5-next 4/4] net/mlx5: Move flow counters data structures from flow steering header

2018-12-05 Thread Saeed Mahameed
On Tue, 2018-12-04 at 21:04 -0800, Cong Wang wrote: > On Tue, Dec 4, 2018 at 6:05 PM Saeed Mahameed > wrote: > > After the following flow counters API refactoring: > > ("net/mlx5: Use flow counter IDs and not the wrapping cache > > object") > > flow counters private data structures mlx5_fc_cache a

  1   2   3   >