[PATCH V2] can: flexcan: fix stop mode acknowledgment

2019-06-17 Thread Joakim Zhang
To enter stop mode, the CPU should manually assert a global Stop Mode request and check the acknowledgment asserted by FlexCAN. The CPU must only consider the FlexCAN in stop mode when both request and acknowledgment conditions are satisfied. Fixes: de3578c198c6 ("can: flexcan: add self wakeup sup

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-06-17 Thread Eric Dumazet
On 6/17/19 8:53 PM, Christoph Paasch wrote: > On Mon, Jun 17, 2019 at 8:44 PM Eric Dumazet wrote: >> >> >> >> On 6/17/19 8:19 PM, Christoph Paasch wrote: >>> >>> Yes, this does the trick for my packetdrill-test. >>> >>> I wonder, is there a way we could end up in a situation where we can't >>>

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-06-17 Thread Christoph Paasch
On Mon, Jun 17, 2019 at 8:44 PM Eric Dumazet wrote: > > > > On 6/17/19 8:19 PM, Christoph Paasch wrote: > > > > Yes, this does the trick for my packetdrill-test. > > > > I wonder, is there a way we could end up in a situation where we can't > > retransmit anymore? > > For example, sk_wmem_queued h

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-06-17 Thread Eric Dumazet
On 6/17/19 8:19 PM, Christoph Paasch wrote: > > Yes, this does the trick for my packetdrill-test. > > I wonder, is there a way we could end up in a situation where we can't > retransmit anymore? > For example, sk_wmem_queued has grown so much that the new test fails. > Then, if we legitimately

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-06-17 Thread Christoph Paasch
On Mon, Jun 17, 2019 at 7:28 PM Eric Dumazet wrote: > > > > On 6/17/19 5:18 PM, Christoph Paasch wrote: > > > > Hi Eric, I now have a packetdrill test that started failing (see > > below). Admittedly, a bit weird test with the SO_SNDBUF forced so low. > > > > Nevertheless, previously this test wou

Re: [EXT] [PATCH net-next 06/16] qlge: Remove useless dma synchronization calls

2019-06-17 Thread Benjamin Poirier
On 2019/06/17 09:44, Manish Chopra wrote: [...] > > --- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c > > +++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c > > @@ -1110,9 +1110,6 @@ static void ql_update_lbq(struct ql_adapter *qdev, > > struct rx_ring *rx_ring) > > dma_unmap_a

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-06-17 Thread Eric Dumazet
On 6/17/19 5:18 PM, Christoph Paasch wrote: > > Hi Eric, I now have a packetdrill test that started failing (see > below). Admittedly, a bit weird test with the SO_SNDBUF forced so low. > > Nevertheless, previously this test would pass, now it stalls after the > write() because tcp_fragment()

Re: [PATCH net-next 0/2] net: mediatek: Add MT7621 TRGMII mode support

2019-06-17 Thread Florian Fainelli
On 6/17/2019 6:53 PM, Andrew Lunn wrote: >> By adding some extra speed states in the code it seems to work. >> >> + if (state->speed == 1200) >> + mcr |= PMCR_FORCE_SPEED_1000; > > Hi René > > Is TRGMII always 1.2G? Or can you set it to 1000 or 1200? This >

Re: [PATCH net-next 0/2] net: mediatek: Add MT7621 TRGMII mode support

2019-06-17 Thread Andrew Lunn
> By adding some extra speed states in the code it seems to work. > > + if (state->speed == 1200) > + mcr |= PMCR_FORCE_SPEED_1000; Hi René Is TRGMII always 1.2G? Or can you set it to 1000 or 1200? This PMCR_FORCE_SPEED_1000 feels wrong. > >We could consider

[PATCH iproute2-next v2] tc: q_netem: JSON-ify the output

2019-06-17 Thread Jakub Kicinski
Add JSON output support to q_netem. The normal output is untouched. In JSON output always use seconds as the base of time units, and non-percentage numbers (0.01 instead of 1%). Try to always report the fields, even if they are zero. All this should make the output more machine-friendly. v2: les

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-06-17 Thread Christoph Paasch
On Mon, Jun 17, 2019 at 10:05 AM Eric Dumazet wrote: > > Jonathan Looney reported that a malicious peer can force a sender > to fragment its retransmit queue into tiny skbs, inflating memory > usage and/or overflow 32bit counters. > > TCP allows an application to queue up to sk_sndbuf bytes, > so

[net-next 02/11] iavf: use signed variable

2019-06-17 Thread Jeff Kirsher
From: Mitch Williams The counter variable in iavf_clean_tx_irq starts out negative and climbs to 0. So allocating it as u16 is actually a really bad idea that just happens to work because the value underflows and overflows consistently on most architectures. Replace the u16 with an int so signed

[net-next 01/11] iavf: Create VLAN tag elements starting from the first element

2019-06-17 Thread Jeff Kirsher
From: Akeem G Abodunrin This patch changes how VLAN tag are being populated and programmed into the HW - Instead of start adding VF VLAN tag from the last member of the element list, start from the first member of the list, until number of allowed VLAN tags is exhausted in the HW. Signed-off-by:

[net-next 07/11] iavf: Remove timer for work triggering, use delaying work instead

2019-06-17 Thread Jeff Kirsher
From: Jakub Pawlak Remove the watchdog timer, instead declare watchdog task as delayed work and use dedicated workqueue to service driver tasks. The dedicated driver workqueue iavf_wq is common for all driver instances. Signed-off-by: Jakub Pawlak Tested-by: Andrew Bowers Signed-off-by: Jeff K

[net-next 08/11] iavf: Refactor the watchdog state machine

2019-06-17 Thread Jeff Kirsher
From: Jan Sokolowski Refactor the watchdog state machine implementation. Add the additional state __IAVF_COMM_FAILED to process the PF communication fails. Prepare the watchdog state machine to integrate with init state machine. Signed-off-by: Jan Sokolowski Signed-off-by: Jakub Pawlak Tested-

[net-next 10/11] iavf: add call to iavf_[add|del]_cloud_filter

2019-06-17 Thread Jeff Kirsher
From: Paul Greenwalt Add call to iavf_add_cloud_filter and iavf_del_cloud_filter from iavf_process_aq_command to clear aq_required IAVF_FLAG_AQ_ADD_CLOUD_FILTER and IAVF_FLAG_AQ_DEL_CLOUD_FILTER bits. aq_required IAVF_FLAG_AQ_DEL_CLOUD_FILTER bit is being set in iavf_down and iavf_delete_clsflow

[net-next 04/11] iavf: Change GFP_KERNEL to GFP_ATOMIC in kzalloc()

2019-06-17 Thread Jeff Kirsher
From: Aleksandr Loktionov iavf_add_vlan() is being called in atomic context so kzalloc() needs GFP_ATOMIC. This patch fixes it. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- 1 file changed, 1 in

[net-next 00/11][pull request] Intel Wired LAN Driver Updates 2019-06-17

2019-06-17 Thread Jeff Kirsher
This series contains updates to the iavf driver only. Akeem updates the driver to change how VLAN tags are being populated and programmed into the hardware by starting from the first member of the list until the number of allowed VLAN tags is exhausted. Mitch fixed the variable type since the var

[net-next 11/11] iavf: allow null RX descriptors

2019-06-17 Thread Jeff Kirsher
From: Mitch Williams In some circumstances, the hardware can hand us a null receive descriptor, with no data attached but otherwise valid. Unfortunately, the driver was ill-equipped to handle such an event, and would stop processing packets at that point. To fix this, use the Descriptor Done bit

[net-next 06/11] iavf: Move commands processing to the separate function

2019-06-17 Thread Jeff Kirsher
From: Jakub Pawlak Move the commands processing outside the watchdog_task() function. This reduce length and complexity of the function which is mainly designed to process the watchdog state machine. Signed-off-by: Jakub Pawlak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers

[net-next 09/11] iavf: Refactor init state machine

2019-06-17 Thread Jeff Kirsher
From: Jakub Pawlak Cleanup of init state machine, move state specific code to separate functions and rewrite the iavf_init_task() function. Signed-off-by: Jakub Pawlak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/iavf/iavf_main.c | 451 +++--

[net-next 03/11] iavf: wait longer for close to complete

2019-06-17 Thread Jeff Kirsher
From: Mitch Williams On some hardware/driver/architecture combinations, it may take longer than 200msec for all close operations to be completed, causing a spurious error message to be logged. Increase the timeout value to 500msec to avoid this erroneous error. Signed-off-by: Mitch Williams Te

[net-next 05/11] iavf: Fix the math for valid length for ADq enable

2019-06-17 Thread Jeff Kirsher
From: Avinash Dayanand There was a calculation error in virtchnl regarding the valid length which was fixed recently and a corresponding change needs to go into the code while we enable ADq. Signed-off-by: Avinash Dayanand Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/

Re: [PATCH net-next 0/2] net: ipv4: remove erroneous advancement of list pointer

2019-06-17 Thread David Miller
From: Florian Westphal Date: Mon, 17 Jun 2019 16:02:26 +0200 > Tariq reported a soft lockup on net-next that Mellanox was able to > bisect to 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list"). > > While reviewing above patch I found a regression when addresses have a > lifetime s

Re: [PATCH net-next v3 5/6] taprio: make clock reference conversions easier

2019-06-17 Thread David Miller
From: Vedang Patel Date: Mon, 17 Jun 2019 12:31:09 -0700 > diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c > index ab6080013666..f63cc3a9e69a 100644 > --- a/net/sched/sch_taprio.c > +++ b/net/sched/sch_taprio.c ... > return ns_to_ktime(sched->base_time); > } > > +static inl

