From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754229Ab2AWVPu (ORCPT ); Mon, 23 Jan 2012 16:15:50 -0500 Received: from mail-we0-f174.google.com ([74.125.82.174]:44709 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753325Ab2AWVPs (ORCPT ); Mon, 23 Jan 2012 16:15:48 -0500 Message-ID: <1327353339.2587.7.camel@edumazet-laptop> Subject: Re: [PATCH/RESEND] drivers/net/ethernet: dev_alloc_skb to netdev_alloc_skb From: Eric Dumazet To: "Pradeep A. Dalvi" Cc: Joe Perches , netdev@vger.kernel.org, "David S. Miller" , Christoph Hellwig , linux-kernel@vger.kernel.org Date: Mon, 23 Jan 2012 22:15:39 +0100 In-Reply-To: References: <1327343283-4830-1-git-send-email-netdev@pradeepdalvi.com> <1327344034.6317.3.camel@joe2Laptop> <1327348561.7527.0.camel@joe2Laptop> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.1- Content-Transfer-Encoding: 8bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mardi 24 janvier 2012 à 02:11 +0530, Pradeep A. Dalvi a écrit : > Aah! Is that really needed? Cause from my understanding, priority GFP > flag __GFP_DMA is anyway negated in __alloc_skb, in a way from all > sources i.e. netdev_alloc_skb or dev_alloc_skb or even alloc_skb. Am I > missing something here? You should read the whole __alloc_skb() function and not only half of it. skb itself is allocated in the normal memory pool, (not GFP_DMA), since it has no hardware requirement for a kernel structure. But skb->head _is_ allocated with GFP_DMA if driver requested it.