The following tunnel combine patch series avoids the packets recirculation after the tunnel push. So it is necessary to populate all relevant packet meta data fields for the following combined action-set.
Consider a chained tunnel test case shown below, PKT-IN --> TUNNEL_PUSH --> MOD_PKT_HDR --> TUNNEL_POP In this eg: the last tunnel_pop operation uses the l4_offset in the packet to validate the packets. So it must be calculated and updated in the packet before executing the action. Since there is no recirculation now on, this calculation is doing as part of tunnel_push. Signed-off-by: Sugesh Chandran <[email protected]> Signed-off-by: Zoltán Balogh <[email protected]> Co-authored-by: Zoltán Balogh <[email protected]> --- lib/netdev-native-tnl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/netdev-native-tnl.c b/lib/netdev-native-tnl.c index 7f3cf98..caa3a0a 100644 --- a/lib/netdev-native-tnl.c +++ b/lib/netdev-native-tnl.c @@ -224,6 +224,7 @@ netdev_tnl_push_udp_header(struct dp_packet *packet, udp->udp_src = netdev_tnl_get_src_port(packet); udp->udp_len = htons(ip_tot_size); + packet->l4_ofs = dp_packet_size(packet) - ip_tot_size; if (udp->udp_csum) { uint32_t csum; if (netdev_tnl_is_header_ipv6(dp_packet_data(packet))) { @@ -440,6 +441,7 @@ netdev_gre_push_header(struct dp_packet *packet, greh = netdev_tnl_push_ip_header(packet, data->header, data->header_len, &ip_tot_size); + packet->l4_ofs = dp_packet_size(packet) - ip_tot_size; if (greh->flags & htons(GRE_CSUM)) { ovs_be16 *csum_opt = (ovs_be16 *) (greh + 1); *csum_opt = csum(greh, ip_tot_size); -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
