Skip to content

Commit

Permalink
ofctrl: Fix warning from sparse.
Browse files Browse the repository at this point in the history
We've used sparse "bitwise" annotations to make ofp_ports into a different
type, so this is required to avoid a sparse warning.

Fixes: 714651c ("ovn-controller: Introduce "inject-pkt" ovs-appctl command.")
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Justin Pettit <[email protected]>
  • Loading branch information
blp committed Jan 6, 2017
1 parent 55a8079 commit c3b85ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ovn/controller/ofctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ ofctrl_inject_pkt(const struct ovsrec_bridge *br_int, const char *flow_s,

/* The physical OpenFlow port was stored in the logical ingress
* port, so put it in the correct location for a flow structure. */
uflow.in_port.ofp_port = uflow.regs[MFF_LOG_INPORT - MFF_REG0];
uflow.in_port.ofp_port = u16_to_ofp(uflow.regs[MFF_LOG_INPORT - MFF_REG0]);
uflow.regs[MFF_LOG_INPORT - MFF_REG0] = 0;

if (!uflow.in_port.ofp_port) {
Expand Down

0 comments on commit c3b85ee

Please sign in to comment.