diff options
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_app.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_app.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_app.h b/drivers/net/ethernet/netronome/nfp/nfp_app.h index 98dd5773e7cc..b5426398f29e 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_app.h +++ b/drivers/net/ethernet/netronome/nfp/nfp_app.h @@ -51,6 +51,7 @@ extern const struct nfp_app_type app_bpf; /** * struct nfp_app_type - application definition * @id: application ID + * @name: application name * * Callbacks * @init: perform basic app checks @@ -58,6 +59,7 @@ extern const struct nfp_app_type app_bpf; */ struct nfp_app_type { enum nfp_app_id id; + const char *name; int (*init)(struct nfp_app *app); @@ -93,6 +95,13 @@ static inline int nfp_app_vnic_init(struct nfp_app *app, struct nfp_net *nn, return app->type->vnic_init(app, nn, id); } +static inline const char *nfp_app_name(struct nfp_app *app) +{ + if (!app) + return ""; + return app->type->name; +} + struct nfp_app *nfp_app_alloc(struct nfp_pf *pf, enum nfp_app_id id); void nfp_app_free(struct nfp_app *app); |