From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756681AbcH2K2u (ORCPT ); Mon, 29 Aug 2016 06:28:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35904 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828AbcH2K2t (ORCPT ); Mon, 29 Aug 2016 06:28:49 -0400 From: Vitaly Kuznetsov To: David Vrabel Cc: , Juergen Gross , Patrick Talbert , , , Boris Ostrovsky Subject: Re: [Xen-devel] [PATCH net-next] xen-netfront: avoid packet loss when ethernet header crosses page boundary References: <1471880577-21380-1-git-send-email-vkuznets@redhat.com> <57BB2E7B.5040303@citrix.com> <87twebb9of.fsf@vitty.brq.redhat.com> Date: Mon, 29 Aug 2016 12:28:44 +0200 In-Reply-To: <87twebb9of.fsf@vitty.brq.redhat.com> (Vitaly Kuznetsov's message of "Tue, 23 Aug 2016 20:51:44 +0200") Message-ID: <87wpizamxv.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 29 Aug 2016 10:28:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Vitaly Kuznetsov writes: > David Vrabel writes: > >> 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 > > I'm afraid this is not always true, just removing the check leads us to > the following: > > [ 495.442186] kernel BUG at ./include/linux/skbuff.h:1927! > [ 495.468789] invalid opcode: 0000 [#1] SMP What I wanted to say here is that this test makes me think the description of the patch I suggested is correct: an SKB can't have its linear part shorter than ETH_HLEN as the header is being pointed directly, upper network layers don't assemble it from frags, the check in netback is valid. So, how can we proceed here? -- Vitaly