RE: [PATCH net-next,v2] Add support for netvsc build without CONFIG_SYSFS flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: David Miller [mailto:davem@xxxxxxxxxxxxx]
> Sent: Thursday, May 8, 2014 4:45 PM
> To: Haiyang Zhang
> Cc: netdev@xxxxxxxxxxxxxxx; KY Srinivasan; olaf@xxxxxxxxx;
> jasowang@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; driverdev-
> devel@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH net-next,v2] Add support for netvsc build without
> CONFIG_SYSFS flag
> 
> From: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> 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. 

Thanks,
- Haiyang

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux