From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> To: 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>, Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com> Subject: Re: [dpdk-dev] [PATCH] eal: update all buses default scan mode Date: Tue, 23 Mar 2021 02:32:39 +0300 Message-ID: <20210323023239.2687be4e@sovereign> (raw) In-Reply-To: <20210316124520.19726-1-xuemingl@nvidia.com> 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.
next prev parent reply other threads:[~2021-03-22 23:32 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-16 12:45 Xueming Li 2021-03-22 23:32 ` Dmitry Kozlyuk [this message] 2021-03-23 9:33 ` Kinsella, Ray 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
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=20210323023239.2687be4e@sovereign \ --to=dmitry.kozliuk@gmail.com \ --cc=dev@dpdk.org \ --cc=dmitrym@microsoft.com \ --cc=mdr@ashroe.eu \ --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
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/dev/0 dev/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 dev dev/ https://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git