netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3] fec: Remove fec_enet_select_queue()
@ 2014-09-22 20:55 Fabio Estevam
  2014-09-26 19:22 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2014-09-22 20:55 UTC (permalink / raw)
  To: davem; +Cc: Frank.Li, netdev, Fabio Estevam

From: Fabio Estevam <fabio.estevam@freescale.com>

Sparse complains about fec_enet_select_queue() not being static.

Feedback from David Miller [1] was to remove this function instead of making it
static:

"Please just delete this function.

It's overriding code which does exactly the same thing.

Actually, more precisely, this code is duplicating code in a way that
bypasses many core facilitites of the networking.  For example, this
override means that socket based flow steering, XPS, etc. are all
not happening on these devices.

Without ->ndo_select_queue(), the flow dissector does __netdev_pick_tx
which is exactly what you want to happen."

[1] http://www.spinics.net/lists/netdev/msg297653.html

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v2:
- Remove fec_enet_select_queue() instead of making it static.

 drivers/net/ethernet/freescale/fec_main.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 09d7f5f..33a7410 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2851,17 +2851,10 @@ static int fec_set_features(struct net_device *netdev,
 	return 0;
 }
 
-u16 fec_enet_select_queue(struct net_device *ndev, struct sk_buff *skb,
-			  void *accel_priv, select_queue_fallback_t fallback)
-{
-	return skb_tx_hash(ndev, skb);
-}
-
 static const struct net_device_ops fec_netdev_ops = {
 	.ndo_open		= fec_enet_open,
 	.ndo_stop		= fec_enet_close,
 	.ndo_start_xmit		= fec_enet_start_xmit,
-	.ndo_select_queue       = fec_enet_select_queue,
 	.ndo_set_rx_mode	= set_multicast_list,
 	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_validate_addr	= eth_validate_addr,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next v3] fec: Remove fec_enet_select_queue()
  2014-09-22 20:55 [PATCH net-next v3] fec: Remove fec_enet_select_queue() Fabio Estevam
@ 2014-09-26 19:22 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-09-26 19:22 UTC (permalink / raw)
  To: festevam; +Cc: Frank.Li, netdev, fabio.estevam

From: Fabio Estevam <festevam@gmail.com>
Date: Mon, 22 Sep 2014 17:55:29 -0300

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Sparse complains about fec_enet_select_queue() not being static.
> 
> Feedback from David Miller [1] was to remove this function instead of making it
> static:
> 
> "Please just delete this function.
> 
> It's overriding code which does exactly the same thing.
> 
> Actually, more precisely, this code is duplicating code in a way that
> bypasses many core facilitites of the networking.  For example, this
> override means that socket based flow steering, XPS, etc. are all
> not happening on these devices.
> 
> Without ->ndo_select_queue(), the flow dissector does __netdev_pick_tx
> which is exactly what you want to happen."
> 
> [1] http://www.spinics.net/lists/netdev/msg297653.html
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Looks a lot better, applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-26 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-22 20:55 [PATCH net-next v3] fec: Remove fec_enet_select_queue() Fabio Estevam
2014-09-26 19:22 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).