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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1266478630.2877.9.camel@edumazet-laptop>
Date:	Thu, 18 Feb 2010 08:37:10 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Vasu Dev <vasu.dev@...ux.intel.com>
Cc:	David Miller <davem@...emloft.net>, jeffrey.t.kirsher@...el.com,
	netdev@...r.kernel.org, gospo@...hat.com, vasu.dev@...el.com
Subject: Re: [net-next-2.6 PATCH 1/3] vlan: adds vlan_dev_select_queue

Le mercredi 17 février 2010 à 14:40 -0800, Vasu Dev a écrit :
> > > ------------------
> > > 
> > > For performance reason, we could avoid calling vlan_dev_select_queue()
> > > for real devices without ndo_select_queue() handler, this would need to
> > > mirror vlan_netdev_ops & vlan_netdev_accel_ops.
> > > 
> 
> This means vlan_netdev_ops & vlan_netdev_accel_ops not to be const
> anymore so that vlan_dev_select_queue() could be initialized to vlan ops
> based on real dev ndo_select_queue() present or not, should be okay to
> be not const anymore. I'll update patch as suggested.

No they should stay const

I said you should mirror (copy if you prefer) the structure, one with a
NULL ndo_select_queue pointer, one with a ndo_select_queue =
vlan_dev_select_queue.

Both structures are const.

You must not dynamiucally change the structure, because the same machine
might have a vlan over a device with no ndo_select_queue() method, and
another vlan over a device with a ndo_select_queue()

Thanks




--
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