/* Others are retrieved through a file descriptor */
char *fd_str;
/* fail-safe device backreference */
- struct rte_eth_dev *fs_dev;
+ uint16_t fs_port_id; /* shared between processes */
/* flag calling for recollection */
volatile unsigned int remove:1;
/* flow isolation state */
*/
#define FS_ATOMIC_RX(s, i) \
rte_atomic64_read( \
- &((struct rxq *)((s)->fs_dev->data->rx_queues[i]))->refcnt[(s)->sid] \
- )
+ &((struct rxq *) \
+ (fs_dev(s)->data->rx_queues[i]))->refcnt[(s)->sid])
/**
* s: (struct sub_device *)
* i: uint16_t qid
*/
#define FS_ATOMIC_TX(s, i) \
rte_atomic64_read( \
- &((struct txq *)((s)->fs_dev->data->tx_queues[i]))->refcnt[(s)->sid] \
- )
+ &((struct txq *) \
+ (fs_dev(s)->data->tx_queues[i]))->refcnt[(s)->sid])
#ifdef RTE_EXEC_ENV_FREEBSD
#define FS_THREADID_TYPE void*
return &subs[sid];
}
+static inline struct rte_eth_dev *
+fs_dev(struct sub_device *sdev) {
+ return &rte_eth_devices[sdev->fs_port_id];
+}
+
/*
* Lock hot-plug mutex.
* is_alarm means that the caller is, for sure, the hot-plug alarm mechanism.