]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
net: ethernet: Fix issues in the driver when DRE is not enabled in the h/w
authorKedareswara rao Appana <appana.durga.rao@xilinx.com>
Tue, 24 Jan 2017 10:23:26 +0000 (15:53 +0530)
committerMichal Simek <monstr@monstr.eu>
Tue, 3 Oct 2017 15:26:29 +0000 (17:26 +0200)
commit194933ff41b8e9a4d4df6a263ec6473b946951c8
tree1bcaee9a60086cff69bde26a1dea4b291f0afbad
parentd565cfc4d050db488f8c613982212a6df6a1236b
net: ethernet: Fix issues in the driver when DRE is not enabled in the h/w

If DRE (Data realignment engine) is not enabled in the DMA h/w,
SW has to take care of the alignment of the buffers.

Currently driver is not handling alignment of buffers properly,
Resulting weired behaviour when try to test the ethernet interface
with these kind of designs.

This patch fixes this issue by allocating a pool of tx buffers
In the driver when DRE is not enabled in the h/w.
When there is an unaligned skb comes it will use those
Allocated tx buffers when DRE is not enabled in the h/w.

Note: When DRE is not enabled in the h/w the tx
Side performance will be very less as there is
a manual copy in the hard_xmit for this case.
Tx Perf Numbers on ZynqMP:
Without DRE: 248 Mbits/sec.
With DRE:   932 Mbits/sec.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Documentation/devicetree/bindings/net/xilinx_axienet.txt
drivers/net/ethernet/xilinx/xilinx_axienet.h
drivers/net/ethernet/xilinx/xilinx_axienet_main.c