On 1/25/24 22:46, Mike Pattrick wrote:
> Include inner offsets in functions where l3 and l4 offsets are either
> modified or checked.
> 
> Signed-off-by: Mike Pattrick <[email protected]>
> Fixes: 084c8087292c ("userspace: Support VXLAN and GENEVE TSO.")
> ---
>  lib/dp-packet.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/dp-packet.c b/lib/dp-packet.c
> index 0e23c766e..502a102ef 100644
> --- a/lib/dp-packet.c
> +++ b/lib/dp-packet.c
> @@ -507,6 +507,8 @@ dp_packet_resize_l2_5(struct dp_packet *b, int increment)
>      /* Adjust layer offsets after l2_5. */
>      dp_packet_adjust_layer_offset(&b->l3_ofs, increment);
>      dp_packet_adjust_layer_offset(&b->l4_ofs, increment);
> +    dp_packet_adjust_layer_offset(&b->inner_l3_ofs, increment);
> +    dp_packet_adjust_layer_offset(&b->inner_l4_ofs, increment);
>  
>      return dp_packet_data(b);
>  }
> @@ -529,7 +531,9 @@ dp_packet_compare_offsets(struct dp_packet *b1, struct 
> dp_packet *b2,
>      if ((b1->l2_pad_size != b2->l2_pad_size) ||
>          (b1->l2_5_ofs != b2->l2_5_ofs) ||
>          (b1->l3_ofs != b2->l3_ofs) ||
> -        (b1->l4_ofs != b2->l4_ofs)) {
> +        (b1->l4_ofs != b2->l4_ofs) ||
> +        (b1->inner_l3_ofs != b2->inner_l3_ofs) ||
> +        (b1->inner_l4_ofs != b2->inner_l4_ofs)) {
>          if (err_str) {
>              ds_put_format(err_str, "Packet offset comparison failed\n");
>              ds_put_format(err_str, "Buffer 1 offsets: l2_pad_size %u,"

Should print out the difference to the log as well.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to