We've used sparse "bitwise" annotations to make ofp_ports into a different type, so this is required to avoid a sparse warning.
CC: Justin Pettit <jpet...@ovn.org> Fixes: 714651c7db6a ("ovn-controller: Introduce "inject-pkt" ovs-appctl command.") Signed-off-by: Ben Pfaff <b...@ovn.org> --- ovn/controller/ofctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovn/controller/ofctrl.c b/ovn/controller/ofctrl.c index 44c2210..3876ff6 100644 --- a/ovn/controller/ofctrl.c +++ b/ovn/controller/ofctrl.c @@ -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) { -- 2.10.2 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev