the flow->in_port value is previously ignored. We normally use the the md->in_port of the first packet in the batch to get the value. However, since some actions might need to be redo due to the fix of ipf issues, we might have an empty batch to feed the action execute, so the conntrack makes use of flow->in_port to get the in_port value and form the ipf_ctx.
This patch changes execute->flow->in_port into odp_port before doing action executes. with this patch, the ipf_ctx patch will not cause testsuite report errors. Signed-off-by: Peng He <hepeng.0...@bytedance.com> Acked-by: Mike Pattrick <m...@redhat.com> Signed-off-by: Aaron Conole <acon...@redhat.com> v1->v2: change in_port in dpif layer rather than ofproto-dpif layer --- lib/dpif-netdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 9f35713ef..fb1264c14 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -4566,6 +4566,9 @@ dpif_netdev_execute(struct dpif *dpif, struct dpif_execute *execute) /* Making a copy because the packet might be stolen during the execution * and caller might still need it. */ struct dp_packet *packet_clone = dp_packet_clone(execute->packet); + /* change execute->flow->in_port into odp_port */ + *CONST_CAST(union flow_in_port *, &execute->flow->in_port) + = packet_clone->md.in_port; dp_packet_batch_init_packet(&pp, packet_clone); dp_netdev_execute_actions(pmd, &pp, false, execute->flow, execute->actions, execute->actions_len); -- 2.25.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev