Re: (2) FW: [Resource Leak] Suggesting patch for tcp_close

2018-11-27 Thread Lorenzo Colitti
On Tue, Nov 27, 2018 at 10:17 PM 배석진 wrote: > >> we saw hundreds of not closed tcp session with FIN_WAIT1 and LAST_ACK. > > > > These sessions should have a timer, and eventually disappear. > > FIN_WAIT2 and TIME_WAIT have a timer. > but FIN_WAIT1 and LAST_ACK are have too? What harm is caused

[PATCH bpf 1/2] bpf: queue/stack map, fix return value of map_lookup_elem

2018-11-27 Thread Prashant Bhole
Since commit 509db2833e0d ("bpf: error handling when map_lookup_elem isn't supported") when map lookup isn't supported, the map_lookup_elem function should return ERR_PTR(-EOPNOTSUPP). Fixes: f1a2e44a3aec ("bpf: add queue and stack maps") Signed-off-by: Prashant Bhole ---

[PATCH bpf 0/2] fix map_lookup_elem return value for queue/stack map

2018-11-27 Thread Prashant Bhole
This set fixes map_lookup_elem return value for queue/stack map. Also adds verifier tests to check whether verifier prevents lookup on these maps. Note that patch 2 isn't dependant on patch 1. The verifier prevents lookup on queue/stack map because key size is zero. Prashant Bhole (2): bpf:

[PATCH bpf 2/2] bpf: test_verifier, test for lookup on queue/stack maps

2018-11-27 Thread Prashant Bhole
This patch adds tests to check whether bpf verifier prevents lookup on queue/stack maps Signed-off-by: Prashant Bhole --- tools/testing/selftests/bpf/test_verifier.c | 52 + 1 file changed, 52 insertions(+) diff --git a/tools/testing/selftests/bpf/test_verifier.c

[PATCH v2 net] bonding: fix 802.3ad state sent to partner when unbinding slave

2018-11-27 Thread Toni Peltonen
Previously when unbinding a slave the 802.3ad implementation only told partner that the port is not suitable for aggregation by setting the port aggregation state from aggregatable to individual. This is not enough. If the physical layer still stays up and we only unbinded this port from the bond

[PATCH] selftests/bpf: add config fragment CONFIG_FTRACE_SYSCALLS

2018-11-27 Thread Naresh Kamboju
CONFIG_FTRACE_SYSCALLS=y is required for get_cgroup_id_user test case this test reads a file from debug trace path /sys/kernel/debug/tracing/events/syscalls/sys_enter_nanosleep/id Signed-off-by: Naresh Kamboju --- tools/testing/selftests/bpf/config | 1 + 1 file changed, 1 insertion(+) diff

Re: [PATCH bpf] bpf: Support sk lookup in netns with id 0

2018-11-27 Thread Nicolas Dichtel
Le 26/11/2018 à 23:08, David Ahern a écrit : > On 11/26/18 2:27 PM, Joe Stringer wrote: >> @@ -2405,6 +2407,9 @@ enum bpf_func_id { >> /* BPF_FUNC_perf_event_output for sk_buff input context. */ >> #define BPF_F_CTXLEN_MASK (0xfULL << 32) >> >> +/* BPF_FUNC_sk_lookup_tcp and

RE: [PATCH v2 net-next 1/8] dpaa2-eth: Add basic XDP support

2018-11-27 Thread Camelia Alexandra Groza
> -Original Message- > From: Ioana Ciocoi Radulescu > Sent: Monday, November 26, 2018 18:27 > To: netdev@vger.kernel.org; da...@davemloft.net > Cc: Ioana Ciornei ; dsah...@gmail.com; Camelia > Alexandra Groza > Subject: [PATCH v2 net-next 1/8] dpaa2-eth: Add basic XDP support > > We keep

[PATCH v2 net-next 2/4] tcp: take care of compressed acks in tcp_add_reno_sack()

2018-11-27 Thread Eric Dumazet
Neal pointed out that non sack flows might suffer from ACK compression added in the following patch ("tcp: implement coalescing on backlog queue") Instead of tweaking tcp_add_backlog() we can take into account how many ACK were coalesced, this information will be available in

[PATCH v2 net-next 4/4] tcp: implement coalescing on backlog queue

2018-11-27 Thread Eric Dumazet
In case GRO is not as efficient as it should be or disabled, we might have a user thread trapped in __release_sock() while softirq handler flood packets up to the point we have to drop. This patch balances work done from user thread and softirq, to give more chances to __release_sock() to

[PATCH v2 net-next 3/4] tcp: make tcp_space() aware of socket backlog

2018-11-27 Thread Eric Dumazet
Jean-Louis Dupond reported poor iscsi TCP receive performance that we tracked to backlog drops. Apparently we fail to send window updates reflecting the fact that we are under stress. Note that we might lack a proper window increase when backlog is fully processed, since __release_sock() clears

Re: [PATCH net] sctp: check and update stream->out_curr when allocating stream_out

2018-11-27 Thread Neil Horman
On Tue, Nov 27, 2018 at 07:30:49PM +0900, Xin Long wrote: > On Mon, Nov 26, 2018 at 10:59 PM Neil Horman wrote: > > > > On Mon, Nov 26, 2018 at 10:46:33PM +0900, Xin Long wrote: > > > On Mon, Nov 26, 2018 at 9:54 PM Neil Horman wrote: > > > > > > > > On Mon, Nov 26, 2018 at 07:22:05PM +0800, Xin

[PATCH net] net: aquantia: fix rx checksum offload bits

2018-11-27 Thread Igor Russkikh
From: Dmitry Bogdanov The last set of csum offload fixes had a leak: Checksum enabled status bits from rx descriptor were incorrectly interpreted. Consequently all the other valid logic worked on zero bits. That caused rx checksum offloads never to trigger. Tested by dumping rx descriptors and

[PATCH net-next] net/flow_dissector: correct comments on enum flow_dissector_key_id

2018-11-27 Thread Edward Cree
There are no such structs flow_dissector_key_flow_vlan or flow_dissector_key_flow_tags, the actual structs used are struct flow_dissector_key_vlan and struct flow_dissector_key_tags. So correct the comments against FLOW_DISSECTOR_KEY_VLAN, FLOW_DISSECTOR_KEY_FLOW_LABEL and

[PATCH v2 net-next 1/4] tcp: hint compiler about sack flows

2018-11-27 Thread Eric Dumazet
Tell the compiler that most TCP flows are using SACK these days. There is no need to add the unlikely() clause in tcp_is_reno(), the compiler is able to infer it. Signed-off-by: Eric Dumazet --- include/net/tcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 net-next 0/4] tcp: take a bit more care of backlog stress

