From patchwork Fri Jul 29 07:18:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?M=C3=A1rio_Kuka?= X-Patchwork-Id: 114447 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 74577A00C4; Fri, 29 Jul 2022 18:03:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20DF44069C; Fri, 29 Jul 2022 18:03:15 +0200 (CEST) Received: from office2.cesnet.cz (office2.cesnet.cz [195.113.144.244]) by mails.dpdk.org (Postfix) with ESMTP id 898C140151 for ; Fri, 29 Jul 2022 09:19:11 +0200 (CEST) Received: from dpdk-test8.liberouter.org (rt-tmc-kou.liberouter.org [195.113.172.126]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 BD82B40006C; Fri, 29 Jul 2022 09:19:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2-2020; t=1659079151; bh=lrwcC+7G56DLxLtzHf0PsmeH7De90oOhM6SoY5f3tZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DisvCfkkmuCyGmrwwwAtt97M5FR+N2r+elldRBMNr6Ae1KgyNzqLr7FTMr9IiSunF qXpxF4R+ealR5laElNtGN4CwlJh3HQOVHTQ+rr+IvWCEbWuaahMdrhZzY4pLrc4FZH 1ZXn7S6KiwpbD9tlEtu/SL7EsXnZB8+FcvZ75TS2OvSqs0MxwvdOm9l5OttAQHXHNo blJIYOqI7433pbGbABvN2VQC2CW0SgQbxJO7nD8Jzr1vxCoOyCepl4+zWXGpYPG9FO nG9C/AZAVQRZSoCGPkMaN07xk/hjrr2Nq3Iu3JpnOmeilfg8g1K4Y9WpUH7B/DDCgJ +VPml+Y+E8QfA== From: =?utf-8?q?M=C3=A1rio_Kuka?= To: kuka@cesnet.cz Cc: dev@dpdk.org, mdr@ashroe.eu, reshma.pattan@intel.com, stephen@networkplumber.org Subject: [PATCH v2 0/2] pcapng: fix some issues with writing packets. Date: Fri, 29 Jul 2022 09:18:39 +0200 Message-Id: <20220729071841.18198-1-kuka@cesnet.cz> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220725152811.409447-1-kuka@cesnet.cz> References: <20220725152811.409447-1-kuka@cesnet.cz> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 29 Jul 2022 18:03:14 +0200 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 patchset contains fixes for some issues that occur when writing a large burst of packets at once, such as writing more packets than the IOV_MAX limit and the problem of partial writing of a packet to a file if the writev() system call performs a partial write. The typical use of pcapng in our cases is to copy the packets into a separate buffer and the process of writing to the file is done in some slow path, for example by writing in a separate thread or at the end of the application, where we don't mind the limitation of the typically slow speed of the storage medium. Mário Kuka (2): pcapng: fix write more packets than IOV_MAX limit pcapng: check if writev() returns a partial write app/test/test_pcapng.c | 42 +++++++++++++++++- lib/pcapng/rte_pcapng.c | 96 +++++++++++++++++++++++++++++++++-------- 2 files changed, 120 insertions(+), 18 deletions(-)