Taras is submitting a patch that allows you to replace the output stream
for ODP_ERR etc with the applications prefered stream - see
https://mail.google.com/mail/u/1/#inbox/149e780e4e57d70c

On 25 November 2014 at 11:00, Zoltan Kiss <zoltan.k...@linaro.org> wrote:

> OVS usually ditches stderr and stdout after startup, so logging there
> won't be
> effective. Use instead the proper OVS logging facilities.
>
> Signed-off-by: Zoltan Kiss <zoltan.k...@linaro.org>
> ---
>  lib/netdev-odp.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/lib/netdev-odp.c b/lib/netdev-odp.c
> index 59de46d..96126a1 100644
> --- a/lib/netdev-odp.c
> +++ b/lib/netdev-odp.c
> @@ -111,13 +111,13 @@ odp_init(int argc, char *argv[])
>
>      result = odp_init_global(NULL, NULL);
>      if (result) {
> -        ODP_ERR("Error: ODP global init failed\n");
> +        VLOG_ERR("Error: ODP global init failed\n");
>          return result;
>      }
>
>      /* Init this thread */
>      if (odp_init_local()) {
> -        ODP_ERR("Error: ODP local init failed.\n");
> +        VLOG_ERR("Error: ODP local init failed.\n");
>          exit(EXIT_FAILURE);
>      }
>
> @@ -139,7 +139,7 @@ odp_class_init(void)
>      pool_base = odp_shm_addr(shm);
>
>      if (odp_unlikely(pool_base == NULL)) {
> -        ODP_ERR("Error: ODP packet pool mem alloc failed\n");
> +        VLOG_ERR("Error: ODP packet pool mem alloc failed\n");
>          out_of_memory();
>          return -1;
>      }
> @@ -151,7 +151,7 @@ odp_class_init(void)
>                                    ODP_BUFFER_TYPE_PACKET);
>
>      if (pool == ODP_BUFFER_POOL_INVALID) {
> -            ODP_ERR("Error: packet pool create failed.\n");
> +            VLOG_ERR("Error: packet pool create failed.\n");
>              return -1;
>      }
>      odp_buffer_pool_print(pool);
> @@ -162,7 +162,7 @@ odp_class_init(void)
>      pool_base = odp_shm_addr(shm);
>
>      if (odp_unlikely(pool_base == NULL)) {
> -        ODP_ERR("Error: ODP packet pool mem alloc failed\n");
> +        VLOG_ERR("Error: ODP packet pool mem alloc failed\n");
>          out_of_memory();
>          return -1;
>      }
> @@ -174,7 +174,7 @@ odp_class_init(void)
>                                           ODP_BUFFER_TYPE_RAW);
>
>      if (ofpbuf_pool == ODP_BUFFER_POOL_INVALID) {
> -            ODP_ERR("Error: ofpbuf pool create failed.\n");
> +            VLOG_ERR("Error: ofpbuf pool create failed.\n");
>              return -1;
>      }
>      odp_buffer_pool_print(ofpbuf_pool);
> @@ -185,7 +185,7 @@ odp_class_init(void)
>      pool_base = odp_shm_addr(shm);
>
>      if (odp_unlikely(pool_base == NULL)) {
> -        ODP_ERR("Error: ODP packet pool mem alloc failed\n");
> +        VLOG_ERR("Error: ODP packet pool mem alloc failed\n");
>          out_of_memory();
>          return -1;
>      }
> @@ -197,7 +197,7 @@ odp_class_init(void)
>                                           ODP_BUFFER_TYPE_RAW);
>
>      if (struct_pool == ODP_BUFFER_POOL_INVALID) {
> -            ODP_ERR("Error: packet pool create failed.\n");
> +            VLOG_ERR("Error: packet pool create failed.\n");
>              return -1;
>      }
>      odp_buffer_pool_print(struct_pool);
> @@ -241,7 +241,7 @@ netdev_odp_construct(struct netdev *netdev_)
>      netdev->pktio = odp_pktio_open(odp_if, pool);
>
>      if (netdev->pktio == ODP_PKTIO_INVALID) {
> -        ODP_ERR("Error: odp pktio failed\n");
> +        VLOG_ERR("Error: odp pktio failed\n");
>          err = ENODEV;
>          goto out_err;
>      }
> @@ -633,7 +633,7 @@ netdev_odp_rxq_recv(struct netdev_rxq *rxq_, struct
> dpif_packet **packets,
>      if (pkts > 0) {
>          pkts_ok = drop_err_pkts(pkt_tbl, pkts);
>          if (odp_unlikely(pkts_ok != pkts))
> -            ODP_ERR("Dropped frames:%u - err_cnt:%lu\n",
> +            VLOG_ERR("Dropped frames:%u - err_cnt:%lu\n",
>                      pkts-pkts_ok, ++err_cnt);
>          if (!pkts_ok) {
>              ret = EAGAIN;
> --
> 1.9.1
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>



-- 
*Mike Holmes*
Linaro  Sr Technical Manager
LNG - ODP
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to