2018-11-27 Thread Eric Dumazet
While working on the SACK compression issue Jean-Louis Dupond reported, we found that his linux box was suffering very hard from tail drops on the socket backlog queue. First patch hints the compiler about sack flows being the norm. Second patch changes non-sack code in preparation of the ack

Re: [PATCH net-next 4/6] nfp: flower: offload tunnel decap rules via indirect TC blocks

2018-11-27 Thread Edward Cree
On 10/11/18 05:21, Jakub Kicinski wrote: > From: John Hurley > > Previously, TC block tunnel decap rules were only offloaded when a > callback was triggered through registration of the rules egress device. > This meant that the driver had no access to the ingress netdev and so > could not verify

Re: [PATCH v2 net] bonding: fix 802.3ad state sent to partner when unbinding slave

2018-11-27 Thread Jay Vosburgh
Toni Peltonen wrote: >Previously when unbinding a slave the 802.3ad implementation only told >partner that the port is not suitable for aggregation by setting the port >aggregation state from aggregatable to individual. This is not enough. If the >physical layer still stays up and we only

Re: [PATCH bpf-next v2 0/3] bpf: add sk_msg helper sk_msg_pop_data

2018-11-27 Thread Alexei Starovoitov
On Mon, Nov 26, 2018 at 02:16:16PM -0800, John Fastabend wrote: > After being able to add metadata to messages with sk_msg_push_data we > have also found it useful to be able to "pop" this metadata off before > sending it to applications in some cases. This series adds a new helper >

Re: [PATCH v2 net-next 0/4] tcp: take a bit more care of backlog stress

2018-11-27 Thread Yuchung Cheng
On Tue, Nov 27, 2018 at 7:57 AM, Eric Dumazet wrote: > While working on the SACK compression issue Jean-Louis Dupond > reported, we found that his linux box was suffering very hard > from tail drops on the socket backlog queue. > > First patch hints the compiler about sack flows being the norm. >

Re: [PATCH bpf-next 1/3] bpf: btf: check name validity for various types

2018-11-27 Thread Alexei Starovoitov
On Mon, Nov 26, 2018 at 09:17:13PM -0800, Yonghong Song wrote: > Commit 2667a2626f4d ("bpf: btf: Add BTF_KIND_FUNC > and BTF_KIND_FUNC_PROTO") checked the name validity > for BTF_KIND_FUNC/BTF_KIND_FUNC_PROTO types such that: > . BTF_KIND_FUNC must have a valid identifier name > . BTF_KIND_PROTO

Re: pull-request: bpf 2018-11-27

2018-11-27 Thread David Miller
From: Daniel Borkmann Date: Tue, 27 Nov 2018 10:16:17 +0100 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) Fix several bugs in BPF sparc JIT, that is, convergence for fused >branches, initialization of frame pointer register, and

[PATCH v4] net: Add trace events for all receive exit points

2018-11-27 Thread Geneviève Bastien
Trace events are already present for the receive entry points, to indicate how the reception entered the stack. This patch adds the corresponding exit trace events that will bound the reception such that all events occurring between the entry and the exit can be considered as part of the

Re: [PATCH bpf] bpf: Support sk lookup in netns with id 0

