Re: [PATCH net v2] net: ti: icssg-prueth: Fix buffer allocation for ICSSG

From: MITTAL, HIMANSHU
Date: Thu Jul 17 2025 - 05:38:11 EST



On 7/15/2025 3:59 PM, Simon Horman wrote:
On Tue, Jul 15, 2025 at 12:37:45PM +0530, MITTAL, HIMANSHU wrote:

...

+-----+-----------------------------------------------+
| | SLICE 0 | SLICE 1 |
| +------------+----------+------------+----------+
| | Start addr | End addr | Start addr | End addr |
+-----+------------+----------+------------+----------+
| EXP | 70024000 | 70028000 | 7002C000 | 70030000 | <-- Overlapping
Thanks for the detailed explanation with these tables.
It is very helpful. I follow both the existing and new mappings
with their help. Except for one thing.

It's not clear how EXP was set to the values on the line above.
Probably I'm missing something very obvious.
Could you help me out here?
The root cause for this issue is that, buffer configuration for Express
Frames
in function: prueth_fw_offload_buffer_setup() is missing.


Details:
The driver implements two distinct buffer configuration functions that are
invoked
based on the driver state and ICSSG firmware:-
prueth_fw_offload_buffer_setup()
- prueth_emac_buffer_setup()

During initialization, the driver creates standard network interfaces
(netdevs) and
configures buffers via prueth_emac_buffer_setup(). This function properly
allocates
and configures all required memory regions including:
- LI buffers
- Express packet buffers
- Preemptible packet buffers

However, when the driver transitions to an offload mode (switch/HSR/PRP),
buffer reconfiguration is handled by prueth_fw_offload_buffer_setup().
This function does not reconfigure the buffer regions required for Express
packets,
leading to incorrect buffer allocation.
Thanks for your patience, I see that now :)

I'm sorry to drag this out, but I do think it would be useful to add
information above the lines of the above to the patch description.
Thanks for the feedback, I will add this information and create an updated patch.
| PRE | 70030000 | 70033800 | 70034000 | 70037800 |
+-----+------------+----------+------------+----------+

+---------------------+----------+----------+
| | SLICE 0 | SLICE 1 |
+---------------------+----------+----------+
| Default Drop Offset | 00000000 | 00000000 | <-- Field not configured
+---------------------+----------+----------+
...