From: "Kinsella, Ray" <mdr@ashroe.eu>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
Xueming Li <xuemingl@nvidia.com>
Cc: dev@dpdk.org,
Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,
Dmitry Malloy <dmitrym@microsoft.com>,
Pallavi Kadam <pallavi.kadam@intel.com>,
Neil Horman <nhorman@tuxdriver.com>
Subject: Re: [dpdk-dev] [PATCH] eal: update all buses default scan mode
Date: Tue, 23 Mar 2021 09:33:31 +0000 [thread overview]
Message-ID: <2fbc5945-4f00-3104-f490-2d8d87d78fc9@ashroe.eu> (raw)
In-Reply-To: <20210323023239.2687be4e@sovereign>
On 22/03/2021 23:32, Dmitry Kozlyuk wrote:
> 2021-03-16 20:45 (UTC+0800), Xueming Li:
> [...]
>> diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c
>> index baa5b532af..ebbb3995f6 100644
>> --- a/lib/librte_eal/common/eal_common_bus.c
>> +++ b/lib/librte_eal/common/eal_common_bus.c
>> @@ -277,3 +277,19 @@ rte_bus_sigbus_handler(const void *failure_addr)
>>
>> return ret;
>> }
>> +
>> +static bool mode_set;
>
> Could be function-local if we really want to save list traversals.
>
>> +
>> +void
>> +rte_bus_scan_mode_update(enum rte_bus_scan_mode mode)
>> +{
>> + struct rte_bus *bus;
>> +
>> + if (mode_set)
>> + return;
>> + TAILQ_FOREACH(bus, &rte_bus_list, next) {
>> + if (bus->conf.scan_mode == RTE_BUS_SCAN_UNDEFINED)
>> + bus->conf.scan_mode = mode;
>> + }
>> + mode_set = true;
>> +}
>
> [...]
>> /**
>> * Create the unix channel for primary/secondary communication.
>> *
>> diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
>> index 474cf123fa..2757f31461 100644
>> --- a/lib/librte_eal/rte_eal_exports.def
>> +++ b/lib/librte_eal/rte_eal_exports.def
>> @@ -11,6 +11,7 @@ EXPORTS
>> rte_bus_probe
>> rte_bus_register
>> rte_bus_scan
>> + rte_bus_scan_mode_update
>> rte_bus_unregister
>> rte_calloc
>> rte_calloc_socket
>> diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map
>> index fce90a112f..171bca478d 100644
>> --- a/lib/librte_eal/version.map
>> +++ b/lib/librte_eal/version.map
>> @@ -417,6 +417,8 @@ EXPERIMENTAL {
>> INTERNAL {
>> global:
>>
>> + rte_bus_scan_mode_update;
>> +
>> rte_mem_lock;
>> rte_mem_map;
>> rte_mem_page_size;
>
> New function is private to EAL, so it doesn't need exporting.
>
Right - it is annotated as INTERNAL.
next prev parent reply other threads:[~2021-03-23 9:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 12:45 Xueming Li
2021-03-22 23:32 ` Dmitry Kozlyuk
2021-03-23 9:33 ` Kinsella, Ray [this message]
2021-03-23 9:34 ` Kinsella, Ray
2021-03-23 9:57 ` Dmitry Kozlyuk
2021-03-23 9:58 ` Kinsella, Ray
2021-03-28 13:14 ` Xueming(Steven) Li
2021-03-28 13:12 ` [dpdk-dev] [PATCH v1] " Xueming Li
2023-06-30 16:16 ` 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=2fbc5945-4f00-3104-f490-2d8d87d78fc9@ashroe.eu \
--to=mdr@ashroe.eu \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=dmitrym@microsoft.com \
--cc=navasile@linux.microsoft.com \
--cc=nhorman@tuxdriver.com \
--cc=pallavi.kadam@intel.com \
--cc=xuemingl@nvidia.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).