lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D5C1322C3E673F459512FB59E0DDC329029E3EE5@orsmsx414.amr.corp.intel.com>
Date:	Mon, 9 Apr 2007 13:43:11 -0700
From:	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>
To:	"David Miller" <davem@...emloft.net>
Cc:	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<jgarzik@...ox.com>, "cramerj" <cramerj@...el.com>,
	"Kok, Auke-jan H" <auke-jan.h.kok@...el.com>,
	"Leech, Christopher" <christopher.leech@...el.com>
Subject: RE: [PATCH 2/2] NET: Multiqueue network device support.

> -----Original Message-----
> From: David Miller [mailto:davem@...emloft.net] 
> Sent: Monday, April 09, 2007 1:38 PM
> To: Waskiewicz Jr, Peter P
> Cc: netdev@...r.kernel.org; linux-kernel@...r.kernel.org; 
> jgarzik@...ox.com; cramerj; Kok, Auke-jan H; Leech, Christopher
> Subject: Re: [PATCH 2/2] NET: Multiqueue network device support.
> 
> From: Peter P.Waskiewicz Jr. <peter.p.waskiewicz.jr@...el.com>
> Date: Mon, 09 Apr 2007 13:50:52 -0700
> 
> > From: Peter P. Waskiewicz Jr. <peter.p.waskiewicz.jr@...el.com>
> > 
> > Added an API and associated supporting routines for 
> multiqueue network devices.
> > This allows network devices supporting multiple TX queues 
> to configure 
> > each queue within the netdevice and manage each queue 
> independantly.  
> > Changes to the PRIO Qdisc also allow a user to map multiple 
> flows to 
> > individual TX queues, taking advantage of each queue on the device.
> > 
> > Signed-off-by: Peter P. Waskiewicz Jr 
> > <peter.p.waskiewicz.jr@...el.com>
> > Signed-off-by: Auke Kok <auke-jan.h.kok@...el.com>
> 
> This looks definitely better than the previous 
> implementation, myself and others will review this in more 
> depth though.
> 
> > + 	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;
> > + 	}
> > + 
> > + 	dev->egress_subqueue = (struct net_device_subqueue *)p;
> 
> No need for a cast, 'p' is "void *".

True, but the assignment for "dev" above also casts this void * to
struct net_device *:

        dev = (struct net_device *)
                (((long)p + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST);
        dev->padded = (char *)dev - (char *)p;

Shall I remove my cast?

Thanks for the feedback,

-PJ Waskiewicz
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