From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9D0B7A00C4; Fri, 29 Jul 2022 20:14:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C7294014F; Fri, 29 Jul 2022 20:14:41 +0200 (CEST) Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) by mails.dpdk.org (Postfix) with ESMTP id A27D74003F for ; Fri, 29 Jul 2022 20:14:39 +0200 (CEST) Received: by mail-qt1-f182.google.com with SMTP id r21so3879408qtn.11 for ; Fri, 29 Jul 2022 11:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tGXL5MR9kQ4s7FTvuvnhRbSDxEQI6GcjKmzOTWwC4hg=; b=4qEaxCgnnkLWmRcSus+vAU0kqPWssf/3cSqmg91UCmwVIfiP75HUN5YDj4o2XXZAQj R1IsujmcRb8rVOyXYzUEO02mEnPzfvAixwWgRfNvhmBqpn2OdIO9g6irsWRS/yOJuVCz kHBlvpxfpl02K743dxCKuKTfBY8+ikL4lx/MWGnuk9roUGmc9rzm6RFDfcXVplihcSye xXhICi6HcsvxkrYEYXNeqC517A59+QB1vK8WNX0gfVz9N9hnwyX75QWLpfWrix0ttgez SZ/hl3ebFQwKNKDVc4/Hqx5LKvg6OjRZRoPPDlJBi1Avd/F4HkQSkqNHbQtLRLAG853b aVKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tGXL5MR9kQ4s7FTvuvnhRbSDxEQI6GcjKmzOTWwC4hg=; b=Uom+9vnke+UBG1t/XimeqSTFBnvf1NmqCfWeTw4ziP5teCRM5XZIsyFvYm216T6VVE udiYth8SbMTwMKq9k0dEv2LKyQXlIXri8ynhzVi1fgXNWmruDWiCNyghSuAkwb1YIKam Z419eRmCf1zCX6N1ZC65fTbGGftaim8P/rHQ2/ilF+i9Rqxwc3q5zw2mHVD4aeCyfhzC ThQCwK8nIK0YY0ycdeuFH/jmcmXRWq/KXf20Le4Ll09T2lP5RRasAKWiuFmCtXV7oNYg 88rMKd1w5cibE3ZiGa6SPnHMOw5CuSYiZafIpc5/BMsGn4HhOEvIUJ6Gq3Y+hg6ch+Qz LDdg== X-Gm-Message-State: AJIora+4vc00pgp4o8P6/SxlspBXfqM8TI3EsWoXZutleum3tE36FLFK F18UvdOlm/sJeq1nhATIBEt65A== X-Google-Smtp-Source: AGRyM1s16bnjIvwJOkJTy+SdeFoHM30rzU8HHEC/i2ohZxNskBkfot/wlpP/DvkPlRkY/piTeDiE5w== X-Received: by 2002:ac8:5cd6:0:b0:31f:211e:f4e2 with SMTP id s22-20020ac85cd6000000b0031f211ef4e2mr4455055qta.405.1659118479005; Fri, 29 Jul 2022 11:14:39 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id 7-20020a370b07000000b006b5fe1c376fsm2689223qkl.131.2022.07.29.11.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 11:14:38 -0700 (PDT) Date: Fri, 29 Jul 2022 11:14:34 -0700 From: Stephen Hemminger To: =?UTF-8?B?TcOhcmlv?= Kuka Cc: dev@dpdk.org, mdr@ashroe.eu, reshma.pattan@intel.com Subject: Re: [PATCH v2 2/2] pcapng: check if writev() returns a partial write Message-ID: <20220729111434.09f6845b@hermes.local> In-Reply-To: References: <20220725152811.409447-1-kuka@cesnet.cz> <20220729071841.18198-1-kuka@cesnet.cz> <20220729071841.18198-3-kuka@cesnet.cz> <20220729090028.25674943@hermes.local> 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 29 Jul 2022 19:08:41 +0200 M=C3=A1rio Kuka wrote: > > Since this is being written to a file, handling partial writes makes li= ttle > > sense. The only case where partial write would happen would be if files= ystem > > was full. Retrying just adds unnecessary complexity. > > > > If you really want to track this, then add a dropped counter. =20 >=20 > But the file descriptor doesn't have to refer to just a regular file, what > if it's a socket or a pipe or some device? The pcapng documentation doesn= 't > say anything about any restrictions, so the implementation should be fully > generic. What's the point of a function to write packets to a file=20 > descriptor > where there's a risk that it won't write all the packets or that the=20 > file will > by corrupted due to a partial write and still not even let me know about= =20 > it? As pcapng is used in the dpdk application it writes to a file. You could repurpose it to something else, but even a pipe will not give partial writes unless you configure the pipe as non-blocking. Writing to a non-blocking pipe is going to have a load of other problems. This seems like a purely hypothetical case, can't see why it needs to be ad= dressed.