Commit ec58c75a authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'i40e-ice-af_xdp-zc-fixes'

Björn Töpel says:

====================
i40e/ice AF_XDP ZC fixes

This series address two crashes in the AF_XDP zero-copy mode for ice
and i40e. More details in each individual the commit message.
====================

Link: https://lore.kernel.org/r/20201211145712.72957-1-bjorn.topel@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 57030a0b 64050b5b
......@@ -220,8 +220,11 @@ bool i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count)
} while (count);
no_buffers:
if (rx_ring->next_to_use != ntu)
if (rx_ring->next_to_use != ntu) {
/* clear the status bits for the next_to_use descriptor */
rx_desc->wb.qword1.status_error_len = 0;
i40e_release_rx_desc(rx_ring, ntu);
}
return ok;
}
......
......@@ -446,8 +446,11 @@ bool ice_alloc_rx_bufs_zc(struct ice_ring *rx_ring, u16 count)
}
} while (--count);
if (rx_ring->next_to_use != ntu)
if (rx_ring->next_to_use != ntu) {
/* clear the status bits for the next_to_use descriptor */
rx_desc->wb.status_error0 = 0;
ice_release_rx_desc(rx_ring, ntu);
}
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment