'tcp_flags' are not placed at the beginning of the 64-bit block, so they have to be padded. Today it is done in a hacky way by pushing zeroes over the last 32-bits of the arp_tha. When that was written the miniflow_pad_from_64() didn't exist, but it's better to use it now instead to avoid confusion.
'ct_tp_src/dst' are not actually extracted for IGMP. See the write_ct_md() function. The pushes are there for the padding purposes, since 'tp_dst' doesn't end on a 64-bit boundary and so we need to pad before pushing the IGMP group. Use an explicit padding function instead to avoid a false impression that IGMP can have non-zero "ports" in the conntrack tuple. This change should not change anything functionally. Signed-off-by: Ilya Maximets <[email protected]> --- lib/flow.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/flow.c b/lib/flow.c index 0eb34892f..53ff7178e 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1043,7 +1043,8 @@ miniflow_extract(struct dp_packet *packet, struct miniflow *dst) if (OVS_LIKELY(tcp_hdr_len >= TCP_HEADER_LEN) && OVS_LIKELY(size >= tcp_hdr_len)) { - miniflow_push_be32(mf, arp_tha.ea[2], 0); + /* tcp_flags are not at the beginning of the block. */ + miniflow_pad_from_64(mf, tcp_flags); miniflow_push_be32(mf, tcp_flags, TCP_FLAGS_BE32(tcp->tcp_ctl)); miniflow_push_be16(mf, tp_src, tcp->tcp_src); @@ -1110,8 +1111,8 @@ miniflow_extract(struct dp_packet *packet, struct miniflow *dst) miniflow_push_be16(mf, tp_src, htons(igmp->igmp_type)); miniflow_push_be16(mf, tp_dst, htons(igmp->igmp_code)); - miniflow_push_be16(mf, ct_tp_src, ct_tp_src); - miniflow_push_be16(mf, ct_tp_dst, ct_tp_dst); + /* ct_tp_src/dst are not extracted for IGMP. */ + miniflow_pad_to_64(mf, tp_dst); miniflow_push_be32(mf, igmp_group_ip4, get_16aligned_be32(&igmp->group)); miniflow_pad_to_64(mf, igmp_group_ip4); -- 2.47.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
