From: Stephen Hemminger <stephen@networkplumber.org>
To: Tianli Lai <laitianli@tom.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH v3] examples/kni: add interrupt mode to receive packets
Date: Fri, 8 Apr 2022 08:15:52 -0700 [thread overview]
Message-ID: <20220408081552.7ba2f9f1@hermes.local> (raw)
In-Reply-To: <20220408091206.4411-1-laitianli@tom.com>
On Fri, 8 Apr 2022 17:12:06 +0800
Tianli Lai <laitianli@tom.com> wrote:
> + if (status[lcore].wakeup) {
> + RTE_LOG(INFO, APP,
> + "lcore %u sleeps until interrupt triggers\n",
> + rte_lcore_id());
> + }
Shouldn't the be at DEBUG level.
> + /* initialize spinlock for each port */
> + rte_spinlock_init(&(locks[i]));
This comment seems rather obvious and unneeded.
> +static void
> +turn_on_off_intr(uint16_t port_id, uint16_t queue_id, bool on)
> +{
> + rte_spinlock_lock(&(locks[port_id]));
> + if (on)
> + rte_eth_dev_rx_intr_enable(port_id, queue_id);
> + else
> + rte_eth_dev_rx_intr_disable(port_id, queue_id);
> + rte_spinlock_unlock(&(locks[port_id]));
> +}
Since Rx queue can not safely shared between cores, why do you need
lock at all?
next prev parent reply other threads:[~2022-04-08 15:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 16:12 [PATCH] " Tianli Lai
2022-04-08 9:02 ` Tianli Lai
2022-04-08 9:12 ` [PATCH v3] " Tianli Lai
2022-04-08 15:15 ` Stephen Hemminger [this message]
2022-04-09 10:13 ` [PATCH v4] " Tianli Lai
2023-07-04 2:58 ` Stephen Hemminger
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=20220408081552.7ba2f9f1@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=laitianli@tom.com \
/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 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).