Commit 592d42ac authored by David S. Miller's avatar David S. Miller

Merge branch 'qed-IOV-cleanups'

Yuval Mintz says:

====================
qed: IOV related clenaups

This patch series targets IOV functionality [on both PF and VF].

Patches #2, #3 and #5 fix flows relating to malicious VFs, either by
upgrading and aligning current safe-guards or by correcing racy flows.

Patches #1 and #8 make some malicious/dysnfunctional VFs logging appear
by default in logs.

The rest of the patches either cleanup the existing code or else correct
some possible [yet fairly insignicant] issues in VF behavior.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents f9fe1c12 e50728ef
This diff is collapsed.
...@@ -348,9 +348,9 @@ int qed_sriov_eqe_event(struct qed_hwfn *p_hwfn, ...@@ -348,9 +348,9 @@ int qed_sriov_eqe_event(struct qed_hwfn *p_hwfn,
* @param p_hwfn * @param p_hwfn
* @param disabled_vfs - bitmask of all VFs on path that were FLRed * @param disabled_vfs - bitmask of all VFs on path that were FLRed
* *
* @return 1 iff one of the PF's vfs got FLRed. 0 otherwise. * @return true iff one of the PF's vfs got FLRed. false otherwise.
*/ */
int qed_iov_mark_vf_flr(struct qed_hwfn *p_hwfn, u32 *disabled_vfs); bool qed_iov_mark_vf_flr(struct qed_hwfn *p_hwfn, u32 *disabled_vfs);
/** /**
* @brief Search extended TLVs in request/reply buffer. * @brief Search extended TLVs in request/reply buffer.
...@@ -407,10 +407,10 @@ static inline int qed_sriov_eqe_event(struct qed_hwfn *p_hwfn, ...@@ -407,10 +407,10 @@ static inline int qed_sriov_eqe_event(struct qed_hwfn *p_hwfn,
return -EINVAL; return -EINVAL;
} }
static inline int qed_iov_mark_vf_flr(struct qed_hwfn *p_hwfn, static inline bool qed_iov_mark_vf_flr(struct qed_hwfn *p_hwfn,
u32 *disabled_vfs) u32 *disabled_vfs)
{ {
return 0; return false;
} }
static inline void qed_iov_wq_stop(struct qed_dev *cdev, bool schedule_first) static inline void qed_iov_wq_stop(struct qed_dev *cdev, bool schedule_first)
......
...@@ -134,14 +134,20 @@ static int qed_send_msg2pf(struct qed_hwfn *p_hwfn, u8 *done, u32 resp_size) ...@@ -134,14 +134,20 @@ static int qed_send_msg2pf(struct qed_hwfn *p_hwfn, u8 *done, u32 resp_size)
} }
if (!*done) { if (!*done) {
DP_VERBOSE(p_hwfn, QED_MSG_IOV, DP_NOTICE(p_hwfn,
"VF <-- PF Timeout [Type %d]\n", "VF <-- PF Timeout [Type %d]\n",
p_req->first_tlv.tl.type); p_req->first_tlv.tl.type);
rc = -EBUSY; rc = -EBUSY;
} else { } else {
DP_VERBOSE(p_hwfn, QED_MSG_IOV, if ((*done != PFVF_STATUS_SUCCESS) &&
"PF response: %d [Type %d]\n", (*done != PFVF_STATUS_NO_RESOURCE))
*done, p_req->first_tlv.tl.type); DP_NOTICE(p_hwfn,
"PF response: %d [Type %d]\n",
*done, p_req->first_tlv.tl.type);
else
DP_VERBOSE(p_hwfn, QED_MSG_IOV,
"PF response: %d [Type %d]\n",
*done, p_req->first_tlv.tl.type);
} }
return rc; return rc;
......
...@@ -275,6 +275,8 @@ struct vfpf_stop_rxqs_tlv { ...@@ -275,6 +275,8 @@ struct vfpf_stop_rxqs_tlv {
struct vfpf_first_tlv first_tlv; struct vfpf_first_tlv first_tlv;
u16 rx_qid; u16 rx_qid;
/* this field is deprecated and should *always* be set to '1' */
u8 num_rxqs; u8 num_rxqs;
u8 cqe_completion; u8 cqe_completion;
u8 padding[4]; u8 padding[4];
...@@ -285,6 +287,8 @@ struct vfpf_stop_txqs_tlv { ...@@ -285,6 +287,8 @@ struct vfpf_stop_txqs_tlv {
struct vfpf_first_tlv first_tlv; struct vfpf_first_tlv first_tlv;
u16 tx_qid; u16 tx_qid;
/* this field is deprecated and should *always* be set to '1' */
u8 num_txqs; u8 num_txqs;
u8 padding[5]; u8 padding[5];
}; };
......
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