netdevice: add queue selection fallback handler for ndo_select_queue
authorDaniel Borkmann <dborkman@redhat.com>
Sun, 16 Feb 2014 14:55:20 +0000 (15:55 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Feb 2014 05:36:34 +0000 (00:36 -0500)
commit99932d4fc03a13bb3e94938fe25458fabc8f2fc3
tree529c7ad3764f7611f10ea299a67313f8baf84ce7
parentc321f7d7c87cdc623c87845f6378620573e57512
netdevice: add queue selection fallback handler for ndo_select_queue

Add a new argument for ndo_select_queue() callback that passes a
fallback handler. This gets invoked through netdev_pick_tx();
fallback handler is currently __netdev_pick_tx() as most drivers
invoke this function within their customized implementation in
case for skbs that don't need any special handling. This fallback
handler can then be replaced on other call-sites with different
queue selection methods (e.g. in packet sockets, pktgen etc).

This also has the nice side-effect that __netdev_pick_tx() is
then only invoked from netdev_pick_tx() and export of that
function to modules can be undone.

Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 files changed:
drivers/net/bonding/bond_main.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/lantiq_etop.c
drivers/net/ethernet/mellanox/mlx4/en_tx.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
drivers/net/ethernet/tile/tilegx.c
drivers/net/team/team.c
drivers/net/tun.c
drivers/net/wireless/mwifiex/main.c
drivers/staging/bcm/Bcmnet.c
drivers/staging/netlogic/xlr_net.c
drivers/staging/rtl8188eu/os_dep/os_intfs.c
include/linux/netdevice.h
net/core/flow_dissector.c
net/mac80211/iface.c