Re: [PATCH net-next] tcp: batch calls to sk_flush_backlog()

2019-08-09 Thread Soheil Hassas Yeganeh
thanks to coalescing done on backlog, but cleans the 16 skbs > found in rtx rb-tree. > > Reported-by: Soheil Hassas Yeganeh > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Thank you very much, Eric! > --- > net/ipv4/tcp.c | 11 ++- > 1 file changed,

Re: [PATCH net] inet: clear num_timeout reqsk_alloc()

2019-06-19 Thread Soheil Hassas Yeganeh
ry/common.c:168 [inline] > prepare_exit_to_usermode+0x39d/0x4d0 arch/x86/entry/common.c:199 > syscall_return_slowpath+0x90/0x5c0 arch/x86/entry/common.c:279 > do_syscall_64+0xe2/0xf0 arch/x86/entry/common.c:305 > entry_SYSCALL_64_after_hwframe+0x63/0xe7 > > Fixes: 336c39a031

[PATCH net-next 2/2] net-backports: selftest: add test for TCP_INQ

2018-04-27 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Yuchung Cheng Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Reviewed-by: Neal Cardwell --- tools/testing/selftests/net/Makefile | 3 +- tools/testing/selftests/net/tcp_inq.c | 189

[PATCH net-next 1/2] tcp: send in-queue bytes in cmsg upon read

2018-04-27 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Applications with many concurrent connections, high variance in receive queue length and tight memory bounds cannot allocate worst-case buffer size to drain sockets. Knowing the size of receive queue length, applications can optimize how they allocate buffers to read

Re: [PATCH net-next 2/2] net-backports: selftest: add test for TCP_INQ

2018-04-27 Thread Soheil Hassas Yeganeh
On Fri, Apr 27, 2018 at 2:50 PM, Soheil Hassas Yeganeh wrote: > From: Soheil Hassas Yeganeh > > Signed-off-by: Soheil Hassas Yeganeh > Signed-off-by: Yuchung Cheng > Signed-off-by: Willem de Bruijn > Reviewed-by: Eric Dumazet > Reviewed-by: Neal Cardwell Really sorry

[PATCH V2 net-next 1/2] tcp: send in-queue bytes in cmsg upon read

2018-04-27 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Applications with many concurrent connections, high variance in receive queue length and tight memory bounds cannot allocate worst-case buffer size to drain sockets. Knowing the size of receive queue length, applications can optimize how they allocate buffers to read

[PATCH V2 net-next 2/2] selftest: add test for TCP_INQ

2018-04-27 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Yuchung Cheng Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Reviewed-by: Neal Cardwell --- tools/testing/selftests/net/Makefile | 3 +- tools/testing/selftests/net/tcp_inq.c | 189

Re: [PATCH V2 net-next 1/2] tcp: send in-queue bytes in cmsg upon read

2018-04-30 Thread Soheil Hassas Yeganeh
On Mon, Apr 30, 2018 at 11:43 AM, Eric Dumazet wrote: > On 04/30/2018 08:38 AM, David Miller wrote: >> From: Soheil Hassas Yeganeh >> Date: Fri, 27 Apr 2018 14:57:32 -0400 >> >>> Since the socket lock is not held when calculating the size of >>> receive que

Re: [PATCH V2 net-next 1/2] tcp: send in-queue bytes in cmsg upon read

2018-04-30 Thread Soheil Hassas Yeganeh
On Mon, Apr 30, 2018 at 12:10 PM, David Miller wrote: > From: Eric Dumazet > Date: Mon, 30 Apr 2018 09:01:47 -0700 > >> TCP sockets are read by a single thread really (or synchronized >> threads), or garbage is ensured, regardless of how the kernel >> ensures locking while reporting "queue length

[PATCH V3 net-next 1/2] tcp: send in-queue bytes in cmsg upon read

2018-05-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Applications with many concurrent connections, high variance in receive queue length and tight memory bounds cannot allocate worst-case buffer size to drain sockets. Knowing the size of receive queue length, applications can optimize how they allocate buffers to read

[PATCH V3 net-next 2/2] selftest: add test for TCP_INQ

2018-05-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Yuchung Cheng Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Reviewed-by: Neal Cardwell --- tools/testing/selftests/net/Makefile | 3 +- tools/testing/selftests/net/tcp_inq.c | 189

Re: [PATCH V3 net-next 1/2] tcp: send in-queue bytes in cmsg upon read

2018-05-01 Thread Soheil Hassas Yeganeh
On Tue, May 1, 2018 at 2:34 PM, David Miller wrote: > From: Soheil Hassas Yeganeh > Date: Tue, 1 May 2018 10:11:27 -0400 > >> +static inline int tcp_inq_hint(struct sock *sk) > > Please do not use 'inline' in foo.c files, let the compiler decide. > > Otherw

[PATCH V4 net-next 2/2] selftest: add test for TCP_INQ

