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:	Wed, 08 Sep 2010 13:36:27 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	masa-korg@....okisemi.com
Cc:	randy.dunlap@...cle.com, ralf@...ux-mips.org,
	eric.dumazet@...il.com, netdev@...r.kernel.org,
	meego-dev@...go.com, mbizon@...ebox.fr,
	linux-kernel@...r.kernel.org, kristoffer@...sler.com,
	john.linn@...inx.com, joe@...ches.com, gregory.v.rose@...el.com,
	yong.y.wang@...el.com, qi.wang@...el.com, okada533@....okisemi.com,
	morinaga526@....okisemi.com, shimizu394@....okisemi.com,
	joel.clark@...el.com, margie.foster@...el.com,
	andrew.chih.howe.khor@...el.com
Subject: Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH

From: Masayuki Ohtake <masa-korg@....okisemi.com>
Date: Tue, 07 Sep 2010 11:42:53 +0900

> +/**
> + * pch_gbe_clean_rx - Send received data up the network stack; legacy
> + * @adapter:     Board private structure
> + * @rx_ring:     Rx descriptor ring
> + * @work_done:   Completed count
> + * @work_to_do:  Request count
> + * Returns
> + *	true:  Cleaned the descriptor
> + *	false: Not cleaned the descriptor
> + */
> +static bool
> +pch_gbe_clean_rx(struct pch_gbe_adapter *adapter,
> +		 struct pch_gbe_rx_ring *rx_ring,
> +		 int *work_done, int work_to_do)
> +{
..
> +			if (netif_receive_skb(skb) == NET_RX_DROP) {
> +				adapter->stats.rx_dropped++;

pch_gbe_clean_rx() should be given the "napi_struct" pointer
argument from it's caller, and packets should be given to the
stack using napi_gro_receive().  Finally, NETIF_F_GRO should
be set in netdev->flags at probe time.

Also, you should not use the return value of netif_receive_skb() to
bump the standard rx_dropped statistics value, those return code are
for other purposes.  No other driver does what you are doing with this
return value.

If you wish to increment some extended stastic value (like
drivers/net/gianfar.c does) with another name, that's fine.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