[ovs-git] [openvswitch/ovs] bb3795: netdev-dpdk: Use uint8_t for port_id.

GitHub noreply at github.com
Wed May 31 23:22:57 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: bb37956ac0067beaa338282d34bd6654b4cdde7c
      https://github.com/openvswitch/ovs/commit/bb37956ac0067beaa338282d34bd6654b4cdde7c
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2017-05-31 (Wed, 31 May 2017)

  Changed paths:
    M lib/netdev-dpdk.c

  Log Message:
  -----------
  netdev-dpdk: Use uint8_t for port_id.

Currently, signed integer is used for 'port_id' variable and
'-1' as identifier of bad or uninitialized 'port_id'.

This inconsistent with dpdk library and, also, in few cases,
leads to passing '-1' to dpdk functions where uint8_t expected.

Such behaviour doesn't produce any issues, but it's better to
use same type as in dpdk library for consistency.
Introduced 'dpdk_port_t' typedef for better maintainability.

Also, magic number '-1' replaced with DPDK_ETH_PORT_ID_INVALID
macro.

Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Mark Kavanagh <mark.b.kavanagh at intel.com>




More information about the git mailing list