2018-05-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Yuchung Cheng Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Reviewed-by: Neal Cardwell --- tools/testing/selftests/net/Makefile | 3 +- tools/testing/selftests/net/tcp_inq.c | 189

[PATCH V4 net-next 1/2] tcp: send in-queue bytes in cmsg upon read

2018-05-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Applications with many concurrent connections, high variance in receive queue length and tight memory bounds cannot allocate worst-case buffer size to drain sockets. Knowing the size of receive queue length, applications can optimize how they allocate buffers to read

Re: [PATCH net] tcp: restore autocorking

2018-05-03 Thread Soheil Hassas Yeganeh
On Wed, May 2, 2018 at 11:25 PM, Eric Dumazet wrote: > Fixes: 75c119afe14f ("tcp: implement rb-tree based retransmit queue") > Signed-off-by: Eric Dumazet > Reported-by: Michael Wenig > Tested-by: Michael Wenig Acked-by: Soheil Hassas Yeganeh Thank you for catching and fixing this!

Re: [PATCH v2 net-next 0/2] tcp: mmap: rework zerocopy receive

2018-04-25 Thread Soheil Hassas Yeganeh
n and changes mmap() > behavior. > > Second patch changes tcp_mmap reference program. > > v2: > Added a missing page align of zc->length in tcp_zerocopy_receive() > Properly clear zc->recv_skip_hint in case user request was completed. Acked-by: Soheil Hassas Yeganeh

Re: [PATCH v3 net-next 2/2] selftests: net: tcp_mmap must use TCP_ZEROCOPY_RECEIVE

2018-04-26 Thread Soheil Hassas Yeganeh
page > aligned. > > Signed-off-by: Eric Dumazet > Cc: Andy Lutomirski > Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Thank you, again! > --- > tools/testing/selftests/net/tcp_mmap.c | 64 +++--- > 1 file changed, 37 insertions(+), 27 d

Re: [PATCH v3 net-next 1/2] tcp: add TCP_ZEROCOPY_RECEIVE support for zerocopy receive

2018-04-26 Thread Soheil Hassas Yeganeh
that memcg might require additional changes. > > Fixes: 93ab6cc69162 ("tcp: implement mmap() for zero copy receive") > Signed-off-by: Eric Dumazet > Reported-by: syzbot > Suggested-by: Andy Lutomirski > Cc: linux...@kvack.org > Cc: Soheil Hassas Yeganeh

Re: [PATCH bpf-next 0/8] bpf: TCP RTT sock_ops bpf callback

2019-07-01 Thread Soheil Hassas Yeganeh
ted-by: Eric Dumazet > Cc: Eric Dumazet > Cc: Priyaranjan Jha > Cc: Yuchung Cheng > Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Thank you for the nice patch series! > Stanislav Fomichev (8): > bpf: add BPF_CGROUP_SOCK_OPS callback that is executed on every RTT &g

Re: [PATCH net] tcp: make sure EPOLLOUT wont be missed

2019-08-17 Thread Soheil Hassas Yeganeh
o renames the do_nonblock label since we might reach this > code path even if we were in blocking mode. > > Fixes: 790ba4566c1a ("tcp: set SOCK_NOSPACE under memory pressure") > Signed-off-by: Eric Dumazet > Cc: Jason Baron > Reported-by: Vladimir Rutsky Ac

Re: [PATCH net] tcp: remove empty skb from write queue in error cases

2019-08-26 Thread Soheil Hassas Yeganeh
and > call sk->sk_write_space(sk) accordingly. > > Fixes: ce5ec440994b ("tcp: ensure epoll edge trigger wakeup when write queue > is empty") > Signed-off-by: Eric Dumazet > Cc: Jason Baron > Reported-by: Vladimir Rutsky > Cc: Soheil Hassas Yeganeh > Cc: N

Re: [PATCH net] tcp: repaired skbs must init their tso_segs

2019-02-23 Thread Soheil Hassas Yeganeh
rnel/sched/idle.c:353 > start_secondary+0x404/0x5c0 arch/x86/kernel/smpboot.c:271 > secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 > Kernel Offset: disabled > Rebooting in 86400 seconds.. > > Fixes: 79861919b889 ("tcp: fix TCP_REPAIR xmit queue setup") >

Re: [PATCH internal pre-review] bpf: add missing entries to bpf_helpers.h

2019-02-26 Thread Soheil Hassas Yeganeh
On Tue, Feb 26, 2019 at 5:55 PM Willem de Bruijn wrote: > > From: Willem de Bruijn > > Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh > --- > tools/testing/selftests/bpf/bpf_helpers.h | 29 +++ > 1 file changed, 29 insertions(+) &

[PATCH net] tcp: do not report TCP_CM_INQ of 0 for closed connections

