Skip to content

Commit

Permalink
qed: IOV l2 functionality
Browse files Browse the repository at this point in the history
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 <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yuval Mintz authored and David S. Miller committed May 12, 2016
1 parent 0b55e27 commit dacd88d
Show file tree
Hide file tree
Showing 9 changed files with 1,957 additions and 246 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/qlogic/qed/qed.h
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ struct qed_dev {
};

#define NUM_OF_VFS(dev) MAX_NUM_VFS_BB
#define NUM_OF_L2_QUEUES(dev) MAX_NUM_L2_QUEUES_BB
#define NUM_OF_SBS(dev) MAX_SB_PER_PATH_BB
#define NUM_OF_ENG_PFS(dev) MAX_NUM_PFS_BB

Expand Down
10 changes: 9 additions & 1 deletion drivers/net/ethernet/qlogic/qed/qed_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,12 @@ void qed_hw_stop_fastpath(struct qed_dev *cdev)

for_each_hwfn(cdev, j) {
struct qed_hwfn *p_hwfn = &cdev->hwfns[j];
struct qed_ptt *p_ptt = p_hwfn->p_main_ptt;
struct qed_ptt *p_ptt = p_hwfn->p_main_ptt;

if (IS_VF(cdev)) {
qed_vf_pf_int_cleanup(p_hwfn);
continue;
}

DP_VERBOSE(p_hwfn,
NETIF_MSG_IFDOWN,
Expand All @@ -962,6 +967,9 @@ void qed_hw_stop_fastpath(struct qed_dev *cdev)

void qed_hw_start_fastpath(struct qed_hwfn *p_hwfn)
{
if (IS_VF(p_hwfn->cdev))
return;

/* Re-open incoming traffic */
qed_wr(p_hwfn, p_hwfn->p_main_ptt,
NIG_REG_RX_LLH_BRB_GATE_DNTFWD_PERPF, 0x0);
Expand Down
Loading

0 comments on commit dacd88d

Please sign in to comment.