[dpdk-dev] doc: add known issue for virtio TSO with clones

Message ID 1486387013-1706-1-git-send-email-olivier.matz@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation fail Compilation issues

Commit Message

Olivier Matz Feb. 6, 2017, 1:16 p.m. UTC
  Document the issue with Tso on shared packets.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 doc/guides/rel_notes/known_issues.rst | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
  

Comments

Stephen Hemminger Feb. 6, 2017, 11:10 p.m. UTC | #1
On Mon,  6 Feb 2017 14:16:53 +0100
Olivier Matz <olivier.matz@6wind.com> wrote:

> +**Implication**:
> +   In this situation, the shared data will be modified by the driver,
> +   potentially causing race conditions with the other users of the mbuf
> +   data.

This is a driver bug! The driver must check for refcount and not modify
mbuf's whose refcnt > 1. For those mbuf's it should copy the mbuf and modify
the copy. 

It is not good to force buggy refcnt handling back onto the application.
It is acceptable to document the performance impact.
  
Thomas Monjalon Feb. 9, 2017, 3:05 p.m. UTC | #2
2017-02-06 15:10, Stephen Hemminger:
> On Mon,  6 Feb 2017 14:16:53 +0100
> Olivier Matz <olivier.matz@6wind.com> wrote:
> 
> > +**Implication**:
> > +   In this situation, the shared data will be modified by the driver,
> > +   potentially causing race conditions with the other users of the mbuf
> > +   data.
> 
> This is a driver bug! The driver must check for refcount and not modify
> mbuf's whose refcnt > 1. For those mbuf's it should copy the mbuf and modify
> the copy. 
> 
> It is not good to force buggy refcnt handling back onto the application.
> It is acceptable to document the performance impact.

Everybody agree it is a bug.
Unfortunately, nobody has time to work on it in this release.
So it is better than nothing to document the bug.

Applied, thanks
  

Patch

diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index 018e999..f149ac7 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -666,3 +666,34 @@  uio pci generic module bind failed in X710/XL710/XXV710
 
 **Driver/Module**:
    Poll Mode Driver (PMD).
+
+
+virtio tx_burst() function cannot do TSO on shared packets
+----------------------------------------------------------
+
+**Description**:
+   The standard TX function of virtio driver does not manage shared
+   packets properly when doing TSO. These packets should be read-only
+   but the driver modifies them.
+
+   When doing TSO, the virtio standard expects that the L4 checksum is
+   set to the pseudo header checksum in the packet data, which is
+   different than the DPDK API. The driver patches the L4 checksum to
+   conform to the virtio standard, but this solution is invalid when
+   dealing with shared packets (clones), because the packet data should
+   not be modified.
+
+**Implication**:
+   In this situation, the shared data will be modified by the driver,
+   potentially causing race conditions with the other users of the mbuf
+   data.
+
+**Resolution/Workaround**:
+   The workaround in the application is to ensure that the network
+   headers in the packet data are not shared.
+
+**Affected Environment/Platform**:
+   Virtual machines running a virtio driver.
+
+**Driver/Module**:
+   Poll Mode Driver (PMD).