Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4023105rwl; Mon, 10 Apr 2023 05:08:57 -0700 (PDT) X-Google-Smtp-Source: AKy350bdUDtXP/OTXsR3mO5d9E1MmOdwXbg0ei9jT5fIxedMU0WktX577BfXvMqQDlxOY1h++LxH X-Received: by 2002:a05:6a20:6615:b0:da:d9e7:9a5d with SMTP id n21-20020a056a20661500b000dad9e79a5dmr9868430pzh.4.1681128536807; Mon, 10 Apr 2023 05:08:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681128536; cv=none; d=google.com; s=arc-20160816; b=g1NvpQLH8DTFZFEugdWV54VIdFibBlHd85TiqpW9ngHQEauxwYqHOpSlvAtHV9/QB/ gzGzp8IMce+iHbHVZMquCxK4U5xHvaqJIydVB1KuX65RVreyz2e29rIWB7rlUX6nx16S hK86XzJ0H5qBAmBa0Ntwd9sUXlHRLm7coLFBfTReoAtGzy/g/8f6Ig/ej4NPWL3i/LtK r8q83oj3/uAvcURd03uhCET2/8EHdDT8SiL8mTXYahQHfGKk/w+zwq3H0DkaLM6dTag9 UZljdlUxEeaETDTMi+BiI4tqvbrK21O8kgme5LUkci7gRkBqPpokpeim1Fo347qG8Nts 0nrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xNbic2k37/uJb//jGocyCjKfzDNnw7vJzB+19fgD/vU=; b=aJaXQXK8340JMBebaL/x7ODsl9DM/NVqXNZlZ2lEAZSQp1aBe7boI0/tR0xVHV1Vk8 sKkwi5t+/FTajzl018fmIZfTLV1SJgRIEgX1bzmyA/bNm1XNFi2gbh5ifvRV9DnGaYIF B8Zo2gjEv46WoiJOJlXC0rwID5ZgLWR1UjZo8f7LJD9vujlvGlSkZQYjdw5Ifm52a9To I36GEFt61/Q0ITPyfT6veMMmz+z4f/igQR9XYmhd6kOMzNlAnXaua5S5x0poiKN3zaf2 EOmj3X1PcOumnYu1kxsO2EAnGDQ61QlzUCg5C4uFubVCJUn7ZsEnDZV5Ov2hIIV8SsN2 /gGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dectris.com header.s=google header.b=lFDITA5h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dectris.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h62-20020a638341000000b0051805159a1fsi6415673pge.462.2023.04.10.05.08.45; Mon, 10 Apr 2023 05:08:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@dectris.com header.s=google header.b=lFDITA5h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dectris.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229848AbjDJMIQ (ORCPT + 99 others); Mon, 10 Apr 2023 08:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229781AbjDJMIC (ORCPT ); Mon, 10 Apr 2023 08:08:02 -0400 Received: from mail-ej1-x663.google.com (mail-ej1-x663.google.com [IPv6:2a00:1450:4864:20::663]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B883819A7 for ; Mon, 10 Apr 2023 05:07:58 -0700 (PDT) Received: by mail-ej1-x663.google.com with SMTP id q23so2534271ejz.3 for ; Mon, 10 Apr 2023 05:07:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dectris.com; s=google; t=1681128477; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xNbic2k37/uJb//jGocyCjKfzDNnw7vJzB+19fgD/vU=; b=lFDITA5hSIO3u8hVF0yCmco2vpi7O1SZ04BShKnCIMBu9qWkXJHcVolsDdPBa0XnUt QBPL+VSVMCKgFgUGuUEsm69+xFRAvRV+4iNWrKhre0ZGaNgVteqGAqqWpvE8mevhZ/sK cob8b+aOSEtLhNj+/1HmHwf0IvR/ENfA/0UlM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681128477; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xNbic2k37/uJb//jGocyCjKfzDNnw7vJzB+19fgD/vU=; b=CG13ZPxkerd7ZPI834Bf5AAnRpuhWw8gNijCPN/Wm3Qtt0OVcXq/k78x8KZMu1YDDd WFOALWQIKShrKJTD5wRNSMP+pdtfjSIlm4WCtJZd1debdj5bJepMmCWO1caMPi1EtjP9 bJr3xBAIqwnMqIHxYc1sWUyd3CXvXkN70v0vmbbtMWqdjvUtflzcu9rhjj3C9GOF0qqC zxCUwYX1M8ftiVxuv2FQ8JIvg01srXFAV/sky5uyI6mTMYKWl4ig4Voll6qF4oDsVpfG 25gDs82VKI8Zy4rMDuf3vPwH3YuBZp21ahZdZEr4XSUra4NPiC17eAjaLXg8tUifCrX1 3LbA== X-Gm-Message-State: AAQBX9cNPGZdXXFa3P8zRMzppU88SqTx5mdgbAIzelPex292woB2+vPn pAFDXy0uVna5MkbtC6BGpDF3SBGQJDiz3JFfpn3UMDS5mil8 X-Received: by 2002:a17:907:2d2a:b0:8b1:7eba:de5 with SMTP id gs42-20020a1709072d2a00b008b17eba0de5mr7635152ejc.10.1681128477114; Mon, 10 Apr 2023 05:07:57 -0700 (PDT) Received: from fedora.dectris.local (dect-ch-bad-pfw.cyberlink.ch. [62.12.151.50]) by smtp-relay.gmail.com with ESMTPS id nb39-20020a1709071ca700b008b1fc5abd08sm2089769ejc.56.2023.04.10.05.07.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 05:07:57 -0700 (PDT) X-Relaying-Domain: dectris.com From: Kal Conley To: Magnus Karlsson , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Maciej Fijalkowski , Jonathan Lemon , Andrii Nakryiko , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan Cc: Kal Conley , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH bpf-next v5 3/4] selftests: xsk: Use hugepages when umem->frame_size > PAGE_SIZE Date: Mon, 10 Apr 2023 14:06:28 +0200 Message-Id: <20230410120629.642955-4-kal.conley@dectris.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230410120629.642955-1-kal.conley@dectris.com> References: <20230410120629.642955-1-kal.conley@dectris.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org HugeTLB UMEMs now support chunk_size > PAGE_SIZE. Set MAP_HUGETLB when frame_size > PAGE_SIZE for future tests. Signed-off-by: Kal Conley --- tools/testing/selftests/bpf/xskxceiver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selftests/bpf/xskxceiver.c index 5a9691e942de..7eccf57a0ccc 100644 --- a/tools/testing/selftests/bpf/xskxceiver.c +++ b/tools/testing/selftests/bpf/xskxceiver.c @@ -1289,7 +1289,7 @@ static void thread_common_ops(struct test_spec *test, struct ifobject *ifobject) void *bufs; int ret; - if (ifobject->umem->unaligned_mode) + if (ifobject->umem->frame_size > sysconf(_SC_PAGESIZE) || ifobject->umem->unaligned_mode) mmap_flags |= MAP_HUGETLB; if (ifobject->shared_umem) -- 2.39.2