vRouter: Mirroring does not work if the mirror destination is local

Bug #1528460 reported by Anand H. Krishnan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
Undecided
Anand H. Krishnan
R2.21.x
Fix Committed
Undecided
Anand H. Krishnan
R2.22.x
Fix Committed
Undecided
Anand H. Krishnan
Trunk
Fix Committed
Undecided
Anand H. Krishnan

Bug Description

For packets that are tunneled, vRouter updates the checksum offset of the packet to reflect tunnel addition. For mirrored packets, if the mirror destination (analyzer) is local, no tunnel headers (MPLSO(UDP/GRE)) are added and hence a checksum offset update is not done. This behavior is wrong since we do add mirror headers (and hence a tunnel) and the whole packet needs a checksum value.

Because of this bug, sometimes we will observe that the checksum offset is not in the head skb, for which the NIC drivers may not be able to calculate checksums.

(From Raja)

When the packet is received by the virtio driver in the analyzer VM, it is seeing frame error (in "ifconfig eth0"). The VM sees these errors as a result of this check in the virtio driver:

        if (hdr->hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
                pr_debug("Needs csum!\n");
                if (!skb_partial_csum_set(skb,
                                          hdr->hdr.csum_start,
                                          hdr->hdr.csum_offset))
                        goto frame_err;

skb_partial_csum_set() is returning 0 as the csum_start and csum_offset are greater than skb_headlen.

Tags: vrouter
Changed in juniperopenstack:
assignee: nobody → Anand H. Krishnan (anandhk)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/15965
Submitter: Anand H. Krishnan (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/15965
Committed: http://github.org/Juniper/contrail-vrouter/commit/d6703ada5dbe8638ac83d0f3801c12246852d513
Submitter: Zuul
Branch: R2.20

commit d6703ada5dbe8638ac83d0f3801c12246852d513
Author: Anand H. Krishnan <email address hidden>
Date: Tue Dec 22 12:36:08 2015 +0530

If needed, DP originated packets should undergo csum/gso updates

For packets that are tunneled, vRouter updates the checksum offset of
the packet to reflect tunnel addition. For mirrored packets, if the
mirror destination (analyzer) is local, no tunnel headers
(MPLSO(UDP/GRE)) are added and hence a checksum offset update is not
done. This behavior is wrong since we do add mirror headers (and hence a
tunnel) and the whole packet needs a checksum value.

Change-Id: Ia8c184d0980e7880bff90ff53f178e657a6be311
Closes-BUG: #1528460

information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/16205
Submitter: Anand H. Krishnan (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/16205
Committed: http://github.org/Juniper/contrail-vrouter/commit/9d89a04c691239ff68282a94afa9b36ee6fc45d5
Submitter: Zuul
Branch: master

commit 9d89a04c691239ff68282a94afa9b36ee6fc45d5
Author: Anand H. Krishnan <email address hidden>
Date: Tue Dec 22 12:36:08 2015 +0530

If needed, DP originated packets should undergo csum/gso updates

For packets that are tunneled, vRouter updates the checksum offset of
the packet to reflect tunnel addition. For mirrored packets, if the
mirror destination (analyzer) is local, no tunnel headers
(MPLSO(UDP/GRE)) are added and hence a checksum offset update is not
done. This behavior is wrong since we do add mirror headers (and hence a
tunnel) and the whole packet needs a checksum value.

Change-Id: Ia8c184d0980e7880bff90ff53f178e657a6be311
Closes-BUG: #1528460

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.22.x

Review in progress for https://review.opencontrail.org/16679
Submitter: Vinay Vithal Mahuli (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/16679
Committed: http://github.org/Juniper/contrail-vrouter/commit/36e6aeae94d25173936ecb183f915cd2931dcd2d
Submitter: Zuul
Branch: R2.22.x

commit 36e6aeae94d25173936ecb183f915cd2931dcd2d
Author: Anand H. Krishnan <email address hidden>
Date: Tue Dec 22 12:36:08 2015 +0530

If needed, DP originated packets should undergo csum/gso updates

For packets that are tunneled, vRouter updates the checksum offset of
the packet to reflect tunnel addition. For mirrored packets, if the
mirror destination (analyzer) is local, no tunnel headers
(MPLSO(UDP/GRE)) are added and hence a checksum offset update is not
done. This behavior is wrong since we do add mirror headers (and hence a
tunnel) and the whole packet needs a checksum value.

Change-Id: Ia8c184d0980e7880bff90ff53f178e657a6be311
Closes-BUG: #1528460

tags: added: vrouter
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.21.x

Review in progress for https://review.opencontrail.org/18466
Submitter: Anand H. Krishnan (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/18466
Committed: http://github.org/Juniper/contrail-vrouter/commit/a2b4d25deb74a94bce1ff27a0fd999419a13f630
Submitter: Zuul
Branch: R2.21.x

commit a2b4d25deb74a94bce1ff27a0fd999419a13f630
Author: Anand H. Krishnan <email address hidden>
Date: Tue Dec 22 12:36:08 2015 +0530

If needed, DP originated packets should undergo csum/gso updates

For packets that are tunneled, vRouter updates the checksum offset of
the packet to reflect tunnel addition. For mirrored packets, if the
mirror destination (analyzer) is local, no tunnel headers
(MPLSO(UDP/GRE)) are added and hence a checksum offset update is not
done. This behavior is wrong since we do add mirror headers (and hence a
tunnel) and the whole packet needs a checksum value.

Change-Id: Ia8c184d0980e7880bff90ff53f178e657a6be311
Closes-BUG: #1528460

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.