diff options
author | Joe Stringer <joe@ovn.org> | 2016-11-14 13:29:05 -0800 |
---|---|---|
committer | Joe Stringer <joe@ovn.org> | 2016-11-16 11:53:50 -0800 |
commit | 8611f9a468bf487326c5f8a642bb5a3e0dbf8b94 (patch) | |
tree | d46433608a35e38e93c8e8fbb68c60ddc224e548 /lib | |
parent | 048318e0726c94876e504de7b578f929e9f509a0 (diff) | |
download | openvswitch-8611f9a468bf487326c5f8a642bb5a3e0dbf8b94.tar.gz |
lib: Use nl_attr_get_odp_port().
This helper is a little tidier than the alternative. Use it treewide.
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Simon Horman <simon.horman@netronome.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dpif-netdev.c | 4 | ||||
-rw-r--r-- | lib/odp-util.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index c477248ec..140051158 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -4410,7 +4410,7 @@ dp_execute_cb(void *aux_, struct dp_packet_batch *packets_, switch ((enum ovs_action_attr)type) { case OVS_ACTION_ATTR_OUTPUT: - p = pmd_tx_port_cache_lookup(pmd, u32_to_odp(nl_attr_get_u32(a))); + p = pmd_tx_port_cache_lookup(pmd, nl_attr_get_odp_port(a)); if (OVS_LIKELY(p)) { int tx_qid; bool dynamic_txqs; @@ -4455,7 +4455,7 @@ dp_execute_cb(void *aux_, struct dp_packet_batch *packets_, case OVS_ACTION_ATTR_TUNNEL_POP: if (*depth < MAX_RECIRC_DEPTH) { struct dp_packet_batch *orig_packets_ = packets_; - odp_port_t portno = u32_to_odp(nl_attr_get_u32(a)); + odp_port_t portno = nl_attr_get_odp_port(a); p = pmd_tx_port_cache_lookup(pmd, portno); if (p) { diff --git a/lib/odp-util.c b/lib/odp-util.c index 332698bfe..626a82ca2 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -2770,7 +2770,7 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma, case OVS_KEY_ATTR_IN_PORT: if (portno_names && verbose && is_exact) { char *name = odp_portno_names_get(portno_names, - u32_to_odp(nl_attr_get_u32(a))); + nl_attr_get_odp_port(a)); if (name) { ds_put_format(ds, "%s", name); } else { |