config_default vs subtargets having their own config_?

2023-03-03 Thread Tim Harvey
Greetings, I'm working on cortexa53 support for target/linux/imx for imx8 support and am not quite clear how best to take care of kernel config. There is a lot of differences in kernel config for cortexa7/cortexa9/cortexa53 with regards to IMX SoC's. I see some targets have config_default files i

Re: [PATCH 2/6] realtek: don't return 0 from rtl83xx_mc_group_alloc on failure

2023-03-03 Thread Jan Hoffmann
On 2023-03-03 at 22:48, Jan Hoffmann wrote: This function returns the index of the allocated multicast group entry, so the return value should be negative when no entry was allocated. Fixes: cde31976e375 ("realtek: Add support for Layer 2 Multicast") Signed-off-by: Jan Hoffmann --- I'm not ent

[PATCH 6/6] realtek: remove store_mcgroups/load_mcgroups

2023-03-03 Thread Jan Hoffmann
The current implementation only works when store and load are called for the same port without any other calls in between. This is because the store function only saves a single port number instead of a portmask for each group. It also doesn't take into account that the allocation of multicast grou

[PATCH 3/6] realtek: don't treat first multicast portmask entry as reserved

2023-03-03 Thread Jan Hoffmann
There doesn't appear to be a reason to do this, as only the last entry is actually reserved for unknown multicast. This also fixes two issues: - As the increment happened after the bounds check, the value of the actually reserved last entry could be overwritten. - On deletion of entries, a co

[PATCH 5/6] realtek: don't add CPU port to multicast portmasks

2023-03-03 Thread Jan Hoffmann
There shouldn't be any reason to forward all multicast to the CPU. The original commit message also doesn't provide a reason for this seemingly unrelated change. The current implementation of the delete method is also broken, as it entirely removes any entry when the portmask contains only the CPU

[PATCH 2/6] realtek: don't return 0 from rtl83xx_mc_group_alloc on failure

2023-03-03 Thread Jan Hoffmann
This function returns the index of the allocated multicast group entry, so the return value should be negative when no entry was allocated. Fixes: cde31976e375 ("realtek: Add support for Layer 2 Multicast") Signed-off-by: Jan Hoffmann --- I'm not entirely sure about this patch. Seen individually

[PATCH 4/6] realtek: actually remove port from multicast portmask

2023-03-03 Thread Jan Hoffmann
Fixes: 724e4af530cd ("realtek: Store and Restore MC memberships for port enable/disable") Signed-off-by: Jan Hoffmann --- target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c | 1 + target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 1 + 2 files changed, 2 insertions(+) di

[PATCH 1/6] realtek: fix writing/deletion of CAM entries

2023-03-03 Thread Jan Hoffmann
Actually use the index returned by rtl83xx_find_l2_cam_entry. Fixes: cde31976e375 ("realtek: Add support for Layer 2 Multicast") Signed-off-by: Jan Hoffmann --- .../realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c | 8 .../realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 8 +

[PATCH 0/6] realtek: fix management of mdb entries

2023-03-03 Thread Jan Hoffmann
This series fixes multiple issues related to the L2 table and multicast table. That includes an issue that causes corruption of the port mask for unknown multicast forwarding, which can occur even when multicast snooping is disabled. With these patches, multicast snooping should be mostly worki