From patchwork Fri Sep 4 03:02:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Feldman X-Patchwork-Id: 32970 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id E1312B6F34 for ; Fri, 4 Sep 2009 13:11:45 +1000 (EST) Received: by ozlabs.org (Postfix) id D6B46DDD0B; Fri, 4 Sep 2009 13:11:45 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 6A4A5DDD04 for ; Fri, 4 Sep 2009 13:11:45 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932913AbZIDDLg (ORCPT ); Thu, 3 Sep 2009 23:11:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932558AbZIDDLg (ORCPT ); Thu, 3 Sep 2009 23:11:36 -0400 Received: from sj-iport-4.cisco.com ([171.68.10.86]:32043 "EHLO sj-iport-4.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932905AbZIDDLf (ORCPT ); Thu, 3 Sep 2009 23:11:35 -0400 X-Greylist: delayed 575 seconds by postgrey-1.27 at vger.kernel.org; Thu, 03 Sep 2009 23:11:35 EDT X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhgFAEkgoEqrR7O6/2dsb2JhbACBU8BMiEEBkCsFhBs X-IronPort-AV: E=Sophos;i="4.44,329,1249257600"; d="scan'208";a="42248561" Received: from sj-dkim-2.cisco.com ([171.71.179.186]) by sj-iport-4.cisco.com with ESMTP; 04 Sep 2009 03:02:09 +0000 Received: from sj-core-2.cisco.com (sj-core-2.cisco.com [171.71.177.254]) by sj-dkim-2.cisco.com (8.12.11/8.12.11) with ESMTP id n84328Fn012856; Thu, 3 Sep 2009 20:02:08 -0700 Received: from palito_client100.nuovasystems.com (savbu-palito-client100.cisco.com [10.193.70.13]) by sj-core-2.cisco.com (8.13.8/8.14.3) with ESMTP id n84328vO009854; Fri, 4 Sep 2009 03:02:08 GMT From: Scott Feldman Subject: [net-next PATCH 04/11] enic: use netdev_alloc_skb To: davem@davemloft.net Cc: netdev@vger.kernel.org Date: Thu, 03 Sep 2009 20:02:08 -0700 Message-ID: <20090904030208.5047.72911.stgit@palito_client100.nuovasystems.com> In-Reply-To: <20090904030046.5047.46509.stgit@palito_client100.nuovasystems.com> References: <20090904030046.5047.46509.stgit@palito_client100.nuovasystems.com> User-Agent: StGIT/0.12.1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=1436; t=1252033328; x=1252897328; c=relaxed/simple; s=sjdkim2002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=scofeldm@cisco.com; z=From:=20Scott=20Feldman=20 |Subject:=20[net-next=20PATCH=2004/11]=20enic=3A=20use=20ne tdev_alloc_skb |Sender:=20; bh=P7GFHnvs6toQFHBOn0xeViKOc4Y9UUAdUEBMKXbx8zU=; b=htWaEqrWSDWZKjk6pAjrk3zHRf+hc3vnJScucRfc7/kl70YXNPIPgfvzR1 EMh8PqlYJqUbS3ZcU2v/g6WqQ6U/MMfIHxuK7eZROoNmXtnxx3Ix/7JIEcj9 teA+GyqgnI; Authentication-Results: sj-dkim-2; header.From=scofeldm@cisco.com; dkim=pass ( sig from cisco.com/sjdkim2002 verified; ); Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org enic: use netdev_alloc_skb Use netdev_alloc_skb rather than dev_alloc_skb Signed-off-by: Scott Feldman --- drivers/net/enic/enic_main.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index a9e9be1..d77119a 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -868,11 +868,12 @@ static void enic_free_rq_buf(struct vnic_rq *rq, struct vnic_rq_buf *buf) dev_kfree_skb_any(buf->os_buf); } -static inline struct sk_buff *enic_rq_alloc_skb(unsigned int size) +static inline struct sk_buff *enic_rq_alloc_skb(struct net_device *netdev, + unsigned int size) { struct sk_buff *skb; - skb = dev_alloc_skb(size + NET_IP_ALIGN); + skb = netdev_alloc_skb(netdev, size + NET_IP_ALIGN); if (skb) skb_reserve(skb, NET_IP_ALIGN); @@ -883,12 +884,13 @@ static inline struct sk_buff *enic_rq_alloc_skb(unsigned int size) static int enic_rq_alloc_buf(struct vnic_rq *rq) { struct enic *enic = vnic_dev_priv(rq->vdev); + struct net_device *netdev = enic->netdev; struct sk_buff *skb; - unsigned int len = enic->netdev->mtu + ETH_HLEN; + unsigned int len = netdev->mtu + ETH_HLEN; unsigned int os_buf_index = 0; dma_addr_t dma_addr; - skb = enic_rq_alloc_skb(len); + skb = enic_rq_alloc_skb(netdev, len); if (!skb) return -ENOMEM;