netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, jgarzik@pobox.com,
	cramerj@intel.com, auke-jan.h.kok@intel.com,
	christopher.leech@intel.com
Subject: Re: [PATCH 2/2] NET: Multiqueue network device support implementation.
Date: Tue, 10 Apr 2007 12:20:49 +0400	[thread overview]
Message-ID: <20070410082049.GC16621@2ka.mipt.ru> (raw)
In-Reply-To: <20070409212841.31670.59366.stgit@gitlost.site>

On Mon, Apr 09, 2007 at 02:28:41PM -0700, Peter P Waskiewicz Jr (peter.p.waskiewicz.jr@intel.com) wrote:
> + 	alloc_size = (sizeof(struct net_device_subqueue) * queue_count);
> + 
> + 	p = kzalloc(alloc_size, GFP_KERNEL);
> + 	if (!p) {
> + 		printk(KERN_ERR "alloc_netdev: Unable to allocate queues.\n");
> + 		return NULL;

I think you either do not want to print it, or want additional details
about device...

> + 	}
> + 
> + 	dev->egress_subqueue = p;
> + 	dev->egress_subqueue_count = queue_count;
> +
>  	dev->get_stats = maybe_internal_stats;
>  	setup(dev);
>  	strcpy(dev->name, name);
>  	return dev;
>  }
> -EXPORT_SYMBOL(alloc_netdev);
> +EXPORT_SYMBOL(alloc_netdev_mq);
>  
>  /**
>   *	free_netdev - free network device
> @@ -3345,6 +3358,7 @@ void free_netdev(struct net_device *dev)
>  {
>  #ifdef CONFIG_SYSFS
>  	/*  Compatibility with error handling in drivers */
> +	kfree((char *)dev->egress_subqueue);
>  	if (dev->reg_state == NETREG_UNINITIALIZED) {
>  		kfree((char *)dev - dev->padded);
>  		return;
> @@ -3356,6 +3370,7 @@ void free_netdev(struct net_device *dev)
>  	/* will free via device release */
>  	put_device(&dev->dev);
>  #else
> +	kfree((char *)dev->egress_subqueue);

Still casting :)


-- 
	Evgeniy Polyakov

  parent reply	other threads:[~2007-04-10  8:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-09 21:27 [PATCH 0/2] REPOST: Multiqueue network device support Peter P Waskiewicz Jr
2007-04-09 21:28 ` [PATCH 1/2] NET: Multiqueue network device support documentation Peter P Waskiewicz Jr
2007-04-09 21:28 ` [PATCH 2/2] NET: Multiqueue network device support implementation Peter P Waskiewicz Jr
2007-04-09 21:33   ` Jan Engelhardt
2007-04-09 21:52     ` Waskiewicz Jr, Peter P
2007-04-10 11:04       ` Herbert Xu
2007-04-10  8:20   ` Evgeniy Polyakov [this message]
2007-04-10 15:41     ` Waskiewicz Jr, Peter P
2007-04-10 15:54       ` Evgeniy Polyakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070410082049.GC16621@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=auke-jan.h.kok@intel.com \
    --cc=christopher.leech@intel.com \
    --cc=cramerj@intel.com \
    --cc=davem@davemloft.net \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).