diff options
Diffstat (limited to 'platform/linux-generic/pktio/socket_common.c')
-rw-r--r-- | platform/linux-generic/pktio/socket_common.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/platform/linux-generic/pktio/socket_common.c b/platform/linux-generic/pktio/socket_common.c index ab0caeb81..b6ae7b9ae 100644 --- a/platform/linux-generic/pktio/socket_common.c +++ b/platform/linux-generic/pktio/socket_common.c @@ -58,8 +58,7 @@ int _odp_mac_addr_get_fd(int fd, const char *name, unsigned char mac_dst[]) ret = ioctl(fd, SIOCGIFHWADDR, ðreq); if (ret != 0) { _odp_errno = errno; - ODP_ERR("ioctl(SIOCGIFHWADDR): %s: \"%s\".\n", strerror(errno), - ethreq.ifr_name); + _ODP_ERR("ioctl(SIOCGIFHWADDR): %s: \"%s\".\n", strerror(errno), ethreq.ifr_name); return -1; } @@ -83,8 +82,7 @@ uint32_t _odp_mtu_get_fd(int fd, const char *name) ret = ioctl(fd, SIOCGIFMTU, &ifr); if (ret < 0) { _odp_errno = errno; - ODP_ERR("ioctl(SIOCGIFMTU): %s: \"%s\".\n", strerror(errno), - ifr.ifr_name); + _ODP_ERR("ioctl(SIOCGIFMTU): %s: \"%s\".\n", strerror(errno), ifr.ifr_name); return 0; } return ifr.ifr_mtu + _ODP_ETHHDR_LEN; @@ -107,8 +105,7 @@ int _odp_mtu_set_fd(int fd, const char *name, int mtu) ret = ioctl(fd, SIOCSIFMTU, &ifr); if (ret < 0) { _odp_errno = errno; - ODP_ERR("ioctl(SIOCSIFMTU): %s: \"%s\".\n", strerror(errno), - ifr.ifr_name); + _ODP_ERR("ioctl(SIOCSIFMTU): %s: \"%s\".\n", strerror(errno), ifr.ifr_name); return -1; } return 0; @@ -128,8 +125,7 @@ int _odp_promisc_mode_set_fd(int fd, const char *name, int enable) ret = ioctl(fd, SIOCGIFFLAGS, &ifr); if (ret < 0) { _odp_errno = errno; - ODP_DBG("ioctl(SIOCGIFFLAGS): %s: \"%s\".\n", strerror(errno), - ifr.ifr_name); + _ODP_DBG("ioctl(SIOCGIFFLAGS): %s: \"%s\".\n", strerror(errno), ifr.ifr_name); return -1; } @@ -141,8 +137,7 @@ int _odp_promisc_mode_set_fd(int fd, const char *name, int enable) ret = ioctl(fd, SIOCSIFFLAGS, &ifr); if (ret < 0) { _odp_errno = errno; - ODP_DBG("ioctl(SIOCSIFFLAGS): %s: \"%s\".\n", strerror(errno), - ifr.ifr_name); + _ODP_DBG("ioctl(SIOCSIFFLAGS): %s: \"%s\".\n", strerror(errno), ifr.ifr_name); return -1; } return 0; @@ -162,8 +157,7 @@ int _odp_promisc_mode_get_fd(int fd, const char *name) ret = ioctl(fd, SIOCGIFFLAGS, &ifr); if (ret < 0) { _odp_errno = errno; - ODP_DBG("ioctl(SIOCGIFFLAGS): %s: \"%s\".\n", strerror(errno), - ifr.ifr_name); + _ODP_DBG("ioctl(SIOCGIFFLAGS): %s: \"%s\".\n", strerror(errno), ifr.ifr_name); return -1; } @@ -179,8 +173,7 @@ int _odp_link_status_fd(int fd, const char *name) ret = ioctl(fd, SIOCGIFFLAGS, &ifr); if (ret < 0) { _odp_errno = errno; - ODP_DBG("ioctl(SIOCGIFFLAGS): %s: \"%s\".\n", strerror(errno), - ifr.ifr_name); + _ODP_DBG("ioctl(SIOCGIFFLAGS): %s: \"%s\".\n", strerror(errno), ifr.ifr_name); return ODP_PKTIO_LINK_STATUS_UNKNOWN; } @@ -207,8 +200,7 @@ int _odp_link_info_fd(int fd, const char *name, odp_pktio_link_info_t *info) ifr.ifr_data = (void *)&pcmd; if (ioctl(fd, SIOCETHTOOL, &ifr) && errno != EOPNOTSUPP) { _odp_errno = errno; - ODP_ERR("ioctl(SIOCETHTOOL): %s: \"%s\".\n", strerror(errno), - ifr.ifr_name); + _ODP_ERR("ioctl(SIOCETHTOOL): %s: \"%s\".\n", strerror(errno), ifr.ifr_name); return -1; } @@ -220,7 +212,8 @@ int _odp_link_info_fd(int fd, const char *name, odp_pktio_link_info_t *info) ifr.ifr_data = (void *)&ecmd_old; if (ioctl(fd, SIOCETHTOOL, &ifr) < 0) { _odp_errno = errno; - ODP_ERR("ioctl(SIOCETHTOOL): %s: \"%s\".\n", strerror(errno), ifr.ifr_name); + _ODP_ERR("ioctl(SIOCETHTOOL): %s: \"%s\".\n", strerror(errno), + ifr.ifr_name); return -1; } @@ -261,7 +254,7 @@ int _odp_link_info_fd(int fd, const char *name, odp_pktio_link_info_t *info) } if (hcmd.link_mode_masks_nwords >= 0 || hcmd.cmd != ETHTOOL_GLINKSETTINGS) { - ODP_ERR("ETHTOOL_GLINKSETTINGS handshake failed\n"); + _ODP_ERR("ETHTOOL_GLINKSETTINGS handshake failed\n"); return -1; } /* Absolute value indicates kernel recommended 'link_mode_masks_nwords' value. */ @@ -278,8 +271,7 @@ int _odp_link_info_fd(int fd, const char *name, odp_pktio_link_info_t *info) ifr.ifr_data = (void *)ecmd; if (ioctl(fd, SIOCETHTOOL, &ifr) < 0) { _odp_errno = errno; - ODP_ERR("ioctl(SIOCETHTOOL): %s: \"%s\".\n", strerror(errno), - ifr.ifr_name); + _ODP_ERR("ioctl(SIOCETHTOOL): %s: \"%s\".\n", strerror(errno), ifr.ifr_name); return -1; } |