2019-03-06 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Returning 0 as inq to userspace indicates there is no more data to read, and the application needs to wait for EPOLLIN. For a connection that has received FIN from the remote peer, however, the application must continue reading until getting EOF (return value of 0

Re: [PATCH bpf-next 10/13] bpf: Sync bpf.h to tools

2019-03-20 Thread Soheil Hassas Yeganeh
On Wed, Mar 20, 2019 at 10:50 AM Willem de Bruijn wrote: > > From: Willem de Bruijn > > Sync include/uapi/linux/bpf.h with tools/ > > Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh > --- > tools/include/uapi/linux/bpf.h | 22

Re: [PATCH net-next 0/3] tcp: add rx/tx cache to reduce lock contention

2019-03-21 Thread Soheil Hassas Yeganeh
so that it can be freed by the cpu feeding the incoming packets in BH. > > This increased the performance of small RPC benchmark by about 10 % on a host > with 112 hyperthreads. > > Eric Dumazet (3): > net: convert rps_needed and rfs_needed to new static branch api > tcp: add one skb

Re: [PATCH v2 net-next 0/3] tcp: add rx/tx cache to reduce lock contention

2019-03-22 Thread Soheil Hassas Yeganeh
> > - Really test rps_needed in sk_eat_skb() as claimed. > > - Fixed rps_needed use in drivers/net/tun.c > > > > Eric Dumazet (3): > > net: convert rps_needed and rfs_needed to new static branch api > > tcp: add one skb cache for tx > > tcp: add one skb cache for rx > > Acked-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Thanks again! > Thanks Eric!

[PATCH net-next] tcp: add documentation for tcp_ca_state

2019-03-22 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Add documentation to the tcp_ca_state enum, since this enum is exposed in uapi. Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Cc: Sowmini Varadhan --- include/uapi/linux/tcp.h | 27

Re: [PATCH net-next] tcp: fix zerocopy and notsent_lowat issues

2019-03-25 Thread Soheil Hassas Yeganeh
r tx") > Signed-off-by: Eric Dumazet > Cc: Willem de Bruijn > Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Thank you for the fix! > --- > include/net/sock.h | 9 + > net/ipv4/tcp.c | 2 -- > 2 files changed, 5 insertions(+), 6 d

Re: [PATCH v2 net-next] tcp: fix zerocopy and notsent_lowat issues

2019-03-26 Thread Soheil Hassas Yeganeh
() instead > of simply checking if the fast clone has been freed. > > Fixes: 472c2e07eef0 ("tcp: add one skb cache for tx") > Signed-off-by: Eric Dumazet > Cc: Willem de Bruijn > Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh I can't think of other

Re: [PATCH net-next 0/2] skbuff: Fix applications not being woken for errors

2018-03-14 Thread Soheil Hassas Yeganeh
On Wed, Mar 14, 2018 at 12:32 PM Willem de Bruijn < willemdebruijn.ker...@gmail.com> wrote: > On Tue, Mar 13, 2018 at 4:35 PM, Vinicius Costa Gomes > wrote: > > Hi, > > > > Changes from the RFC: > > - tweaked commit messages; > > > > Original cover letter: > > > > This is actually a "bug report"

[PATCH linux-stable-4.14] tcp: reset sk_send_head in tcp_write_queue_purge

2018-03-15 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh tcp_write_queue_purge clears all the SKBs in the write queue but does not reset the sk_send_head. As a result, we can have a NULL pointer dereference anywhere that we use tcp_send_head instead of the tcp_write_queue_tail. For example, after 27fid7a8ed38 (tcp: purge

Re: 4.14.2[6-7] tcp_push NULL pointer

2018-03-19 Thread Soheil Hassas Yeganeh
On Mon, Mar 19, 2018 at 10:16 AM Eric Dumazet wrote: > On 03/19/2018 07:03 AM, David Miller wrote: > > From: Eric Dumazet > > Date: Mon, 19 Mar 2018 05:17:37 -0700 > > > >> We have sent a fix last week, I am not sure if David took it. > >> > >> https://patchwork.ozlabs.org/patch/886324/ > > >

Re: Socket error queue with timestamping and SOF_TIMESTAMPING_OPT_CMSG

2018-04-03 Thread Soheil Hassas Yeganeh
On Tue, Apr 3, 2018 at 11:19 AM Miroslav Lichvar wrote: > > I came across an interesting issue with error messages in sockets with > enabled timestamping using the SOF_TIMESTAMPING_OPT_CMSG option. When > the socket is connected and there is an error (e.g. due to destination > unreachable ICMP), s

[PATCH net] tcp: clear tp->packets_out when purging write queue

2018-04-14 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Clear tp->packets_out when purging the write queue, otherwise tcp_rearm_rto() mistakenly assumes TCP write queue is not empty. This results in NULL pointer dereference. Also, remove the redundant `tp->packets_out = 0` from tcp_disconnect(), since tcp_disc

[PATCH linux-stable-4.14] tcp: clear tp->packets_out when purging write queue

2018-04-14 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Clear tp->packets_out when purging the write queue, otherwise tcp_rearm_rto() mistakenly assumes TCP write queue is not empty. This results in NULL pointer dereference. Also, remove the redundant `tp->packets_out = 0` from tcp_disconnect(), since tcp_disc

[PATCH net-next] socket: skip checking sk_err for recvmmsg(MSG_ERRQUEUE)

2018-02-27 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh recvmmsg does not call ___sys_recvmsg when sk_err is set. That is fine for normal reads but, for MSG_ERRQUEUE, recvmmsg should always call ___sys_recvmsg regardless of sk->sk_err to be able to clear error queue. Otherwise, users are not able to drain the error qu

[PATCH net] tcp: purge write queue upon RST

2018-02-27 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh When the connection is reset, there is no point in keeping the packets on the write queue until the connection is closed. RFC 793 (page 70) and RFC 793-bis (page 64) both suggest purging the write queue upon RST: https://tools.ietf.org/html/draft-ietf-tcpm-rfc793bis

Re: [PATCH net-next 0/2] tcp_bbr: more GSO work

2018-02-28 Thread Soheil Hassas Yeganeh
re needed to fill the pipe when a device has > suboptimal TSO limits. > Eric Dumazet (2): >tcp_bbr: better deal with suboptimal GSO (II) >tcp_bbr: remove bbr->tso_segs_goal Acked-by: Soheil Hassas Yeganeh Thank you, Eric! > include/net/tcp.h | 6 ++

[PATCH net] tcp: purge write queue upon aborting the connection

2018-03-06 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh When the connection is aborted, there is no point in keeping the packets on the write queue until the connection is closed. Similar to a27fd7a8ed38 ('tcp: purge write queue upon RST'), this is essential for a correct MSG_ZEROCOPY implementation, because

Re: [PATCH v2 net-next] net: sk_buff rbnode reorg

2017-09-19 Thread Soheil Hassas Yeganeh
the swtstamp field from struct tcp_skb_cb > > Signed-off-by: Eric Dumazet > Cc: Soheil Hassas Yeganeh > Cc: Wei Wang > Cc: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Very nice!

[PATCH net-next 1/2] ip: do not set RFS core on error queue reads

2018-01-03 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh We should only record RPS on normal reads and writes. In single threaded processes, all calls record the same state. In multi-threaded processes where a separate thread processes errors, the RFS table mispredicts. Note that, when CONFIG_RPS is disabled

[PATCH net-next 2/2] net: revert "Update RFS target at poll for tcp/udp"

2018-01-03 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh On multi-threaded processes, one common architecture is to have one (or a small number of) threads polling sockets, and a considerably larger pool of threads reading form and writing to the sockets. When we set RPS core on tcp_poll() or udp_poll() we essentially steer

[PATCH net] tcp: limit sk_rcvlowat by the maximum receive buffer

2018-06-08 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh The user-provided value to setsockopt(SO_RCVLOWAT) can be larger than the maximum possible receive buffer. Such values mute POLLIN signals on the socket which can stall progress on the socket. Limit the user-provided value to half of the maximum receive buffer, i.e

[PATCH net-next] tcp: improve recv_skip_hint for tcp_zerocopy_receive

2019-10-10 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh tcp_zerocopy_receive() rounds down the zc->length a multiple of PAGE_SIZE. This results in two issues: - tcp_zerocopy_receive sets recv_skip_hint to the length of the receive queue if the zc->length input is smaller than the PAGE_SIZE, even though the d

Re: [PATCH net-next] tcp: cleanup sk_tx_skb_cache before reuse

2019-03-29 Thread Soheil Hassas Yeganeh
ot;tcp: add one skb cache for tx") > Signed-off-by: Eric Dumazet > Cc: Soheil Hassas Yeganeh > Cc: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Nice catch! Thank you! > --- > net/ipv4/tcp.c | 2 ++ > 1 file changed, 2 insertions(+) &

Re: [PATCH net] dctcp: more accurate tracking of packets delivery

2019-04-11 Thread Soheil Hassas Yeganeh
ntly, calling it only once per RTT. > > Signed-off-by: Eric Dumazet > Cc: Yuchung Cheng > Cc: Neal Cardwell > Cc: Soheil Hassas Yeganeh > Cc: Florian Westphal > Cc: Daniel Borkmann > Cc: Lawrence Brakmo > Cc: Abdul Kabbani Acked-by: Soheil Hassas Yeganeh Tha

Re: [PATCH net-next] tcp: properly reset skb->truesize for tx recycling

2019-04-19 Thread Soheil Hassas Yeganeh
:/ > > Fixes: 472c2e07eef0 ("tcp: add one skb cache for tx") > Signed-off-by: Eric Dumazet > Cc: Soheil Hassas Yeganeh > Cc: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Nice catch! Thank you for the fix. > --- > net/ipv4/tcp.c | 2 +- > 1 file changed, 1

[PATCH net-next 2/2] tcp: schedule EPOLLOUT after a partial sendmsg

2020-09-14 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh For EPOLLET, applications must call sendmsg until they get EAGAIN. Otherwise, there is no guarantee that EPOLLOUT is sent if there was a failure upon memory allocation. As a result on high-speed NICs, userspace observes multiple small sendmsgs after a partial sendmsg

[PATCH net-next 1/2] tcp: return EPOLLOUT from tcp_poll only when notsent_bytes is half the limit

2020-09-14 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh If there was any event available on the TCP socket, tcp_poll() will be called to retrieve all the events. In tcp_poll(), we call sk_stream_is_writeable() which returns true as long as we are at least one byte below notsent_lowat. This will result in quite a few

Re: [PATCH net-next] tcp: remove loop to compute wscale

2018-11-29 Thread Soheil Hassas Yeganeh
On Thu, Nov 29, 2018 at 10:56 AM Eric Dumazet wrote: > > We can remove the loop and conditional branches > and compute wscale efficiently thanks to ilog2() > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Very nice, thank you, Eric! > --- > net/

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

2018-12-05 Thread Soheil Hassas Yeganeh
TCP is limited by receive > window") > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Excellent catch! Thank you for the fix, Eric! > --- > net/ipv4/tcp_output.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/n

Re: [PATCH net] tcp: allow MSG_ZEROCOPY transmission also in CLOSE_WAIT state

2019-01-10 Thread Soheil Hassas Yeganeh
;tcp: enable MSG_ZEROCOPY") > Reported-by: Marek Majkowski > Signed-off-by: Willem de Bruijn > CC: Yuchung Cheng > CC: Neal Cardwell > CC: Soheil Hassas Yeganeh > CC: Alexey Kodanev Acked-by: Soheil Hassas Yeganeh Thank you for the fix! > --- > > This is a narro

Re: [PATCH net-next 00/11] tcp: remove code from tcp_create_openreq_child()

2019-01-17 Thread Soheil Hassas Yeganeh
/ipv4/tcp_minisocks.c | 34 ---------- > > 2 files changed, 20 insertions(+), 35 deletions(-) > > > > -- > Entire patch set looks great to me! > > Acked-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Thank you very much, Eric, for the nice code removal! > > 2.20.1.321.g9e740568ce-goog > >

Re: [PATCH net-next] net: loopback: clear skb->tstamp before netif_rx()

2018-10-19 Thread Soheil Hassas Yeganeh
> Signed-off-by: Eric Dumazet > Cc: Willem de Bruijn > Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Thank you, Eric! > --- > drivers/net/loopback.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/loop

Re: [PATCH net-next] tcp: handle EOR and FIN conditions the same in tcp_tso_should_defer()

2018-12-10 Thread Soheil Hassas Yeganeh
EOR flag. > > Both flags should be handled at the same time, after all other > heuristics have been considered. They both mean that no more bytes > can be added to this skb by an application. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Thank you Eric for the

[PATCH net-next 1/2] tcp: set recv_skip_hint when tcp_inq is less than PAGE_SIZE

2018-09-26 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh When we have less than PAGE_SIZE of data on receive queue, we set recv_skip_hint to 0. Instead, set it to the actual number of bytes available. Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet --- net/ipv4/tcp.c | 14 +- 1 file changed

[PATCH net-next 2/2] tcp: adjust rcv zerocopy hints based on frag sizes

2018-09-26 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh When SKBs are coalesced, we can have SKBs with different frag sizes. Some with PAGE_SIZE and some not with PAGE_SIZE. Since recv_skip_hint is always set to the full SKB size, it can overestimate the amount that should be read using normal read for coalesced packets

Re: [PATCH net 2/2] tcp: tcp_v4_err() should be more careful

2019-02-15 Thread Soheil Hassas Yeganeh
If there is no packet in retransmit queue, we should > > avoid a NULL deref. > > > > Signed-off-by: Eric Dumazet > > Reported-by: soukjin bae > > --- > > net/ipv4/tcp_ipv4.c | 5 - > > 1 file changed, 4 insertions(+), 1 deletion(-) > >

Re: [PATCH net-next 2/4] tcp: do not force quickack when receiving out-of-order packets

2018-05-17 Thread Soheil Hassas Yeganeh
compression or losses. > > We plan to add SACK compression in the following patch, we > must therefore not call tcp_enter_quickack_mode() > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Thank you, Eric!

Re: [PATCH net-next 1/2] tcp: add max_quickacks param to tcp_incr_quickack and tcp_enter_quickack_mode

2018-05-22 Thread Soheil Hassas Yeganeh
On Mon, May 21, 2018 at 6:08 PM, Eric Dumazet wrote: > We want to add finer control of the number of ACK packets sent after > ECN events. > > This patch is not changing current behavior, it only enables following > change. > > Signed-off-by: Eric Dumazet Acked-by:

Re: [PATCH net-next 2/2] tcp: do not aggressively quick ack after ECN events

2018-05-22 Thread Soheil Hassas Yeganeh
nough. > > This should reduce the extra load noticed in DCTCP environments, > after congestion events. > > This is part 2 of our effort to reduce pure ACK packets. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Thanks for the patch!

Re: [PATCH net] tcp: when scheduling TLP, time of RTO should account for current ACK

2017-11-17 Thread Soheil Hassas Yeganeh
ayed ACKs), then > the TLP timer fires too quickly. > > Fixes: df92c8394e6e ("tcp: fix xmit timer to only be reset if data > ACKed/SACKed") > Signed-off-by: Neal Cardwell > Signed-off-by: Yuchung Cheng > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Nice fix. Thank you, Neal!

Re: [PATCH net-next] tcp: force a PSH flag on TSO packets

2019-09-10 Thread Soheil Hassas Yeganeh
ivers. > > It has been used at Google for about four years, > and has been discussed at various networking conferences. > > [1] segments smaller than MSS already have PSH flag set > by tcp_sendmsg() / tcp_mark_push(), unless MSG_MORE > has been requested by the user. >

Re: [PATCH v5 2/2] tcp: Add snd_wnd to TCP_INFO

2019-09-14 Thread Soheil Hassas Yeganeh
_wnd, the receive window that the receiver has advertised to > > > the sender. > > > > This serves the purpose of adding an additional __u32 to avoid the > > would-be hole caused by the addition of the tcpi_rcvi_ooopack field. > > > > Signed-off-by: Thomas Higdon

Introducing Transperf

2019-09-26 Thread Soheil Hassas Yeganeh
We'd like to announce the availability of transperf: a network protocol performance testing tool. transperf enables users to test TCP performance over a variety of emulated network scenarios (using netem), including RTT, bottleneck bandwidth, and policed rate that can change over time. The tool su

Re: [PATCH net-next] tcp: tcp_fragment() should not assume rtx skbs

2017-11-02 Thread Soheil Hassas Yeganeh
m added later (but in same linux >> version) >> for rtx-rb-tree to fix the bug. >> >> Fixes: e2080072ed2d ("tcp: new list for sent but unacked skbs for RACK >> recovery") >> Signed-off-by: Eric Dumazet > > Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Nice! Thank you, Eric!

Re: [PATCH iproute2] tc: fq: support low_rate_threshold attribute

2017-09-08 Thread Soheil Hassas Yeganeh
rate_threshold 10Mbit > lpaa5:/tmp# ./netperf -H lpaa6 -t TCP_RR -l10 -- -q 50 -r 300,300 -o > P99_LATENCY > 99th Percentile Latency Microseconds > 858 > > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Thank you, Eric!

Re: [PATCH net] tcp: update skb->skb_mstamp more carefully

2017-09-14 Thread Soheil Hassas Yeganeh
ue. >> ... >>> >>> Signed-off-by: Eric Dumazet >>> Reported-by: liujian >>> --- >>> net/ipv4/tcp_output.c | 19 --- >>> 1 file changed, 12 insertions(+), 7 deletions(-) >> >> Acked-by: Neal Cardwell > Acked-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Very nice! Thank you, Eric!

Re: [PATCH net] tcp: fix data delivery rate

2017-09-15 Thread Soheil Hassas Yeganeh
igned-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Nice catch!

Re: [PATCH net] tcp: refresh tcp_mstamp from timers callbacks

2017-12-12 Thread Soheil Hassas Yeganeh
t; >> Even if RFC 7323 does not request it, this is consistent to what linux >> did in the past, when TS values were based on jiffies. >> >> Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path") >> Signed-off-by: Eric Dumazet >> Cc: Soh

Re: [PATCH net-next 0/6] tcp: remove non GSO code

2018-02-19 Thread Soheil Hassas Yeganeh
only deals with CHECKSUM_PARTIAL > tcp: remove dead code from tcp_set_skb_tso_segs() > tcp: remove dead code after CHECKSUM_PARTIAL adoption Acked-by: Soheil Hassas Yeganeh Very nice patch-series! Thank you, Eric! >include/net/sock.h| 10

Re: [PATCH net] tcp_bbr: better deal with suboptimal GSO

2018-02-21 Thread Soheil Hassas Yeganeh
; 631 > > 517 > > > > After patch : > > # for f in {1..5}; do ./super_netperf 1 -H lpaa24 -- -K bbr; done > >1733 (ss -temoi shows cwnd is around 386 ) > >1778 > >1746 > >1781 > >1718 > > > > Fixes: 0f8782ea14

Re: [PATCH] net/packet: fix missing net_device reference release

2017-05-12 Thread Soheil Hassas Yeganeh
ing control messages") > Signed-off-by: Douglas Caetano dos Santos Acked-by: Soheil Hassas Yeganeh > --- > net/packet/af_packet.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c > index

[PATCH net] tcp: eliminate negative reordering in tcp_clean_rtx_queue

2017-05-15 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh tcp_ack() can call tcp_fragment() which may dededuct the value tp->fackets_out when MSS changes. When prior_fackets is larger than tp->fackets_out, tcp_clean_rtx_queue() can invoke tcp_update_reordering() with negative values. This results in absurd tp->

Re: [PATCH net-next] tcp: internal implementation for pacing

2017-05-15 Thread Soheil Hassas Yeganeh
1 > 17 83 0 0 > 4 0 0 259829168 46024 27105840016 0 1688472 197158 1 > 17 82 0 0 > 3 0 0 259830224 46024 271040800 0 0 1692450 197212 0 > 18 82 0 0 > > As expected, number of interrupts per second is very different. &g

[PATCH net-next] tcp: warn on negative reordering values

2017-05-16 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Commit bafbb9c73241 ("tcp: eliminate negative reordering in tcp_clean_rtx_queue") fixes an issue for negative reordering metrics. To be resilient to such errors, warn and return when a negative metric is passed to tcp_update_reordering(). Signed-off-

Re: [PATCH net-next 01/15] tcp: use tp->tcp_mstamp in output path

2017-05-17 Thread Soheil Hassas Yeganeh
p only when necessary. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > net/ipv4/tcp_ipv4.c | 1 + > net/ipv4/tcp_output.c | 21 +++-- > net/ipv4/tcp_recovery.c | 1 - > net/ipv4/tcp_timer.c| 3 ++- > 4 files changed, 14 insert

Re: [PATCH net-next 02/15] tcp: introduce tcp_jiffies32

2017-05-17 Thread Soheil Hassas Yeganeh
n the future to have 1ms TCP TS clock, > regardless of HZ value, we want to cleanup things. > > tcp_jiffies32 is the truncated jiffies value, > which will be used only in places where we want a 'host' > timestamp. > > Signed-off-by: Eric Dumazet Acked-by:

Re: [PATCH net-next 03/15] dccp: do not use tcp_time_stamp

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > Use our own macro instead of abusing tcp_time_stamp > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > net/dccp/ccids/ccid2.c | 8 > net/dccp/ccids/ccid2.h | 2 +- > 2 files change

Re: [PATCH net-next 04/15] tcp: use tcp_jiffies32 to feed tp->lsndtime

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > Use tcp_jiffies32 instead of tcp_time_stamp to feed > tp->lsndtime. > > tcp_time_stamp will soon be a litle bit more expensive > than simply reading 'jiffies'. > > Signed-off-by: Eric Dumazet

Re: [PATCH net-next 06/15] tcp_bbr: use tcp_jiffies32 instead of tcp_time_stamp

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > Use tcp_jiffies32 instead of tcp_time_stamp, since > tcp_time_stamp will soon be only used for TCP TS option. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > net/ipv4/tcp_bbr.c | 12 ++--

Re: [PATCH net-next 05/15] tcp: use tcp_jiffies32 to feed tp->snd_cwnd_stamp

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > Use tcp_jiffies32 instead of tcp_time_stamp to feed > tp->snd_cwnd_stamp. > > tcp_time_stamp will soon be a litle bit more expensive > than simply reading 'jiffies'. > > Signed-off-by: Eric Dumazet

Re: [PATCH net-next 07/15] tcp: bic,cubic: use tcp_jiffies32 instead of tcp_time_stamp

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > Use tcp_jiffies32 instead of tcp_time_stamp, since > tcp_time_stamp will soon be only used for TCP TS option. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > net/ipv4/tcp_bic.c | 6

Re: [PATCH net-next 08/15] tcp: use tcp_jiffies32 for rcv_tstamp and lrcvtime

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > Use tcp_jiffies32 instead of tcp_time_stamp, since > tcp_time_stamp will soon be only used for TCP TS option. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > include/net/tcp.h|

Re: [PATCH net-next 10/15] tcp: uses jiffies_32 to feed tp->chrono_start

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > tcp_time_stamp will no longer be tied to jiffies. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > net/ipv4/tcp.c| 2 +- > net/ipv4/tcp_output.c | 2 +- > 2 files changed, 2 inser

Re: [PATCH net-next 09/15] tcp: use tcp_jiffies32 to feed probe_timestamp

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > Use tcp_jiffies32 instead of tcp_time_stamp, since > tcp_time_stamp will soon be only used for TCP TS option. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > net/ipv4/tcp_output.c | 6

Re: [PATCH net-next 13/15] tcp_lp: cache tcp_time_stamp

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > tcp_time_stamp will become slightly more expensive soon, > cache its value. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > net/ipv4/tcp_lp.c | 7 --- > 1 file changed, 4 insertions(+), 3

Re: [PATCH net-next 14/15] tcp: replace misc tcp_time_stamp to tcp_jiffies32

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > After this patch, all uses of tcp_time_stamp will require > a change when we introduce 1 ms and/or 1 us TCP TS option. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > net/ipv4/tcp.c

Re: [PATCH net-next 12/15] tcp_westwood: use tcp_jiffies32 instead of tcp_time_stamp

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > This CC does not need 1 ms tcp_time_stamp and can use > the jiffy based 'timestamp'. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > net/ipv4/tcp_westwood.c | 6 +++--- > 1 f

Re: [PATCH net-next 11/15] tcp: use tcp_jiffies32 in __tcp_oow_rate_limited()

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 5:00 PM, Eric Dumazet wrote: > This place wants to use tcp_jiffies32, this is good enough. > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > net/ipv4/tcp_input.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) &g

