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]
Date:	Fri, 25 Sep 2015 12:48:48 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	madalin.bucur@...escale.com
Cc:	netdev@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
	linux-kernel@...r.kernel.org, scottwood@...escale.com,
	igal.liberman@...escale.com, roy.pledge@...escale.com,
	ppc@...dchasers.com, joe@...ches.com, pebolle@...cali.nl,
	joakim.tjernlund@...nsmode.se, f.fainelli@...il.com, stsp@...t.ru
Subject: Re: [v3 2/8] dpaa_eth: add support for DPAA Ethernet

From: Madalin Bucur <madalin.bucur@...escale.com>
Date: Thu, 24 Sep 2015 18:00:13 +0300

> +#define DPA_NAPI_WEIGHT		64

This is just the default, so simply use "NAPI_POLL_WEIGHT" rather
than defining your own macro unnecessarily for this.

> +static int dpa_eth_priv_stop(struct net_device *net_dev)
> +{
> +	int err;
> +	struct dpa_priv_s *priv;
> +
> +	err = dpa_stop(net_dev);
> +	/* Allow NAPI to consume any frame still in the Rx/TxConfirm
> +	 * ingress queues. This is to avoid a race between the current
> +	 * context and ksoftirqd which could leave NAPI disabled while
> +	 * in fact there's still Rx traffic to be processed.
> +	 */
> +	usleep_range(5000, 10000);

A wait never fixes a race.  Instead you must use appropriate mutual
exclusion mechanisms to ensure that NAPI is really completed it's
run, and we definitely have a means by which to do that properly.

> +	net_dev->hw_features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
> +		NETIF_F_LLTX);

This second line should start exactly at the first column after the
openning parenthesis of the first line.
--
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