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 81BCDA00C3; Mon, 1 Aug 2022 10:42:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74FB341101; Mon, 1 Aug 2022 10:42:06 +0200 (CEST) Received: from office2.cesnet.cz (office2.cesnet.cz [195.113.144.244]) by mails.dpdk.org (Postfix) with ESMTP id CC1C04067B for ; Mon, 1 Aug 2022 10:42:05 +0200 (CEST) Received: from [IPV6:2a01:c846:1282:6700:df8:66cf:cbf:b9dd] (unknown [IPv6:2a01:c846:1282:6700:df8:66cf:cbf:b9dd]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id 78C8140006C; Mon, 1 Aug 2022 10:42:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2-2020; t=1659343325; bh=ViHkCQVG8/RuvUzYo4zuJEYopdP+lEz1Q1K298xCvAM=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=VKBw9Hfl+1BDzSSY2slP0FwHbl3xo6pJCCGQdsEM/x3L/GNYJi2lMrQUT0y/pmiB0 rKGP223Ma9dgj0iflgsPwmYsM5aAgvlAvbZkrnLZpJdiSwfpL3THy1FA54AUek3N42 iiiD+fJgtnJO52v6UwNU6ae95PavH9lSsKYRb8Wl1G0zVPcTbYEFZFyntlsc3gtPQd 7oKrperS3tkN/RTPVzBWy00fLWiAjpnENlJkSlA7inSlVF7Yyqhes/xDRXSjUTZDaQ vv/qgdhYpLGJvne4JE7M0si14ydTAmtU70liL4DCPCLePUm9g2o5NaRdwtQ0P7mt32 ynUo2s7as+TFw== Message-ID: Date: Mon, 1 Aug 2022 10:42:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2 2/2] pcapng: check if writev() returns a partial write Content-Language: sk-SK To: Stephen Hemminger Cc: dev@dpdk.org, mdr@ashroe.eu, reshma.pattan@intel.com References: <20220725152811.409447-1-kuka@cesnet.cz> <20220729071841.18198-1-kuka@cesnet.cz> <20220729071841.18198-3-kuka@cesnet.cz> <20220729090028.25674943@hermes.local> <20220729111434.09f6845b@hermes.local> From: =?UTF-8?Q?M=c3=a1rio_Kuka?= In-Reply-To: <20220729111434.09f6845b@hermes.local> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms030607080707070901040701" 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 This is a cryptographically signed message in MIME format. --------------ms030607080707070901040701 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > 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 addressed. OK, I'm sending patch v3 which only fixes the IVO_MAX limit issue. I've removed the changes related to the partial write check. On 29/07/2022 20:14, Stephen Hemminger wrote: > On Fri, 29 Jul 2022 19:08:41 +0200 > Mário Kuka wrote: > >>> Since this is being written to a file, handling partial writes makes little >>> sense. The only case where partial write would happen would be if filesystem >>> was full. Retrying just adds unnecessary complexity. >>> >>> If you really want to track this, then add a dropped counter. >> 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 >> descriptor >> where there's a risk that it won't write all the packets or that the >> file will >> by corrupted due to a partial write and still not even let me know about >> 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 addressed. --------------ms030607080707070901040701 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC DU4wggZgMIIESKADAgECAhEAnTCbnaNwi54ahsTjQqFVbTANBgkqhkiG9w0BAQwFADBGMQsw CQYDVQQGEwJOTDEZMBcGA1UEChMQR0VBTlQgVmVyZW5pZ2luZzEcMBoGA1UEAxMTR0VBTlQg UGVyc29uYWwgQ0EgNDAeFw0yMTA0MjUwMDAwMDBaFw0yNDA0MjQyMzU5NTlaMIHbMQ8wDQYD VQQREwYxNjAgMDAxODA2BgNVBAoML0NFU05FVCwgesOham1vdsOpIHNkcnXFvmVuw60gcHLD oXZuaWNrw71jaCBvc29iMRYwFAYDVQQJEw0xOTAzLzQgWmlrb3ZhMR4wHAYDVQQIDBVQcmFo YSwgSGxhdm7DrSBtxJtzdG8xDjAMBgNVBAcTBVByYWhhMQswCQYDVQQGEwJDWjEUMBIGA1UE AwwLTcOhcmlvIEt1a2ExIzAhBgkqhkiG9w0BCQEWFG1hcmlvLmt1a2FAY2VzbmV0LmN6MIIB IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsf8rfNlSMXsoruJ2DkRtAGXBvekIfYKu HfaRR7BzICsgHgjwxDZl1bIqTMuwiadre+QI2EN4h7DqAI8+ws7s+RUtSD9/v4yWMsSobX+7 AfbDbmJaK7phomafkH4oEzZ9nGvlI6M55bZx18xMvBa5s/gxmqTjvpcU1aFBPOcPHf+w50wX prt5TyFFgEONgBZuh8ksJBI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