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] [day] [month] [year] [list]
Message-ID: <CAJ3xEMhZmSMVBUq7Ry++KGK_Ec2PG++MUps=yA5PoMrhayzYQQ@mail.gmail.com>
Date:	Fri, 29 Jan 2016 15:17:54 +0200
From:	Or Gerlitz <gerlitz.or@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	Or Gerlitz <ogerlitz@...lanox.com>,
	Linux Netdev List <netdev@...r.kernel.org>,
	Eran Ben Elisha <eranbe@...lanox.com>,
	Saeed Mahameed <saeedm@...lanox.com>
Subject: Re: [PATCH net 2/2] net/mlx5e: Use a private copy of netdev ops

On Fri, Jan 29, 2016 at 6:00 AM, David Miller <davem@...emloft.net> wrote:

> This is not the canonical way to fix this.  Please look at how
> other drivers handle this situation before inventing your own
> way of solving the problem.

Dave, I was aware that other drivers do that differently, but the
maintainer here preferred to go this way and I didn't see a deep
reason why not.

> The proper way is to have multiple netdevice ops instances, and simply
> choose the one which is correct for the chip in question.

yep, but - this can become little lengthy if you have N ndos shared
among (say) three different profiles with m1, m2, m3 distinct ndos -
so we thought it can be a bit more elegant to do selective assignment
within a function and not as three globals.

> You should also mark the ops as const.  They should never _ever_ be
> modified at runtime.

okay

Or.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