From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id E2B22432E6;
	Thu,  9 Nov 2023 16:44:53 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id CE14F40A79;
	Thu,  9 Nov 2023 16:44:53 +0100 (CET)
Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com
 [209.85.214.182])
 by mails.dpdk.org (Postfix) with ESMTP id 8B08A40A72
 for <dev@dpdk.org>; Thu,  9 Nov 2023 16:44:52 +0100 (CET)
Received: by mail-pl1-f182.google.com with SMTP id
 d9443c01a7336-1cc330e8f58so8419605ad.3
 for <dev@dpdk.org>; Thu, 09 Nov 2023 07:44:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1699544692;
 x=1700149492; darn=dpdk.org; 
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:from:to:cc:subject:date
 :message-id:reply-to;
 bh=pnHdvuWBXrrOQYt7bIZQvEph9S8H0z2L9tL4/k4YwQY=;
 b=eE85TiJ3wiA1EtyT7PdgrkGXjzJaIC0l9jNKpz31X6wTJlQrhf3u1FlWOGpCuZPyf/
 eU4B57PHfBa6VTkhioS/Qkh+mVeRNDI4FXiz8N8DwXwlf76IlpJ0u6U7VMHz/9xXmrym
 653rPXDsGlF9YybNUSdJrOcJvWsH0QhxZ6DoWgOTiysHAG674C87XLnRc/0lrZbwtyMe
 +kFVeZzEoHL198UJunurh0G7KPSp64pT/n12LxCDbXea7rPSBZltfwXauD5pe3rSsi75
 5JmrfM2nmHgd56daBh6TNoQahpYP9TyjzCpO3NK3OH6zDGVtLyIpo6rK9oplwgmGJXFk
 Sedw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1699544692; x=1700149492;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=pnHdvuWBXrrOQYt7bIZQvEph9S8H0z2L9tL4/k4YwQY=;
 b=XzXfzsYBVW8vItzD2LweXTuidAuaWMjp46spZSIdP6T/4pUWrgVcN98lWFnMttXzqR
 UoZR2lXOE8oQGATsWrVqAAthsimYoZVodjA/Fa6gN1yoJNbqOQYk+mi7L+coa0e/23Ej
 uggi1hdhbzzMiIrpRT4DiTv5hrKtYhv50ys/aPuwo/gHC3g7Ix8vi4ftCN3IZtcGgA6P
 o8tYaAFAhnKzXzPtdcVswGHt87lTjpyesuNWUGdMs/5CTmE+8dXuOXHB5dCxDNgfzfek
 Rk5jAtLF/k5sSLaMSKeTbKCx9qts5r6h2JyVmQJYQrc8HRGLL2xPRd9Gu5/PzBmRvpdQ
 Jc2Q==
X-Gm-Message-State: AOJu0YzLU7nHoGQjUoejKXJppvTT2tmDl3rMxhNJPVDqy7XzHNMJVxao
 aO4N155OdVpf/dNg3TpN5PTcW0Lv24n8xdsBt2w=
X-Google-Smtp-Source: AGHT+IHg/hXmymU2h9ORl25YPw24GAYOieg8ZiQISTHms1Y1Bbc5JVuvCKnDRvWTxcgGV8/wrrIKSg==
X-Received: by 2002:a17:902:c951:b0:1ca:8e43:765d with SMTP id
 i17-20020a170902c95100b001ca8e43765dmr5342679pla.64.1699544691687; 
 Thu, 09 Nov 2023 07:44:51 -0800 (PST)
Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141])
 by smtp.gmail.com with ESMTPSA id
 a21-20020a170902ee9500b001c9ab91d3d7sm3698048pld.37.2023.11.09.07.44.51
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 09 Nov 2023 07:44:51 -0800 (PST)
Date: Thu, 9 Nov 2023 07:44:49 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Morten =?UTF-8?B?QnLDuHJ1cA==?= <mb@smartsharesystems.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH v3 4/5] pcapng: avoid using alloca()
Message-ID: <20231109074449.1ba95e1b@hermes.local>
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9EFFC@smartserver.smartshare.dk>
References: <20230921042349.104150-1-stephen@networkplumber.org>
 <20231108183557.381955-1-stephen@networkplumber.org>
 <20231108183557.381955-5-stephen@networkplumber.org>
 <98CBD80474FA8B44BF855DF32C47DC35E9EFFC@smartserver.smartshare.dk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Thu, 9 Nov 2023 09:21:22 +0100
Morten Br=C3=B8rup <mb@smartsharesystems.com> wrote:

> I can't find the definition of BUFSIZ. Please make sure to add a comment =
to the definition of BUFSIZ mentioning - like in your patch description - t=
hat it will be more than sufficient for the info related blocks in the file.
>=20
> More comments inline below, regarding existing bugs found while reviewing.
>=20
>=20
> Assuming BUFSIZ has a comment describing the reason for its value,
>=20
> Acked-by: Morten Br=C3=B8rup <mb@smartsharesystems.com>

The constant BUFSIZ comes from stdio.h and used lots of places in libraries.
It is 8192 in current glibc and unlikely to be a problem.
Chose it because this a on stack buffer used before writing to a file which
is similar to what stdio does.

The library does not use stdio because most of the I/O is writing packets
which needs to be fast and overhead of extra stdio buffer is harmful.
Looking into using io_uring in a future version.