[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

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,

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

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

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 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

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: [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 >

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

[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

[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 ---

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

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

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. >

[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

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 > > > === > > >

[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

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

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

[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,

[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

[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

[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

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

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

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

[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

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

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

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

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

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

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

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

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

[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 ---

[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

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

[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

[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:

[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

[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

[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 +++--

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

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 > > ---

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 =

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...

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

[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

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

[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

[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.

[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

[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

[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 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

[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

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

[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

[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

[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

[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 +-

[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

[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

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 >

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 > >

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

[PATCH net] tcp: Do not underestimate rwnd_limited

2018-12-05 Thread Eric Dumazet
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 window") Signed-off-by: Eric Dumazet --- net/ipv4/tcp_output.c |

Re: DSA support for Marvell 88e6065 switch

2018-12-05 Thread Florian Fainelli
On 12/5/18 12:46 PM, Pavel Machek wrote: > Hi! > > But I'm running into problems with tagging code, and I guess I'd like > some help understanding. > > tag_trailer: allocates new skb, then copies data around. > > tag_qca: does dev->stats.tx_packets++, and reuses existing

pull-request: bpf 2018-12-05

2018-12-05 Thread Alexei Starovoitov
Hi David, 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 branches, from Alexei. 3) strict btf checks, from Yonghong. 4)

[PATCH] net-udp: deprioritize cpu match for udp socket lookup

2018-12-05 Thread Maciej Żenczykowski
From: Maciej Żenczykowski During udp socket lookup cpu match should be lowest priority, hence it should increase score by only 1. The next priority is delivering v4 to v4 sockets, and v6 to v6 sockets. The v6 code path doesn't have to deal with this so it always gets a score of '4'. The v4

[PATCH net-next 4/6] net: mii: Add mii_lpa_mod_linkmode_lpa_t

2018-12-05 Thread Andrew Lunn
Add a _mod_ variant of mii_lpa_to_linkmode_lpa_t. Use this to fix the genphy_read_status() where the 1G link partner features are getting lost. Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to linkmode") Reported-by: Heiner Kallweit Signed-off-by: Andrew Lunn ---

[PATCH net-next 2/6] net: mii: Rename mii_stat1000_to_linkmode_lpa_t

2018-12-05 Thread Andrew Lunn
Rename mii_stat1000_to_linkmode_lpa_t to mii_stat1000_mod_linkmode_lpa_t to indicate it modifies the passed linkmode bitmap, without clearing any other bits. Add a helper to set/clear bits in a linkmode. Use this helper to ensure bit are clear which the stat1000 indicates should not be set.

[PATCH net-next 5/6] net: mii: mii_lpa_mod_linkmode_lpa_t: Make use of linkmode_mod_bit helper

2018-12-05 Thread Andrew Lunn
Replace the if else code structure with a call to the helper linkmode_mod_bit. Signed-off-by: Andrew Lunn --- include/linux/mii.h | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/mii.h b/include/linux/mii.h index e72447778a08..6fee8b1a4400 100644 ---

[PATCH net-next 6/6] net: phy: Fix ioctl handler when modifing MII_ADVERTISE

2018-12-05 Thread Andrew Lunn
When the MII_ADVERTISE register is modified by the IOCTL handler, phydev->advertising needs recalculating. Use the _mod_ variant of mii_adv_to_linkmode_adv_t so that bits outside of the advertise registers are not cleared. Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to

[PATCH net-next 1/6] net: mii: Fix autoneg in mii_lpa_to_linkmode_lpa_t()

2018-12-05 Thread Andrew Lunn
mii_adv_to_linkmode_adv_t() clears all bits before setting it needs to set. This means the freshly set Autoneg gets cleared. Change the order, and add comments about it clearing the old content of the bitmap. Reported-by: Heiner Kallweit Fixes: c0ec3c273677 ("net: phy: Convert u32

[PATCH net-next 3/6] phy: marvell: Rename mii_lpa_to_linkmode_lpa_t

2018-12-05 Thread Andrew Lunn
Rename mii_lpa_to_linkmode_lpa_t to mii_lpa_mod_linkmode_lpa_t to indicate it modifies the passed linkmode bitmap, without clearing any other bits. Also, ensure bit are clear which the lpa indicates should not be set. Suggested-by: Heiner Kallweit Fixes: c0ec3c273677 ("net: phy: Convert u32

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

2018-12-05 Thread Andrew Lunn
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 clearer, the idea from Heiner Kallweit was used, with _mod_ to indicate

Re: DSA support for Marvell 88e6065 switch

2018-12-05 Thread Pavel Machek
Hi! > > > > But I'm running into problems with tagging code, and I guess I'd like > > > > some help understanding. > > > > > > > > tag_trailer: allocates new skb, then copies data around. > > > > > > > > tag_qca: does dev->stats.tx_packets++, and reuses existing skb. > > > > > > > > tag_brcm:

Re: [PATCH net] macvlan: remove duplicate check

2018-12-05 Thread David Miller
From: Matteo Croce Date: Tue, 4 Dec 2018 18:05:42 +0100 > Following commit 59f997b088d2 ("macvlan: return correct error value"), > there is a duplicate check for mac addresses both in macvlan_sync_address() > and macvlan_set_mac_address(). > As the former calls the latter, remove the one in

Re: [PATCH 0/3] net: macb: DMA race condition fixes

2018-12-05 Thread David Miller
From: Anssi Hannula Date: Fri, 30 Nov 2018 20:21:34 +0200 > Here are a couple of race condition fixes for the macb driver. The first > two are issues observed on real HW. It looks like there is still an active discussion about the memory barriers in patch #3 being excessive. Once that is

Re: [PATCH 1/3] net: macb: fix random memory corruption on RX with 64-bit DMA

2018-12-05 Thread David Miller
From: Anssi Hannula Date: Fri, 30 Nov 2018 20:21:35 +0200 > @@ -682,6 +682,11 @@ static void macb_set_addr(struct macb *bp, struct > macb_dma_desc *desc, dma_addr_ > if (bp->hw_dma_cap & HW_DMA_CAP_64B) { > desc_64 = macb_64b_desc(bp, desc); > desc_64->addrh =

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 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" > Basically, it is an implementation of network manager logic

  1   2   >