Skip to content

Commit

Permalink
ionic: account for vlan tag len in rx buffer len
Browse files Browse the repository at this point in the history
Let the FW know we have enough receive buffer space for the
vlan tag if it isn't stripped.

Fixes: 0f3154e ("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>
  • Loading branch information
emusln authored and kuba-moo committed Dec 22, 2020
1 parent d7e2c82 commit 8346989
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/pensando/ionic/ionic_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ void ionic_rx_fill(struct ionic_queue *q)
unsigned int i, j;
unsigned int len;

len = netdev->mtu + ETH_HLEN;
len = netdev->mtu + ETH_HLEN + VLAN_HLEN;
nfrags = round_up(len, PAGE_SIZE) / PAGE_SIZE;

for (i = ionic_q_space_avail(q); i; i--) {
Expand Down

0 comments on commit 8346989

Please sign in to comment.