Re: [PATCH net-next v3 4/6] taprio: Add support for txtime-assist mode.

2019-06-17 Thread David Miller
From: Vedang Patel Date: Mon, 17 Jun 2019 12:31:08 -0700 > diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c > index a41d7d4434ee..ab6080013666 100644 > --- a/net/sched/sch_taprio.c > +++ b/net/sched/sch_taprio.c ... > +/* Get how much time has been already elapsed in the current cycl

Re: [PATCH net-next 0/2] net: mediatek: Add MT7621 TRGMII mode support

2019-06-17 Thread René van Dorst
Quoting Andrew Lunn : Hi Andrew, On Mon, Jun 17, 2019 at 09:33:12PM +, René van Dorst wrote: Quoting Andrew Lunn : >On Sun, Jun 16, 2019 at 08:20:08PM +0200, René van Dorst wrote: >>Like many other mediatek SOCs, the MT7621 SOC and the internal MT7530 >>switch both >>supports TRGMII mode.

[RFC PATCH net-next 09/33] tcp, ulp: Add clone operation to tcp_ulp_ops

2019-06-17 Thread Mat Martineau
If ULP is used on a listening socket, icsk_ulp_ops and icsk_ulp_data are copied when the listener is cloned. Sometimes the clone is immediately deleted, which will invoke the release op on the clone and likely corrupt the listening socket's icsk_ulp_data. The clone operation is invoked immediately

[RFC PATCH net-next 01/33] tcp: Add MPTCP option number

2019-06-17 Thread Mat Martineau
TCP option 30 is allocated for MPTCP by the IANA. Signed-off-by: Mat Martineau --- include/net/tcp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net/tcp.h b/include/net/tcp.h index 96e0e53ff440..a8ec09b7767e 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -179,6 +179,7

[RFC PATCH net-next 07/33] mptcp: Handle MP_CAPABLE options for outgoing connections

2019-06-17 Thread Mat Martineau
From: Peter Krystad Add hooks to tcp_output.c to add MP_CAPABLE to an outgoing SYN request for a subflow socket and to the final ACK of the three-way handshake. Use the .sk_rx_dst_set() handler in the subflow proto to capture when the responding SYN-ACK is received and notify the MPTCP connectio

[RFC PATCH net-next 28/33] tcp: Check for filled TCP option space before SACK

2019-06-17 Thread Mat Martineau
The SACK code would potentially add four bytes to the expected TCP option size even if all option space was already used. Signed-off-by: Mat Martineau --- net/ipv4/tcp_output.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 5fe9459bbd6a

[RFC PATCH net-next 06/33] tcp: Expose tcp struct and routine for MPTCP

2019-06-17 Thread Mat Martineau
From: Peter Krystad tcp_request_sock_ipv4_ops and tcp_v4_init_sock(). This function is needed for MPTCP subflow initialization. Signed-off-by: Peter Krystad --- include/net/tcp.h | 3 +++ net/ipv4/tcp_ipv4.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/ne

[RFC PATCH net-next 22/33] mptcp: add basic kselftest program

2019-06-17 Thread Mat Martineau
From: Florian Westphal create mptcp connection between two processes, xmit data back and forth. Data is read from stdin and written (after traversing mtcp connection twice) to stdout. Wrapper script tests that data has passed un-altered. Will run automatically on "make kselftest". Signed-off-

[RFC PATCH net-next 12/33] mptcp: Add shutdown() socket operation

2019-06-17 Thread Mat Martineau
From: Peter Krystad Signed-off-by: Peter Krystad --- net/mptcp/protocol.c | 21 + 1 file changed, 21 insertions(+) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 2f340ef8e281..6596e594fa5f 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -296,

[RFC PATCH net-next 15/33] mptcp: Add MPTCP to skb extensions

2019-06-17 Thread Mat Martineau
Add enum value for MPTCP and update config dependencies Signed-off-by: Mat Martineau --- include/linux/skbuff.h | 3 +++ include/net/mptcp.h| 16 net/core/skbuff.c | 7 +++ net/mptcp/Kconfig | 1 + 4 files changed, 27 insertions(+) diff --git a/include/linu

[RFC PATCH net-next 19/33] mptcp: Implement MPTCP receive path

2019-06-17 Thread Mat Martineau
Parses incoming DSS options and populates outgoing MPTCP ACK fields. MPTCP fields are parsed from the TCP option header and placed in an skb extension, allowing the upper MPTCP layer to access MPTCP options after the skb has gone through the TCP stack. Outgoing MPTCP ACK values are now populated f

[RFC PATCH net-next 03/33] mptcp: Add MPTCP socket stubs

2019-06-17 Thread Mat Martineau
Implements the infrastructure for MPTCP sockets. MPTCP sockets open one in-kernel TCP socket per subflow. These subflow sockets are only managed by the MPTCP socket that owns them and are not visible from userspace. This commit allows a userspace program to open an MPTCP socket with: sock = soc

[RFC PATCH net-next 14/33] tcp: clean ext on tx recycle

2019-06-17 Thread Mat Martineau
From: Paolo Abeni Otherwise we will find stray/unexpected/old extensions value on next iteration. On tcp_write_xmit() we can end-up splitting an already queued skb in two parts, via tso_fragment(). The newly created skb can be allocated via the tx cache and the mptcp stack will not be aware of i

[RFC PATCH net-next 17/33] tcp: Export low-level TCP functions

2019-06-17 Thread Mat Martineau
MPTCP will make use of tcp_send_mss() and tcp_push() when sending data to specific TCP subflows. Signed-off-by: Mat Martineau --- include/net/tcp.h | 3 +++ net/ipv4/tcp.c| 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index af

[RFC PATCH net-next 21/33] mptcp: add and use mptcp_subflow_hold

2019-06-17 Thread Mat Martineau
From: Florian Westphal subflow sockets already have lifetime managed by RCU, so we can switch to atomic_inc_not_zero and skip/pretend we did not find such socket in the mptcp subflow list. This is required to get rid of synchronize_rcu() from mptcp_close(). Signed-off-by: Florian Westphal ---

[RFC PATCH net-next 00/33] Multipath TCP

2019-06-17 Thread Mat Martineau
The MPTCP upstreaming community has prepared a net-next RFC patch set for review. Clone/fetch: https://github.com/multipath-tcp/mptcp_net-next.git (tag: netdev-rfc) Browse: https://github.com/multipath-tcp/mptcp_net-next/tree/netdev-rfc With CONFIG_MPTCP=y, a socket created with IPPROTO_MPTCP wi

[RFC PATCH net-next 08/33] mptcp: add mptcp_poll

2019-06-17 Thread Mat Martineau
From: Florian Westphal Can't use tcp_poll directly: BUG: KASAN: slab-out-of-bounds in tcp_poll+0x17f/0x540 Read of size 4 at addr 88806ac5e50c by task mptcp_connect/2085 Call Trace: tcp_poll+0x17f/0x540 sock_poll+0x152/0x180 Signed-off-by: Florian Westphal --- net/mptcp/protocol.c | 14

[RFC PATCH net-next 31/33] mptcp: Add path manager interface

2019-06-17 Thread Mat Martineau
From: Peter Krystad Add enough of a path manager interface to allow sending of ADD_ADDR when an incoming MPTCP connection is created. Capable of sending only a single IPv4 ADD_ADDR option. The 'pm_data' element of the connection sock will need to be expanded to handle multiple interfaces and IPv6

[RFC PATCH net-next 32/33] mptcp: Add ADD_ADDR handling

2019-06-17 Thread Mat Martineau
From: Peter Krystad Add handling for sending and receiving the ADD_ADDR, ADD_ADDR6, and RM_ADDR suboptions. Signed-off-by: Peter Krystad --- include/linux/tcp.h | 11 + include/net/mptcp.h | 16 ++-- net/mptcp/options.c | 98 +++- net/mptcp/pm

[RFC PATCH net-next 26/33] mptcp: sendmsg() do spool all the provided data

2019-06-17 Thread Mat Martineau
From: Paolo Abeni This makes mptcp sendmsg() behaviour more consistent and improves xmit performances. Signed-off-by: Paolo Abeni --- net/mptcp/protocol.c | 110 +-- 1 file changed, 63 insertions(+), 47 deletions(-) diff --git a/net/mptcp/protocol.c b/n

[RFC PATCH net-next 20/33] mptcp: Make connection_list a real list of subflows

2019-06-17 Thread Mat Martineau
From: Peter Krystad Use the MPTCP socket lock to mutually exclude shutdown and close execution. Since mptcp_close() is the only code path that removes entries from conn_list, we can safely traverse the list while interrupting the RCU critical section. Signed-off-by: Peter Krystad Signed-off-by

[RFC PATCH net-next 30/33] mptcp: switch sublist to mptcp socket lock protection

2019-06-17 Thread Mat Martineau
From: Florian Westphal The mptcp sublist is currently guarded by rcu, but this comes with several artifacts that make little sense. 1. There is a synchronize_rcu after stealing the subflow list on each mptcp socket close. synchronize_rcu() is a very expensive call, and should not be ne

[RFC PATCH net-next 10/33] mptcp: Create SUBFLOW socket for incoming connections

2019-06-17 Thread Mat Martineau
From: Peter Krystad Add subflow_request_sock type that extends tcp_request_sock and add an is_mptcp flag to tcp_request_sock distinguish them. Override the listen() and accept() methods of the MPTCP socket proto_ops so they may act on the subflow socket. Override the conn_request() and syn_recv

[RFC PATCH net-next 04/33] mptcp: Handle MPTCP TCP options

2019-06-17 Thread Mat Martineau
From: Peter Krystad Currently only MPTCP v0 is supported so ignore v1 MP_CAPABLE option. Signed-off-by: Peter Krystad --- include/linux/tcp.h | 15 + include/net/mptcp.h | 20 ++ net/ipv4/tcp_input.c | 5 ++ net/ipv4/tcp_output.c | 15 + net/mptcp/Makefile| 2 +- ne

[RFC PATCH net-next 29/33] mptcp: accept: don't leak mptcp socket structure

2019-06-17 Thread Mat Martineau
From: Florian Westphal accept() is supposed to prepare and return a 'struct sock'. The caller holds a new inode/socket, and will associate the returned sock with it. mptcp_accept however will allocate it via 'struct socket', then returns socket->sk. This then leaks the outer socket struct inode

[RFC PATCH net-next 24/33] mptcp: selftests: Add capture option

2019-06-17 Thread Mat Martineau
Added a "-c" command line option for mptcp_connect.sh to make it easier to capture packets from each test. The script will use tcpdump to create one .pcap file per test case, named according to the namespaces, protocols, and connect address in use. For example, the first test case writes the captur

[RFC PATCH net-next 13/33] mptcp: Add setsockopt()/getsockopt() socket operations

2019-06-17 Thread Mat Martineau
From: Peter Krystad Signed-off-by: Peter Krystad --- net/mptcp/protocol.c | 48 1 file changed, 48 insertions(+) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 6596e594fa5f..3215601b9c43 100644 --- a/net/mptcp/protocol.c +++ b/net/mp

[RFC PATCH net-next 16/33] tcp: Prevent coalesce/collapse when skb has MPTCP extensions

2019-06-17 Thread Mat Martineau
The MPTCP extension data needs to be preserved as it passes through the TCP stack. Make sure that these skbs are not appended to others during coalesce or collapse, so the data remains associated with the payload of the given skb. Signed-off-by: Mat Martineau --- include/net/mptcp.h | 10 +

[RFC PATCH net-next 33/33] mptcp: Add handling of incoming MP_JOIN requests

2019-06-17 Thread Mat Martineau
From: Peter Krystad Process the MP_JOIN option in a SYN packet with the same flow as MP_CAPABLE but when the third ACK is received add the subflow to the MPTCP socket subflow list instead of adding it to the TCP socket accept queue. The subflow is added at the end of the subflow list so it will

[RFC PATCH net-next 27/33] mptcp: allow collapsing consecutive sendpages on the same substream

2019-06-17 Thread Mat Martineau
From: Paolo Abeni If the current sendmsg() lands on the same subflow we used last, we can try to collapse the data. Signed-off-by: Paolo Abeni --- net/mptcp/protocol.c | 79 +--- 1 file changed, 60 insertions(+), 19 deletions(-) diff --git a/net/mptcp/p

[RFC PATCH net-next 18/33] mptcp: Write MPTCP DSS headers to outgoing data packets

2019-06-17 Thread Mat Martineau
Per-packet metadata required to write the MPTCP DSS option is written to the skb_ext area. One write to the socket may contain more than one packet of data, in which case the DSS option in the first packet will have a mapping covering all of the data in that write. Packets after the first do not ha

[RFC PATCH net-next 11/33] mptcp: Add key generation and token tree

2019-06-17 Thread Mat Martineau
From: Peter Krystad Generate the local keys, IDSN, and token when creating a new socket. Introduce the token tree to track all tokens in use using a radix tree with the MPTCP token itself as the index. Signed-off-by: Peter Krystad --- net/mptcp/Makefile | 2 +- net/mptcp/crypto.c | 206 +

[RFC PATCH net-next 05/33] mptcp: Associate MPTCP context with TCP socket

2019-06-17 Thread Mat Martineau
From: Peter Krystad Use ULP to associate a subflow_context structure with each TCP subflow socket. Signed-off-by: Peter Krystad Signed-off-by: Florian Westphal Signed-off-by: Matthieu Baerts --- include/linux/tcp.h | 3 ++ net/mptcp/Makefile | 2 +- net/mptcp/protocol.c | 96 +++

[RFC PATCH net-next 25/33] mptcp: use sk_page_frag() in sendmsg

2019-06-17 Thread Mat Martineau
From: Paolo Abeni This clean-up a bit the send path, and allows better performances. Signed-off-by: Paolo Abeni --- net/mptcp/protocol.c | 41 - 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c i

[RFC PATCH net-next 02/33] tcp: Define IPPROTO_MPTCP

2019-06-17 Thread Mat Martineau
To open a MPTCP socket with socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP), IPPROTO_MPTCP needs a value that differs from IPPROTO_TCP. The existing IPPROTO numbers mostly map directly to IANA-specified protocol numbers. MPTCP does not have a protocol number allocated because MPTCP packets use the TCP

[RFC PATCH net-next 23/33] mptcp: selftests: switch to netns+veth based tests

2019-06-17 Thread Mat Martineau
From: Florian Westphal ... so we can exercise PMTU and MSS handling. MTU on lo is 64k, so we never had to deal with segmentation either. This also avoids problems with timewait state in inet_ns, all net namespaces are torn down before script exits. This uncovers several bugs: 1. mptcp_init_sock

Re: [PATCH net-next 4/4] qed: Add devlink support for configuration attributes.

2019-06-17 Thread Jakub Kicinski
On Mon, 17 Jun 2019 04:45:28 -0700, Sudarsana Reddy Kalluru wrote: > This patch adds implementation for devlink callbacks for reading/ > configuring the device attributes. > > Signed-off-by: Sudarsana Reddy Kalluru > Signed-off-by: Ariel Elior You need to provide documentation for your paramete

[PATCH bpf-next] libbpf: constify getter APIs

2019-06-17 Thread Andrii Nakryiko
Add const qualifiers to bpf_object/bpf_program/bpf_map arguments for getter APIs. There is no need for them to not be const pointers. Verified that make -C tools/lib/bpf make -C tools/testing/selftests/bpf make -C tools/perf all build without warnings. Signed-off-by: Andrii Nakryiko --- tools

[PATCH 3/3] netfilter: ipv6: nf_defrag: accept duplicate fragments again

2019-06-17 Thread Pablo Neira Ayuso
From: Guillaume Nault When fixing the skb leak introduced by the conversion to rbtree, I forgot about the special case of duplicate fragments. The condition under the 'insert_error' label isn't effective anymore as nf_ct_frg6_gather() doesn't override the returned value anymore. So duplicate frag

[PATCH 0/3] Netfilter fixes for net

2019-06-17 Thread Pablo Neira Ayuso
Hi David, 1) Module autoload for masquerade and redirection does not work. 2) Leak in unqueued packets in nf_ct_frag6_queue(). Ignore duplicated fragments, pretend they are placed into the queue. Patches from Guillaume Nault. You can pull these changes from: git://git.kernel.org/pub/scm

[PATCH 1/3] netfilter: nf_tables: fix module autoload with inet family

2019-06-17 Thread Pablo Neira Ayuso
Use MODULE_ALIAS_NFT_EXPR() to make happy the inet family with nat. Fixes: 63ce3940f3ab ("netfilter: nft_redir: add inet support") Fixes: 071657d2c38c ("netfilter: nft_masq: add inet support") Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nft_masq.c | 3 +-- net/netfilter/nft_redir.c | 3 +

Re: [PATCH] netfilter: nft_paylaod: add base type NFT_PAYLOAD_LL_HEADER_NO_TAG

2019-06-17 Thread Florian Westphal
Pablo Neira Ayuso wrote: > > Subject: Change bridge l3 dependency to meta protocol > > > > This examines skb->protocol instead of ethernet header type, which > > might be different when vlan is involved. > > > > + if (ctx->pctx.family == NFPROTO_BRIDGE && desc == &proto_eth) { > > +

[PATCH 2/3] netfilter: ipv6: nf_defrag: fix leakage of unqueued fragments

2019-06-17 Thread Pablo Neira Ayuso
From: Guillaume Nault With commit 997dd9647164 ("net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c"), nf_ct_frag6_reasm() is now called from nf_ct_frag6_queue(). With this change, nf_ct_frag6_queue() can fail after the skb has been added to the fragment queue and nf_ct_frag6_gather() was adapt

Re: [PATCH net v2 2/2] net: netem: fix use after free and double free with packet corruption

2019-06-17 Thread Cong Wang
On Mon, Jun 17, 2019 at 11:11 AM Jakub Kicinski wrote: > > Brendan reports that the use of netem's packet corruption capability > leads to strange crashes. This seems to be caused by > commit d66280b12bd7 ("net: netem: use a list in addition to rbtree") > which uses skb->next pointer to construct

Re: [PATCH net v2 1/2] net: netem: fix backlog accounting for corrupted GSO frames

2019-06-17 Thread Cong Wang
On Mon, Jun 17, 2019 at 11:11 AM Jakub Kicinski wrote: > > When GSO frame has to be corrupted netem uses skb_gso_segment() > to produce the list of frames, and re-enqueues the segments one > by one. The backlog length has to be adjusted to account for > new frames. > > The current calculation is

Re: [PATCH] netfilter: nft_paylaod: add base type NFT_PAYLOAD_LL_HEADER_NO_TAG

2019-06-17 Thread Pablo Neira Ayuso
Hi Florian, On Mon, Jun 10, 2019 at 11:44:33AM +0200, Florian Westphal wrote: > we...@ucloud.cn wrote: > > From: wenxu > > > > nft add rule bridge firewall rule-100-ingress ip protocol icmp drop > > nft --debug=netlink add rule bridge firewall rule-100-ingress ip protocol > icmp drop > bridge

Re: [PATCH iproute2 v2 0/3] refactor the cmd_exec()

2019-06-17 Thread David Ahern
On 6/17/19 4:20 PM, Matteo Croce wrote: > > I looked for every occourrence of netns_switch(): > > bridge/bridge.c:if (netns_switch(argv[1])) > include/namespace.h:int netns_switch(char *netns); > ip/ip.c:if (netns_switch(argv[1])) > ip/ipnetns.c:

Re: [PATCH iproute2 v2 0/3] refactor the cmd_exec()

2019-06-17 Thread Matteo Croce
On Sat, Jun 15, 2019 at 4:06 PM Matteo Croce wrote: > > On Fri, Jun 14, 2019 at 4:36 PM David Ahern wrote: > > > > On 6/11/19 10:10 AM, Matteo Croce wrote: > > > Refactor the netns and ipvrf code so less steps are needed to exec > > > commands > > > in a netns or a VRF context. > > > Also remove

Re: [PATCH v2 bpf-next 09/11] selftests/bpf: switch BPF_ANNOTATE_KV_PAIR tests to BTF-defined maps

2019-06-17 Thread Daniel Borkmann
On 06/17/2019 11:41 PM, Song Liu wrote: >> On Jun 17, 2019, at 12:26 PM, Andrii Nakryiko wrote: >> >> Switch tests that already rely on BTF to BTF-defined map definitions. >> >> Signed-off-by: Andrii Nakryiko > > For 09 to 11: > > Acked-by: Song Liu I've added it to patch 10 by hand given the

Re: [PATCH net-next 0/2] net: mediatek: Add MT7621 TRGMII mode support

2019-06-17 Thread Florian Fainelli
On 6/17/19 2:33 PM, René van Dorst wrote: > Quoting Andrew Lunn : > >> On Sun, Jun 16, 2019 at 08:20:08PM +0200, René van Dorst wrote: >>> Like many other mediatek SOCs, the MT7621 SOC and the internal MT7530 >>> switch both >>> supports TRGMII mode. MT7621 TRGMII speed is 1200MBit. >> >> Hi René

Re: [PATCH v2 bpf-next 00/11] BTF-defined BPF map definitions

2019-06-17 Thread Daniel Borkmann
On 06/17/2019 11:17 PM, Daniel Borkmann wrote: > On 06/17/2019 09:26 PM, Andrii Nakryiko wrote: >> This patch set implements initial version (as discussed at LSF/MM2019 >> conference) of a new way to specify BPF maps, relying on BTF type >> information, >> which allows for easy extensibility, pres

Re: [RFC net-next 1/2] net: sched: refactor reinsert action

2019-06-17 Thread John Hurley
On Mon, Jun 17, 2019 at 7:44 PM Edward Cree wrote: > > On 14/06/2019 15:33, John Hurley wrote: > > Instead of > > returning TC_ACT_REINSERT, change the type to the new TC_ACT_CONSUMED > > which tells the caller that the packet has been stolen by another process > > and that no consume call is requ

Re: [PATCH net-next v2 1/3] net: sched: add mpls manipulation actions to TC

2019-06-17 Thread John Hurley
On Mon, Jun 17, 2019 at 10:18 PM Cong Wang wrote: > > On Fri, Jun 14, 2019 at 3:56 PM John Hurley wrote: > > > > On Fri, Jun 14, 2019 at 5:59 PM Cong Wang wrote: > > > > > > On Thu, Jun 13, 2019 at 10:44 AM John Hurley > > > wrote: > > > > +static inline void tcf_mpls_set_eth_type(struct sk_bu

Re: [PATCH net-next 0/2] net: mediatek: Add MT7621 TRGMII mode support

2019-06-17 Thread Andrew Lunn
On Mon, Jun 17, 2019 at 09:33:12PM +, René van Dorst wrote: > Quoting Andrew Lunn : > > >On Sun, Jun 16, 2019 at 08:20:08PM +0200, René van Dorst wrote: > >>Like many other mediatek SOCs, the MT7621 SOC and the internal MT7530 > >>switch both > >>supports TRGMII mode. MT7621 TRGMII speed is 12

Re: [PATCH v2 bpf-next 09/11] selftests/bpf: switch BPF_ANNOTATE_KV_PAIR tests to BTF-defined maps

2019-06-17 Thread Song Liu
> On Jun 17, 2019, at 12:26 PM, Andrii Nakryiko wrote: > > Switch tests that already rely on BTF to BTF-defined map definitions. > > Signed-off-by: Andrii Nakryiko For 09 to 11: Acked-by: Song Liu

Re: [PATCH net-next 0/2] net: mediatek: Add MT7621 TRGMII mode support

2019-06-17 Thread René van Dorst
Quoting Andrew Lunn : On Sun, Jun 16, 2019 at 08:20:08PM +0200, René van Dorst wrote: Like many other mediatek SOCs, the MT7621 SOC and the internal MT7530 switch both supports TRGMII mode. MT7621 TRGMII speed is 1200MBit. Hi René Hi Andrew, Is TRGMII used only between the SoC and the

Re: [PATCH v2 bpf-next 00/11] BTF-defined BPF map definitions

2019-06-17 Thread Daniel Borkmann
On 06/17/2019 09:26 PM, Andrii Nakryiko wrote: > This patch set implements initial version (as discussed at LSF/MM2019 > conference) of a new way to specify BPF maps, relying on BTF type information, > which allows for easy extensibility, preserving forward and backward > compatibility. See details

Re: [PATCH net-next v2 1/3] net: sched: add mpls manipulation actions to TC

2019-06-17 Thread Cong Wang
On Fri, Jun 14, 2019 at 3:56 PM John Hurley wrote: > > On Fri, Jun 14, 2019 at 5:59 PM Cong Wang wrote: > > > > On Thu, Jun 13, 2019 at 10:44 AM John Hurley > > wrote: > > > +static inline void tcf_mpls_set_eth_type(struct sk_buff *skb, __be16 > > > ethertype) > > > +{ > > > + struct eth

Re: [PATCH] bpf: optimize constant blinding

2019-06-17 Thread Edward Cree
On 17/06/2019 21:40, Jiong Wang wrote: > Now if we don't split patch when patch an insn inside patch, instead, if we > replace the patched insn using what you suggested, then the logic looks to > me becomes even more complex, something like > >for (idx = 0; idx < insn_cnt; idx++) { > if (i

Re: [PATCH bpf-next 8/8] selftests/bpf: switch tests to BTF-defined map definitions

2019-06-17 Thread Stanislav Fomichev
On 06/17, Andrii Nakryiko wrote: > On Fri, Jun 14, 2019 at 5:01 PM Stanislav Fomichev wrote: > > > > On 06/14, Andrii Nakryiko wrote: > > > On Fri, Jun 14, 2019 at 4:23 PM Stanislav Fomichev > > > wrote: > > > > > > > > On 06/10, Andrii Nakryiko wrote: > > > > > Switch test map definition to new

Re: [patch net-next] net: sched: cls_matchall: allow to delete filter

2019-06-17 Thread David Miller
From: Jiri Pirko Date: Mon, 17 Jun 2019 18:02:32 +0200 > From: Jiri Pirko > > Currently user is unable to delete the filter. See following example: > $ tc filter add dev ens16np1 ingress pref 1 handle 1 matchall action drop > $ tc filter show dev ens16np1 ingress > filter protocol all pref 1 ma

Re: [PATCH] bpf: optimize constant blinding

2019-06-17 Thread Jiong Wang
Alexei Starovoitov writes: > On Mon, Jun 17, 2019 at 1:40 PM Jiong Wang wrote: >> >> After digest Alexei and Andrii's reply, I still don't see the need to turn >> branch target into list, and I am not sure whether pool based list sound >> good? it saves size, resize pool doesn't invalid allocat

Re: [PATCH net-next 0/2] net: sched: act_ctinfo: fixes

2019-06-17 Thread David Miller
From: Kevin Darbyshire-Bryant Date: Mon, 17 Jun 2019 11:03:25 +0100 > This is first attempt at sending a small series. Order is important > because one bug (policy validation) prevents us from encountering the > more important 'OOPS' generating bug in action creation. Fix the OOPS > first. > >

Re: [RFC PATCH bpf-next 6/8] libbpf: allow specifying map definitions using BTF

2019-06-17 Thread Andrii Nakryiko
On Mon, Jun 17, 2019 at 2:07 AM Lorenz Bauer wrote: > > On Thu, 6 Jun 2019 at 23:35, Andrii Nakryiko > wrote: > > > > On Thu, Jun 6, 2019 at 9:43 AM Lorenz Bauer wrote: > > > > > > Thanks for sending this RFC! For me, the biggest draw is that map-in-map > > > would be so much nicer to use, plus

Re: [PATCH] bpf: optimize constant blinding

2019-06-17 Thread Alexei Starovoitov
On Mon, Jun 17, 2019 at 1:40 PM Jiong Wang wrote: > > After digest Alexei and Andrii's reply, I still don't see the need to turn > branch target into list, and I am not sure whether pool based list sound > good? it saves size, resize pool doesn't invalid allocated node (the offset > doesn't change

Re: [PATCH] bpf: optimize constant blinding

2019-06-17 Thread Jiong Wang
Edward Cree writes: > On 17/06/2019 20:59, Jiong Wang wrote: >> Edward Cree writes: >> >>> On 14/06/2019 16:13, Jiong Wang wrote: Just an update and keep people posted. Working on linked list based approach, the implementation looks like the following, mostly a combine of dis

Re: [net-next] tipc: include retrans failure detection for unicast

2019-06-17 Thread David Miller
From: Tuong Lien Date: Mon, 17 Jun 2019 12:15:42 +0700 > In patch series, commit 9195948fbf34 ("tipc: improve TIPC throughput by > Gap ACK blocks"), as for simplicity, the repeated retransmit failures' > detection in the function - "tipc_link_retrans()" was kept there for > broadcast retransmissi

Re: [PATCHv2 net-next] team: add ethtool get_link_ksettings

2019-06-17 Thread David Miller
From: Hangbin Liu Date: Mon, 17 Jun 2019 09:32:55 +0800 > Like bond, add ethtool get_link_ksettings to show the total speed. > > v2: no update, just repost. > > Signed-off-by: Hangbin Liu Applied, thank you.

Re: [PATCH rdma-next v1 0/4] Expose ENCAP mode to mlx5_ib

2019-06-17 Thread Doug Ledford
On Sun, 2019-06-16 at 12:44 +, Leon Romanovsky wrote: > On Wed, Jun 12, 2019 at 03:20:10PM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Changelog v0->v1: > > * Added patch to devlink to use declared enum for encap mode > > instead of u8 > > * Constify input argumetn to en

Re: [PATCH] bpf: optimize constant blinding

2019-06-17 Thread Edward Cree
On 17/06/2019 20:59, Jiong Wang wrote: > Edward Cree writes: > >> On 14/06/2019 16:13, Jiong Wang wrote: >>> Just an update and keep people posted. >>> >>> Working on linked list based approach, the implementation looks like the >>> following, mostly a combine of discussions happened and Naveen's p

Re: [PATCH] bpf: optimize constant blinding

2019-06-17 Thread Jiong Wang
Edward Cree writes: > On 14/06/2019 16:13, Jiong Wang wrote: >> Just an update and keep people posted. >> >> Working on linked list based approach, the implementation looks like the >> following, mostly a combine of discussions happened and Naveen's patch, >> please feel free to comment. >> >>

Re: [PATCH] bpf: optimize constant blinding

2019-06-17 Thread Edward Cree
On 14/06/2019 16:13, Jiong Wang wrote: > Just an update and keep people posted. > > Working on linked list based approach, the implementation looks like the > following, mostly a combine of discussions happened and Naveen's patch, > please feel free to comment. > > - Use the reserved opcode 0xf0

Re: [PATCH v2 bpf-next 03/11] libbpf: streamline ELF parsing error-handling

2019-06-17 Thread Song Liu
> On Jun 17, 2019, at 12:26 PM, Andrii Nakryiko wrote: > > Simplify ELF parsing logic by exiting early, as there is no common clean > up path to execute. That makes it unnecessary to track when err was set > and when it was cleared. It also reduces nesting in some places. > > Signed-off-by: A

Re: [PATCH v2 bpf-next 07/11] libbpf: allow specifying map definitions using BTF

2019-06-17 Thread Song Liu
> On Jun 17, 2019, at 12:26 PM, Andrii Nakryiko wrote: > > This patch adds support for a new way to define BPF maps. It relies on > BTF to describe mandatory and optional attributes of a map, as well as > captures type information of key and value naturally. This eliminates > the need for BPF_

Re: [PATCH v2 bpf-next 02/11] libbpf: extract BTF loading logic

2019-06-17 Thread Song Liu
> On Jun 17, 2019, at 12:26 PM, Andrii Nakryiko wrote: > > As a preparetion fro adding BTF-based BPF map loading, extract .BTF and > .BTF.ext loading logic. > > Signed-off-by: Andrii Nakryiko Acked-by: Song Liu > --- > tools/lib/bpf/libbpf.c | 93 +-

  1   2   3   >