From patchwork Thu Feb 15 13:26:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Patchwork-Id: 13558382 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8BA712FF8C for ; Thu, 15 Feb 2024 13:26:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708003604; cv=none; b=ImCUFTe0FZNYiBGyJeKldFbOYdP3M7kgKObFua9dpbIAO46Sfx/HAznYIruQYVeSRglwxwabBeRj0qLMHLijqVrtpgSGQSQcVkKofgVTW42nV2w6xdG8/G+1Dru6Ih1ZgFhG2Hnf/Hbo/tPsjE1csWI1MG9oHFq3CqC9Rm7OcHQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708003604; c=relaxed/simple; bh=7R2FSTbqLoIJPgkJpGMiH1wCCoFDMC1EYWvrfRVf3zg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=RoDqVq6vQvrsECN4JnPXLRS3JLCQHMcmErUPRVe2kHUloF/q6G55o60ZJHOo8GBNfZn7U/SZFbMwhlODlZELycJRfBLR5oVr4FmrRCn8v+Wc3s/bHmSyWpW3lLx1ckoLM0uCN8Bksgzuai+4P0QgROJd6zGzt3mxQn3TMovMQ8E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=TIt5T8d5; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TIt5T8d5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708003601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FLw+lhy3W1tMloxBS/bRk4F1uzdmef+pWM5Uhua3Ilc=; b=TIt5T8d5Ms+3dyPU4CRI00020v9seB46Cd0S1AWu1zUD1C1IH3bvWw/MNmDTbS9b+EIVLx xNzye+994VS8FsbnVHmTmq7TKiwNOt33VkbE5auCQgYL9tPKteyu2lNS7NfmkgnAfwWIWd fBA6UUTSmjZOdr4e8HjTKmECF10HZS4= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-584-RZAW6l-8NY6g3iUJVQBj3w-1; Thu, 15 Feb 2024 08:26:40 -0500 X-MC-Unique: RZAW6l-8NY6g3iUJVQBj3w-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a2b068401b4so113935966b.1 for ; Thu, 15 Feb 2024 05:26:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708003599; x=1708608399; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FLw+lhy3W1tMloxBS/bRk4F1uzdmef+pWM5Uhua3Ilc=; b=ER2hZf+0mtaD46cpyDMZJ01heOxGsbEZHe21KVCSy77TzT6ua0umOXZNtenb9c81ZA ILUwhHu0PBb6zKTjvVMshJ+iPGkArVZyMzrZWAoXjlxVlnBnJ8Y2/FN0VcIydLQOCUdj oiJQ3LxeITaSzk3VSvIuj6HT2JmDnA7IONghbxdIwWP1IfPs6xlak5mwS9qE6IMTJZ+U mdTOD4d+aMm/7f6jqpenNsM18jvi+zOuDckiiw8LtQsoNTZmgMntoYzVM4Pl8dNNFXVB 8pBqI1sOKpWQlpv1Nv9ASMGAuWAMf4lpC/CtzpaAbj7+MV/enG/TbxrOVjp6/wsFATg8 eHZQ== X-Forwarded-Encrypted: i=1; AJvYcCWaItE+32YpMq1edtb9y2iJPDZgJtdRg5bvSKvPmfww+0T/sb060jhnpds7vCg72WvvVbpjFg3Z6xTP0wW1yAaHecHE X-Gm-Message-State: AOJu0Yyh5oGrNjGoqUshrohJgJ8BS9SQRVPR9sGa9Zgz/EQ8IdNbxLo2 fouofvC4C4gwqpwRNtk6ZMjZEhIsHh8IXBfh/SKWgBPk5Rz0a8QY4tGnb4jAeTtLnlE5Fis7b9a UngxW/xbBAxUPUtq8k0JGtA8Vc4qkQsT1Zfv5G0VStr2/qMj8/A== X-Received: by 2002:a17:906:ae4f:b0:a3c:ec8a:cf8e with SMTP id lf15-20020a170906ae4f00b00a3cec8acf8emr4141127ejb.24.1708003599185; Thu, 15 Feb 2024 05:26:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGh3w1124SAANXe3mn4J6Do4jPi80EvOoOD3rif4yZAfDqZu6lAM8VvVhIUSiVnk2Zi1Ps4LA== X-Received: by 2002:a17:906:ae4f:b0:a3c:ec8a:cf8e with SMTP id lf15-20020a170906ae4f00b00a3cec8acf8emr4141085ejb.24.1708003598746; Thu, 15 Feb 2024 05:26:38 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id r29-20020a50aadd000000b005603dea632esm558334edc.88.2024.02.15.05.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 05:26:37 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 98AF810F59B7; Thu, 15 Feb 2024 14:26:37 +0100 (CET) From: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Jesper Dangaard Brouer Cc: Alexander Lobakin , =?utf-8?q?Toke_H=C3=B8?= =?utf-8?q?iland-J=C3=B8rgensen?= , netdev@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH net-next 0/3] Change BPF_TEST_RUN use the system page pool for live XDP frames Date: Thu, 15 Feb 2024 14:26:29 +0100 Message-ID: <20240215132634.474055-1-toke@redhat.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Now that we have a system-wide page pool, we can use that for the live frame mode of BPF_TEST_RUN (used by the XDP traffic generator), and avoid the cost of creating a separate page pool instance for each syscall invocation. See the individual patches for more details. Toke Høiland-Jørgensen (3): net: Register system page pool as an XDP memory model bpf: test_run: Use system page pool for XDP live frame mode bpf: test_run: Fix cacheline alignment of live XDP frame data structures include/linux/netdevice.h | 1 + net/bpf/test_run.c | 138 +++++++++++++++++++------------------- net/core/dev.c | 13 +++- 3 files changed, 81 insertions(+), 71 deletions(-) Reviewed-by: Alexander Lobakin Tested-by: Alexander Lobakin