openwrt/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek
HsiuWen Yen fe7d965ea9 ramips: fix two-way hash and auto ageout on MT7621
Current code directly writes the FOE entry to hash_val+1 position
when hash collision occurs. However, it is found that this behavior
will cause the cache and the hardware FOE table to be inconsistent.

For example, there are three flows, and their hashed values are all
equal to 100. The first flow is written to the position of 100. The
second flow is written to the position of 100+1. Then, the logic of
the current code will also write the third flow to 100+1.

At this time, the cache has flow 1 and 2; and the hardware FOE table
has flow 1 and 3, where these two parts store different contents.
So it is necessary to check whether the hash_val+1 is also occupied
before writing. If hash_val+1 is also occupied, we won’t bind th
third flow to the FOE table.

Addition to that, we also cancel the processing of foe_entry removal
because the hardware has auto age-out ability. The hardware will
periodically iterate through the FOE table to find out the time-out
entry and set it as INVALID.

Signed-off-by: HsiuWen Yen <y.hsiuwen@gmail.com>
2019-01-23 09:27:30 +01:00
..
esw_rt3050.c
esw_rt3050.h
ethtool.c
ethtool.h
gsw_mt7620.c ramips: mt7620: add force use of mdio-mode 2018-11-26 12:16:52 +01:00
gsw_mt7620.h
gsw_mt7621.c
Kconfig
Makefile
mdio_mt7620.c
mdio_rt2880.c
mdio_rt2880.h
mdio.c ramips: fix gigabit switch PHY access on MDIO 2018-08-06 07:05:37 +02:00
mdio.h
mt7530.c
mt7530.h
mtk_debugfs.c
mtk_eth_soc.c ramips: ethernet: unify tx descriptor buffer splitting 2018-09-03 12:06:24 +02:00
mtk_eth_soc.h ramips: ethernet: use own page_frag_cache 2018-07-12 18:43:53 +02:00
mtk_offload.c ramips: fix two-way hash and auto ageout on MT7621 2019-01-23 09:27:30 +01:00
mtk_offload.h
soc_mt7620.c
soc_mt7621.c ramips: ethernet: disable fraglist support 2018-07-14 08:32:39 +02:00
soc_rt2880.c
soc_rt3050.c
soc_rt3883.c