]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ionic: account for vlan tag len in rx buffer len
authorShannon Nelson <snelson@pensando.io>
Fri, 18 Dec 2020 21:50:01 +0000 (13:50 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jan 2021 19:16:16 +0000 (20:16 +0100)
[ Upstream commit 83469893204281ecf65d572bddf02de29a19787c ]

Let the FW know we have enough receive buffer space for the
vlan tag if it isn't stripped.

Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Link: https://lore.kernel.org/r/20201218215001.64696-1-snelson@pensando.io
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/pensando/ionic/ionic_txrx.c

index ab6663d94f4240ef44d2b73e2722bf16ef05ebb0..c818d24a8b24ff06ae6e3ffd97e18420a9841aab 100644 (file)
@@ -257,7 +257,7 @@ void ionic_rx_fill(struct ionic_queue *q)
        unsigned int len;
        unsigned int i;
 
-       len = netdev->mtu + ETH_HLEN;
+       len = netdev->mtu + ETH_HLEN + VLAN_HLEN;
 
        for (i = ionic_q_space_avail(q); i; i--) {
                skb = ionic_rx_skb_alloc(q, len, &dma_addr);