<div dir="ltr"><div dir="ltr">Hi Stephen,<div><br></div><div>Thanks for your review.</div><div>If I make it __rte_internal then, testpmd or our application can't use it.</div><div>So instead I am planning to make it __rte_experimental.</div><div><br></div><div>Regards,</div><div>Rahul.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 3 Nov 2023 at 00:08, Stephen Hemminger <<a href="mailto:stephen@networkplumber.org">stephen@networkplumber.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu,  2 Nov 2023 11:19:24 -0700<br>
Rahul Gupta <<a href="mailto:rahulgupt@linux.microsoft.com" target="_blank">rahulgupt@linux.microsoft.com</a>> wrote:<br>
<br>
> From: Rahul Gupta <<a href="mailto:rahulgupt@linux.microsoft.com" target="_blank">rahulgupt@linux.microsoft.com</a>><br>
> To: <a href="mailto:dev@dpdk.org" target="_blank">dev@dpdk.org</a>,  <a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a><br>
> Cc: <a href="mailto:sovaradh@linux.microsoft.com" target="_blank">sovaradh@linux.microsoft.com</a>, <a href="mailto:okaya@kernel.org" target="_blank">okaya@kernel.org</a>, <a href="mailto:sujithsankar@microsoft.com" target="_blank">sujithsankar@microsoft.com</a>,  <a href="mailto:sowmini.varadhan@microsoft.com" target="_blank">sowmini.varadhan@microsoft.com</a>, <a href="mailto:rahulrgupta27@gmail.com" target="_blank">rahulrgupta27@gmail.com</a>,  Rahul Gupta <<a href="mailto:rahulgupt@microsoft.com" target="_blank">rahulgupt@microsoft.com</a>>,  Rahul Gupta <<a href="mailto:rahulgupt@linux.microsoft.com" target="_blank">rahulgupt@linux.microsoft.com</a>><br>
> Subject: [RFC] eal: RFC to refactor rte_eal_init into sub-functions<br>
> Date: Thu,  2 Nov 2023 11:19:24 -0700<br>
> X-Mailer: git-send-email 1.8.3.1<br>
> <br>
> From: Rahul Gupta <<a href="mailto:rahulgupt@microsoft.com" target="_blank">rahulgupt@microsoft.com</a>><br>
> <br>
> Initialization often requires rte_eal_init + rte_pktmbuf_pool_create<br>
> which can consume a total time of 500-600 ms:<br>
> a) For many devices FLR may take a significant chunk of time<br>
>    (200-250 ms in our use-case), this FLR is triggered during device<br>
>    probe in rte_eal_init().<br>
> b) rte_pktmbuf_pool_create() can consume upto 300-350 ms for<br>
> applications that require huge memory.<br>
> <br>
> This cost is incurred on each restart (which happens in our use-case<br>
> during binary updates for servicing).<br>
> This patch provides an optimization using pthreads that appplications<br>
> can use and which can save 200-230ms.<br>
> <br>
> In this patch, rte_eal_init() is refactored into two parts-<br>
> a) 1st part is dependent code ie- it’s a perquisite of the FLR and<br>
>    mempool creation. So this code needs to be executed before any<br>
>    pthreads. Its named as rte_eal_init_setup()<br>
> b) 2nd part of code is independent code ie- it can execute in parallel<br>
>    to mempool creation in a pthread. Its named as rte_probe_and_ioctl().<br>
> <br>
> Existing applications require no changes unless they wish to leverage<br>
> the optimization.<br>
> <br>
> If the application wants to use pthread functionality, it should call-<br>
> a) rte_eal_init_setup() then create two or more pthreads-<br>
> b) in one pthread call- rte_probe_and_ioctl(),<br>
> c) second pthread call- rte_pktmbuf_pool_create()<br>
> d) (optional) Other pthreads for  any other independent function.<br>
> <br>
> Signed-off-by: Rahul Gupta <<a href="mailto:rahulgupt@linux.microsoft.com" target="_blank">rahulgupt@linux.microsoft.com</a>><br>
<br>
These probably marked internal rather than part of API/ABI.<br>
</blockquote></div></div>