net/mlx5: fix handling link status event
[dpdk.git] / drivers / net / failsafe / failsafe_private.h
index d81cc3c..54b5b91 100644 (file)
@@ -62,8 +62,8 @@
 struct rxq {
        struct fs_priv *priv;
        uint16_t qid;
-       /* id of last sub_device polled */
-       uint8_t last_polled;
+       /* next sub_device to poll */
+       struct sub_device *sdev;
        unsigned int socket_id;
        struct rte_eth_rxq_info info;
        rte_atomic64_t refcnt[];
@@ -100,6 +100,7 @@ struct fs_stats {
 
 struct sub_device {
        /* Exhaustive DPDK device description */
+       struct sub_device *next;
        struct rte_devargs devargs;
        struct rte_bus *bus;
        struct rte_device *dev;
@@ -269,13 +270,13 @@ extern int mac_from_arg;
  * a: (rte_atomic64_t)
  */
 #define FS_ATOMIC_P(a) \
-       rte_atomic64_add(&(a), 1)
+       rte_atomic64_set(&(a), 1)
 
 /**
  * a: (rte_atomic64_t)
  */
 #define FS_ATOMIC_V(a) \
-       rte_atomic64_sub(&(a), 1)
+       rte_atomic64_set(&(a), 0)
 
 /**
  * s: (struct sub_device *)