From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=BbxXzZ6ZhWVVqXaJ4d2uB3fQaIl8y9zvvBVSTMJ0h6U=; b=OCOe5l9Piz1FZ/RBiMmcpU7rQFGNBaDGA2lENPflgoWxSqwfBE2j7sJRy0uwK2RMaY jEEN01f4jCa9O6tOlLFATjThqNKP562Jd9p/mCrv1vyNmQhuiR3IjWnfPh9HUrhQPyGb a/5iH80IUJdDurq8AP5sFtd1WMtfWj/K0DGDYsNVxMKQJDd1+9PzBGXh2Tj0P7Ma8W64 jJr0lVjI4pUh+wFWQjiJy5XWE040szcPfGpMYGAKKRtFn7fY/yK9icKjd9tHOrjoirqG ziDJ4ULV4slS0qmat2VDp+MIFDrVv/eyNZmXVc3bXhsU0iXdCPeNm1BtmUy9MVlXZ6Sl hxXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=BbxXzZ6ZhWVVqXaJ4d2uB3fQaIl8y9zvvBVSTMJ0h6U=; b=HOoeO0p2BZBW78aGIwkfola5ltdIEW80jOHHipd0RiLnyVIWIu/Bnnamh8u5BdtQFw OqmiLVEIoqHhcOLu6POMt5Ic0T/gtHKFXmWSbRWqjgR9yeCVJuP4xb882d+ZmpdomA7L alRfwdx0HyAhf9I+6pNP09HKm//vEzzs997+YUqgK+QX0h2BxpsN7vbs3zSyLRiVLMv6 UAuOvdEoO0OPtc4dj4oyS7uOUM9h9QQj6iwUx1ea9TN+cQ1pEKWsKhIRJrGDd95RqgYc PFChv8y+XUZIHJ/MxB7ToxpcPn5JeyllVuvFhvnsRESLZUx0KbJUdRLRLSeI9XcOWISl SsVQ== X-Gm-Message-State: ALoCoQkPyXCO2tyj2/iOU9CpZJlH5oZBin9DiRHhzfNYqicsDu/QaK3gGpo/WwGwbzBoj0hcJkyaU2rLoOGxtKoPCyK6cT23vw== X-Received: by 10.66.182.202 with SMTP id eg10mr194671241pac.50.1452660614516; Tue, 12 Jan 2016 20:50:14 -0800 (PST) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id l73sm33828411pfi.37.2016.01.12.20.50.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jan 2016 20:50:14 -0800 (PST) Date: Tue, 12 Jan 2016 20:50:22 -0800 From: Stephen Hemminger To: Yong Wang Message-ID: <20160112205022.118c3423@xeon-e3> In-Reply-To: <6EDC655B-0C21-4C63-997D-87BD2B35BAEB@vmware.com> 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" Subject: Re: [dpdk-dev] [PATCH v3 1/4] vmxnet3: restore tx data ring support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2016 04:50:16 -0000 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.