#include <unistd.h>
#include <rte_alarm.h>
-#include <rte_config.h>
#include <rte_errno.h>
#include <rte_ethdev.h>
#include <rte_interrupts.h>
/* 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;
int rc;
int ret = 0;
+ fsdev = fs_dev(sdev);
if (sdev == NULL || (ETH(sdev) == NULL) ||
- sdev->fs_dev == NULL || (PRIV(sdev->fs_dev) == NULL)) {
+ fsdev == NULL || (PRIV(fsdev) == NULL)) {
ERROR("Called with invalid arguments");
return -EINVAL;
}
dev = ETH(sdev);
- fsdev = sdev->fs_dev;
- epfd = PRIV(sdev->fs_dev)->rxp.efd;
+ epfd = PRIV(fsdev)->rxp.efd;
pid = PORT_ID(sdev);
if (epfd <= 0) {
const struct rte_intr_conf *const intr_conf =
Ð(sdev)->data->dev_conf.intr_conf;
- fsdev = sdev->fs_dev;
+ fsdev = fs_dev(sdev);
rxq = (struct rxq **)fsdev->data->rx_queues;
if (intr_conf->rxq == 0)
return 0;
struct rte_eth_dev *fsdev;
struct rxq *fsrxq;
- fsdev = sdev->fs_dev;
+ fsdev = fs_dev(sdev);
for (qid = 0; qid < ETH(sdev)->data->nb_rx_queues; qid++) {
if (qid < fsdev->data->nb_rx_queues) {
fsrxq = fsdev->data->rx_queues[qid];
- if (fsrxq->enable_events)
+ if (fsrxq != NULL && fsrxq->enable_events)
rte_eth_dev_rx_intr_disable(PORT_ID(sdev),
qid);
}
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;