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 983A5A0544; Mon, 10 Oct 2022 02:40:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40287400D5; Mon, 10 Oct 2022 02:40:56 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 437B840042; Mon, 10 Oct 2022 02:40:55 +0200 (CEST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DE8D65C004A; Sun, 9 Oct 2022 20:40:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 09 Oct 2022 20:40:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1665362454; x= 1665448854; bh=47oeN1Q6PNsnN7HATPRo7E8pixeoNuX8l5MyFV2lsis=; b=T DZEm/ryVEhDDZ8kYuze8o0Sjug7IqDFg8pjca4GXZp4SZZwRQwCwU9zeRIAimGzU b9+D9opXcLp81yqbjyCoDA1DO8TuyjL0P5ZZU3xHULY4n83YvGD1nWy+BV+AHe6s XsDxX9GS4aDHAw1fSwFSG5CdN+KkJB/lN14EdSLqZyudHDMtZB47IksQFhypYlYK tZgfvMqfypYN+bGIdshuHoAORQ0dsyTLn5R7uOhnhVnU9F3rjU58YUm6nskxnls0 CV71DyRUxYiyKMGB/6my8uB4ztyy0tcE4LagNaLKkPtgsYfuGTZW/2v8Hs0KLoD2 7QeFs5Vwz372GgEpfcSoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1665362454; x= 1665448854; bh=47oeN1Q6PNsnN7HATPRo7E8pixeoNuX8l5MyFV2lsis=; b=t cO28c/fOpqD3tv06cr+7NAwaScUQMfzfs/Qs1RuJTxGYXJHNH439d9JKS0ufZKn2 IFEBzaYJE6unO6NWjjpf8DNA6ypLCeyCIfLCzatdwAu/C3RC9N4X0cheu9KCjDd+ WSo9iktfwIl/j/QkDueVVtmqJx/vd05GS4XnniYmUkG+RqvSh//4caTm05UYt63U 7wIqu/EFoqRSDISSgS4TzaRUL8XGXecekOz4/TwIRQ+RE4duNdzSHATUbuA3+FLr 2hJ6nnSXp4zPIo50EQNxON4KtXx1kiAqg0ILmzUcAg/M0ApWhNt1oC26HcJVljfW PQ3N+EdFvorj6HEm2pAyA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeejvddgfeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtudenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeefhfejleeuvdevtddutdeutdevhfeijeethfffueejhfetuddu vedtkedtieekffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 Oct 2022 20:40:53 -0400 (EDT) From: Thomas Monjalon To: =?ISO-8859-1?Q?M=E1rio?= Kuka Cc: dev@dpdk.org, mdr@ashroe.eu, reshma.pattan@intel.com, Stephen Hemminger , stable@dpdk.org Subject: Re: [PATCH v3] pcapng: fix write more packets than IOV_MAX limit Date: Mon, 10 Oct 2022 02:40:52 +0200 Message-ID: <2098902.3Lj2Plt8kZ@thomas> In-Reply-To: <20220801083350.12d55889@hermes.local> References: <20220729071841.18198-1-kuka@cesnet.cz> <20220801084056.17418-1-kuka@cesnet.cz> <20220801083350.12d55889@hermes.local> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" 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 01/08/2022 17:33, Stephen Hemminger: > On Mon, 1 Aug 2022 10:40:56 +0200 > M=E1rio Kuka wrote: >=20 > > The rte_pcapng_write_packets() function fails when we try to write more > > packets than the IOV_MAX limit. writev() system call is limited by the > > IOV_MAX limit. The iovcnt argument is valid if it is greater than 0 and > > less than or equal to IOV_MAX as defined in . > >=20 > > To avoid this problem, we can check that all segments of the next > > packet will fit into the iovec buffer, whose capacity will be limited > > by the IOV_MAX limit. If not, we flush the current iovec buffer to the > > file by calling writev() and, if successful, fit the current packet at > > the beginning of the flushed iovec buffer. > >=20 > > Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files") > > Cc: stephen@networkplumber.org + Cc: stable@dpdk.org > >=20 > > Signed-off-by: M=E1rio Kuka >=20 > Thanks for fixing this. >=20 > Acked-by: Stephen Hemminger Applied, thanks.