On 8/12/2022 11:22 AM, Chaoyong He wrote:
The NFP card can load different firmware applications.
This commit move the init logic of corenic app of the
secondary process into its own function.

Signed-off-by: Chaoyong He <chaoyong...@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderl...@corigine.com>

<...>

+       switch (app_id) {
+       case NFP_APP_CORE_NIC:
+               PMD_INIT_LOG(INFO, "Initializing coreNIC");
+               ret = nfp_secondary_init_app_nic(pci_dev, sym_tbl, cpp);
+               if (ret != 0) {
+                       PMD_INIT_LOG(ERR, "Could not initialize coreNIC!");
+                       goto sym_tbl_cleanup;
                }

If you are planning to add more FW app support, what do you think to add another abstraction for it? Something like

struct fw_ops {
        *init()
        *secondary_init()
        ...
}

        ...
        ret = fw_ops[app_id].secondary_init(...);
        ...


Reply via email to