From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751293AbcBMLFO (ORCPT ); Sat, 13 Feb 2016 06:05:14 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:48277 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751010AbcBMLFM (ORCPT ); Sat, 13 Feb 2016 06:05:12 -0500 Date: Sat, 13 Feb 2016 06:05:07 -0500 (EST) Message-Id: <20160213.060507.1405887572923400829.davem@davemloft.net> To: vkuznets@redhat.com Cc: netdev@vger.kernel.org, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, kys@microsoft.com, haiyangz@microsoft.com Subject: Re: [PATCH net] hv_netvsc: Restore needed_headroom request From: David Miller In-Reply-To: <1454689748-29095-1-git-send-email-vkuznets@redhat.com> References: <1454689748-29095-1-git-send-email-vkuznets@redhat.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sat, 13 Feb 2016 03:05:12 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vitaly Kuznetsov Date: Fri, 5 Feb 2016 17:29:08 +0100 > Commit c0eb454034aa ("hv_netvsc: Don't ask for additional head room in the > skb") got rid of needed_headroom setting for the driver. With the change I > hit the following issue trying to use ptkgen module: > > [ 57.522021] kernel BUG at net/core/skbuff.c:1128! > [ 57.522021] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC > ... > [ 58.721068] Call Trace: > [ 58.721068] [] netvsc_start_xmit+0x4c6/0x8e0 [hv_netvsc] > ... > [ 58.721068] [] ? pktgen_finalize_skb+0x25c/0x2a0 [pktgen] > [ 58.721068] [] ? __netdev_alloc_skb+0xc0/0x100 > [ 58.721068] [] pktgen_thread_worker+0x257/0x1920 [pktgen] > > Basically, we're calling skb_cow_head(skb, RNDIS_AND_PPI_SIZE) and crash on > if (skb_shared(skb)) > BUG(); > > We probably need to restore needed_headroom setting (but shrunk to > RNDIS_AND_PPI_SIZE as we don't need more) to request the required headroom > space. In theory, it should not give us performance penalty. > > Signed-off-by: Vitaly Kuznetsov Applied, thanks.