|
@@ -34,6 +34,8 @@
|
|
|
#ifndef _NFP_PORT_H_
|
|
#ifndef _NFP_PORT_H_
|
|
|
#define _NFP_PORT_H_
|
|
#define _NFP_PORT_H_
|
|
|
|
|
|
|
|
|
|
+#include <net/devlink.h>
|
|
|
|
|
+
|
|
|
struct net_device;
|
|
struct net_device;
|
|
|
struct nfp_app;
|
|
struct nfp_app;
|
|
|
struct nfp_port;
|
|
struct nfp_port;
|
|
@@ -66,6 +68,7 @@ enum nfp_port_flags {
|
|
|
* @type: what port type does the entity represent
|
|
* @type: what port type does the entity represent
|
|
|
* @flags: port flags
|
|
* @flags: port flags
|
|
|
* @app: backpointer to the app structure
|
|
* @app: backpointer to the app structure
|
|
|
|
|
+ * @dl_port: devlink port structure
|
|
|
* @eth_id: for %NFP_PORT_PHYS_PORT port ID in NFP enumeration scheme
|
|
* @eth_id: for %NFP_PORT_PHYS_PORT port ID in NFP enumeration scheme
|
|
|
* @eth_port: for %NFP_PORT_PHYS_PORT translated ETH Table port entry
|
|
* @eth_port: for %NFP_PORT_PHYS_PORT translated ETH Table port entry
|
|
|
* @port_list: entry on pf's list of ports
|
|
* @port_list: entry on pf's list of ports
|
|
@@ -78,6 +81,8 @@ struct nfp_port {
|
|
|
|
|
|
|
|
struct nfp_app *app;
|
|
struct nfp_app *app;
|
|
|
|
|
|
|
|
|
|
+ struct devlink_port dl_port;
|
|
|
|
|
+
|
|
|
unsigned int eth_id;
|
|
unsigned int eth_id;
|
|
|
struct nfp_eth_table_port *eth_port;
|
|
struct nfp_eth_table_port *eth_port;
|
|
|
|
|
|
|
@@ -99,4 +104,7 @@ void nfp_port_free(struct nfp_port *port);
|
|
|
int nfp_net_refresh_eth_port(struct nfp_port *port);
|
|
int nfp_net_refresh_eth_port(struct nfp_port *port);
|
|
|
void nfp_net_refresh_port_table(struct nfp_port *port);
|
|
void nfp_net_refresh_port_table(struct nfp_port *port);
|
|
|
|
|
|
|
|
|
|
+int nfp_devlink_port_register(struct nfp_app *app, struct nfp_port *port);
|
|
|
|
|
+void nfp_devlink_port_unregister(struct nfp_port *port);
|
|
|
|
|
+
|
|
|
#endif
|
|
#endif
|