[PATCH net] tuntap: fix multiqueue rx

2018-11-17 Thread Matthew Cover
When writing packets to a descriptor associated with a combined queue, the packets should end up on that queue. Before this change all packets written to any descriptor associated with a tap interface end up on rx-0, even when the descriptor is associated with a different queue. The rx traffic

[PATCHv2 net] sctp: not allow to set asoc prsctp_enable by sockopt

2018-11-17 Thread Xin Long
As rfc7496#section4.5 says about SCTP_PR_SUPPORTED: This socket option allows the enabling or disabling of the negotiation of PR-SCTP support for future associations. For existing associations, it allows one to query whether or not PR-SCTP support was negotiated on a particular

[PATCH net] sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit

2018-11-17 Thread Xin Long
Now sctp increases sk_wmem_alloc by 1 when doing set_owner_w for the skb allocked in sctp_packet_transmit and decreases by 1 when freeing this skb. But when this skb goes through networking stack, some subcomponents might change skb->truesize and add the same amount on sk_wmem_alloc. However sctp

Re: [PATCH net] sctp: not allow to set asoc prsctp_enable by sockopt

2018-11-17 Thread Xin Long
On Sat, Nov 17, 2018 at 12:12 AM Neil Horman wrote: > > On Thu, Nov 15, 2018 at 09:41:01PM -0200, Marcelo Ricardo Leitner wrote: > > [ re-sending, without html this time ] > > > > On Thu, Nov 15, 2018, 15:26 Neil Horman > > > > On Thu, Nov 15, 2018 at 08:25:36PM -0200, Marcelo Ricardo Leitner

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

2018-11-17 Thread David Miller
From: Mathieu Desnoyers Date: Sat, 17 Nov 2018 13:27:29 -0500 (EST) > I see two possible solutions: > > 1) Remove the "skb" argument from the sbk_exit tracepoints completely. > Anyway, I think it's not really needed for analysis purposes because > we can link the "entry" with the associated

Re: [PATCH 0/3] Fix unsafe BPF_PROG_TEST_RUN interface

2018-11-17 Thread Y Song
On Fri, Nov 16, 2018 at 12:54 PM Lorenz Bauer wrote: > > Right now, there is no safe way to use BPF_PROG_TEST_RUN with data_out. > This is because bpf_test_finish copies the output buffer to user space > without checking its size. This can lead to the kernel overwriting > data in user space after

Re: [PATCH v2 net] net-gro: reset skb->pkt_type in napi_reuse_skb()

