sa = rxq->evq->sa;
sfc_adapter_lock(sa);
- sw_index = sfc_rxq_sw_index(rxq);
+ sw_index = dp_rxq->dpq.queue_id;
sfc_log_init(sa, "RxQ=%u", sw_index);
if (rc != 0)
goto fail_tx_qinit;
- dev->data->tx_queues[tx_queue_id] = sa->txq_info[tx_queue_id].txq->dp;
+ dev->data->tx_queues[tx_queue_id] = sa->txq_info[tx_queue_id].dp;
sfc_adapter_unlock(sa);
return 0;
return;
txq = sfc_txq_by_dp_txq(dp_txq);
- sw_index = sfc_txq_sw_index(txq);
+ sw_index = dp_txq->dpq.queue_id;
SFC_ASSERT(txq->evq != NULL);
sa = txq->evq->sa;
sfc_adapter_unlock(sa);
}
+/*
+ * The function is used by the secondary process as well. It must not
+ * use any process-local pointers from the adapter data.
+ */
static uint32_t
sfc_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
{
return sap->dp_rx->qdesc_npending(rxq_info->dp);
}
+/*
+ * The function is used by the secondary process as well. It must not
+ * use any process-local pointers from the adapter data.
+ */
static int
sfc_rx_descriptor_done(void *queue, uint16_t offset)
{
struct sfc_dp_rxq *dp_rxq = queue;
- struct sfc_rxq *rxq = sfc_rxq_by_dp_rxq(dp_rxq);
+ const struct sfc_dp_rx *dp_rx;
- return offset < rxq->evq->sa->priv.dp_rx->qdesc_npending(dp_rxq);
+ dp_rx = sfc_dp_rx_by_dp_rxq(dp_rxq);
+
+ return offset < dp_rx->qdesc_npending(dp_rxq);
}
+/*
+ * The function is used by the secondary process as well. It must not
+ * use any process-local pointers from the adapter data.
+ */
static int
sfc_rx_descriptor_status(void *queue, uint16_t offset)
{
struct sfc_dp_rxq *dp_rxq = queue;
- struct sfc_rxq *rxq = sfc_rxq_by_dp_rxq(dp_rxq);
+ const struct sfc_dp_rx *dp_rx;
+
+ dp_rx = sfc_dp_rx_by_dp_rxq(dp_rxq);
- return rxq->evq->sa->priv.dp_rx->qdesc_status(dp_rxq, offset);
+ return dp_rx->qdesc_status(dp_rxq, offset);
}
+/*
+ * The function is used by the secondary process as well. It must not
+ * use any process-local pointers from the adapter data.
+ */
static int
sfc_tx_descriptor_status(void *queue, uint16_t offset)
{
struct sfc_dp_txq *dp_txq = queue;
- struct sfc_txq *txq = sfc_txq_by_dp_txq(dp_txq);
+ const struct sfc_dp_tx *dp_tx;
- return txq->evq->sa->priv.dp_tx->qdesc_status(dp_txq, offset);
+ dp_tx = sfc_dp_tx_by_dp_txq(dp_txq);
+
+ return dp_tx->qdesc_status(dp_txq, offset);
}
static int
return sfc_dev_udp_tunnel_op(dev, tunnel_udp, SFC_UDP_TUNNEL_DEL_PORT);
}
+/*
+ * The function is used by the secondary process as well. It must not
+ * use any process-local pointers from the adapter data.
+ */
static int
sfc_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
struct rte_eth_rss_conf *rss_conf)
return -rc;
}
+/*
+ * The function is used by the secondary process as well. It must not
+ * use any process-local pointers from the adapter data.
+ */
static int
sfc_dev_rss_reta_query(struct rte_eth_dev *dev,
struct rte_eth_rss_reta_entry64 *reta_conf,
}
static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
+ .rx_queue_count = sfc_rx_queue_count,
+ .rx_descriptor_done = sfc_rx_descriptor_done,
+ .rx_descriptor_status = sfc_rx_descriptor_status,
+ .tx_descriptor_status = sfc_tx_descriptor_status,
+ .reta_query = sfc_dev_rss_reta_query,
+ .rss_hash_conf_get = sfc_dev_rss_hash_conf_get,
.rxq_info_get = sfc_rx_queue_info_get,
.txq_info_get = sfc_tx_queue_info_get,
};