Skip to content

Commit d0ea9eb

Browse files
Manoj Vishwanathananguy11
authored andcommitted
idpf: add more info during virtchnl transaction timeout/salt mismatch
Add more information related to the transaction like cookie, vc_op, salt when transaction times out and include similar information when transaction salt does not match. Info output for transaction timeout: ------------------- (op:5015 cookie:45fe vc_op:5015 salt:45 timeout:60000ms) ------------------- before it was: ------------------- (op 5015, 60000ms) ------------------- Signed-off-by: Manoj Vishwanathan <manojvishy@google.com> Signed-off-by: Brian Vazquez <brianvv@google.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent 9a5b021 commit d0ea9eb

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

drivers/net/ethernet/intel/idpf/idpf_virtchnl.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,10 @@ static ssize_t idpf_vc_xn_exec(struct idpf_adapter *adapter,
517517
retval = -ENXIO;
518518
goto only_unlock;
519519
case IDPF_VC_XN_WAITING:
520-
dev_notice_ratelimited(&adapter->pdev->dev, "Transaction timed-out (op %d, %dms)\n",
521-
params->vc_op, params->timeout_ms);
520+
dev_notice_ratelimited(&adapter->pdev->dev,
521+
"Transaction timed-out (op:%d cookie:%04x vc_op:%d salt:%02x timeout:%dms)\n",
522+
params->vc_op, cookie, xn->vc_op,
523+
xn->salt, params->timeout_ms);
522524
retval = -ETIME;
523525
break;
524526
case IDPF_VC_XN_COMPLETED_SUCCESS:
@@ -615,8 +617,9 @@ idpf_vc_xn_forward_reply(struct idpf_adapter *adapter,
615617
idpf_vc_xn_lock(xn);
616618
salt = FIELD_GET(IDPF_VC_XN_SALT_M, msg_info);
617619
if (xn->salt != salt) {
618-
dev_err_ratelimited(&adapter->pdev->dev, "Transaction salt does not match (%02x != %02x)\n",
619-
xn->salt, salt);
620+
dev_err_ratelimited(&adapter->pdev->dev, "Transaction salt does not match (exp:%d@%02x(%d) != got:%d@%02x)\n",
621+
xn->vc_op, xn->salt, xn->state,
622+
ctlq_msg->cookie.mbx.chnl_opcode, salt);
620623
idpf_vc_xn_unlock(xn);
621624
return -EINVAL;
622625
}

0 commit comments

Comments
 (0)