<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/net/ethernet/mediatek/mtk_ppe.c, branch davem/net-next</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>http://git.waynecole.info/wireguard-linux/atom?h=davem%2Fnet-next</id>
<link rel='self' href='http://git.waynecole.info/wireguard-linux/atom?h=davem%2Fnet-next'/>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/'/>
<updated>2026-04-12T22:22:58Z</updated>
<entry>
<title>net: ethernet: mtk_eth_soc: initialize PPE per-tag-layer MTU registers</title>
<updated>2026-04-12T22:22:58Z</updated>
<author>
<name>Daniel Golle</name>
<email>daniel@makrotopia.org</email>
</author>
<published>2026-04-10T02:57:52Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=2dddb34dd0d07b01fa770eca89480a4da4f13153'/>
<id>urn:sha1:2dddb34dd0d07b01fa770eca89480a4da4f13153</id>
<content type='text'>
The PPE enforces output frame size limits via per-tag-layer VLAN_MTU
registers that the driver never initializes. The hardware defaults do
not account for PPPoE overhead, causing the PPE to punt encapsulated
frames back to the CPU instead of forwarding them.

Initialize the registers at PPE start and on MTU changes using the
maximum GMAC MTU. This is a conservative approximation -- the actual
per-PPE requirement depends on egress path, but using the global
maximum ensures the limits are never too small.

Fixes: ba37b7caf1ed2 ("net: ethernet: mtk_eth_soc: add support for initializing the PPE")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Link: https://patch.msgid.link/ec995ab8ce8be423267a1cc093147a74d2eb9d82.1775789829.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28Z</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: Use ipv6_addr_{cpu_to_be32,be32_to_cpu} helpers</title>
<updated>2024-08-16T17:27:48Z</updated>
<author>
<name>Simon Horman</name>
<email>horms@kernel.org</email>
</author>
<published>2024-08-13T13:33:48Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=b908c722133e3a158bf703b5003e7a8272e9d540'/>
<id>urn:sha1:b908c722133e3a158bf703b5003e7a8272e9d540</id>
<content type='text'>
Use ipv6_addr_cpu_to_be32 and ipv6_addr_be32_to_cpu helpers to convert
address, rather than open coding the conversion.

No functional change intended.
Compile tested only.

Suggested-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Link: https://lore.kernel.org/netdev/c7684349-535c-45a4-9a74-d47479a50020@lunn.ch/
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20240813-ipv6_addr-helpers-v2-2-5c974f8cca3e@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: Reuse value using READ_ONCE instead of re-rereading it</title>
<updated>2024-04-04T13:46:52Z</updated>
<author>
<name>linke li</name>
<email>lilinke99@qq.com</email>
</author>
<published>2024-04-03T02:54:00Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=04172043bd218dbbfc0c13bd4630142eb3f027cb'/>
<id>urn:sha1:04172043bd218dbbfc0c13bd4630142eb3f027cb</id>
<content type='text'>
In mtk_flow_entry_update_l2, the hwe-&gt;ib1 is read using READ_ONCE at the
beginning of the function, checked, and then re-read from hwe-&gt;ib1,
may void all guarantees of the checks. Reuse the value that was read by
READ_ONCE to ensure the consistency of the ib1 throughout the function.

Signed-off-by: linke li &lt;lilinke99@qq.com&gt;
Link: https://lore.kernel.org/r/tencent_C699E9540505523424F11A9BD3D21B86840A@qq.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: fix PPE hanging issue</title>
<updated>2024-03-15T14:03:45Z</updated>
<author>
<name>Daniel Golle</name>
<email>daniel@makrotopia.org</email>
</author>
<published>2024-03-13T22:50:40Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=ea80e3ed09ab2c2b75724faf5484721753e92c31'/>
<id>urn:sha1:ea80e3ed09ab2c2b75724faf5484721753e92c31</id>
<content type='text'>
A patch to resolve an issue was found in MediaTek's GPL-licensed SDK:
In the mtk_ppe_stop() function, the PPE scan mode is not disabled before
disabling the PPE. This can potentially lead to a hang during the process
of disabling the PPE.

