From patchwork Thu Jul 29 21:23:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiang Wang ." X-Patchwork-Id: 12409853 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EE63C4338F for ; Thu, 29 Jul 2021 21:24:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 276FD60F6F for ; Thu, 29 Jul 2021 21:24:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234158AbhG2VYc (ORCPT ); Thu, 29 Jul 2021 17:24:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234153AbhG2VYb (ORCPT ); Thu, 29 Jul 2021 17:24:31 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D205C0613CF for ; Thu, 29 Jul 2021 14:24:27 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id e5so8512780pld.6 for ; Thu, 29 Jul 2021 14:24:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bhGcOUQjFyv9qKej/FfYNNPvlVrV7Is0yhKG/rkyjT0=; b=tMVW2kJI+MM5+iQPUQUAbpfsUS+j5kqaGJ77UoKjLLiMWAlEzGF9s9e42dtbBXaWWh lpTdxwJ1BsaRoSW89ntPIWuunBv3CYPtAl5irkVszvUD+y1A33OHtZGqTxB2ANvj9dWq ckYPzoKks9a/+DJSmYCIUNIots6glRfhrj+uZRJ/WElDCxWpmNy5pPKB/GB61/kC33wg 2oIAU2Y4ruZ1Syn7texzmL3MSsdCAu5YY2Qj6ILsy9df0+hEcQHLYxM0PT6o5PZfKHZr FFNcdX/aLg7VZp7aRPFdeyhuDE34udmmZmiakyWwODw5XIf685DOcB/N84nIEas9nMBS Np4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bhGcOUQjFyv9qKej/FfYNNPvlVrV7Is0yhKG/rkyjT0=; b=o4hzE7ARFapy7s3rVTWYzNEApERZlL69hD6wAxiebpQFXnG588fCQlp3ILgmbnwTht FdVQML+FulIRZW/9O5a9oD2+m4mFAhqv7NIIT9fO6ixC8URe/Z5/IkaeSw1WMYAVpRiV OVlQwrm0CWDkBWNxy4g43soNXQ0t4fPZlWjToxV4AZ9acOxlg/ADgZZrREdaxR4MHc29 +o7XWEZaMgrNF9UTckI23zb41qUlvG7fTS7K7guY0rieoe3AZtLdwxASD0az/JS9oPQD 40M5QKYVpfo3l29UpB6SvXBj5wpBAxjI8YMvU7AqDpYadG6LyalQ6oi5yiUEpiKABpjD XJHQ== X-Gm-Message-State: AOAM531GWvLNJfraqa9jDGlRDh1XCiBQRypvHXdXC3XtTSTYqkzHGvot ALrj+zlmxqGNoPgH6gFTDyrV+g== X-Google-Smtp-Source: ABdhPJz4+6Qd39ubFrTCqLVoQ7dWmWNt2B5ozeKGFEYNOy6d8WfsGkVhKdhpd2Tc6fu9mRxXIKrr6g== X-Received: by 2002:a17:902:da82:b029:12b:ac76:204a with SMTP id j2-20020a170902da82b029012bac76204amr6395381plx.56.1627593866842; Thu, 29 Jul 2021 14:24:26 -0700 (PDT) Received: from ip-10-124-121-13.byted.org (ec2-54-241-92-238.us-west-1.compute.amazonaws.com. [54.241.92.238]) by smtp.gmail.com with ESMTPSA id c15sm4686258pfl.181.2021.07.29.14.24.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jul 2021 14:24:26 -0700 (PDT) From: Jiang Wang To: netdev@vger.kernel.org Cc: cong.wang@bytedance.com, duanxiongchun@bytedance.com, xieyongji@bytedance.com, chaiwen.cc@bytedance.com, John Fastabend , "David S. Miller" , Jakub Kicinski , Daniel Borkmann , Jakub Sitnicki , Lorenz Bauer , Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Shuah Khan , Johan Almbladh , linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH bpf-next v2 3/5] selftest/bpf: add tests for sockmap with unix stream type. Date: Thu, 29 Jul 2021 21:23:59 +0000 Message-Id: <20210729212402.1043211-4-jiang.wang@bytedance.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210729212402.1043211-1-jiang.wang@bytedance.com> References: <20210729212402.1043211-1-jiang.wang@bytedance.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Add two tests for unix stream to unix stream redirection in sockmap tests. Signed-off-by: Jiang Wang Reviewed-by: Cong Wang Acked-by: John Fastabend --- tools/testing/selftests/bpf/prog_tests/sockmap_listen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c index a9f1bf9d5..7a976d432 100644 --- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c @@ -2020,11 +2020,13 @@ void test_sockmap_listen(void) run_tests(skel, skel->maps.sock_map, AF_INET); run_tests(skel, skel->maps.sock_map, AF_INET6); test_unix_redir(skel, skel->maps.sock_map, SOCK_DGRAM); + test_unix_redir(skel, skel->maps.sock_map, SOCK_STREAM); skel->bss->test_sockmap = false; run_tests(skel, skel->maps.sock_hash, AF_INET); run_tests(skel, skel->maps.sock_hash, AF_INET6); test_unix_redir(skel, skel->maps.sock_hash, SOCK_DGRAM); + test_unix_redir(skel, skel->maps.sock_hash, SOCK_STREAM); test_sockmap_listen__destroy(skel); }