From patchwork Thu Nov 4 09:07:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 301632 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA498MPY012157 for ; Thu, 4 Nov 2010 09:08:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754482Ab0KDJHs (ORCPT ); Thu, 4 Nov 2010 05:07:48 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:55409 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754202Ab0KDJHr (ORCPT ); Thu, 4 Nov 2010 05:07:47 -0400 Received: by wyf28 with SMTP id 28so1646482wyf.19 for ; Thu, 04 Nov 2010 02:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=Vjvk03NNevtMkD+Q6GzBbG8oGKfJaY6cxKE7xo83TI0=; b=SJDogeruQLh8sR1LQp8tpDjq9DeekVMVBFlW7zlkH/pSZeytCrsV/IgmsOTcT5KCiH CHBpDhWA/ZGjWynRM0+guTAszYm2qr8BrwhjzLQxVF2vw8x4/eS+4dSMAdNUFJNHpQxg Njh2mA1fDmTZD8SGAXCFjB+wLnAhayazBSPbA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=GGGVxJkPJ8m62XeidYW7/MAY015JKqgkXDHi8axKFNy6dJbTCEkSSn/FPA+YuvUiSe 7rtMlHk9uZcUXyd1c0grvZoLv2Do0sNn1MkjEiPY4LoWbkpIbQ+/nsPQIe/GjzIQfkAd qUWwZADTw2BUokfsD7CECKAZ49DaIRfC8hqGs= Received: by 10.216.158.18 with SMTP id p18mr1619798wek.2.1288861666374; Thu, 04 Nov 2010 02:07:46 -0700 (PDT) Received: from [10.150.51.210] (gw0.net.jmsp.net [212.23.165.14]) by mx.google.com with ESMTPS id c16sm2182508wef.17.2010.11.04.02.07.44 (version=SSLv3 cipher=RC4-MD5); Thu, 04 Nov 2010 02:07:45 -0700 (PDT) Subject: Re: [PATCH v14 06/17] Use callback to deal with skb_release_data() specially. From: Eric Dumazet To: xiaohui.xin@intel.com Cc: netdev@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mst@redhat.com, mingo@elte.hu, davem@davemloft.net, herbert@gondor.hengli.com.au, jdike@linux.intel.com In-Reply-To: <1288861465.2659.44.camel@edumazet-laptop> References: <1288861513-5707-1-git-send-email-xiaohui.xin@intel.com> <1288861465.2659.44.camel@edumazet-laptop> Date: Thu, 04 Nov 2010 10:07:43 +0100 Message-ID: <1288861663.2659.47.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 04 Nov 2010 09:08:23 +0000 (UTC) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index e6ba898..2dca504 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -195,6 +195,9 @@ struct skb_shared_info { __be32 ip6_frag_id; __u8 tx_flags; struct sk_buff *frag_list; + /* Intermediate layers must ensure that destructor_arg + * remains valid until skb destructor */ + void *destructor_arg; struct skb_shared_hwtstamps hwtstamps; /* @@ -202,9 +205,6 @@ struct skb_shared_info { */ atomic_t dataref; - /* Intermediate layers must ensure that destructor_arg - * remains valid until skb destructor */ - void * destructor_arg; /* must be last field, see pskb_expand_head() */ skb_frag_t frags[MAX_SKB_FRAGS]; };