All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: "Mário Kuka" <kuka@cesnet.cz>
Cc: dev@dpdk.org, mdr@ashroe.eu, reshma.pattan@intel.com,
	Stephen Hemminger <stephen@networkplumber.org>,
	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	[thread overview]
Message-ID: <2098902.3Lj2Plt8kZ@thomas> (raw)
In-Reply-To: <20220801083350.12d55889@hermes.local>

01/08/2022 17:33, Stephen Hemminger:
> On Mon,  1 Aug 2022 10:40:56 +0200
> Mário Kuka <kuka@cesnet.cz> wrote:
> 
> > 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 <limits.h>.
> > 
> > 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.
> > 
> > Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files")
> > Cc: stephen@networkplumber.org

+ Cc: stable@dpdk.org
> > 
> > Signed-off-by: Mário Kuka <kuka@cesnet.cz>
> 
> Thanks for fixing this.
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>

Applied, thanks.



      reply	other threads:[~2022-10-10  0:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25 15:28 [PATCH] pcapng: fix write more packets than IOV_MAX limit Mário Kuka
2022-07-25 15:57 ` Stephen Hemminger
2022-07-25 16:10 ` Stephen Hemminger
2022-07-29  7:18 ` [PATCH v2 0/2] pcapng: fix some issues with writing packets Mário Kuka
2022-07-29  7:18   ` [PATCH v2 1/2] pcapng: fix write more packets than IOV_MAX limit Mário Kuka
2022-07-29  7:18   ` [PATCH v2 2/2] pcapng: check if writev() returns a partial write Mário Kuka
2022-07-29 16:00     ` Stephen Hemminger
2022-07-29 17:08       ` Mário Kuka
2022-07-29 18:14         ` Stephen Hemminger
2022-08-01  8:42           ` Mário Kuka
2022-07-29 15:58   ` [PATCH v2 0/2] pcapng: fix some issues with writing packets Stephen Hemminger
2022-07-29 17:33     ` Mário Kuka
2022-08-01  8:40   ` [PATCH v3] pcapng: fix write more packets than IOV_MAX limit Mário Kuka
2022-08-01 15:33     ` Stephen Hemminger
2022-10-10  0:40       ` Thomas Monjalon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2098902.3Lj2Plt8kZ@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=kuka@cesnet.cz \
    --cc=mdr@ashroe.eu \
    --cc=reshma.pattan@intel.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.