#ifndef _NFP_PORT_H_
#define _NFP_PORT_H_
#include <net/devlink.h>
struct net_device;
struct netdev_phys_item_id;
struct nfp_app;
struct nfp_pf;
struct nfp_port;
enum nfp_port_type { … };
enum nfp_port_flags { … };
enum { … };
struct nfp_port { … };
extern const struct ethtool_ops nfp_port_ethtool_ops;
int nfp_port_setup_tc(struct net_device *netdev, enum tc_setup_type type,
void *type_data);
static inline bool nfp_port_is_vnic(const struct nfp_port *port)
{ … }
int
nfp_port_set_features(struct net_device *netdev, netdev_features_t features);
struct nfp_port *nfp_port_from_netdev(struct net_device *netdev);
int nfp_port_get_port_parent_id(struct net_device *netdev,
struct netdev_phys_item_id *ppid);
struct nfp_eth_table_port *__nfp_port_get_eth_port(struct nfp_port *port);
struct nfp_eth_table_port *nfp_port_get_eth_port(struct nfp_port *port);
int
nfp_port_get_phys_port_name(struct net_device *netdev, char *name, size_t len);
int nfp_port_configure(struct net_device *netdev, bool configed);
struct nfp_port *
nfp_port_alloc(struct nfp_app *app, enum nfp_port_type type,
struct net_device *netdev);
void nfp_port_free(struct nfp_port *port);
int nfp_port_init_phy_port(struct nfp_pf *pf, struct nfp_app *app,
struct nfp_port *port, unsigned int id);
int nfp_net_refresh_eth_port(struct nfp_port *port);
void nfp_net_refresh_port_table(struct nfp_port *port);
int nfp_net_refresh_port_table_sync(struct nfp_pf *pf);
int nfp_devlink_port_register(struct nfp_app *app, struct nfp_port *port);
void nfp_devlink_port_unregister(struct nfp_port *port);
#define NFP_MAC_STATS_BASE …
#define NFP_MAC_STATS_SIZE …
#define NFP_MAC_STATS_RX_IN_OCTETS …
#define NFP_MAC_STATS_RX_FRAME_TOO_LONG_ERRORS …
#define NFP_MAC_STATS_RX_RANGE_LENGTH_ERRORS …
#define NFP_MAC_STATS_RX_VLAN_RECEIVED_OK …
#define NFP_MAC_STATS_RX_IN_ERRORS …
#define NFP_MAC_STATS_RX_IN_BROADCAST_PKTS …
#define NFP_MAC_STATS_RX_DROP_EVENTS …
#define NFP_MAC_STATS_RX_ALIGNMENT_ERRORS …
#define NFP_MAC_STATS_RX_PAUSE_MAC_CTRL_FRAMES …
#define NFP_MAC_STATS_RX_FRAMES_RECEIVED_OK …
#define NFP_MAC_STATS_RX_FRAME_CHECK_SEQUENCE_ERRORS …
#define NFP_MAC_STATS_RX_UNICAST_PKTS …
#define NFP_MAC_STATS_RX_MULTICAST_PKTS …
#define NFP_MAC_STATS_RX_PKTS …
#define NFP_MAC_STATS_RX_UNDERSIZE_PKTS …
#define NFP_MAC_STATS_RX_PKTS_64_OCTETS …
#define NFP_MAC_STATS_RX_PKTS_65_TO_127_OCTETS …
#define NFP_MAC_STATS_RX_PKTS_512_TO_1023_OCTETS …
#define NFP_MAC_STATS_RX_PKTS_1024_TO_1518_OCTETS …
#define NFP_MAC_STATS_RX_JABBERS …
#define NFP_MAC_STATS_RX_FRAGMENTS …
#define NFP_MAC_STATS_RX_PAUSE_FRAMES_CLASS2 …
#define NFP_MAC_STATS_RX_PAUSE_FRAMES_CLASS3 …
#define NFP_MAC_STATS_RX_PKTS_128_TO_255_OCTETS …
#define NFP_MAC_STATS_RX_PKTS_256_TO_511_OCTETS …
#define NFP_MAC_STATS_RX_PKTS_1519_TO_MAX_OCTETS …
#define NFP_MAC_STATS_RX_OVERSIZE_PKTS …
#define NFP_MAC_STATS_RX_PAUSE_FRAMES_CLASS0 …
#define NFP_MAC_STATS_RX_PAUSE_FRAMES_CLASS1 …
#define NFP_MAC_STATS_RX_PAUSE_FRAMES_CLASS4 …
#define NFP_MAC_STATS_RX_PAUSE_FRAMES_CLASS5 …
#define NFP_MAC_STATS_RX_PAUSE_FRAMES_CLASS6 …
#define NFP_MAC_STATS_RX_PAUSE_FRAMES_CLASS7 …
#define NFP_MAC_STATS_RX_MAC_CTRL_FRAMES_RECEIVED …
#define NFP_MAC_STATS_RX_MAC_HEAD_DROP …
#define NFP_MAC_STATS_TX_QUEUE_DROP …
#define NFP_MAC_STATS_TX_OUT_OCTETS …
#define NFP_MAC_STATS_TX_VLAN_TRANSMITTED_OK …
#define NFP_MAC_STATS_TX_OUT_ERRORS …
#define NFP_MAC_STATS_TX_BROADCAST_PKTS …
#define NFP_MAC_STATS_TX_PKTS_64_OCTETS …
#define NFP_MAC_STATS_TX_PKTS_256_TO_511_OCTETS …
#define NFP_MAC_STATS_TX_PKTS_512_TO_1023_OCTETS …
#define NFP_MAC_STATS_TX_PAUSE_MAC_CTRL_FRAMES …
#define NFP_MAC_STATS_TX_FRAMES_TRANSMITTED_OK …
#define NFP_MAC_STATS_TX_UNICAST_PKTS …
#define NFP_MAC_STATS_TX_MULTICAST_PKTS …
#define NFP_MAC_STATS_TX_PKTS_65_TO_127_OCTETS …
#define NFP_MAC_STATS_TX_PKTS_128_TO_255_OCTETS …
#define NFP_MAC_STATS_TX_PKTS_1024_TO_1518_OCTETS …
#define NFP_MAC_STATS_TX_PKTS_1519_TO_MAX_OCTETS …
#define NFP_MAC_STATS_TX_PAUSE_FRAMES_CLASS0 …
#define NFP_MAC_STATS_TX_PAUSE_FRAMES_CLASS1 …
#define NFP_MAC_STATS_TX_PAUSE_FRAMES_CLASS4 …
#define NFP_MAC_STATS_TX_PAUSE_FRAMES_CLASS5 …
#define NFP_MAC_STATS_TX_PAUSE_FRAMES_CLASS2 …
#define NFP_MAC_STATS_TX_PAUSE_FRAMES_CLASS3 …
#define NFP_MAC_STATS_TX_PAUSE_FRAMES_CLASS6 …
#define NFP_MAC_STATS_TX_PAUSE_FRAMES_CLASS7 …
#endif