OSDN Git Service

net: lan966x: Stop using packing library
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Fri, 17 Mar 2023 15:27:13 +0000 (16:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Mar 2023 15:21:48 +0000 (15:21 +0000)
commitfd7627833ddf1d845dcc0edb14bff97ddbb1272e
treeb23e6e857c0a29c0e7a988263ed598cf77f6b0f0
parentff89ac704e2c92edfdb636070a7e0b91c1e4ec2d
net: lan966x: Stop using packing library

When a frame is injected from CPU, it is required to create an IFH(Inter
frame header) which sits in front of the frame that is transmitted.
This IFH, contains different fields like destination port, to bypass the
analyzer, priotity, etc. Lan966x it is using packing library to set and
get the fields of this IFH. But this seems to be an expensive
operations.
If this is changed with a simpler implementation, the RX will be
improved with ~5Mbit while on the TX is a much bigger improvement as it
is required to set more fields. Below are the numbers for TX.

Before:
[  5]   0.00-10.02  sec   439 MBytes   367 Mbits/sec    0 sender

After:
[  5]   0.00-10.00  sec   578 MBytes   485 Mbits/sec    0 sender

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/lan966x/Kconfig
drivers/net/ethernet/microchip/lan966x/lan966x_main.c