Re: [PATCH net-next 15/15] tcp: switch TCP TS option (RFC 7323) to 1ms clock

2017-05-17 Thread Soheil Hassas Yeganeh
/slides-97-tcpm-tcp-options-for-low-latency-00.pdf > > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh > --- > include/linux/skbuff.h | 62 +- > include/linux/tcp.h | 22 - > include/net/tcp.h

Re: [PATCH v3 net-next 4/7] net: add new control message for incoming HW-timestamped packets

2017-05-17 Thread Soheil Hassas Yeganeh
On Tue, May 16, 2017 at 8:44 AM, Miroslav Lichvar wrote: > Add SOF_TIMESTAMPING_OPT_PKTINFO option to request a new control message > for incoming packets with hardware timestamps. It contains the index of > the real interface which received the packet and the length of the > packet at layer 2. >

Re: [PATCH net-next] tcp: fix tcp_rearm_rto()

2017-05-18 Thread Soheil Hassas Yeganeh
rto from jiffies to usec, compute a time difference > in usec, then convert the delta to HZ units. > > Fixes: 9a568de4818d ("tcp: switch TCP TS option (RFC 7323) to 1ms clock") > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Thank you for the quick fix, Eric!

Re: [PATCH net-next] tcp: fix tcp_probe_timer() for TCP_USER_TIMEOUT

