From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754511Ab1BAEfW (ORCPT ); Mon, 31 Jan 2011 23:35:22 -0500 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:53938 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753719Ab1BAEfV (ORCPT ); Mon, 31 Jan 2011 23:35:21 -0500 Date: Mon, 31 Jan 2011 20:35:56 -0800 (PST) Message-Id: <20110131.203556.193730771.davem@davemloft.net> To: ratbert.chuang@gmail.com Cc: mirqus@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bhutchings@solarflare.com, eric.dumazet@gmail.com, joe@perches.com, dilinger@queued.net, ratbert@faraday-tech.com Subject: Re: [PATCH v4] net: add Faraday FTMAC100 10/100 Ethernet driver From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Po-Yu Chuang Date: Tue, 1 Feb 2011 11:56:16 +0800 > If I simply allocate a page for each rx ring entry, I still need to allocate > an skb and copy at least packet header in first page to skb->data. Then > add the page of rest of payload to skb by skb_fill_page_desc(). You should attach the pages, the use __pskb_pull_tail() to bring in the headers to the linear skb->data area. See drivers/net/niu.c:niu_process_rx_pkt().