Skip to content

Commit

Permalink
netdev-dpdk: Use ETH_ADDR_BYTES_ARGS instead of open-coding it.
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Pfaff <[email protected]>
Reviewed-by: Yifeng Sun <[email protected]>
Signed-off-by: Ian Stokes <[email protected]>
  • Loading branch information
blp authored and istokes committed Jul 24, 2018
1 parent 31a033c commit 773c3cb
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions lib/netdev-dpdk.c
Original file line number Diff line number Diff line change
@@ -4079,25 +4079,17 @@ dump_flow_pattern(struct rte_flow_item *item)
if (eth_spec) {
VLOG_DBG(" Spec: src="ETH_ADDR_FMT", dst="ETH_ADDR_FMT", "
"type=0x%04" PRIx16"\n",
eth_spec->src.addr_bytes[0], eth_spec->src.addr_bytes[1],
eth_spec->src.addr_bytes[2], eth_spec->src.addr_bytes[3],
eth_spec->src.addr_bytes[4], eth_spec->src.addr_bytes[5],
eth_spec->dst.addr_bytes[0], eth_spec->dst.addr_bytes[1],
eth_spec->dst.addr_bytes[2], eth_spec->dst.addr_bytes[3],
eth_spec->dst.addr_bytes[4], eth_spec->dst.addr_bytes[5],
ETH_ADDR_BYTES_ARGS(eth_spec->src.addr_bytes),
ETH_ADDR_BYTES_ARGS(eth_spec->dst.addr_bytes),
ntohs(eth_spec->type));
} else {
VLOG_DBG(" Spec = null\n");
}
if (eth_mask) {
VLOG_DBG(" Mask: src="ETH_ADDR_FMT", dst="ETH_ADDR_FMT", "
"type=0x%04"PRIx16"\n",
eth_mask->src.addr_bytes[0], eth_mask->src.addr_bytes[1],
eth_mask->src.addr_bytes[2], eth_mask->src.addr_bytes[3],
eth_mask->src.addr_bytes[4], eth_mask->src.addr_bytes[5],
eth_mask->dst.addr_bytes[0], eth_mask->dst.addr_bytes[1],
eth_mask->dst.addr_bytes[2], eth_mask->dst.addr_bytes[3],
eth_mask->dst.addr_bytes[4], eth_mask->dst.addr_bytes[5],
ETH_ADDR_BYTES_ARGS(eth_mask->src.addr_bytes),
ETH_ADDR_BYTES_ARGS(eth_mask->dst.addr_bytes),
eth_mask->type);
} else {
VLOG_DBG(" Mask = null\n");

0 comments on commit 773c3cb

Please sign in to comment.