Re: [PATCH 3/3] net: ocelot: add FDMA support
From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2021-10-28 14:54:56
Also in:
linux-devicetree, lkml
From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2021-10-28 14:54:56
Also in:
linux-devicetree, lkml
On Thu, Oct 28, 2021 at 04:31:23PM +0200, Clément Léger wrote:
quoted
Can't we make the FDMA and the manual injection/extraction registers use the same endianness, instead of duplicating code? I can regression-test the manual inj/xtr regs on LS1028A.I guess this would be possible by disabling byte swapping (INJ_GRP_CFG.BYTE_SWAP) when sending the IFH when in register based mode. BTW, while checking performances, I noticed that the CPU spent quite a long time in packing so I added precomputation of IFH. I could probably modify the register based inj/xtr to also use this.
packing() is not the most optimized thing in the world, so I wouldn't mind if you changed it to some other API, but the ability to read, understand and modify the XFH/IFH headers easily is something I care about, so no weird macros that depend upon some particular endianness, please.