From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: "Pattan, Reshma" <reshma.pattan@intel.com>
Cc: dev@dpdk.org, "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [PATCH v9 1/8] ethdev: use locks to protect Rx/Tx callback lists
Date: Wed, 15 Jun 2016 10:19:07 +0200 [thread overview]
Message-ID: <10886152.VH5xYhdqG2@xps13> (raw)
In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F0104E1EE@IRSMSX109.ger.corp.intel.com>
2016-06-15 05:30, Pattan, Reshma:
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > 2016-06-14 10:38, Reshma Pattan:
> > > Added spinlocks around add/remove logic of Rx and Tx callbacks to
> > > avoid corruption of callback lists in multithreaded context.
> > >
> > > Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
> >
> > Why cb->next is not locked in burst functions?
> It is safe to do "read access" here and doesn't require any locking as rx/tx burst is initiated by only local user(control plane) thread.
>
> > Just protecting add/remove but not its usage seems useless.
> Here locks were required around add/remove to protect "write access" because write to callback list is now done from 2 threads
> i.e. one from local user thread(control plane) and another from pdump control thread(initiated by remote pdump request).
So read and write can be done by different threads.
I think the read access would need locking but we do not want it
in fast path.
Are you sure there is no issue in this design?
next prev parent reply other threads:[~2016-06-15 8:19 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1465487895-5870-1-git-send-email-reshma.pattan@intel.com>
2016-06-10 16:18 ` [dpdk-dev] [PATCH v8 0/8] add packet capture framework Reshma Pattan
2016-06-10 16:18 ` [dpdk-dev] [PATCH v8 1/8] librte_ether: protect add/remove of rxtx callbacks with spinlocks Reshma Pattan
2016-06-10 16:18 ` [dpdk-dev] [PATCH v8 2/8] librte_ether: add new api rte_eth_add_first_rx_callback Reshma Pattan
2016-06-10 16:18 ` [dpdk-dev] [PATCH v8 3/8] librte_ether: add new fields to rte_eth_dev_info struct Reshma Pattan
2016-06-10 16:18 ` [dpdk-dev] [PATCH v8 4/8] librte_ether: make rte_eth_dev_get_port_by_name rte_eth_dev_get_name_by_port public Reshma Pattan
2016-06-10 16:18 ` [dpdk-dev] [PATCH v8 5/8] lib/librte_pdump: add new library for packet capturing support Reshma Pattan
2016-06-10 18:48 ` Aaron Conole
2016-06-10 22:14 ` Pattan, Reshma
2016-06-13 13:28 ` Aaron Conole
2016-06-10 16:18 ` [dpdk-dev] [PATCH v8 6/8] app/pdump: add pdump tool for packet capturing Reshma Pattan
2016-06-10 16:18 ` [dpdk-dev] [PATCH v8 7/8] app/test-pmd: add pdump initialization uninitialization Reshma Pattan
2016-06-10 16:18 ` [dpdk-dev] [PATCH v8 8/8] doc: update doc for packet capture framework Reshma Pattan
2016-06-10 23:23 ` [dpdk-dev] [PATCH v8 0/8] add " Neil Horman
2016-06-13 8:47 ` Pattan, Reshma
2016-06-14 9:38 ` [dpdk-dev] [PATCH v9 " Reshma Pattan
2016-06-14 9:38 ` [dpdk-dev] [PATCH v9 1/8] ethdev: use locks to protect Rx/Tx callback lists Reshma Pattan
2016-06-14 19:59 ` Thomas Monjalon
2016-06-15 5:30 ` Pattan, Reshma
2016-06-15 8:19 ` Thomas Monjalon [this message]
2016-06-15 8:37 ` Ananyev, Konstantin
2016-06-15 8:48 ` Thomas Monjalon
2016-06-15 9:54 ` Ananyev, Konstantin
2016-06-15 11:17 ` Thomas Monjalon
2016-06-15 13:49 ` Thomas Monjalon
2016-06-15 12:15 ` Ivan Boule
2016-06-15 12:40 ` Ananyev, Konstantin
2016-06-15 13:29 ` Bruce Richardson
2016-06-15 14:07 ` Ivan Boule
2016-06-15 14:19 ` Bruce Richardson
2016-06-15 14:20 ` Ananyev, Konstantin
2016-06-15 14:22 ` Bruce Richardson
2016-06-15 14:27 ` Ananyev, Konstantin
2016-06-15 15:33 ` Ivan Boule
2016-06-14 9:38 ` [dpdk-dev] [PATCH v9 2/8] ethdev: add new api to add Rx callback as head of the list Reshma Pattan
2016-06-14 20:01 ` Thomas Monjalon
2016-06-14 21:43 ` Pattan, Reshma
2016-06-14 9:38 ` [dpdk-dev] [PATCH v9 3/8] ethdev: add new fields to ethdev info struct Reshma Pattan
2016-06-14 20:10 ` Thomas Monjalon
2016-06-14 21:57 ` Pattan, Reshma
2016-06-14 9:38 ` [dpdk-dev] [PATCH v9 4/8] ethdev: make get port by name and get name by port public Reshma Pattan
2016-06-14 20:23 ` Thomas Monjalon
2016-06-14 21:55 ` Pattan, Reshma
2016-06-14 9:38 ` [dpdk-dev] [PATCH v9 5/8] pdump: add new library for packet capturing support Reshma Pattan
2016-06-14 20:28 ` Thomas Monjalon
2016-06-14 21:59 ` Pattan, Reshma
2016-06-15 9:05 ` Mcnamara, John
2016-06-15 9:32 ` Thomas Monjalon
2016-06-15 9:43 ` Bruce Richardson
2016-06-15 15:44 ` Mcnamara, John
2016-06-14 9:38 ` [dpdk-dev] [PATCH v9 6/8] app/pdump: add pdump tool for packet capturing Reshma Pattan
2016-06-14 19:56 ` Thomas Monjalon
2016-06-14 9:38 ` [dpdk-dev] [PATCH v9 7/8] app/testpmd: add pdump initialization uninitialization Reshma Pattan
2016-06-14 9:38 ` [dpdk-dev] [PATCH v9 8/8] doc: update doc for packet capture framework Reshma Pattan
2016-06-14 20:41 ` Thomas Monjalon
2016-06-15 5:44 ` Pattan, Reshma
2016-06-15 8:24 ` Thomas Monjalon
2016-06-15 14:06 ` [dpdk-dev] [PATCH v10 0/7] add " Reshma Pattan
2016-06-15 14:06 ` [dpdk-dev] [PATCH v10 1/7] ethdev: use locks to protect Rx/Tx callback lists Reshma Pattan
2016-06-15 14:06 ` [dpdk-dev] [PATCH v10 2/7] ethdev: add new api to add Rx callback as head of the list Reshma Pattan
2016-06-15 14:06 ` [dpdk-dev] [PATCH v10 3/7] ethdev: add new fields to ethdev info struct Reshma Pattan
2016-06-16 19:14 ` Thomas Monjalon
2016-06-15 14:06 ` [dpdk-dev] [PATCH v10 4/7] ethdev: make get port by name and get name by port public Reshma Pattan
2016-06-16 20:27 ` Thomas Monjalon
2016-06-15 14:06 ` [dpdk-dev] [PATCH v10 5/7] pdump: add new library for packet capturing support Reshma Pattan
2016-06-15 14:06 ` [dpdk-dev] [PATCH v10 6/7] app/pdump: add pdump tool for packet capturing Reshma Pattan
2016-06-15 14:06 ` [dpdk-dev] [PATCH v10 7/7] app/testpmd: add pdump initialization uninitialization Reshma Pattan
2016-06-16 21:55 ` [dpdk-dev] [PATCH v10 0/7] add packet capture framework Thomas Monjalon
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=10886152.VH5xYhdqG2@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=reshma.pattan@intel.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).