]> git.baikalelectronics.ru Git - kernel.git/commit
net: enetc: recycle buffers for frames with RX errors
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 16 Apr 2021 21:22:18 +0000 (00:22 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Apr 2021 00:08:39 +0000 (17:08 -0700)
commitde3f34418ace99a9753585c49ef7a683a3b8a980
tree71e187ae34ae1dc42cf074a4efd100d859d92eba
parentd4f66a750c56c5d0d395c0980dd136fae9713c1d
net: enetc: recycle buffers for frames with RX errors

When receiving a frame with errors, currently we do nothing with it (we
don't construct an skb or an xdp_buff), we just exit the NAPI poll loop.

Let's put the buffer back into the RX ring (similar to XDP_DROP).

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc.c