From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: Re: [PATCH bpf-next 0/5] fix test_sockmap Date: Fri, 18 May 2018 09:42:14 -0700 Message-ID: <9c41f494-fc95-e4d5-067f-e000eedc7d7f@gmail.com> References: <20180518071753.4768-1-bhole_prashant_q7@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "David S . Miller" , Shuah Khan , netdev@vger.kernel.org To: Prashant Bhole , Alexei Starovoitov , Daniel Borkmann Return-path: Received: from mail-pl0-f67.google.com ([209.85.160.67]:37107 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751395AbeERQmU (ORCPT ); Fri, 18 May 2018 12:42:20 -0400 Received: by mail-pl0-f67.google.com with SMTP id w19-v6so4893950plq.4 for ; Fri, 18 May 2018 09:42:20 -0700 (PDT) In-Reply-To: <20180518071753.4768-1-bhole_prashant_q7@lab.ntt.co.jp> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 05/18/2018 12:17 AM, Prashant Bhole wrote: > This series fixes bugs in test_sockmap code. They weren't caught > previously because failure in RX/TX thread was not notified to the > main thread. > > Also fixed data verification logic and slightly improved test output > such that parameters values (cork, apply, start, end) of failed test > can be easily seen. > Great, this was on my list so thanks for taking care of it. > Note: Even after fixing above problems there are issues with tests > which set cork parameter. Tests fail (RX thread timeout) when cork > value is non-zero and overall data sent by TX thread isn't multiples > of cork value. This is expected. When 'cork' is set the sender should only xmit the data when 'cork' bytes are available. If the user doesn't provide the N bytes the data is cork'ed waiting for the bytes and if the socket is closed the state is cleaned up. What these tests are testing is the cleanup path when a user doesn't provide the N bytes. In practice this is used to validate headers and prevent users from sending partial headers. We want to keep these tests because they verify a tear-down path in the code. After your changes do these get reported as failures? If so we need to account for the above in the calculations. > > Prashant Bhole (5): > selftests/bpf: test_sockmap, check test failure > selftests/bpf: test_sockmap, join cgroup in selftest mode > selftests/bpf: test_sockmap, fix test timeout > selftests/bpf: test_sockmap, fix data verification > selftests/bpf: test_sockmap, print additional test options > > tools/testing/selftests/bpf/test_sockmap.c | 76 +++++++++++++++++++++++------- > 1 file changed, 58 insertions(+), 18 deletions(-) >