Skip to content

Commit

Permalink
octeontx2-pf: Forward error codes to VF
Browse files Browse the repository at this point in the history
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2040643

commit a8db854
Author: Subbaraya Sundeep <sbhatta@marvell.com>
Date:   Fri Jan 21 12:04:46 2022 +0530

    octeontx2-pf: Forward error codes to VF

    PF forwards its VF messages to AF and corresponding
    replies from AF to VF. AF sets proper error code in the
    replies after processing message requests. Currently PF
    checks the error codes in replies and sends invalid
    message to VF. This way VF lacks the information of
    error code set by AF for its messages. This patch
    changes that such that PF simply forwards AF replies
    so that VF can handle error codes.

    Fixes: d424b6c ("octeontx2-pf: Enable SRIOV and added VF mbox handling")
    Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
  • Loading branch information
michich committed Feb 16, 2023
1 parent cba08f6 commit 102cdf2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,12 @@ static int otx2_forward_vf_mbox_msgs(struct otx2_nic *pf,
dst_mdev->msg_size = mbox_hdr->msg_size;
dst_mdev->num_msgs = num_msgs;
err = otx2_sync_mbox_msg(dst_mbox);
if (err) {
/* Error code -EIO indicate there is a communication failure
* to the AF. Rest of the error codes indicate that AF processed
* VF messages and set the error codes in response messages
* (if any) so simply forward responses to VF.
*/
if (err == -EIO) {
dev_warn(pf->dev,
"AF not responding to VF%d messages\n", vf);
/* restore PF mbase and exit */
Expand Down

0 comments on commit 102cdf2

Please sign in to comment.