Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Copyright (c) 2018, Intel Corporation. */
0003 
0004 #ifndef _NET_FAILOVER_H
0005 #define _NET_FAILOVER_H
0006 
0007 #include <net/failover.h>
0008 
0009 /* failover state */
0010 struct net_failover_info {
0011     /* primary netdev with same MAC */
0012     struct net_device __rcu *primary_dev;
0013 
0014     /* standby netdev */
0015     struct net_device __rcu *standby_dev;
0016 
0017     /* primary netdev stats */
0018     struct rtnl_link_stats64 primary_stats;
0019 
0020     /* standby netdev stats */
0021     struct rtnl_link_stats64 standby_stats;
0022 
0023     /* aggregated stats */
0024     struct rtnl_link_stats64 failover_stats;
0025 
0026     /* spinlock while updating stats */
0027     spinlock_t stats_lock;
0028 };
0029 
0030 struct failover *net_failover_create(struct net_device *standby_dev);
0031 void net_failover_destroy(struct failover *failover);
0032 
0033 #define FAILOVER_VLAN_FEATURES  (NETIF_F_HW_CSUM | NETIF_F_SG | \
0034                  NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \
0035                  NETIF_F_HIGHDMA | NETIF_F_LRO)
0036 
0037 #define FAILOVER_ENC_FEATURES   (NETIF_F_HW_CSUM | NETIF_F_SG | \
0038                  NETIF_F_RXCSUM | NETIF_F_ALL_TSO)
0039 
0040 #endif /* _NET_FAILOVER_H */