From: David Marchand <david.marchand@redhat.com>
To: Ferruh Yigit <ferruh.yigit@xilinx.com>
Cc: Gaetan Rivet <grive@u256.net>, dpdk stable <stable@dpdk.org>,
Hyong Youb Kim <hyonkim@cisco.com>,
Harman Kalra <hkalra@marvell.com>, dev <dev@dpdk.org>
Subject: Re: [PATCH] net/failsafe: fix interrupt handle leak
Date: Fri, 29 Apr 2022 16:25:04 +0200
Message-ID: <CAJFAV8wyaZSrGF1BasL5sLeaGcBFJeTeHjjZy+_OGokGknHa2g@mail.gmail.com> (raw)
In-Reply-To: <b03033f6-8253-277c-2bd0-9772ec709958@xilinx.com>
Hello Ferruh,
On Fri, Apr 29, 2022 at 3:56 PM Ferruh Yigit <ferruh.yigit@xilinx.com> wrote:
> > @@ -442,12 +428,16 @@ fs_rx_queue_setup(struct rte_eth_dev *dev,
> > rxq->info.nb_desc = nb_rx_desc;
> > rxq->priv = PRIV(dev);
> > rxq->sdev = PRIV(dev)->subs;
> > - ret = rte_intr_efd_enable(intr_handle, 1);
> > - if (ret < 0) {
> > +#ifdef RTE_EXEC_ENV_LINUX
> > + rxq->event_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
> > + if (rxq->event_fd < 0) {
> > + ERROR("Failed to create an eventfd: %s", strerror(errno));
> > fs_unlock(dev, 0);
> > - return ret;
> > + return -errno;
> > }
> > - rxq->event_fd = rte_intr_efds_index_get(intr_handle, 0);
> > +#else
> > + rxq->event_fd = -1;
> > +#endif
>
> How this impacts the BSD? I don't know if driver used on BSD but
> technically it looks supported.
Atm, the driver calls rte_intr_efd_enable() which on Linux triggers an
eventfd creation and a intr_handle->nb_intr++, but does nothing on
FreeBSD.
I did not test it with FreeBSD but I expect the previous call to
rte_intr_efds_index_get(intr_handle, 0); return -1 (because of a
earlier call to rte_intr_efds_index_set(intr_handle, 0, -1)).
--
David Marchand
next prev parent reply other threads:[~2022-04-29 14:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 15:09 David Marchand
2022-04-29 13:55 ` Ferruh Yigit
2022-04-29 14:25 ` David Marchand [this message]
2022-04-29 14:26 ` David Marchand
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=CAJFAV8wyaZSrGF1BasL5sLeaGcBFJeTeHjjZy+_OGokGknHa2g@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@xilinx.com \
--cc=grive@u256.net \
--cc=hkalra@marvell.com \
--cc=hyonkim@cisco.com \
--cc=stable@dpdk.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
patches for DPDK stable branches
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
stable@dpdk.org
public-inbox-index stable
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.dpdk.org/inbox.dpdk.stable
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git