rptun: add buffer check in RX IRQ

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-04-27 23:45:04 +08:00 committed by Xiang Xiao
parent cf22dd8688
commit e368ce6c07

View File

@ -324,7 +324,10 @@ static int rptun_callback(FAR void *arg, uint32_t vqid)
if (vqid == RPTUN_NOTIFY_ALL ||
vqid == vdev->vrings_info[rvq->vq_queue_index].notifyid)
{
rptun_wakeup_rx(priv);
if (rptun_buffer_nused(&priv->rvdev, true))
{
rptun_wakeup_rx(priv);
}
}
if (vqid == RPTUN_NOTIFY_ALL ||