[ovs-dev] [PATCH 1/5] netdev-dpdk: Fix incorrect byte order conversion in log message.

Yifeng Sun pkusunyifeng at gmail.com
Mon Jul 16 18:04:05 UTC 2018


Thanks.

Reviewed-by: Yifeng Sun <pkusunyifeng at gmail.com>

On Thu, Jul 12, 2018 at 2:55 PM, Ben Pfaff <blp at ovn.org> wrote:

> uint8_t values shouldn't be passed to ntohs().
>
> Found by soarse.
>
> Signed-off-by: Ben Pfaff <blp at ovn.org>
> ---
>  lib/netdev-dpdk.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index bb4d60f26cc4..b4ed4ad5919c 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -4202,8 +4202,8 @@ dump_flow_pattern(struct rte_flow_item *item)
>          VLOG_DBG("rte flow icmp pattern:\n");
>          if (icmp_spec) {
>              VLOG_DBG("  Spec: icmp_type=%"PRIu8", icmp_code=%"PRIu8"\n",
> -                     ntohs(icmp_spec->hdr.icmp_type),
> -                     ntohs(icmp_spec->hdr.icmp_code));
> +                     icmp_spec->hdr.icmp_type,
> +                     icmp_spec->hdr.icmp_code);
>          } else {
>              VLOG_DBG("  Spec = null\n");
>          }
> --
> 2.16.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list