1
0
Fork 0
alistair23-linux/drivers/net/ethernet
Jakub Kicinski 1f2b729334 gianfar: remove faulty filer optimizer
Current filer rule optimization is broken in several ways:
 (1) Can perform reads/writes beyond end of allocated tables.
     (gianfar_ethtool.c:1326).

(2) It breaks badly for rules with more than 2 specifiers
     (e.g. matching ip, port, tos).

Example:
# ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.1 dst-port 1 tos 1 action 1
Added rule with ID 254
# ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.2 dst-port 2 tos 2 action 9
Added rule with ID 253
# ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.3 dst-port 3 tos 3 action 17
Added rule with ID 252
# ./filer_decode /sys/kernel/debug/gfar1/filer_raw
00: MASK == 00000210 AND         Q:00           ctrl:00000080 prop:00000210
01: FPR  == 00000210 AND CLE     Q:00           ctrl:00000281 prop:00000210
02: MASK == ffffffff AND         Q:00           ctrl:00000080 prop:ffffffff
03: DPT  == 00000003 AND         Q:00           ctrl:0000008e prop:00000003
04: TOS  == 00000003 AND         Q:00           ctrl:0000008a prop:00000003
05: DIA  == 0a000003 AND         Q:11           ctrl:0000448c prop:0a000003
06: DPT  == 00000002 AND         Q:00           ctrl:0000008e prop:00000002
07: TOS  == 00000002 AND         Q:00           ctrl:0000008a prop:00000002
08: DIA  == 0a000002 AND         Q:09           ctrl:0000248c prop:0a000002
09: DIA  == 0a000001 AND         Q:00           ctrl:0000008c prop:0a000001
0a: DPT  == 00000001 AND         Q:00           ctrl:0000008e prop:00000001
0b: TOS  == 00000001     CLE     Q:01           ctrl:0000060a prop:00000001
ff: MASK >= 00000000             Q:00           ctrl:00000020 prop:00000000

(Entire cluster gets AND-ed together).

 (3) We observed that the masking rules it generates do not
     play well with clustering on P2020.  Only first rule
     of the cluster would ever fire.  Given that optimizer
     relies heavily on masking this is very hard to fix.

Example:
# ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.1 dst-port 1  action 1
Added rule with ID 254
# ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.2 dst-port 2  action 9
Added rule with ID 253
# ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.3 dst-port 3  action 17
Added rule with ID 252
# ./filer_decode /sys/kernel/debug/gfar1/filer_raw
00: MASK == 00000210 AND         Q:00           ctrl:00000080 prop:00000210
01: FPR  == 00000210 AND CLE     Q:00           ctrl:00000281 prop:00000210
02: MASK == ffffffff AND         Q:00           ctrl:00000080 prop:ffffffff
03: DPT  == 00000003 AND         Q:00           ctrl:0000008e prop:00000003
04: DIA  == 0a000003             Q:11           ctrl:0000440c prop:0a000003
05: DPT  == 00000002 AND         Q:00           ctrl:0000008e prop:00000002
06: DIA  == 0a000002             Q:09           ctrl:0000240c prop:0a000002
07: DIA  == 0a000001 AND         Q:00           ctrl:0000008c prop:0a000001
08: DPT  == 00000001     CLE     Q:01           ctrl:0000060e prop:00000001
ff: MASK >= 00000000             Q:00           ctrl:00000020 prop:00000000

Which looks correct according to the spec but only the first
(eth id 252)/last added rule for 10.0.0.3 will ever trigger.
As if filer did not treat the AND CLE as cluster start but
also kept AND-ing the rules.  We found no errata covering this.

The fact that nobody noticed (2) or (3) makes me think
that this feature is not very widely used and we should just
remove it.

