X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Ffailsafe%2Ffailsafe_intr.c;h=602c04033c18c7ec5de95c1f33c7fa36f40e1433;hb=fdab8f2e17493192d555cd88cf28b06269174326;hp=09aa3c696426deaf12adf5e9ac5bc232509d4cfa;hpb=08647012458486b6a6c00145ea3d5ad06d3a6a39;p=dpdk.git diff --git a/drivers/net/failsafe/failsafe_intr.c b/drivers/net/failsafe/failsafe_intr.c index 09aa3c6964..602c04033c 100644 --- a/drivers/net/failsafe/failsafe_intr.c +++ b/drivers/net/failsafe/failsafe_intr.c @@ -13,7 +13,6 @@ #include #include -#include #include #include #include @@ -274,14 +273,14 @@ failsafe_eth_rx_intr_ctl_subdevice(struct sub_device *sdev, int op) 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) { @@ -330,7 +329,7 @@ int failsafe_rx_intr_install_subdevice(struct sub_device *sdev) 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; @@ -368,7 +367,7 @@ void failsafe_rx_intr_uninstall_subdevice(struct sub_device *sdev) 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]; @@ -394,7 +393,7 @@ fs_rx_event_proxy_uninstall(struct fs_priv *priv) free(priv->rxp.evec); priv->rxp.evec = NULL; } - if (priv->rxp.efd > 0) { + if (priv->rxp.efd >= 0) { close(priv->rxp.efd); priv->rxp.efd = -1; }