[PATCH 2/2] common/cnxk: fix race condition between up and down mbox

Jerin Jacob jerinjacobk at gmail.com
Thu Oct 5 16:16:39 CEST 2023


On Thu, Oct 5, 2023 at 12:06 PM Harman Kalra <hkalra at marvell.com> wrote:
>
> Fixing a possible case for race condition where an up mbox
> interrupt over writes the down mbox message.
> Although mbox_wait_for_zero() makes sure no up/down message
> is pending before raising an up mbox interrupt. But there is a
> small window were a VF may send a down mbox request to PF after
> mbox_wait_for_zero() and before PF attempts to send a up
> message to same VF. In such scenario interrupt register which has
> down message bit set will get overwritten by up message bit.
>
> As a solution, read interrupt register and OR the status with
> required up/down bit before writing to the interrupt register.
>
> Fixes: fa4ee2d43188 ("common/cnxk: sync between mbox up and down messages")

Cc: stable at dpdk.org

>
> Signed-off-by: Harman Kalra <hkalra at marvell.com>

Series applied to dpdk-next-net-mrvl/for-next-net. Thanks


More information about the dev mailing list