Reported-by: Aleksander Dutkowski <adutkowski@gmail.com>
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-12 14:47:06 -07:00
..
3com 3c59x: Fix resource leaks in vortex_open 2015-08-03 15:21:33 -07:00
8390 drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
adaptec drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
adi drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
aeroflex net: greth: constify of_device_id array 2015-03-17 15:00:22 -04:00
agere drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
allwinner drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
alteon drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
altera altera_tse: Correct rx packet length 2015-04-29 15:19:34 -04:00
amd amd-xgbe: Fix DMA API debug warning 2015-07-08 15:57:14 -07:00
apm drivers: net: xgene: Pre-initialize ret in xgene_enet_get_resources() 2015-06-28 16:54:32 -07:00
apple drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
arc drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
atheros drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
broadcom bnx2x: Free NVRAM lock at end of each page 2015-08-10 14:31:59 -07:00
brocade bna: fix interrupts storm caused by erroneous packets 2015-08-10 10:58:37 -07:00
cadence macb: Fix build with macro'ized readl/writel. 2015-07-27 14:24:48 -07:00
calxeda ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
cavium net: thunderx: remove effective "default y" from Kconfig if ARCH_THUNDER=y 2015-08-07 00:01:37 -07:00
chelsio cxgb4: missing curly braces in t4_setup_debugfs() 2015-08-10 14:26:26 -07:00
cirrus drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
cisco enic: fix issues in enic_poll 2015-07-02 12:10:20 -07:00
davicom dm9000: Add regulator and reset support to dm9000 2015-01-15 14:08:07 -05:00
dec drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
dlink drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
emulex be2net: protect eqo->affinity_mask from getting freed twice 2015-08-07 11:53:06 -07:00
ezchip NET: Add ezchip ethernet driver 2015-06-23 07:16:25 -07:00
faraday drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
freescale gianfar: remove faulty filer optimizer 2015-08-12 14:47:06 -07:00
fujitsu drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
hisilicon drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
hp drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
i825xx drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
ibm drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
icplus net: icplus: fix typo in constant name 2015-06-29 15:57:50 -07:00
intel i40evf: don't configure unused RSS queues 2015-06-26 02:52:27 -07:00
marvell net: mvpp2: replace TX coalescing interrupts with hrtimer 2015-08-10 10:57:00 -07:00
mellanox net/mlx5_core: Set log_uar_page_sz for non 4K page size architecture 2015-08-07 15:55:48 -07:00
micrel drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
microchip drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
moxa drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
myricom Minor merge needed, due to function move. 2015-07-01 10:49:25 -07:00
natsemi drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
neterion drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
nuvoton drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
nvidia drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
nxp
octeon netdev: octeon_mgmt: constify of_device_id array 2015-03-17 15:00:22 -04:00
oki-semi drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
packetengines drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
pasemi drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
qlogic qlcnic: Fix corruption while copying 2015-07-29 23:57:26 -07:00
qualcomm drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
rdc drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
realtek r8169: enforce RX_MULTI_EN on rtl8168ep/8111ep chips 2015-08-07 00:00:10 -07:00
renesas ravb: fix ring memory allocation 2015-07-21 22:34:27 -07:00
rocker rocker: free netdevice during netdevice removal 2015-08-02 17:19:17 -07:00
samsung ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
seeq drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
sfc sfc: Report TX completions to BQL after all TX events in interrupt 2015-07-09 00:00:40 -07:00
sgi drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
silan drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
sis sis900: Trivial: Fix typos in enums 2015-06-29 12:52:06 -07:00
smsc drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
stmicro stmmac: dwmac-ipq806x: fix static checker warning 2015-08-07 00:12:04 -07:00
sun niu: don't count tx error twice in case of headroom realloc fails 2015-07-26 21:17:54 -07:00
tehuti drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
ti net: netcp: fix unused interface rx buffer size configuration 2015-08-07 00:02:36 -07:00
tile net: batch of last_rx update avoidance in ethernet drivers. 2015-05-14 17:38:17 -04:00
toshiba drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
tundra drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
via net: via: VIA_RHINE and VIA_VELOCITY should depend on HAS_DMA 2015-06-28 20:20:55 -07:00
wiznet drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
xilinx net: axienet: Fix devm_ioremap_resource return value check 2015-07-09 21:43:16 -07:00
xircom drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
xscale drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
Kconfig NET: Add ezchip ethernet driver 2015-06-23 07:16:25 -07:00
Makefile NET: Add ezchip ethernet driver 2015-06-23 07:16:25 -07:00
dnet.c net: dnet: fix dnet_poll() 2015-01-11 21:44:55 -05:00
dnet.h
ec_bhf.c
ethoc.c net: ethoc: constify of_device_id array 2015-03-17 15:00:21 -04:00
fealnx.c
jme.c net: rename vlan_tx_* helpers since "tx" is misleading there 2015-01-13 17:51:08 -05:00
jme.h
korina.c
lantiq_etop.c
netx-eth.c