@@ -21,6 +21,7 @@
#include <bus_pci_driver.h>
#include <bus_ifpga_driver.h>
#include <rte_rawdev.h>
+#include <rte_errno.h>
#include "afu_pmd_core.h"
#include "afu_pmd_n3000.h"
@@ -693,7 +694,7 @@ static int poll_interrupt(struct dma_afu_ctx *ctx)
pfd.events = POLLIN;
poll_ret = poll(&pfd, 1, DMA_TIMEOUT_MSEC);
if (poll_ret < 0) {
- IFPGA_RAWDEV_PMD_ERR("Error %s", strerror(errno));
+ IFPGA_RAWDEV_PMD_ERR("Error %s", rte_strerror(errno));
ret = -EFAULT;
goto out;
} else if (poll_ret == 0) {
@@ -708,7 +709,7 @@ static int poll_interrupt(struct dma_afu_ctx *ctx)
ret = 0;
} else {
IFPGA_RAWDEV_PMD_ERR("Failed %s", bytes_read > 0 ?
- strerror(errno) : "zero bytes read");
+ rte_strerror(errno) : "zero bytes read");
ret = -EIO;
}
}
@@ -7,6 +7,8 @@
#include <unistd.h>
#include "ifpga_sec_mgr.h"
+#include <rte_errno.h>
+
static struct ifpga_sec_mgr *sec_mgr;
static void set_rsu_control(struct ifpga_sec_mgr *smgr, uint32_t ctrl)
@@ -112,7 +114,7 @@ static int write_flash_image(struct ifpga_sec_mgr *smgr, const char *image,
if (fd < 0) {
dev_err(smgr,
"Failed to open \'%s\' for RD [e:%s]\n",
- image, strerror(errno));
+ image, rte_strerror(errno));
return -EIO;
}
@@ -130,14 +132,14 @@ static int write_flash_image(struct ifpga_sec_mgr *smgr, const char *image,
IFPGA_RSU_DATA_BLK_SIZE : length;
if (lseek(fd, offset, SEEK_SET) < 0) {
dev_err(smgr, "Failed to seek in \'%s\' [e:%s]\n",
- image, strerror(errno));
+ image, rte_strerror(errno));
ret = -EIO;
goto end;
}
read_size = read(fd, buf, to_transfer);
if (read_size < 0) {
dev_err(smgr, "Failed to read from \'%s\' [e:%s]\n",
- image, strerror(errno));
+ image, rte_strerror(errno));
ret = -EIO;
goto end;
}
@@ -316,7 +318,7 @@ int fpga_update_flash(struct ifpga_fme_hw *fme, const char *image,
if (fd < 0) {
dev_err(smgr,
"Failed to open \'%s\' for RD [e:%s]\n",
- image, strerror(errno));
+ image, rte_strerror(errno));
return -EIO;
}
len = lseek(fd, 0, SEEK_END);
@@ -325,7 +327,7 @@ int fpga_update_flash(struct ifpga_fme_hw *fme, const char *image,
if (len < 0) {
dev_err(smgr,
"Failed to get file length of \'%s\' [e:%s]\n",
- image, strerror(errno));
+ image, rte_strerror(errno));
return -EIO;
}
if (len == 0) {
@@ -848,7 +848,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
if (file_fd < 0) {
IFPGA_RAWDEV_PMD_ERR("%s: open file error: %s",
__func__, file_name);
- IFPGA_RAWDEV_PMD_ERR("Message : %s", strerror(errno));
+ IFPGA_RAWDEV_PMD_ERR("Message : %s", rte_strerror(errno));
return -EINVAL;
}
ret = stat(file_name, &file_stat);