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: <20120708.033122.2108511545126626834.davem@davemloft.net>
Date:	Sun, 08 Jul 2012 03:31:22 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	meravs@...adcom.com
Cc:	netdev@...r.kernel.org, eilong@...adcom.com, dmitry@...adcom.com
Subject: Re: [net-next patch] bnx2x: Add run-time CNIC support

From: "Merav Sicron" <meravs@...adcom.com>
Date: Sun, 8 Jul 2012 12:48:34 +0300

> This patch replaces the BCM_CNIC compilation flag with a run-time flag.
> This is mainly important for the SR-IOV driver, as this driver will share the
> same code with the PF/hypervisor driver. Since storage is not supported in
> SR-IOV (while is usually enabled in the non-SR-IOV driver), we don't want to
> waste resources on it.
> In addition this change makes the code prettier.
 ...
> -static const struct net_device_ops bnx2x_netdev_ops = {
> +static struct net_device_ops bnx2x_netdev_ops = {
 ...
> 
> +	if (CNIC_ENABLED(bp))
> +		bnx2x_netdev_ops.ndo_select_queue = bnx2x_select_queue;
> +#if defined(NETDEV_FCOE_WWNN)
> +	if (CNIC_ENABLED(bp))
> +		bnx2x_netdev_ops.ndo_fcoe_get_wwn = bnx2x_fcoe_get_wwn;
> +#endif
 ...
+static int set_is_cnic_enabled(void)
+{
+#if defined(CONFIG_CNIC) || defined(CONFIG_CNIC_MODULE)
+	return 1;
+#else
+	return 0;
+#endif
+}

This is basically a joke.

You're losing const'ness of net_device_ops and other nice things for
what is still, in the end, set by kconfig options.

I'm not applying crap like this, sorry.
--
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