2017-05-21 Thread Soheil Hassas Yeganeh
ption (RFC 7323) to 1ms clock") > Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Thank you for the fix, Eric!

Re: [PATCH net-next] tcp: fix TCP_SYNCNT flakes

2017-05-23 Thread Soheil Hassas Yeganeh
4818d ("tcp: switch TCP TS option (RFC 7323) to 1ms clock") > Signed-off-by: Eric Dumazet > Signed-off-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Nice!

Re: commit f5f99309 (sock: do not set sk_err in sock_dequeue_err_skb) has broken ping

2017-06-01 Thread Soheil Hassas Yeganeh
On Thu, Jun 1, 2017 at 10:00 AM, Cyril Hrubis wrote: > I've bisected the problem to this commit: > > commit f5f99309fa7481f59a500f0d08f3379cd6424c1f (HEAD, refs/bisect/bad) > Author: Soheil Hassas Yeganeh > Date: Thu Nov 3 18:24:27 2016 -0400 > >

Re: commit f5f99309 (sock: do not set sk_err in sock_dequeue_err_skb) has broken ping

2017-06-01 Thread Soheil Hassas Yeganeh
g patch to see if it fixes your issue? >From 3ec438460425d127741b20f03f78644c9e441e8c Mon Sep 17 00:00:00 2001 From: Soheil Hassas Yeganeh Date: Thu, 1 Jun 2017 10:34:09 -0400 Subject: [PATCH net] sock: reset sk_err when the error queue is empty Before f5f99309fa74 (sock: do

Re: commit f5f99309 (sock: do not set sk_err in sock_dequeue_err_skb) has broken ping

2017-06-01 Thread Soheil Hassas Yeganeh
On Thu, Jun 1, 2017 at 11:10 AM, Cyril Hrubis wrote: >> Thank you for the confirmation. Could you please try the following >> patch to see if it fixes your issue? > > Does not seem to help, I still got the same bussy loop. Thank you for trying the patch. Unfortunately, I can't reproduce on my mac

Re: commit f5f99309 (sock: do not set sk_err in sock_dequeue_err_skb) has broken ping

2017-06-01 Thread Soheil Hassas Yeganeh
On Thu, Jun 1, 2017 at 11:36 AM, Cyril Hrubis wrote: > It seems to repeatedly produce (until I plug the cable back): > > ee_errno = 113 ee_origin = 2 ee_type = 3 ee_code = 1 ee_info = 0 ee_data = 0 > > So we get EHOSTUNREACH on SO_EE_ORIGIN_ICMP. Thank you very much! I have a wild guess that, whe

  1   2   3   >