bmips is using Broadcom B53 DSA driver which means the ethernet driver
must compensate for 6 bytes tags from the internal switch.
This means using NET_IP_ALIGN actually misaligns the skb, lowering
performance significantly. Therefore napi_alloc_skb() which uses
NET_IP_ALIGN is changed to netdev_alloc_skb().
Performance in iperf3 is increased from ~47Mbps to 52Mbps.
Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
if (len < priv->copybreak) {
struct sk_buff *nskb;
- nskb = napi_alloc_skb(&priv->napi, len);
+ nskb = netdev_alloc_skb(dev, len);
if (!nskb) {
/* forget packet, just rearm desc */
dev->stats.rx_dropped++;