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: <20141030.194453.129639650935738765.davem@davemloft.net>
Date:	Thu, 30 Oct 2014 19:44:53 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	andriy.shevchenko@...ux.intel.com
Cc:	peppe.cavallaro@...com, netdev@...r.kernel.org,
	hock.leong.kweh@...el.com, vbridgers2013@...il.com
Subject: Re: [PATCH] stmmac: pci: set default of the filter bins

From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Date: Thu, 30 Oct 2014 11:39:25 +0200

> @@ -32,7 +32,10 @@ static struct stmmac_dma_cfg dma_cfg;
>  
>  static void stmmac_default_data(void)
>  {
> +	struct plat_stmmacenet_data *plat = &plat_dat;
> +
>  	memset(&plat_dat, 0, sizeof(struct plat_stmmacenet_data));
> +
>  	plat_dat.bus_id = 1;
>  	plat_dat.phy_addr = 0;
>  	plat_dat.interface = PHY_INTERFACE_MODE_GMII;
> @@ -47,6 +50,12 @@ static void stmmac_default_data(void)
>  	dma_cfg.pbl = 32;
>  	dma_cfg.burst_len = DMA_AXI_BLEN_256;
>  	plat_dat.dma_cfg = &dma_cfg;
> +
> +	/* Set default value for multicast hash bins */
> +	plat->multicast_filter_bins = HASH_TABLE_SIZE;
> +
> +	/* Set default value for unicast filter entries */
> +	plat->unicast_filter_entries = 1;

Don't do this.

The rest of the function goes "plat_dat.foo" so it looks terribly
inconsistent when you add the local variable to dereference it like
this.

So just do "plat_dat.multicast_filter_bins = x;" etc.
--
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