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]
Date:	Sun, 11 May 2014 14:07:05 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Haiyang Zhang <haiyangz@...rosoft.com>
Cc:	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	KY Srinivasan <kys@...rosoft.com>,
	"olaf@...fle.de" <olaf@...fle.de>,
	"jasowang@...hat.com" <jasowang@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"driverdev-devel@...uxdriverproject.org" 
	<driverdev-devel@...uxdriverproject.org>
Subject: Re: [PATCH net-next,v2] Add support for netvsc build without
 CONFIG_SYSFS flag

On Thu, 2014-05-08 at 20:50 +0000, Haiyang Zhang wrote:
> 
> > -----Original Message-----
> > From: David Miller [mailto:davem@...emloft.net]
> > Sent: Thursday, May 8, 2014 4:45 PM
> > To: Haiyang Zhang
> > Cc: netdev@...r.kernel.org; KY Srinivasan; olaf@...fle.de;
> > jasowang@...hat.com; linux-kernel@...r.kernel.org; driverdev-
> > devel@...uxdriverproject.org
> > Subject: Re: [PATCH net-next,v2] Add support for netvsc build without
> > CONFIG_SYSFS flag
> > 
> > From: Haiyang Zhang <haiyangz@...rosoft.com>
> > Date: Thu,  8 May 2014 13:41:33 -0700
> > 
> > > +static inline void netvsc_record_rx_queue(struct sk_buff *skb,
> > > +					  struct hv_netvsc_packet *packet,
> > > +					  struct net_device *ndev)
> > > +{
> > > +#ifdef CONFIG_SYSFS
> > > +	skb_record_rx_queue(skb, packet->channel->
> > > +			    offermsg.offer.sub_channel_index %
> > > +			    ndev->real_num_rx_queues);
> > > +#endif
> > > +}
> > 
> > This is still fantastically gross, what is so unique about your driver that it needs
> > hacks like this?  No other driver to my knowledge does.
> > 
> > Figure out what it is that makes your driver so unique, and try to make it
> > conform to how other drivers handle these features without SYSFS ifdef'ery
> > instead.
> > 
> 
> I looked around the other drivers, and the netif_set_real_num_rx_queues() function. 
> It's already switched to no-op without CONFIG_SYSFS flag. So I will rely on this, and 
> don't have to handle the flag in my code. 

I think most other drivers have a 1-1 mapping between hardware RX queues
and the RX queue indices reported to Linux.  It appears that in this
case sub_channel_index is the 'hardware' queue number, but you think
there is not a 1-1 mapping.  Why is that?

Ben.

-- 
Ben Hutchings
Sturgeon's Law: Ninety percent of everything is crap.

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