From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932799AbcHVQ4M (ORCPT ); Mon, 22 Aug 2016 12:56:12 -0400 Received: from smtp.citrix.com ([66.165.176.89]:58463 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755058AbcHVQ4J (ORCPT ); Mon, 22 Aug 2016 12:56:09 -0400 X-IronPort-AV: E=Sophos;i="5.28,561,1464652800"; d="scan'208";a="373816136" Subject: Re: [Xen-devel] [PATCH net-next] xen-netfront: avoid packet loss when ethernet header crosses page boundary To: Vitaly Kuznetsov , References: <1471880577-21380-1-git-send-email-vkuznets@redhat.com> CC: Juergen Gross , Patrick Talbert , , David Vrabel , , Boris Ostrovsky From: David Vrabel X-Enigmail-Draft-Status: N1110 Message-ID: <57BB2E7B.5040303@citrix.com> Date: Mon, 22 Aug 2016 17:55:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <1471880577-21380-1-git-send-email-vkuznets@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/08/16 16:42, Vitaly Kuznetsov wrote: > > I see two ways to fix the issue: > - Change the 'wire' protocol between netfront and netback to start keeping > the original SKB structure. We'll have to add a flag indicating the fact > that the particular request is a part of the original linear part and not > a frag. We'll need to know the length of the linear part to pre-allocate > memory. I don't think there needs to be a protocol change. I think the check in netback is bogus -- it's the total packet length that must be > HLEN_ETH. The upper layers will pull any headers from the frags as needed (or if necessary, netback could pull a minimum amount). There's no need to preserve the skb layout (e.g., look how the to-guest direction we do not do this). David