From patchwork Thu Apr 6 13:02:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kal Cutter Conley X-Patchwork-Id: 13203290 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 557B6C761A6 for ; Thu, 6 Apr 2023 13:02:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237218AbjDFNCv (ORCPT ); Thu, 6 Apr 2023 09:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236914AbjDFNCp (ORCPT ); Thu, 6 Apr 2023 09:02:45 -0400 Received: from mail-wr1-x462.google.com (mail-wr1-x462.google.com [IPv6:2a00:1450:4864:20::462]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 936238A53 for ; Thu, 6 Apr 2023 06:02:38 -0700 (PDT) Received: by mail-wr1-x462.google.com with SMTP id i7so436431wrc.2 for ; Thu, 06 Apr 2023 06:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dectris.com; s=google; t=1680786157; 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=fYGBsedO7sFGOwkuHkxlhxHdXQ5kL1JPCs+UK404gumJcIWP5To2X9LbN8Uu0zXRtp cFQizxbm8foNz1Iz01EY4Hf3rHlzhX34AB1b1usIpK9Akz3bisg30VWafpA26T6437sT V4IIF2WXJA3F9mAwJ+A+wXmSmRPn3NY37zBGc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680786157; 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=cATG6iRevc1fEzT3YvRm3dLGPEPFpb0CArxSqArGKtotO1fvK72WYvbFOEPQFWhebg JLvsmjxI1UmRcDCC8dN2X19dg5LCClC3sYa/JuKL8xBmR8q0Q2mw3WHB3JqZCPLEaTSa pI/z7J3iS64qx+bH7ok9LVLMWYbssKvH1huyRQD8/98LH9PpFE8HKrUuE+mEOSnkUlxQ CgZF+kGHP+3LbmI0C9/dSbjgJgsoFC7dkanxpxe3YB7ottBiLG3ITPHMd3vhOY1LQoRp zwDgM+/AvmglgOoiv9VdLwTr2QDsApVkT2To/tfSfqDAub6OooGeIiMgaZiQYtHxvC4z yfcA== X-Gm-Message-State: AAQBX9fFgX8Iyc3OAK0Cg4CvkUVs9JZwzF6KZVc8eyaBSpP3IbLEWRoT +7WbloCe6YgihJSuSW0CBQIvrvZEYbkpM/7ztwjs7lGpd+6l X-Google-Smtp-Source: AKy350Z7nWji5jZ/JhutfeuyyKpRm9ttRpjaDA26u8AtYWHHXOQbl1G71/2HXI1EXyGCEsSgLhbgJwy3mUrX X-Received: by 2002:a5d:4cc2:0:b0:2cf:f44e:45e1 with SMTP id c2-20020a5d4cc2000000b002cff44e45e1mr5992704wrt.19.1680786156773; Thu, 06 Apr 2023 06:02:36 -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 s3-20020adfeb03000000b002e62dd5b3d6sm65625wrn.3.2023.04.06.06.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 06:02:36 -0700 (PDT) X-Relaying-Domain: dectris.com From: Kal Conley To: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , 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 v3 2/3] selftests: xsk: Use hugepages when umem->frame_size > PAGE_SIZE Date: Thu, 6 Apr 2023 15:02:04 +0200 Message-Id: <20230406130205.49996-3-kal.conley@dectris.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230406130205.49996-1-kal.conley@dectris.com> References: <20230406130205.49996-1-kal.conley@dectris.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@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)