2018-11-27 Thread Joe Stringer
On Tue, 27 Nov 2018 at 06:49, Nicolas Dichtel wrote: > > Le 26/11/2018 à 23:08, David Ahern a écrit : > > On 11/26/18 2:27 PM, Joe Stringer wrote: > >> @@ -2405,6 +2407,9 @@ enum bpf_func_id { > >> /* BPF_FUNC_perf_event_output for sk_buff input context. */ > >> #define BPF_F_CTXLEN_MASK

Re: [PATCH net-next 4/6] nfp: flower: offload tunnel decap rules via indirect TC blocks

2018-11-27 Thread Jakub Kicinski
On Tue, 27 Nov 2018 16:04:29 +, Edward Cree wrote: > On 10/11/18 05:21, Jakub Kicinski wrote: > > From: John Hurley > > > > Previously, TC block tunnel decap rules were only offloaded when a > > callback was triggered through registration of the rules egress device. > > This meant that the

Re: [PATCH v2 net] bonding: fix 802.3ad state sent to partner when unbinding slave

2018-11-27 Thread Jonathan Toppins
On 11/27/2018 09:56 AM, Toni Peltonen wrote: > Previously when unbinding a slave the 802.3ad implementation only told > partner that the port is not suitable for aggregation by setting the port > aggregation state from aggregatable to individual. This is not enough. If the > physical layer still

Re: [PATCH] selftests/bpf: add config fragment CONFIG_FTRACE_SYSCALLS

2018-11-27 Thread Yonghong Song
On 11/27/18 7:24 AM, Naresh Kamboju wrote: > CONFIG_FTRACE_SYSCALLS=y is required for get_cgroup_id_user test case > this test reads a file from debug trace path > /sys/kernel/debug/tracing/events/syscalls/sys_enter_nanosleep/id > > Signed-off-by: Naresh Kamboju Acked-by: Yonghong Song >

Re: Invalid transport_offset with AF_PACKET socket

2018-11-27 Thread Willem de Bruijn
On Tue, Nov 27, 2018 at 2:58 PM Willem de Bruijn wrote: > > On Tue, Nov 27, 2018 at 1:41 PM Maxim Mikityanskiy > wrote: > > > > Hi everyone, > > > > We are experiencing an issue with Mellanox mlx5 driver, and I tracked it > > down to > > the packet_snd function in net/packet/af_packet.c. > > >

Re: [PATCH v2 net-next 2/4] tcp: take care of compressed acks in tcp_add_reno_sack()

2018-11-27 Thread Neal Cardwell
On Tue, Nov 27, 2018 at 10:57 AM Eric Dumazet wrote: > > Neal pointed out that non sack flows might suffer from ACK compression > added in the following patch ("tcp: implement coalescing on backlog queue") > > Instead of tweaking tcp_add_backlog() we can take into > account how many ACK were

Re: [iproute2-next PATCH v4] tc: flower: Classify packets based port ranges

2018-11-27 Thread Nambiar, Amritha
On 11/26/2018 8:02 PM, Stephen Hemminger wrote: > On Mon, 26 Nov 2018 17:56:10 -0800 > "Nambiar, Amritha" wrote: > >> On 11/26/2018 4:43 PM, David Ahern wrote: >>> On 11/26/18 5:23 PM, Nambiar, Amritha wrote: > Can tc flower use something similar to ip ru with single port or port >

Re: [PATCH v2 net-next 2/4] tcp: take care of compressed acks in tcp_add_reno_sack()

2018-11-27 Thread Eric Dumazet
On 11/27/2018 01:19 PM, Neal Cardwell wrote: > On Tue, Nov 27, 2018 at 10:57 AM Eric Dumazet wrote: >> >> Neal pointed out that non sack flows might suffer from ACK compression >> added in the following patch ("tcp: implement coalescing on backlog queue") >> >> Instead of tweaking

Re: Invalid transport_offset with AF_PACKET socket

2018-11-27 Thread Willem de Bruijn
On Tue, Nov 27, 2018 at 1:41 PM Maxim Mikityanskiy wrote: > > Hi everyone, > > We are experiencing an issue with Mellanox mlx5 driver, and I tracked it down > to > the packet_snd function in net/packet/af_packet.c. > > Brief description: when a socket is created by calling `socket(AF_PACKET, >

Re: [PATCH bpf] bpf: Support sk lookup in netns with id 0

2018-11-27 Thread Alexei Starovoitov
On Tue, Nov 27, 2018 at 10:01:40AM -0800, Joe Stringer wrote: > On Tue, 27 Nov 2018 at 06:49, Nicolas Dichtel > wrote: > > > > Le 26/11/2018 à 23:08, David Ahern a écrit : > > > On 11/26/18 2:27 PM, Joe Stringer wrote: > > >> @@ -2405,6 +2407,9 @@ enum bpf_func_id { > > >> /*

Re: [PATCHv2 net] sctp: update frag_point when stream_interleave is set

2018-11-27 Thread Jakub Audykowicz
On 2018-11-27 12:11, Xin Long wrote: > sctp_assoc_update_frag_point() should be called whenever asoc->pathmtu > changes, but we missed one place in sctp_association_init(). It would > cause frag_point is zero when sending data. > > As says in Jakub's reproducer, if sp->pathmtu is set by

Re: [PATCH v2 net-next 4/4] tcp: implement coalescing on backlog queue

2018-11-27 Thread Neal Cardwell
On Tue, Nov 27, 2018 at 10:57 AM Eric Dumazet wrote: > > In case GRO is not as efficient as it should be or disabled, > we might have a user thread trapped in __release_sock() while > softirq handler flood packets up to the point we have to drop. > > This patch balances work done from user thread

Re: [PATCH v2 net-next 1/4] tcp: hint compiler about sack flows

2018-11-27 Thread Neal Cardwell
On Tue, Nov 27, 2018 at 10:57 AM Eric Dumazet wrote: > > Tell the compiler that most TCP flows are using SACK these days. > > There is no need to add the unlikely() clause in tcp_is_reno(), > the compiler is able to infer it. > > Signed-off-by: Eric Dumazet > --- Acked-by: Neal Cardwell Nice.

[PATCH net-next] net: phy: improve generic EEE ethtool functions

2018-11-27 Thread Heiner Kallweit
So far the two functions consider neither member eee_enabled nor eee_active. Therefore network drivers have to do this in some kind of glue code. I think this can be avoided. Getting EEE parameters: When not advertising any EEE mode, we can't consider EEE to be enabled. Therefore interpret "EEE

RE: [PATCH] i40e: fix kerneldoc for xsk methods

2018-11-27 Thread Bowers, AndrewX
>From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On Behalf Of >Sokolowski, Jan >Sent: Tuesday, November 27, 2018 12:20 AM >To: intel-wired-...@osuosl.org >Cc: netdev@vger.kernel.org >Subject: [Intel-wired-lan] [PATCH] i40e: fix kerneldoc for xsk methods > >One method,

Re: [PATCHv2 net] sctp: update frag_point when stream_interleave is set

2018-11-27 Thread Marcelo Ricardo Leitner
On Tue, Nov 27, 2018 at 07:11:50PM +0800, Xin Long wrote: > sctp_assoc_update_frag_point() should be called whenever asoc->pathmtu > changes, but we missed one place in sctp_association_init(). It would > cause frag_point is zero when sending data. > > As says in Jakub's reproducer, if

Re: [PATCH bpf-next 1/3] bpf: btf: check name validity for various types

2018-11-27 Thread Yonghong Song
On 11/27/18 11:02 AM, Alexei Starovoitov wrote: > On Mon, Nov 26, 2018 at 09:17:13PM -0800, Yonghong Song wrote: >> Commit 2667a2626f4d ("bpf: btf: Add BTF_KIND_FUNC >> and BTF_KIND_FUNC_PROTO") checked the name validity >> for BTF_KIND_FUNC/BTF_KIND_FUNC_PROTO types such that: >> .

[PATCH bpf v2 1/4] bpf: btf: implement btf_name_valid_identifier()

2018-11-27 Thread Yonghong Song
Function btf_name_valid_identifier() have been implemented in bpf-next commit 2667a2626f4d ("bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO"). Backport this function so later patch can use it. Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)") Signed-off-by: Yonghong Song ---

[PATCH bpf v2 3/4] tools/bpf: fix two test_btf unit test cases

2018-11-27 Thread Yonghong Song
From: Martin KaFai Lau There are two unit test cases, which should encode TYPEDEF type, but instead encode PTR type. The error is flagged out after enforcing name checking in the previous patch. Fixes: c0fa1b6c3efc ("bpf: btf: Add BTF tests") Signed-off-by: Martin KaFai Lau Signed-off-by:

[PATCH bpf v2 0/4] bpf: btf: check name validity for various types

2018-11-27 Thread Yonghong Song
This patch set added name checking for PTR, ARRAY, VOLATILE, TYPEDEF, CONST, RESTRICT, STRUCT, UNION, ENUM and FWD types. Such a strict name checking makes BTF more sound in the kernel and future BTF-to-header-file converesion ([1]) less fragile. Patch #1 implemented btf_name_valid_identifier()

[PATCH bpf v2 4/4] tools/bpf: add addition type tests to test_btf

2018-11-27 Thread Yonghong Song
The following additional unit testcases are added to test_btf: ... BTF raw test[42] (typedef (invalid name, name_off = 0)): OK BTF raw test[43] (typedef (invalid name, invalid identifier)): OK BTF raw test[44] (ptr type (invalid name, name_off <> 0)): OK BTF raw test[45] (volatile type (invalid

[PATCH bpf v2 2/4] bpf: btf: check name validity for various types

2018-11-27 Thread Yonghong Song
This patch added name checking for the following types: . BTF_KIND_PTR, BTF_KIND_ARRAY, BTF_KIND_VOLATILE, BTF_KIND_CONST, BTF_KIND_RESTRICT: the name must be null . BTF_KIND_STRUCT, BTF_KIND_UNION: the struct/member name is either null or a valid identifier . BTF_KIND_ENUM: the

Re: [PATCH v2 net-next 3/4] tcp: make tcp_space() aware of socket backlog

2018-11-27 Thread Neal Cardwell
On Tue, Nov 27, 2018 at 10:57 AM Eric Dumazet wrote: > > Jean-Louis Dupond reported poor iscsi TCP receive performance > that we tracked to backlog drops. > > Apparently we fail to send window updates reflecting the > fact that we are under stress. > > Note that we might lack a proper window

[PATCH net 1/2] nfp: flower: release metadata on offload failure

2018-11-27 Thread Jakub Kicinski
From: John Hurley Calling nfp_compile_flow_metadata both assigns a stats context and increments a ref counter on (or allocates) a mask id table entry. These are released by the nfp_modify_flow_metadata call on flow deletion, however, if a flow add fails after metadata is set then the flow entry

Re: [PATCH v2 net-next 4/4] tcp: implement coalescing on backlog queue

2018-11-27 Thread Eric Dumazet
On 11/27/2018 01:58 PM, Neal Cardwell wrote: > I wonder if technically perhaps the logic should skip coalescing if > the tail or skb has the TCP_FLAG_URG bit set? It seems if skbs are > coalesced, and some have urgent data and some do not, then the > TCP_FLAG_URG bit will be accumulated into

Re: [PATCH net] sctp: always set frag_point on pmtu change

2018-11-27 Thread Jakub Audykowicz
On 2018-11-19 08:20, Xin Long wrote: > On Mon, Nov 19, 2018 at 5:49 AM Jakub Audykowicz > wrote: >> Calling send on a connected SCTP socket results in kernel panic if >> spp_pathmtu was configured manually before an association is established >> and it was not reconfigured to another value once

BPF uapi structures and 32-bit

2018-11-27 Thread David Miller
In the linux/bpf.h UAPI header, we must absolutely avoid any non-fixed-sized types. Otherwise we have serious problems on 32-bit. Unfortunately I discovered today that we have take on two such cases, sk_msg_md and sk_reuseport_md, both of which start with two void pointers. I hit this because

[PATCH v3 net-next 2/4] tcp: take care of compressed acks in tcp_add_reno_sack()

2018-11-27 Thread Eric Dumazet
Neal pointed out that non sack flows might suffer from ACK compression added in the following patch ("tcp: implement coalescing on backlog queue") Instead of tweaking tcp_add_backlog() we can take into account how many ACK were coalesced, this information will be available in

[PATCH v3 net-next 4/4] tcp: implement coalescing on backlog queue

2018-11-27 Thread Eric Dumazet
In case GRO is not as efficient as it should be or disabled, we might have a user thread trapped in __release_sock() while softirq handler flood packets up to the point we have to drop. This patch balances work done from user thread and softirq, to give more chances to __release_sock() to

[PATCH v3 net-next 0/4] tcp: take a bit more care of backlog stress

2018-11-27 Thread Eric Dumazet
While working on the SACK compression issue Jean-Louis Dupond reported, we found that his linux box was suffering very hard from tail drops on the socket backlog queue. First patch hints the compiler about sack flows being the norm. Second patch changes non-sack code in preparation of the ack

[PATCH v3 net-next 3/4] tcp: make tcp_space() aware of socket backlog

2018-11-27 Thread Eric Dumazet
Jean-Louis Dupond reported poor iscsi TCP receive performance that we tracked to backlog drops. Apparently we fail to send window updates reflecting the fact that we are under stress. Note that we might lack a proper window increase when backlog is fully processed, since __release_sock() clears

[PATCH v3 net-next 1/4] tcp: hint compiler about sack flows

2018-11-27 Thread Eric Dumazet
Tell the compiler that most TCP flows are using SACK these days. There is no need to add the unlikely() clause in tcp_is_reno(), the compiler is able to infer it. Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Acked-by: Yuchung Cheng --- include/net/tcp.h | 2 +- 1 file changed, 1

Re: [PATCH] net: tcp: add correct check for tcp_retransmit_skb()

2018-11-27 Thread David Miller
From: Sharath Chandra Vurukala Date: Mon, 26 Nov 2018 15:05:50 +0530 > when the tcp_retranmission_timer expires and tcp_retranmsit_skb is > called if the retranmsission fails due to local congestion, > backoff should not incremented. > > tcp_retransmit_skb() returns non-zero negative value in

Re: [PATCH net-next v4 0/5] Ease to interpret net-nsid

2018-11-27 Thread David Miller
From: Nicolas Dichtel Date: Mon, 26 Nov 2018 15:42:01 +0100 > > The goal of this series is to ease the interpretation of nsid received in > netlink messages from other netns (when the user uses > NETLINK_F_LISTEN_ALL_NSID). > > After this series, with a patched iproute2: ... > v3 -> v4: > -

Re: [PATCH v3 net] lan743x: fix return value for lan743x_tx_napi_poll

2018-11-27 Thread David Miller
From: Bryan Whitehead Date: Mon, 26 Nov 2018 12:04:57 -0500 > The lan743x driver, when under heavy traffic load, has been noticed > to sometimes hang, or cause a kernel panic. > > Debugging reveals that the TX napi poll routine was returning > the wrong value, 'weight'. Most other drivers

Re: [PATCH] net: tcp: add correct check for tcp_retransmit_skb()

2018-11-27 Thread Yuchung Cheng
On Mon, Nov 26, 2018 at 1:35 AM, Sharath Chandra Vurukala wrote: > when the tcp_retranmission_timer expires and tcp_retranmsit_skb is > called if the retranmsission fails due to local congestion, > backoff should not incremented. > > tcp_retransmit_skb() returns non-zero negative value in some

[iproute2-next PATCH v6] tc: flower: Classify packets based port ranges

2018-11-27 Thread Amritha Nambiar
Added support for filtering based on port ranges. UAPI changes have been accepted into net-next. Example: 1. Match on a port range: - $ tc filter add dev enp4s0 protocol ip parent :\ prio 1 flower ip_proto tcp dst_port 20-30 skip_hw\ action drop $ tc -s filter

Re: [PATCH net] be2net: Fix NULL pointer dereference in be_tx_timeout()

2018-11-27 Thread David Miller
From: Petr Oros Date: Thu, 22 Nov 2018 15:24:07 +0100 > @@ -4700,8 +4700,11 @@ int be_update_queues(struct be_adapter *adapter) > struct net_device *netdev = adapter->netdev; > int status; > > - if (netif_running(netdev)) > + if (netif_running(netdev)) { > + /*

Re: [PATCH net] net: phy: add workaround for issue where PHY driver doesn't bind to the device

2018-11-27 Thread David Miller
From: Heiner Kallweit Date: Fri, 23 Nov 2018 19:41:29 +0100 > After switching the r8169 driver to use phylib some user reported that > their network is broken. This was caused by the genphy PHY driver being > used instead of the dedicated PHY driver for the RTL8211B. Users > reported that

[PATCH net-next] tcp: md5: add tcp_md5_needed jump label

2018-11-27 Thread Eric Dumazet
Most linux hosts never setup TCP MD5 keys. We can avoid a cache line miss (accessing tp->md5ig_info) on RX and TX using a jump label. Signed-off-by: Eric Dumazet --- include/net/tcp.h | 18 +++--- net/ipv4/tcp.c| 5 - net/ipv4/tcp_ipv4.c | 11 +++

Re: [PATCH net-next 0/5] mlxsw: Prepare for VLAN-aware bridge w/VxLAN

2018-11-27 Thread David Miller
From: Ido Schimmel Date: Sun, 25 Nov 2018 09:43:53 + > The driver is using 802.1Q filtering identifiers (FIDs) to represent the > different VLANs in the VLAN-aware bridge (only one is supported). > > However, the device cannot assign a VNI to such FIDs, which prevents the > driver from

Re: [Patch net] mlx5: fixup checksum for ethernet padding

2018-11-27 Thread Cong Wang
On Tue, Nov 27, 2018 at 3:48 PM Eric Dumazet wrote: > > > > On 11/27/2018 03:21 PM, Cong Wang wrote: > > When an ethernet frame is padded to meet the minimum ethernet frame > > size, the padding octets are not covered by the hardware checksum. > > Fortunately the padding octets are ususally

Re: [PATCH net] net: thunderx: fix NULL pointer dereference in nic_remove

2018-11-27 Thread David Miller
From: Lorenzo Bianconi Date: Mon, 26 Nov 2018 15:07:16 +0100 > Fix a possible NULL pointer dereference in nic_remove routine > removing the nicpf module if nic_probe fails. > The issue can be triggered with the following reproducer: > > $rmmod nicvf > $rmmod nicpf > > [ 521.412008] Unable to

Re: [PATCH net-next 7/8] net: eth: altera: tse: add msgdma prefetcher

2018-11-27 Thread Dalon Westergreen
On Fri, 2018-11-16 at 09:20 -0600, Thor Thayer wrote: > Hi Dalon, > > Just a few comments/questions. > > On 11/14/18 6:50 PM, Dalon Westergreen wrote: > > From: Dalon Westergreen > > > > Add support for the mSGDMA prefetcher. The prefetcher adds support > > for a linked list of descriptors in

[PATCH net 2/2] nfp: flower: prevent offload if rhashtable insert fails

2018-11-27 Thread Jakub Kicinski
From: John Hurley For flow offload adds, if the rhash insert code fails, the flow will still have been offloaded but the reference to it in the driver freed. Re-order the offload setup calls to ensure that a flow will only be written to FW if a kernel reference is held and stored in the

Re: Invalid transport_offset with AF_PACKET socket

2018-11-27 Thread Willem de Bruijn
On Tue, Nov 27, 2018 at 3:32 PM Willem de Bruijn wrote: > > On Tue, Nov 27, 2018 at 2:58 PM Willem de Bruijn > wrote: > > > > On Tue, Nov 27, 2018 at 1:41 PM Maxim Mikityanskiy > > wrote: > > > > > > Hi everyone, > > > > > > We are experiencing an issue with Mellanox mlx5 driver, and I tracked

Re: [Patch net] mlx5: fixup checksum for ethernet padding

2018-11-27 Thread Cong Wang
On Tue, Nov 27, 2018 at 3:21 PM Cong Wang wrote: > + if (proto == htons(ETH_P_IP)) { > + struct iphdr *ipv4 = ip_p; > + > + pad_offset = network_depth + be16_to_cpu(ipv4->tot_len); > + } else if (proto == htons(ETH_P_IPV6)) { > + struct

Re: [PATCH net-next] add documents for snmp counters

2018-11-27 Thread David Miller
From: yupeng Date: Sun, 25 Nov 2018 23:35:46 -0800 > Add explaination of below counters: > TcpExtTCPRcvCoalesce > TcpExtTCPAutoCorking > TcpExtTCPOrigDataSent > TCPSynRetrans > TCPFastOpenActiveFail > TcpExtListenOverflows > TcpExtListenDrops > TcpExtTCPHystartTrainDetect >

Re: [PATCH net-next v3 0/4] qed* enhancements series

2018-11-27 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Mon, 26 Nov 2018 02:26:56 -0800 > From: Sudarsana Reddy Kalluru > > The patch series add few enhancements to qed/qede drivers. > > Changes from previous versions: > --- > v3: Revert v2 changes as the other paths (i.e. ptp) access

Re: [PATCH v2 net-next 4/4] tcp: implement coalescing on backlog queue

2018-11-27 Thread Eric Dumazet
On Tue, Nov 27, 2018 at 2:13 PM Eric Dumazet wrote: > > > > On 11/27/2018 01:58 PM, Neal Cardwell wrote: > > > I wonder if technically perhaps the logic should skip coalescing if > > the tail or skb has the TCP_FLAG_URG bit set? It seems if skbs are > > coalesced, and some have urgent data and

[Patch net] mlx5: fixup checksum for ethernet padding

2018-11-27 Thread Cong Wang
When an ethernet frame is padded to meet the minimum ethernet frame size, the padding octets are not covered by the hardware checksum. Fortunately the padding octets are ususally zero's, which don't affect checksum. However, we have a switch which pads non-zero octets, this causes kernel hardware

Re: [PATCH net] sctp: increase sk_wmem_alloc when head->truesize is increased

2018-11-27 Thread David Miller
From: Xin Long Date: Mon, 26 Nov 2018 14:52:44 +0800 > I changed to count sk_wmem_alloc by skb truesize instead of 1 to > fix the sk_wmem_alloc leak caused by later truesize's change in > xfrm in Commit 02968ccf0125 ("sctp: count sk_wmem_alloc by skb > truesize in sctp_packet_transmit"). > >

Re: [Patch net] mlx5: fixup checksum for ethernet padding

2018-11-27 Thread Eric Dumazet
On 11/27/2018 03:21 PM, Cong Wang wrote: > When an ethernet frame is padded to meet the minimum ethernet frame > size, the padding octets are not covered by the hardware checksum. > Fortunately the padding octets are ususally zero's, which don't affect > checksum. However, we have a switch

Re: [PATCH v2 net-next 0/8] dpaa2-eth: Introduce XDP support

2018-11-27 Thread David Miller
From: Ioana Ciocoi Radulescu Date: Mon, 26 Nov 2018 16:27:28 + > Add support for XDP programs. Only XDP_PASS, XDP_DROP and XDP_TX > actions are supported for now. Frame header changes are also > allowed. > > v2: - count the XDP packets in the rx/tx inteface stats > - add message with

Re: [PATCH net-next 0/2] bnx2x: Popoulate firmware versions in driver info query.

2018-11-27 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Mon, 26 Nov 2018 22:25:55 -0800 > From: Sudarsana Reddy Kalluru > > The patch series populates MBI and storm firware versions in the ethtool > driver info query. > > Please consider applying it to 'net-next' tree. Series applied.

Re: [Patch net] mlx5: fixup checksum for ethernet padding

2018-11-27 Thread Eric Dumazet
On 11/27/2018 04:07 PM, Cong Wang wrote: > On Tue, Nov 27, 2018 at 3:48 PM Eric Dumazet wrote: >> >> But the padding might be added on normal packets (say 1000 bytes + 3 bytes >> of padding) ? > > I never see other padding cases than ETH_ZLEN. Does ethernet standard > require padding for

Re: Invalid transport_offset with AF_PACKET socket

2018-11-27 Thread Saeed Mahameed
On Tue, 2018-11-27 at 10:00 +, Maxim Mikityanskiy wrote: > Hi everyone, > > We are experiencing an issue with Mellanox mlx5 driver, and I tracked > it down to > the packet_snd function in net/packet/af_packet.c. > > Brief description: when a socket is created by calling > `socket(AF_PACKET,

Re: [PATCH v2 net] lan743x: Enable driver to work with LAN7431

2018-11-27 Thread David Miller
From: Bryan Whitehead Date: Mon, 26 Nov 2018 12:27:10 -0500 > This driver was designed to work with both LAN7430 and LAN7431. > The only difference between the two is the LAN7431 has support > for external phy. > > This change adds LAN7431 to the list of recognized devices > supported by this

Re: [PATCH net-next] r8169: remove unneeded mmiowb barriers

2018-11-27 Thread David Miller
From: Heiner Kallweit Date: Mon, 26 Nov 2018 20:24:16 +0100 > writex() has implicit barriers, that's what makes it different from > writex_relaxed(). Therefore these calls to mmiowb() can be removed. > > Signed-off-by: Heiner Kallweit Applied.

FW: [Resource Leak] Suggesting patch for tcp_close

2018-11-27 Thread 배석진
Hello all, nobody concern about this? minor problem? :( we saw hundreds of not closed tcp session with FIN_WAIT1 and LAST_ACK. and easily reproduced in wifi network because of android gms... :p i heard that gms try connect to their server to confirm wifi connection. and they can't recieve the

Re: Invalid transport_offset with AF_PACKET socket

2018-11-27 Thread Willem de Bruijn
On Tue, Nov 27, 2018 at 6:08 PM Willem de Bruijn wrote: > > On Tue, Nov 27, 2018 at 3:32 PM Willem de Bruijn > wrote: > > > > On Tue, Nov 27, 2018 at 2:58 PM Willem de Bruijn > > wrote: > > > > > > On Tue, Nov 27, 2018 at 1:41 PM Maxim Mikityanskiy > > > wrote: > > > > > > > > Hi everyone, >

Re: [Patch net] mlx5: fixup checksum for ethernet padding

2018-11-27 Thread Cong Wang
On Tue, Nov 27, 2018 at 5:11 PM Saeed Mahameed wrote: > > On Tue, 2018-11-27 at 16:07 -0800, Cong Wang wrote: > > On Tue, Nov 27, 2018 at 3:48 PM Eric Dumazet > > wrote: > > > The bug here is that mlx5 csum only includes the data in IP frame. > > > > > > I would simply force skb->ip_summed to

Re: [Patch net] mlx5: fixup checksum for ethernet padding

2018-11-27 Thread Cong Wang
On Tue, Nov 27, 2018 at 5:25 PM Eric Dumazet wrote: > > > > On 11/27/2018 04:07 PM, Cong Wang wrote: > > On Tue, Nov 27, 2018 at 3:48 PM Eric Dumazet wrote: > > >> > >> But the padding might be added on normal packets (say 1000 bytes + 3 bytes > >> of padding) ? > > > > I never see other

Re: [Patch net] mlx5: fixup checksum for ethernet padding

2018-11-27 Thread Eric Dumazet
On Tue, Nov 27, 2018 at 5:42 PM Cong Wang wrote: > > On Tue, Nov 27, 2018 at 5:25 PM Eric Dumazet wrote: > > > > > > > > On 11/27/2018 04:07 PM, Cong Wang wrote: > > > On Tue, Nov 27, 2018 at 3:48 PM Eric Dumazet > > > wrote: > > > > >> > > >> But the padding might be added on normal packets

[PATCH iproute2] bridge: make -c match -compressvlans first instead of -color

2018-11-27 Thread Roopa Prabhu
From: Roopa Prabhu commit c7c1a1ef51ae ("bridge: colorize output and use JSON print library") broke previous use of -c to represent compressvlans. This restores previous use of -c to represent compressvlans. Understand the original motivation to use -c to represent color consistently everywhere

Re: [PATCH net] sctp: always set frag_point on pmtu change

2018-11-27 Thread Marcelo Ricardo Leitner
On Tue, Nov 27, 2018 at 11:18:02PM +0100, Jakub Audykowicz wrote: > On 2018-11-19 08:20, Xin Long wrote: > > > On Mon, Nov 19, 2018 at 5:49 AM Jakub Audykowicz > > wrote: > >> Calling send on a connected SCTP socket results in kernel panic if > >> spp_pathmtu was configured manually before an

Re: [PATCH v2 net-next] tcp: remove hdrlen argument from tcp_queue_rcv()

2018-11-27 Thread David Miller
From: Eric Dumazet Date: Mon, 26 Nov 2018 14:49:12 -0800 > Only one caller needs to pull TCP headers, so lets > move __skb_pull() to the caller side. > > Signed-off-by: Eric Dumazet > Acked-by: Yuchung Cheng > --- > v2: sent as a standalone patch. Applied, thanks Eric.

Re: [RFC PATCH 0/3] sk_buff: add skb extension infrastructure

2018-11-27 Thread David Miller
From: Eric Dumazet Date: Mon, 26 Nov 2018 15:05:02 -0800 > One thing that could be done without too much impact is to provide a cbext[] > only for TCP packets in write/rtx queue, that is not in sk_buff but > on the struct sk_buff_fclones > > This extra space would not be 0-initialized at

Re: [Patch net] mlx5: fixup checksum for ethernet padding

2018-11-27 Thread Saeed Mahameed
On Tue, 2018-11-27 at 16:07 -0800, Cong Wang wrote: > On Tue, Nov 27, 2018 at 3:48 PM Eric Dumazet > wrote: > > > > > > On 11/27/2018 03:21 PM, Cong Wang wrote: > > > When an ethernet frame is padded to meet the minimum ethernet > > > frame > > > size, the padding octets are not covered by the

Re: [Patch net] mlx5: fixup checksum for ethernet padding

2018-11-27 Thread Cong Wang
On Tue, Nov 27, 2018 at 5:49 PM Eric Dumazet wrote: > > > Sure this patch handles short frames, but I am saying the issue is > more generic than that. Yeah. Let's fix one problem in one patch. I will clarify that I am only fixing short frames in v2, as I need to update it anyway. Thanks!

Re: FW: [Resource Leak] Suggesting patch for tcp_close

2018-11-27 Thread Eric Dumazet
On 11/27/2018 05:09 PM, 배석진 wrote: > Hello all, > > nobody concern about this? minor problem? :( > we saw hundreds of not closed tcp session with FIN_WAIT1 and LAST_ACK. These sessions should have a timer, and eventually disappear. Do you have a test to demonstrate the issue ? I know

Re: [PATCH v3 3/4] libbpf: add bpf_prog_test_run_xattr

2018-11-27 Thread Alexei Starovoitov
On Mon, Nov 26, 2018 at 4:45 AM Lorenz Bauer wrote: > > That's what I had initially, but that makes re-using test_attr really > awkward. Either > you need to reset data_out_size before every call because it is used > to return the > buffer size, I think that is exactly what the user of the

Re: consistency for statistics with XDP mode

2018-11-27 Thread Jason Wang
On 2018/11/27 下午3:04, Toshiaki Makita wrote: On 2018/11/26 10:37, Toshiaki Makita wrote: On 2018/11/23 1:43, David Ahern wrote: On 11/21/18 5:53 PM, Toshiaki Makita wrote: We really need consistency in the counters and at a minimum, users should be able to track packet and byte counters for

[PATCH net-next] net/ipv4: Fix missing raw_init when CONFIG_PROC_FS is disabled

2018-11-27 Thread David Ahern
From: David Ahern Randy reported when CONFIG_PROC_FS is not enabled: ld: net/ipv4/af_inet.o: in function `inet_init': af_inet.c:(.init.text+0x42d): undefined reference to `raw_init' Fix by moving the endif up to the end of the proc entries Fixes: 6897445fb194c ("net: provide a sysctl

Re: FW: [Resource Leak] Suggesting patch for tcp_close

2018-11-27 Thread Eric Dumazet
On 11/27/2018 08:57 PM, Eric Dumazet wrote: > > > On 11/27/2018 05:09 PM, 배석진 wrote: >> Hello all, >> >> nobody concern about this? minor problem? :( >> we saw hundreds of not closed tcp session with FIN_WAIT1 and LAST_ACK. > > These sessions should have a timer, and eventually disappear. >

Re: [PATCH net-next] net/ipv4: Fix missing raw_init when CONFIG_PROC_FS is disabled

2018-11-27 Thread David Miller
From: David Ahern Date: Tue, 27 Nov 2018 20:52:24 -0800 > From: David Ahern > > Randy reported when CONFIG_PROC_FS is not enabled: > ld: net/ipv4/af_inet.o: in function `inet_init': > af_inet.c:(.init.text+0x42d): undefined reference to `raw_init' > > Fix by moving the endif up to the

Re: consistency for statistics with XDP mode

2018-11-27 Thread Toshiaki Makita
On 2018/11/28 13:03, Jason Wang wrote: > On 2018/11/27 下午3:04, Toshiaki Makita wrote: >> On 2018/11/26 10:37, Toshiaki Makita wrote: >>> On 2018/11/23 1:43, David Ahern wrote: On 11/21/18 5:53 PM, Toshiaki Makita wrote: >> We really need consistency in the counters and at a minimum, users

  1   2   >