aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c
Commit message (Collapse)AuthorAgeFilesLines
* ramips: allow packets with ttl=0Felix Fietkau2019-03-241-2/+2
| | | | | | | Some broken ISPs (e.g. Comcast) send DHCPv6 packets with hop limit=0. This trips up the TTL=0 check in the PPE if enabled. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: fix two-way hash and auto ageout on MT7621HsiuWen Yen2019-01-231-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* ramips: whitespace cleanup inside hnat driverJohn Crispin2019-01-071-6/+8
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* ramips: add two-way hashing scheme for MT7621HsiuWen Yen2019-01-071-0/+11
| | | | | | | | | | Sometimes the tuples might be hashed to the same FOE entry. When this hash collision problem occurs, some of the connections will not be bound and consequently the CPU idle rate cannot reach 100%. Therefore, two-way hashing is adopted to alleviate this problem. Signed-off-by: HsiuWen Yen <y.hsiuwen@gmail.com>
* ramips: rename ethernet driver folder to the same one that upstream usesFelix Fietkau2018-06-131-0/+526
Preparation for sharing offload code with the mediatek target through generic files/ Signed-off-by: Felix Fietkau <nbd@nbd.name>