diff options
author | Jere Leppänen <jere.leppanen@nokia.com> | 2021-02-22 21:54:31 +0200 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2021-02-26 15:09:58 +0200 |
commit | 706e1e6b24a40bfd9c2b07f084af47532bc2141f (patch) | |
tree | 29e51bc1e773a918dcd5f1951ed66116e046a690 /platform/linux-generic/pktio/tap.c | |
parent | 07e583bcbd09ba4852193e6732136148fef1022b (diff) |
linux-gen: rename remaining global symbols in the static library
Rename the rest of the global symbols in the static library that do
not have the "_odp_" prefix.
Fixes: https://github.com/OpenDataPlane/odp/issues/805
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'platform/linux-generic/pktio/tap.c')
-rw-r--r-- | platform/linux-generic/pktio/tap.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/platform/linux-generic/pktio/tap.c b/platform/linux-generic/pktio/tap.c index cb85e9afd..e7c9417c3 100644 --- a/platform/linux-generic/pktio/tap.c +++ b/platform/linux-generic/pktio/tap.c @@ -90,7 +90,7 @@ static int mac_addr_set_fd(int fd, const char *name, ret = ioctl(fd, SIOCSIFHWADDR, ðreq); if (ret != 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("ioctl(SIOCSIFHWADDR): %s: \"%s\".\n", strerror(errno), ethreq.ifr_name); return -1; @@ -121,7 +121,7 @@ static int tap_pktio_open(odp_pktio_t id ODP_UNUSED, fd = open("/dev/net/tun", O_RDWR); if (fd < 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("failed to open /dev/net/tun: %s\n", strerror(errno)); return -1; } @@ -136,7 +136,7 @@ static int tap_pktio_open(odp_pktio_t id ODP_UNUSED, snprintf(ifr.ifr_name, IF_NAMESIZE, "%s", devname + 4); if (ioctl(fd, TUNSETIFF, (void *)&ifr) < 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("%s: creating tap device failed: %s\n", ifr.ifr_name, strerror(errno)); goto tap_err; @@ -145,13 +145,13 @@ static int tap_pktio_open(odp_pktio_t id ODP_UNUSED, /* Set nonblocking mode on interface. */ flags = fcntl(fd, F_GETFL, 0); if (flags < 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("fcntl(F_GETFL) failed: %s\n", strerror(errno)); goto tap_err; } if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("fcntl(F_SETFL) failed: %s\n", strerror(errno)); goto tap_err; } @@ -162,14 +162,14 @@ static int tap_pktio_open(odp_pktio_t id ODP_UNUSED, /* Create AF_INET socket for network interface related operations. */ skfd = socket(AF_INET, SOCK_DGRAM, 0); if (skfd < 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("socket creation failed: %s\n", strerror(errno)); goto tap_err; } mtu = _odp_mtu_get_fd(skfd, devname + 4); if (mtu == 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("_odp_mtu_get_fd failed: %s\n", strerror(errno)); goto sock_err; } @@ -201,7 +201,7 @@ static int tap_pktio_start(pktio_entry_t *pktio_entry) /* Up interface by default. */ if (ioctl(tap->skfd, SIOCGIFFLAGS, &ifr) < 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("ioctl(SIOCGIFFLAGS) failed: %s\n", strerror(errno)); goto sock_err; } @@ -210,7 +210,7 @@ static int tap_pktio_start(pktio_entry_t *pktio_entry) ifr.ifr_flags |= IFF_RUNNING; if (ioctl(tap->skfd, SIOCSIFFLAGS, &ifr) < 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("failed to come up: %s\n", strerror(errno)); goto sock_err; } @@ -232,7 +232,7 @@ static int tap_pktio_stop(pktio_entry_t *pktio_entry) /* Up interface by default. */ if (ioctl(tap->skfd, SIOCGIFFLAGS, &ifr) < 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("ioctl(SIOCGIFFLAGS) failed: %s\n", strerror(errno)); goto sock_err; } @@ -241,7 +241,7 @@ static int tap_pktio_stop(pktio_entry_t *pktio_entry) ifr.ifr_flags &= ~IFF_RUNNING; if (ioctl(tap->skfd, SIOCSIFFLAGS, &ifr) < 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("failed to come up: %s\n", strerror(errno)); goto sock_err; } @@ -258,13 +258,13 @@ static int tap_pktio_close(pktio_entry_t *pktio_entry) pkt_tap_t *tap = pkt_priv(pktio_entry); if (tap->fd != -1 && close(tap->fd) != 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("close(tap->fd): %s\n", strerror(errno)); ret = -1; } if (tap->skfd != -1 && close(tap->skfd) != 0) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("close(tap->skfd): %s\n", strerror(errno)); ret = -1; } @@ -289,8 +289,8 @@ static odp_packet_t pack_odp_pkt(pktio_entry_t *pktio_entry, const void *data, } } - num = packet_alloc_multi(pkt_priv(pktio_entry)->pool, - len + frame_offset, &pkt, 1); + num = _odp_packet_alloc_multi(pkt_priv(pktio_entry)->pool, + len + frame_offset, &pkt, 1); if (num != 1) return ODP_PACKET_INVALID; @@ -344,7 +344,7 @@ static int tap_pktio_recv(pktio_entry_t *pktio_entry, int index ODP_UNUSED, ts_val = odp_time_global(); if (retval < 0) { - __odp_errno = errno; + _odp_errno = errno; break; } @@ -374,7 +374,7 @@ static int tap_pktio_send_lockless(pktio_entry_t *pktio_entry, if (odp_unlikely(pkt_len > mtu)) { if (i == 0) { - __odp_errno = EMSGSIZE; + _odp_errno = EMSGSIZE; return -1; } break; @@ -391,7 +391,7 @@ static int tap_pktio_send_lockless(pktio_entry_t *pktio_entry, if (retval < 0) { if (i == 0 && SOCK_ERR_REPORT(errno)) { - __odp_errno = errno; + _odp_errno = errno; ODP_ERR("write(): %s\n", strerror(errno)); return -1; } @@ -399,7 +399,7 @@ static int tap_pktio_send_lockless(pktio_entry_t *pktio_entry, } else if ((uint32_t)retval != pkt_len) { ODP_ERR("sent partial ethernet packet\n"); if (i == 0) { - __odp_errno = EMSGSIZE; + _odp_errno = EMSGSIZE; return -1; } break; |