Without this patch, the PPE may experience a hang during the reboot test.

Link: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/b40da332dfe763932a82f9f62a4709457a15dd6c
Fixes: ba37b7caf1ed ("net: ethernet: mtk_eth_soc: add support for initializing the PPE")
Suggested-by: Bc-bocun Chen &lt;bc-bocun.chen@mediatek.com&gt;
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_wed: introduce partial AMSDU offload support for MT7988</title>
<updated>2023-09-19T16:27:56Z</updated>
<author>
<name>Sujuan Chen</name>
<email>sujuan.chen@mediatek.com</email>
</author>
<published>2023-09-18T10:29:15Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=b230812b9dda125e69ab0a5a11cda88d9c0d18a9'/>
<id>urn:sha1:b230812b9dda125e69ab0a5a11cda88d9c0d18a9</id>
<content type='text'>
Introduce partial AMSDU offload support for MT7988 SoC in order to merge
in hw packets belonging to the same AMSDU before passing them to the
WLAN nic.

Co-developed-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Sujuan Chen &lt;sujuan.chen@mediatek.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: support per-flow accounting on MT7988</title>
<updated>2023-08-03T09:28:37Z</updated>
<author>
<name>Daniel Golle</name>
<email>daniel@makrotopia.org</email>
</author>
<published>2023-08-02T03:31:09Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=571e9c4968875a78495eccfa26901083d0e6f833'/>
<id>urn:sha1:571e9c4968875a78495eccfa26901083d0e6f833</id>
<content type='text'>
NETSYS_V3 uses 64 bits for each counters while older SoCs are using
48/40 bits for each counter.
Support reading per-flow byte and package counters on NETSYS_V3.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://lore.kernel.org/r/37a0928fa8c1253b197884c68ce1f54239421ac5.1690946442.git.daniel@makrotopia.org
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: enable nft hw flowtable_offload for MT7988 SoC</title>
<updated>2023-07-29T01:47:26Z</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2023-07-27T07:07:28Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=88efedf517e69a4b12e4dd40c44c2e298f53fa83'/>
<id>urn:sha1:88efedf517e69a4b12e4dd40c44c2e298f53fa83</id>
<content type='text'>
Enable hw Packet Process Engine (PPE) for MT7988 SoC.

Tested-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Link: https://lore.kernel.org/r/5e86341b0220a49620dadc02d77970de5ded9efc.1690441576.git.lorenzo@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: add version in mtk_soc_data</title>
<updated>2023-07-27T05:05:10Z</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2023-07-25T00:52:02Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=a008e2a84e6b2b598af6fadf6c8f756d4fe639ca'/>
<id>urn:sha1:a008e2a84e6b2b598af6fadf6c8f756d4fe639ca</id>
<content type='text'>
Introduce version field in mtk_soc_data data structure in order to
make mtk_eth driver easier to maintain for chipset configuration
codebase. Get rid of MTK_NETSYS_V2 bit in chip capabilities.
This is a preliminary patch to introduce support for MT7988 SoC.

Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Link: https://lore.kernel.org/r/e52fae302ca135436e5cdd26d38d87be2da63055.1690246066.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: mtk_eth_soc: mediatek: fix ppe flow accounting for v1 hardware</title>
<updated>2023-04-23T12:25:49Z</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2023-04-20T21:06:42Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=4eaeca1fc43a4060fa79d7a071572e89181a725e'/>
<id>urn:sha1:4eaeca1fc43a4060fa79d7a071572e89181a725e</id>
<content type='text'>
Older chips (like MT7622) use a different bit in ib2 to enable hardware
counter support. Add macros for both and select the appropriate bit.

Fixes: 3fbe4d8c0e53 ("net: ethernet: mtk_eth_soc: ppe: add support for flow accounting")
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
