diff options
author | Maxim Uvarov <maxim.uvarov@linaro.org> | 2016-02-02 13:57:17 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2016-02-08 20:45:25 +0300 |
commit | a8779116291a868e4e57bb610c1d82d5e737d648 (patch) | |
tree | cb52efe74c5b485e32a6c6a629347f6b9a8f6366 /platform | |
parent | 7d2cab3b6db07f23f583011d1ab6ed8b331a9938 (diff) |
mergefix: odp_packet_io.c: move odp_pktio_term_global down in file
No code change.
Because we merged branches partially (with cherry-pick) odp_term_global
function placed in different offsets in file for master and api-next branch.
This patch aligns file in master branch with api-next.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform')
-rw-r--r-- | platform/linux-generic/odp_packet_io.c | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 206871b92..a196f4ec3 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -876,6 +876,48 @@ void odp_pktio_output_queue_param_init(odp_pktio_output_queue_param_t *param) memset(param, 0, sizeof(odp_pktio_output_queue_param_t)); } +void odp_pktio_print(odp_pktio_t id) +{ + pktio_entry_t *entry; + uint8_t addr[ETH_ALEN]; + int max_len = 512; + char str[max_len]; + int len = 0; + int n = max_len - 1; + + entry = get_pktio_entry(id); + if (entry == NULL) { + ODP_DBG("pktio entry %d does not exist\n", id); + return; + } + + len += snprintf(&str[len], n - len, + "pktio\n"); + len += snprintf(&str[len], n - len, + " handle %" PRIu64 "\n", odp_pktio_to_u64(id)); + len += snprintf(&str[len], n - len, + " name %s\n", entry->s.name); + len += snprintf(&str[len], n - len, + " type %s\n", entry->s.ops->name); + len += snprintf(&str[len], n - len, + " state %s\n", + entry->s.state == STATE_START ? "start" : + (entry->s.state == STATE_STOP ? "stop" : "unknown")); + memset(addr, 0, sizeof(addr)); + odp_pktio_mac_addr(id, addr, ETH_ALEN); + len += snprintf(&str[len], n - len, + " mac %02x:%02x:%02x:%02x:%02x:%02x\n", + addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); + len += snprintf(&str[len], n - len, + " mtu %d\n", odp_pktio_mtu(id)); + len += snprintf(&str[len], n - len, + " promisc %s\n", + odp_pktio_promisc_mode(id) ? "yes" : "no"); + str[len] = '\0'; + + ODP_PRINT("\n%s\n", str); +} + int odp_pktio_term_global(void) { int ret; @@ -923,48 +965,6 @@ int odp_pktio_term_global(void) return ret; } -void odp_pktio_print(odp_pktio_t id) -{ - pktio_entry_t *entry; - uint8_t addr[ETH_ALEN]; - int max_len = 512; - char str[max_len]; - int len = 0; - int n = max_len - 1; - - entry = get_pktio_entry(id); - if (entry == NULL) { - ODP_DBG("pktio entry %d does not exist\n", id); - return; - } - - len += snprintf(&str[len], n - len, - "pktio\n"); - len += snprintf(&str[len], n - len, - " handle %" PRIu64 "\n", odp_pktio_to_u64(id)); - len += snprintf(&str[len], n - len, - " name %s\n", entry->s.name); - len += snprintf(&str[len], n - len, - " type %s\n", entry->s.ops->name); - len += snprintf(&str[len], n - len, - " state %s\n", - entry->s.state == STATE_START ? "start" : - (entry->s.state == STATE_STOP ? "stop" : "unknown")); - memset(addr, 0, sizeof(addr)); - odp_pktio_mac_addr(id, addr, ETH_ALEN); - len += snprintf(&str[len], n - len, - " mac %02x:%02x:%02x:%02x:%02x:%02x\n", - addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); - len += snprintf(&str[len], n - len, - " mtu %d\n", odp_pktio_mtu(id)); - len += snprintf(&str[len], n - len, - " promisc %s\n", - odp_pktio_promisc_mode(id) ? "yes" : "no"); - str[len] = '\0'; - - ODP_PRINT("\n%s\n", str); -} - int odp_pktio_capability(odp_pktio_t pktio, odp_pktio_capability_t *capa) { pktio_entry_t *entry; |