linux/drivers/net
Ben Hutchings 950c54df1e sfc: Reduce RX scatter buffer size, and reduce alignment if appropriate
efx_start_datapath() asserts that we can fit 2 RX scatter buffers plus
a software structure, each appropriately aligned, into a single page.
Where L1_CACHE_BYTES == 256 and PAGE_SIZE == 4096, which is the case
on s390, this assertion fails.

The current scatter buffer size is also not a multiple of 64 or 128,
which are more common cache line sizes.  If we can make both the start
and end of a scatter buffer cache-aligned, this will reduce the need
for read-modify-write operations on inter- processor links.

Fix the alignment by reducing EFX_RX_USR_BUF_SIZE to 2048 - 256 ==
1792.  (We could use 2048 - L1_CACHE_BYTES, but EFX_RX_USR_BUF_SIZE
also affects user-level networking where a larger amount of
housekeeping data may be needed.  Although this version of the driver
does not support user-level networking, I prefer to keep scattering
behaviour consistent with the out-of-tree version.)

This still doesn't fix the s390 build because like most architectures
it has NET_IP_ALIGN == 2.  When NET_IP_ALIGN != 0 we cannot achieve
cache line alignment at either the start or end of a scatter buffer,
so there is actually no point in padding the buffers to a multiple of
the cache line size.  All we need is 4-byte alignment of the network
header, so do that.

Adjust the assertions accordingly.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-14 11:32:04 -07:00
..
appletalk
arcnet
bonding Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
caif caif: CAIF_VIRTIO should depend on HAS_DMA 2013-05-11 16:28:24 -07:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00
cris
dsa
ethernet sfc: Reduce RX scatter buffer size, and reduce alignment if appropriate 2013-05-14 11:32:04 -07:00
fddi
hamradio drivers/net: rename random32() to prandom_u32() 2013-05-07 18:38:27 -07:00
hippi
hyperv hyperv: Fix a compiler warning in netvsc_send() 2013-04-29 14:06:32 -04:00
ieee802154 at86rf230: change irq handling to prevent lockups with edge type irq 2013-04-16 16:34:08 -04:00
irda net/irda: fix error return code in bfin_sir_open() 2013-05-08 13:13:29 -07:00
phy Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
plip
ppp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00
slip
team drivers/net: rename random32() to prandom_u32() 2013-05-07 18:38:27 -07:00
usb sierra_net: keep status interrupt URB active 2013-05-08 13:13:29 -07:00
vmxnet3 net: vlan: add protocol argument to packet tagging functions 2013-04-19 14:46:06 -04:00
wan
wimax
wireless net/wireless: ATH9K should depend on HAS_DMA 2013-05-11 16:28:23 -07:00
xen-netback xen-netback: better names for thresholds 2013-05-02 16:50:08 -04:00
dummy.c
eql.c
ifb.c net: vlan: announce STAG offload capability in some drivers 2013-04-19 14:46:06 -04:00
Kconfig
LICENSE.SRC
loopback.c
macvlan.c macvlan: fix passthru mode race between dev removal and rx path 2013-05-11 16:25:00 -07:00
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-04-30 03:55:20 -04:00
veth.c net: vlan: announce STAG offload capability in some drivers 2013-04-19 14:46:06 -04:00
virtio_net.c virtio_net: use default napi weight by default 2013-05-11 17:40:14 -07:00
vxlan.c vxlan: do not set SKB_GSO_UDP 2013-04-29 15:27:47 -04:00
xen-netfront.c xen-netfront: reduce gso_max_size to account for max TCP header 2013-04-22 15:37:01 -04:00