Lines Matching refs:sdev
14 fs_rx_unsafe(struct sub_device *sdev) in fs_rx_unsafe() argument
16 return (ETH(sdev) == NULL) || in fs_rx_unsafe()
17 (ETH(sdev)->rx_pkt_burst == NULL) || in fs_rx_unsafe()
18 (sdev->state != DEV_STARTED) || in fs_rx_unsafe()
19 (sdev->remove != 0); in fs_rx_unsafe()
23 fs_tx_unsafe(struct sub_device *sdev) in fs_tx_unsafe() argument
25 return (sdev == NULL) || in fs_tx_unsafe()
26 (ETH(sdev) == NULL) || in fs_tx_unsafe()
27 (ETH(sdev)->tx_pkt_burst == NULL) || in fs_tx_unsafe()
28 (sdev->state != DEV_STARTED); in fs_tx_unsafe()
34 struct sub_device *sdev; in failsafe_set_burst_fn() local
40 FOREACH_SUBDEV(sdev, i, dev) in failsafe_set_burst_fn()
41 need_safe |= fs_rx_unsafe(sdev); in failsafe_set_burst_fn()
84 struct sub_device *sdev; in failsafe_rx_burst() local
90 sdev = rxq->sdev; in failsafe_rx_burst()
92 if (fs_rx_unsafe(sdev)) { in failsafe_rx_burst()
94 sdev = sdev->next; in failsafe_rx_burst()
97 sub_rxq = ETH(sdev)->data->rx_queues[rxq->qid]; in failsafe_rx_burst()
98 FS_ATOMIC_P(rxq->refcnt[sdev->sid]); in failsafe_rx_burst()
99 nb_rx = ETH(sdev)-> in failsafe_rx_burst()
101 FS_ATOMIC_V(rxq->refcnt[sdev->sid]); in failsafe_rx_burst()
102 sdev = sdev->next; in failsafe_rx_burst()
103 } while (nb_rx == 0 && sdev != rxq->sdev); in failsafe_rx_burst()
104 rxq->sdev = sdev; in failsafe_rx_burst()
116 struct sub_device *sdev; in failsafe_rx_burst_fast() local
122 sdev = rxq->sdev; in failsafe_rx_burst_fast()
124 RTE_ASSERT(!fs_rx_unsafe(sdev)); in failsafe_rx_burst_fast()
125 sub_rxq = ETH(sdev)->data->rx_queues[rxq->qid]; in failsafe_rx_burst_fast()
126 FS_ATOMIC_P(rxq->refcnt[sdev->sid]); in failsafe_rx_burst_fast()
127 nb_rx = ETH(sdev)-> in failsafe_rx_burst_fast()
129 FS_ATOMIC_V(rxq->refcnt[sdev->sid]); in failsafe_rx_burst_fast()
130 sdev = sdev->next; in failsafe_rx_burst_fast()
131 } while (nb_rx == 0 && sdev != rxq->sdev); in failsafe_rx_burst_fast()
132 rxq->sdev = sdev; in failsafe_rx_burst_fast()
144 struct sub_device *sdev; in failsafe_tx_burst() local
150 sdev = TX_SUBDEV(&rte_eth_devices[txq->priv->data->port_id]); in failsafe_tx_burst()
151 if (unlikely(fs_tx_unsafe(sdev))) in failsafe_tx_burst()
153 sub_txq = ETH(sdev)->data->tx_queues[txq->qid]; in failsafe_tx_burst()
154 FS_ATOMIC_P(txq->refcnt[sdev->sid]); in failsafe_tx_burst()
155 nb_tx = ETH(sdev)->tx_pkt_burst(sub_txq, tx_pkts, nb_pkts); in failsafe_tx_burst()
156 FS_ATOMIC_V(txq->refcnt[sdev->sid]); in failsafe_tx_burst()
165 struct sub_device *sdev; in failsafe_tx_burst_fast() local
171 sdev = TX_SUBDEV(&rte_eth_devices[txq->priv->data->port_id]); in failsafe_tx_burst_fast()
172 RTE_ASSERT(!fs_tx_unsafe(sdev)); in failsafe_tx_burst_fast()
173 sub_txq = ETH(sdev)->data->tx_queues[txq->qid]; in failsafe_tx_burst_fast()
174 FS_ATOMIC_P(txq->refcnt[sdev->sid]); in failsafe_tx_burst_fast()
175 nb_tx = ETH(sdev)->tx_pkt_burst(sub_txq, tx_pkts, nb_pkts); in failsafe_tx_burst_fast()
176 FS_ATOMIC_V(txq->refcnt[sdev->sid]); in failsafe_tx_burst_fast()