* Re: [PATCH v3] pcapng: fix write more packets than IOV_MAX limit
[not found] ` <20220801083350.12d55889@hermes.local>
@ 2022-10-10 0:40 ` Thomas Monjalon
0 siblings, 0 replies; only message in thread
From: Thomas Monjalon @ 2022-10-10 0:40 UTC (permalink / raw)
To: Mário Kuka; +Cc: dev, mdr, reshma.pattan, Stephen Hemminger, stable
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-10 0:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20220729071841.18198-1-kuka@cesnet.cz>
[not found] ` <20220801084056.17418-1-kuka@cesnet.cz>
[not found] ` <20220801083350.12d55889@hermes.local>
2022-10-10 0:40 ` [PATCH v3] pcapng: fix write more packets than IOV_MAX limit Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).