From patchwork Tue Feb 20 14:57:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Parthakumar Roy X-Patchwork-Id: 137319 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 24B5643C03; Tue, 27 Feb 2024 07:02:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94B3A4027D; Tue, 27 Feb 2024 07:02:29 +0100 (CET) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by mails.dpdk.org (Postfix) with ESMTP id D005A40289 for ; Tue, 20 Feb 2024 15:57:38 +0100 (CET) Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-7874a96a01dso171329285a.3 for ; Tue, 20 Feb 2024 06:57:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708441058; x=1709045858; darn=dpdk.org; 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=yxOKb8VnSONdTuRtDZBPYB/0ZZrchEHw9l64Yt4A6iY=; b=fko0eFvtHiNsxsnozIid0kV1MX/5QJ00d52CbxlDyT7771D5MtK6QewTnsu9d/yz0Q Qn86gDwmjWhcqXwx8BYqTRvwzljk4F8Fu3k5rDwbQgJXXB9VRVhx5Ayrt/hooIBBoDoE 5rmPlxOgFJKttqbdokp4rSoyXAmfKLgFrZS83EJLossirKxpGvhEMdLYdpjvrksWMB2G tu3hQcjsZSOE+TVfDcCH2RF/HwWji/KqSPaRXui9kRHDaXEUBcLRA8Csh8zE+qUH4sHS 0rotXGOMB29QsjDFg2fi2pZULNmCu42RxCVFwj/fgKFFhmtMGFxFSM/vSwh1PF7oRhRa cHAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708441058; x=1709045858; 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=yxOKb8VnSONdTuRtDZBPYB/0ZZrchEHw9l64Yt4A6iY=; b=LRI+4ycjK2+sCrAn+L4eM53K4yKeUnheRKgXjM/nFNDyVff1EPogbPYc5pU65p/i55 0Vr2sHvyXGdi37rQz1R+vZfKoDSSU89pWU2v1jODmFDV1j3+qbgUGgnaitA9M9pdYtXf 7z6qHvsUHQMAlMSn23gJ/aYOffFQGkJ93gJ+tSAZ4RcLZvq2AqRektUMgIjHK/YCTajt OpZDXsLXK712cd9ky70ettHOieqdjaW/pY6+wKuM+Ht4tnMgfO5t58BcX0jBqtLXbO7D xuCN/y0Cng7eHAUxOQ0D4mDavDEfdTJbDtNmQq8/xaioXkIxpnHsUE2mDuBBoJKuAiTw b6sg== X-Gm-Message-State: AOJu0YzWaYyntPcQ4m6paClZ1eBVlPVcUzGwH2fsN75Y1git+rdYYS8+ 35n+rmN8mAucjYmNC6AZDNC9J3BIWhGIRHYbDldBbGT2F8VzejoAC2atmRZi X-Google-Smtp-Source: AGHT+IGaO5YqGL7UAy76EnjfLdDCHE2/s4MVoiv3NZ3iBE24oIB//1RumwHaR0+rYwrqWuem/Z3QEQ== X-Received: by 2002:a05:620a:460a:b0:787:7e2b:74c6 with SMTP id br10-20020a05620a460a00b007877e2b74c6mr1345431qkb.25.1708441057879; Tue, 20 Feb 2024 06:57:37 -0800 (PST) Received: from cbld_jammy.pok.stglabs.ibm.com ([129.41.87.4]) by smtp.gmail.com with ESMTPSA id a13-20020a05620a16cd00b0078715cd3116sm3460613qkn.106.2024.02.20.06.57.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 06:57:37 -0800 (PST) From: Parthakumar Roy X-Google-Original-From: Parthakumar Roy To: dev@dpdk.org Cc: Parthakumar Roy Subject: [PATCH v2] build: make buffer headroom configurable Date: Tue, 20 Feb 2024 14:57:35 +0000 Message-Id: <20240220145735.383949-1-Parthakumar.Roy@ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 27 Feb 2024 07:02:23 +0100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The default value for RTE_PKTMBUF_HEADROOM used to be set in config/rte_config.h. This patch removes it from the file and instead, a meson option, pkt_mbuf_headroom, is introduced to make headroom tunable from the build process. Signed-off-by: Parthakumar Roy Acked-by: Bruce Richardson Acked-by: Morten Brørup --- config/meson.build | 1 + config/rte_config.h | 1 - meson_options.txt | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index a9ccd56deb..f90ff0a290 100644 --- a/config/meson.build +++ b/config/meson.build @@ -346,6 +346,7 @@ dpdk_conf.set('RTE_MAX_ETHPORTS', get_option('max_ethports')) dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet')) dpdk_conf.set('RTE_ENABLE_STDATOMIC', get_option('enable_stdatomic')) dpdk_conf.set('RTE_ENABLE_TRACE_FP', get_option('enable_trace_fp')) +dpdk_conf.set('RTE_PKTMBUF_HEADROOM', get_option('pkt_mbuf_headroom')) # values which have defaults which may be overridden dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64) dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64) diff --git a/config/rte_config.h b/config/rte_config.h index da265d7dd2..505199f2fe 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -51,7 +51,6 @@ /* mbuf defines */ #define RTE_MBUF_DEFAULT_MEMPOOL_OPS "ring_mp_mc" -#define RTE_PKTMBUF_HEADROOM 128 /* ether defines */ #define RTE_MAX_QUEUES_PER_PORT 1024 diff --git a/meson_options.txt b/meson_options.txt index 50a9d3669d..68f378c401 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -40,6 +40,8 @@ option('machine', type: 'string', value: 'auto', description: 'Alias of cpu_instruction_set.') option('max_ethports', type: 'integer', value: 32, description: 'maximum number of Ethernet devices') +option('pkt_mbuf_headroom', type: 'integer', value: 128, description: + 'number of bytes skipped on Rx at the start of the packet buffer to leave room for additional packet headers') option('max_lcores', type: 'string', value: 'default', description: 'Set maximum number of cores/threads supported by EAL; "default" is different per-arch, "detect" detects the number of cores on the build machine.') option('max_numa_nodes', type: 'string', value: 'default', description: