diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-05-22 20:59:30 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-22 21:59:05 +0300 |
commit | 6d4f8cba5fbbc83e74ee8a49e5234e446306bac6 (patch) | |
tree | baa7114989e0ed7623f206e41457e47bef3bbc53 /drivers/net/ethernet/netronome/nfp/nfp_port.h | |
parent | 3d4ed1e70185936ea7cfeec18dd25963c2908871 (diff) | |
download | linux-6d4f8cba5fbbc83e74ee8a49e5234e446306bac6.tar.xz |
nfp: move refresh tracking into the port structure
Track whether physical port's state have changed since last refresh
inside the nfp_port structure instead of the vNIC structure.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_port.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_port.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_port.h b/drivers/net/ethernet/netronome/nfp/nfp_port.h index 341e7e128233..47adacf88557 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_port.h +++ b/drivers/net/ethernet/netronome/nfp/nfp_port.h @@ -51,9 +51,20 @@ enum nfp_port_type { }; /** + * enum nfp_port_flags - port flags (can be type-specific) + * @NFP_PORT_CHANGED: port state has changed since last eth table refresh; + * for NFP_PORT_PHYS_PORT, never set otherwise; must hold + * rtnl_lock to clear + */ +enum nfp_port_flags { + NFP_PORT_CHANGED = 0, +}; + +/** * struct nfp_port - structure representing NFP port * @netdev: backpointer to associated netdev * @type: what port type does the entity represent + * @flags: port flags * @app: backpointer to the app structure * @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 @@ -62,6 +73,8 @@ struct nfp_port { struct net_device *netdev; enum nfp_port_type type; + unsigned long flags; + struct nfp_app *app; unsigned int eth_id; |