From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3 1/4] vmxnet3: restore tx data ring support Date: Tue, 12 Jan 2016 20:50:22 -0800 Message-ID: <20160112205022.118c3423@xeon-e3> References: <1452039178-15635-1-git-send-email-yongwang@vmware.com> <1452039178-15635-2-git-send-email-yongwang@vmware.com> <20160105164849.526442a8@xeon-e3> <6EDC655B-0C21-4C63-997D-87BD2B35BAEB@vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Yong Wang Return-path: Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by dpdk.org (Postfix) with ESMTP id C90185686 for ; Wed, 13 Jan 2016 05:50:15 +0100 (CET) Received: by mail-pa0-f51.google.com with SMTP id yy13so258920432pab.3 for ; Tue, 12 Jan 2016 20:50:15 -0800 (PST) In-Reply-To: <6EDC655B-0C21-4C63-997D-87BD2B35BAEB@vmware.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 13 Jan 2016 02:20:01 +0000 Yong Wang wrote: > >Good idea to use a local region which optmizes the copy in the host, > >but this implementation needs to be more general. > > > >As written it is broken for multi-segment packets. A multi-segment > >packet will have a pktlen >=3D datalen as in: > > m -> mb_segs=3D3, pktlen=3D1200, datalen=3D200 =20 > > -> datalen=3D900 > > -> datalen=3D100 =20 > > > >There are two ways to fix this. You could test for nb_segs =3D=3D 1 > >or better yet. Optimize each segment it might be that the first > >segment (or tail segment) would fit in the available data area. =20 >=20 > Currently the vmxnet3 backend has a limitation of 128B data area so > it should work even for the multi-segmented pkt shown above. But > I agree it does not work for all multi-segmented packets. The > following packet will be such an example. >=20 > m -> nb_segs=3D3, pktlen=3D128, datalen=3D64 > -> datalen=3D32 > -> datalen=3D32 =20 >=20 >=20 > It=E2=80=99s unclear if/how we might get into such a multi-segmented pkt > but I agree we should handle this case. Patch updated taking the > simple approach (checking for nb_segs =3D=3D 1). I=E2=80=99ll leave the > optimization as a future patch. Such a packet can happen when adding a tunnel header such as VXLAN and the underlying packet is shared (refcnt > 1) or does not have enough headroom for the tunnel header.