Skip to content

Commit dacd88d

Browse files
Yuval Mintzdavem330
authored andcommitted
qed: IOV l2 functionality
This adds sufficient changes to allow VFs l2-configuration flows to work. While the fastpath of the VF and the PF are meant to be exactly the same, the configuration of the VF is done by the PF. This diverges all VF-related configuration flows that originate from a VF, making them pass through the VF->PF channel and adding sufficient logic on the PF side to support them. Signed-off-by: Yuval Mintz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0b55e27 commit dacd88d

File tree

9 files changed

+1957
-246
lines changed

9 files changed

+1957
-246
lines changed

drivers/net/ethernet/qlogic/qed/qed.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ struct qed_dev {
532532
};
533533

534534
#define NUM_OF_VFS(dev) MAX_NUM_VFS_BB
535+
#define NUM_OF_L2_QUEUES(dev) MAX_NUM_L2_QUEUES_BB
535536
#define NUM_OF_SBS(dev) MAX_SB_PER_PATH_BB
536537
#define NUM_OF_ENG_PFS(dev) MAX_NUM_PFS_BB
537538

drivers/net/ethernet/qlogic/qed/qed_dev.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,12 @@ void qed_hw_stop_fastpath(struct qed_dev *cdev)
938938

939939
for_each_hwfn(cdev, j) {
940940
struct qed_hwfn *p_hwfn = &cdev->hwfns[j];
941-
struct qed_ptt *p_ptt = p_hwfn->p_main_ptt;
941+
struct qed_ptt *p_ptt = p_hwfn->p_main_ptt;
942+
943+
if (IS_VF(cdev)) {
944+
qed_vf_pf_int_cleanup(p_hwfn);
945+
continue;
946+
}
942947

943948
DP_VERBOSE(p_hwfn,
944949
NETIF_MSG_IFDOWN,
@@ -962,6 +967,9 @@ void qed_hw_stop_fastpath(struct qed_dev *cdev)
962967

963968
void qed_hw_start_fastpath(struct qed_hwfn *p_hwfn)
964969
{
970+
if (IS_VF(p_hwfn->cdev))
971+
return;
972+
965973
/* Re-open incoming traffic */
966974
qed_wr(p_hwfn, p_hwfn->p_main_ptt,
967975
NIG_REG_RX_LLH_BRB_GATE_DNTFWD_PERPF, 0x0);

0 commit comments

Comments
 (0)