/* prepare service info */
memset(&service, 0, sizeof(struct rte_service_spec));
snprintf(service.name, sizeof(service.name), "%s_Rx_service",
- priv->dev->data->name);
- service.socket_id = priv->dev->data->numa_node;
+ priv->data->name);
+ service.socket_id = priv->data->numa_node;
service.callback = fs_rx_event_proxy_routine;
service.callback_userdata = priv;
unsigned int count;
struct rte_intr_handle *intr_handle;
- rxqs_n = priv->dev->data->nb_rx_queues;
+ rxqs_n = priv->data->nb_rx_queues;
n = RTE_MIN(rxqs_n, (uint32_t)RTE_MAX_RXTX_INTR_VEC_ID);
count = 0;
intr_handle = &priv->intr_handle;
return -rte_errno;
}
for (i = 0; i < n; i++) {
- struct rxq *rxq = priv->dev->data->rx_queues[i];
+ struct rxq *rxq = priv->data->rx_queues[i];
/* Skip queues that cannot request interrupts. */
if (rxq == NULL || rxq->event_fd < 0) {
{
struct fs_priv *priv = PRIV(dev);
const struct rte_intr_conf *const intr_conf =
- &priv->dev->data->dev_conf.intr_conf;
+ &priv->data->dev_conf.intr_conf;
if (intr_conf->rxq == 0 || dev->intr_handle != NULL)
return 0;
if (queue == NULL)
return;
rxq = queue;
- dev = rxq->priv->dev;
+ dev = &rte_eth_devices[rxq->priv->data->port_id];
fs_lock(dev, 0);
if (rxq->event_fd > 0)
close(rxq->event_fd);
if (queue == NULL)
return;
txq = queue;
- dev = txq->priv->dev;
+ dev = &rte_eth_devices[txq->priv->data->port_id];
fs_lock(dev, 0);
FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) {
if (ETH(sdev)->data->tx_queues != NULL &&
unsigned int lsc_callback:1;
};
+/*
+ * This is referenced by eth_dev->data->dev_private
+ * This is shared between processes.
+ */
struct fs_priv {
- struct rte_eth_dev *dev;
+ struct rte_eth_dev_data *data; /* backreference to shared data. */
/*
* Set of sub_devices.
* subs[0] is the preferred device
uint16_t nb_tx;
txq = queue;
- sdev = TX_SUBDEV(txq->priv->dev);
+ sdev = TX_SUBDEV(&rte_eth_devices[txq->priv->data->port_id]);
if (unlikely(fs_tx_unsafe(sdev)))
return 0;
sub_txq = ETH(sdev)->data->tx_queues[txq->qid];
uint16_t nb_tx;
txq = queue;
- sdev = TX_SUBDEV(txq->priv->dev);
+ sdev = TX_SUBDEV(&rte_eth_devices[txq->priv->data->port_id]);
RTE_ASSERT(!fs_tx_unsafe(sdev));
sub_txq = ETH(sdev)->data->tx_queues[txq->qid];
FS_ATOMIC_P(txq->refcnt[sdev->sid]);