2018-11-17 Thread David Miller
From: Eric Dumazet Date: Sat, 17 Nov 2018 21:57:02 -0800 > eth_type_trans() assumes initial value for skb->pkt_type > is PACKET_HOST. > > This is indeed the value right after a fresh skb allocation. > > However, it is possible that GRO merged a packet with a different > value (like

Re: [PATCH 3/3] selftests: add a test for bpf_prog_test_run output size

2018-11-17 Thread Y Song
On Fri, Nov 16, 2018 at 12:55 PM Lorenz Bauer wrote: > > Make sure that bpf_prog_test_run returns the correct length > in the size_out argument and that the kernel respects the > output size hint. > > Signed-off-by: Lorenz Bauer > --- > tools/testing/selftests/bpf/test_progs.c | 34

[PATCH v2 net] net-gro: reset skb->pkt_type in napi_reuse_skb()

2018-11-17 Thread Eric Dumazet
eth_type_trans() assumes initial value for skb->pkt_type is PACKET_HOST. This is indeed the value right after a fresh skb allocation. However, it is possible that GRO merged a packet with a different value (like PACKET_OTHERHOST in case macvlan is used), so we need to make sure napi->skb will

Re: [PATCH net] net-gro: reset skb->pkt_type in napi_reuse_skb()

2018-11-17 Thread Eric Dumazet
On 11/17/2018 09:51 PM, Eric Dumazet wrote: > eth_type_trans() assumes initial value for skb->pkt_type > is PACKET_HOST. > > This is indeed the value right after a fresh skb allocation. > > However, it is possible that GRO merged a packet with a different > value (like PACKET_OTHERHOST in

Re: [PATCH net 0/2] Prevent uncaught exceptions in tdc

2018-11-17 Thread David Miller
From: Lucas Bates Date: Fri, 16 Nov 2018 17:37:54 -0500 > This patch series addresses two potential bugs in tdc that can > cause exceptions to be raised in certain circumstances. These > exceptions are generally not handled, so instead we will prevent > them from being raised. Series applied.

Re: [PATCH 2/3] libbpf: require size hint in bpf_prog_test_run

2018-11-17 Thread Y Song
On Fri, Nov 16, 2018 at 12:54 PM Lorenz Bauer wrote: > > Require size_out to be non-NULL if data_out is given. This prevents > accidental overwriting of process memory after the output buffer. > > Adjust callers of bpf_prog_test_run to this behaviour. > > Signed-off-by: Lorenz Bauer > --- >

[PATCH net] net-gro: reset skb->pkt_type in napi_reuse_skb()

2018-11-17 Thread Eric Dumazet
eth_type_trans() assumes initial value for skb->pkt_type is PACKET_HOST. This is indeed the value right after a fresh skb allocation. However, it is possible that GRO merged a packet with a different value (like PACKET_OTHERHOST in case macvlan is used), so we need to make sure napi->skb will

Re: [PATCH net] ip_tunnel: don't force DF when MTU is locked

2018-11-17 Thread David Miller
From: Sabrina Dubroca Date: Fri, 16 Nov 2018 16:58:19 +0100 > The various types of tunnels running over IPv4 can ask to set the DF > bit to do PMTU discovery. However, PMTU discovery is subject to the > threshold set by the net.ipv4.route.min_pmtu sysctl, and is also > disabled on routes with

Re: [PATCH 1/3] bpf: respect size hint to BPF_PROG_TEST_RUN if present

2018-11-17 Thread Y Song
On Fri, Nov 16, 2018 at 12:54 PM Lorenz Bauer wrote: > > Use data_size_out as a size hint when copying test output to user space. > A program using BPF_PERF_OUTPUT can compare its own buffer length with > data_size_out after the syscall to detect whether truncation has taken > place. Callers

Re: [PATCH net-next] net: align gnet_stats_basic_cpu struct

2018-11-17 Thread David Miller
From: Eric Dumazet Date: Fri, 16 Nov 2018 07:43:29 -0800 > This structure is small (12 or 16 bytes depending on 64bit > or 32bit kernels), but we do not want it spanning two cache lines. > > Signed-off-by: Eric Dumazet Applied.

Re: [PATCH net-next] net: align pcpu_sw_netstats and pcpu_lstats structs

2018-11-17 Thread David Miller
From: Eric Dumazet Date: Fri, 16 Nov 2018 07:24:24 -0800 > Do not risk spanning these small structures on two cache lines, > it is absolutely not worth it. > > For 32bit arches, the hint might not be enough, but we do not > really care anymore. > > Signed-off-by: Eric Dumazet Applied.

Re: [PATCH] socket: do a generic_file_splice_read when proto_ops has no splice_read

2018-11-17 Thread David Miller
From: kasl...@vmware.com Date: Fri, 16 Nov 2018 11:27:53 +0200 > From: Slavomir Kaslev > > splice(2) fails with -EINVAL when called reading on a socket with no > splice_read > set in its proto_ops (such as vsock sockets). Switch this to fallbacks to a > generic_file_splice_read instead. > >

Re: [PATCH net V3 0/5] net/smc: fixes 2018-11-12

2018-11-17 Thread David Miller
From: Ursula Braun Date: Fri, 16 Nov 2018 13:36:12 +0100 > v2->v3: >stay with 8-byte alignment for union smcd_cdc_cursor in >patch 4/5 "net/smc: atomic SMCD cursor handling", but get rid of >__packed for struct smcd_cdc_msg This SMC-D message is defined in some standard somewhere,

Re: [PATCH 00/10] add flow_rule infrastructure

2018-11-17 Thread David Miller
From: Or Gerlitz Date: Fri, 16 Nov 2018 12:29:29 +0200 > I think it would be fair to ask for one such driver porting to see > the impact/benefit. This is an absolute requirement, otherwise the claim that it helps is pure theory.

Re: [PATCH] [PATCH net-next] tun: fix multiqueue rx

2018-11-17 Thread David Miller
From: Matthew Cover Date: Fri, 16 Nov 2018 00:00:15 -0700 > When writing packets to a descriptor associated with a combined queue, the > packets should end up on that queue. > > Before this change all packets written to any descriptor associated with a > tap interface end up on rx-0, even when

Re: [PATCH] [PATCH net-next] tun: fix multiqueue rx

2018-11-17 Thread David Miller
From: Matthew Cover Date: Thu, 15 Nov 2018 21:10:16 -0700 > When writing packets to a descriptor associated with a combined queue, the > packets should end up on that queue. > > Before this change all packets written to any descriptor associated with a > tap interface end up on rx-0, even when

Re: [PATCH net-next] cxgb4: Remove SGE_HOST_PAGE_SIZE dependency on page size

2018-11-17 Thread David Miller
From: Arjun Vynipadath Date: Fri, 16 Nov 2018 09:15:42 +0530 > The SGE Host Page Size has nothing to do with the actual > Host Page Size. It's the SGE's BAR2 Doorbell/GTS Page Size > for interpreting the SGE Ingress/Egress Queue per Page values. > Firmware reads all of these things and makes all

Re: [PATCH net-next] tcp: add SRTT to SCM_TIMESTAMPING_OPT_STATS

2018-11-17 Thread David Miller
From: Yousuk Seung Date: Thu, 15 Nov 2018 16:44:12 -0800 > Add TCP_NLA_SRTT to SCM_TIMESTAMPING_OPT_STATS that reports the smoothed > round trip time in microseconds (tcp_sock.srtt_us >> 3). > > Signed-off-by: Yousuk Seung > Signed-off-by: Eric Dumazet > Acked-by: Soheil Hassas Yeganeh >

Re: [PATCH net-next] uapi/ethtool: fix spelling errors

2018-11-17 Thread David Miller
From: Stephen Hemminger Date: Thu, 15 Nov 2018 15:26:51 -0800 > Trivial spelling errors found by codespell. > > Signed-off-by: Stephen Hemminger Applied.

Re: [PATCH 01/10] flow_dissector: add flow_rule and flow_match structures and use them

2018-11-17 Thread David Miller
From: Pablo Neira Ayuso Date: Fri, 16 Nov 2018 02:41:30 +0100 > static int bnxt_tc_parse_flow(struct bnxt *bp, > struct tc_cls_flower_offload *tc_flow_cmd, > struct bnxt_tc_flow *flow) > { > - struct flow_dissector *dissector =

Re: [PATCH 10/10] dsa: bcm_sf2: use flow_rule infrastructure

2018-11-17 Thread David Miller
From: Pablo Neira Ayuso Date: Fri, 16 Nov 2018 02:41:39 +0100 > @@ -335,6 +336,11 @@ static int bcm_sf2_cfp_ipv4_rule_set(struct bcm_sf2_priv > *priv, int port, > struct ethtool_tcpip4_spec *v4_spec, *v4_m_spec; Local variables v4_spec and v4_m_spec are now set but not used.

Re: [PATCH][net-next] net: slightly optimize eth_type_trans

2018-11-17 Thread David Miller
From: Eric Dumazet Date: Sat, 17 Nov 2018 17:19:34 -0800 > I might have been not very clear. > > Issue is that with macvlan and GRO-friend traffic we can receive the > following packets : > > P1-P2 with PACKET_OTHERHOST because eth_type_trans() detected the dst MAC is > not the eth0 device

Re: [PATCH][net-next] net: slightly optimize eth_type_trans

2018-11-17 Thread Eric Dumazet
On 11/17/2018 04:51 PM, David Miller wrote: > From: Eric Dumazet > Date: Sat, 17 Nov 2018 14:37:12 -0800 > >> >> >> On 11/15/2018 03:11 PM, David Miller wrote: >> >>> >>> Applied. >>> >> >> While reviewing this stuff, I found we have a bug. >> >> If napi_reuse_skb() is called, we might

Re: [net-next:master 114/114] drivers/net/tun.c:2503:42: warning: Using plain integer as NULL pointer

2018-11-17 Thread David Miller
From: kbuild test robot Date: Sun, 18 Nov 2018 07:13:44 +0800 > tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git > master > head: f9e06c45cb28beb30a6a474952ead7da2b8940f3 > commit: f9e06c45cb28beb30a6a474952ead7da2b8940f3 [114/114] tuntap: free XDP > dropped packets

Re: [PATCH][net-next] net: slightly optimize eth_type_trans

2018-11-17 Thread David Miller
From: Eric Dumazet Date: Sat, 17 Nov 2018 14:37:12 -0800 > > > On 11/15/2018 03:11 PM, David Miller wrote: > >> >> Applied. >> > > While reviewing this stuff, I found we have a bug. > > If napi_reuse_skb() is called, we might inherit from prior skb->pkt_type > value. > > It seems that

Re: [Patch net] net: invert the check of detecting hardware RX checksum fault

2018-11-17 Thread David Miller
From: Herbert Xu Date: Fri, 16 Nov 2018 09:52:42 +0800 > netdev_rx_csum_fault is meant to warn about the situation where > a packet with a valid checksum (i.e., sum == 0) was given to us > by the hardware with a partial checksum that was invalid. Thanks for reminding us how this code is

Re: selftests: net: udpgro.sh hangs on DUT devices running Linux -next

2018-11-17 Thread Paolo Abeni
Hi, On Fri, 2018-11-16 at 14:55 +0530, Naresh Kamboju wrote: > Kernel selftests: net: udpgro.sh hangs / waits forever on x86_64 and > arm32 devices running Linux -next. Test getting PASS on arm64 devices. > > Do you see this problem ? > > Short error log: > - > ip6tables

hw csum failure + conntrack with more debugging information

2018-11-17 Thread Andre Tomt
I added Cong Wang's hw csum failure debug patch to my 4.19.2 tree and got a splat with a bit more information. [47273.905616] p0xe0: hw csum failure [47273.905642] dev features: 0x000860c000114bb3 [47273.905663] skb len=44 data_len=0 gso_size=0 gso_type=0 ip_summed=2 csum=0,

Re: [PATCH iproute2 00/22] misc cleanups

2018-11-17 Thread David Ahern
On 11/15/18 3:36 PM, Stephen Hemminger wrote: > Code cleanup including: >* make local functions static >* drop dead code >* whitespace code style cleanup > Hi Stephen: You did not mark these for -next but that is typically where cleanups go. What is your intention?

[net-next:master 114/114] drivers/net/tun.c:2503:42: warning: Using plain integer as NULL pointer

2018-11-17 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: f9e06c45cb28beb30a6a474952ead7da2b8940f3 commit: f9e06c45cb28beb30a6a474952ead7da2b8940f3 [114/114] tuntap: free XDP dropped packets in a batch config: x86_64-allmodconfig (attached as .config) compiler:

Re: [PATCH][net-next] net: slightly optimize eth_type_trans

2018-11-17 Thread Eric Dumazet
On 11/15/2018 03:11 PM, David Miller wrote: > > Applied. > While reviewing this stuff, I found we have a bug. If napi_reuse_skb() is called, we might inherit from prior skb->pkt_type value. It seems that GRO could aggregate packets with pkt_type != PACKET_HOST, right ? David, any

Re: Linux kernel hangs if using RV1108 with MSZ8863 switch with two ports connected

2018-11-17 Thread Otavio Salvador
Hi Andrew, On Fri, Nov 16, 2018 at 9:40 PM Andrew Lunn wrote: > On Fri, Nov 16, 2018 at 04:28:29PM -0200, Otavio Salvador wrote: > > RV1108 GMAC is connected to KSZ8863 port 3 and after kernel boots, I > > can put an Ethernet cable from my router to the uplink port of > > KSZ8863, which makes

Re: [PATCH mlx5-next 11/12] {net,IB}/mlx5: Move Page fault EQ and ODP logic to RDMA

2018-11-17 Thread Jason Gunthorpe
On Fri, Nov 16, 2018 at 01:59:00PM -0800, Saeed Mahameed wrote: > Use the new generic EQ API to move all ODP RDMA data structures and logic > form mlx5 core driver into mlx5_ib driver. > > Signed-off-by: Saeed Mahameed > Reviewed-by: Leon Romanovsky > Reviewed-by: Tariq Toukan >

Re: [PATCH v2 04/21] octeontx2-af: Relax resource lock into mutex

2018-11-17 Thread David Miller
From: Sunil Kovvuri Date: Sat, 17 Nov 2018 21:42:41 +0530 > On Sat, Nov 17, 2018 at 12:50 PM David Miller wrote: >> >> From: sunil.kovv...@gmail.com >> Date: Thu, 15 Nov 2018 16:29:29 +0530 >> >> > From: Stanislaw Kardach >> > >> > The resource locks does not need to be a spinlock as they are

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

2018-11-17 Thread Mathieu Desnoyers
- On Nov 16, 2018, at 10:50 PM, David S. Miller da...@davemloft.net wrote: > From: Geneviève Bastien > Date: Tue, 13 Nov 2018 15:13:26 -0500 > >> @@ -5222,9 +5228,14 @@ static void netif_receive_skb_list_internal(struct >> list_head *head) >> */ >> int netif_receive_skb(struct sk_buff

Re: [PATCH v2 04/21] octeontx2-af: Relax resource lock into mutex

2018-11-17 Thread Sunil Kovvuri
On Sat, Nov 17, 2018 at 12:50 PM David Miller wrote: > > From: sunil.kovv...@gmail.com > Date: Thu, 15 Nov 2018 16:29:29 +0530 > > > From: Stanislaw Kardach > > > > The resource locks does not need to be a spinlock as they are not > > used in any interrupt handling routines (only in bottom

Re: [PATCH net-next 1/8] net: eth: altera: tse_start_xmit ignores tx_buffer call response

2018-11-17 Thread Westergreen, Dalon
On Fri, 2018-11-16 at 20:38 -0800, David Miller wrote: > From: Dalon Westergreen > Date: Wed, 14 Nov 2018 16:50:40 -0800 > > > @@ -202,7 +204,7 @@ int sgdma_tx_buffer(struct altera_tse_private *priv, > struct tse_buffer *buffer) > > /* enqueue the request to the pending transmit queue */ >

[net-next:master 353/376] htmldocs: include/linux/skbuff.h:870: warning: Function parameter or member '__pkt_vlan_present_offset' not described in 'sk_buff'

2018-11-17 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: 9c549a6b057386df478e4307902cbc84f1eee058 commit: 0c4b2d370514cb4f3454dd3b18f031d2651fab73 [353/376] net: remove VLAN_TAG_PRESENT reproduce: make htmldocs All warnings (new ones prefixed by >>):