summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
diff options
context:
space:
mode:
authorYuval Mintz2014-03-23 17:12:24 +0100
committerDavid S. Miller2014-03-26 02:07:03 +0100
commit370d4a26590fcc7510ad4a8432e4982a209f1b59 (patch)
treec6047611d7d2661fd10e0117411c4762336a3b26 /drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
parentbnx2x: Support mng. request for driver version (diff)
downloadkernel-qcow2-linux-370d4a26590fcc7510ad4a8432e4982a209f1b59.tar.gz
kernel-qcow2-linux-370d4a26590fcc7510ad4a8432e4982a209f1b59.tar.xz
kernel-qcow2-linux-370d4a26590fcc7510ad4a8432e4982a209f1b59.zip
bnx2x: Create workqueue for IOV related tasks
The bnx2x sriov mechanisms were done in the bnx2x slowpath workitem which runs on the bnx2x's workqueue; This workitem is also responsible for the bottom half of interrupt handling in the driver, and specifically it also receives FW notifications of ramrod completions, allowing other flows to progress. The original design of the sriov reltaed-flows was based on the notion such flows must not sleep, since their context is the slowpath workitem. Otherwise, we might reach timeouts - those flows may wait for ramrod completion that will never arrive as the workitem wlll not be re-scheduled until that same flow will be over. In more recent time bnx2x started supporting features in which the VF interface can be configured by the tools accessing the PF on the hypervisor. This support created possible races on the VF-PF lock (which is taken either when the PF is handling a VF message or when the PF is doing some slowpath work on behalf of the VF) which may cause timeouts on the VF side and lags on the PF side. This patch changes the scheme - it creates a new workqueue for sriov related tasks and moves all handling currently done in the slowpath task into the the new workqueue. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x.h')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
index f33fab6abb95..8e35dbaca76e 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
@@ -1155,10 +1155,6 @@ struct bnx2x_port {
(offsetof(struct bnx2x_eth_stats, stat_name) / 4)
/* slow path */
-
-/* slow path work-queue */
-extern struct workqueue_struct *bnx2x_wq;
-
#define BNX2X_MAX_NUM_OF_VFS 64
#define BNX2X_VF_CID_WND 4 /* log num of queues per VF. HW config. */
#define BNX2X_CIDS_PER_VF (1 << BNX2X_VF_CID_WND)
@@ -1416,6 +1412,12 @@ enum sp_rtnl_flag {
BNX2X_SP_RTNL_GET_DRV_VERSION,
};
+enum bnx2x_iov_flag {
+ BNX2X_IOV_HANDLE_VF_MSG,
+ BNX2X_IOV_CONT_VFOP,
+ BNX2X_IOV_HANDLE_FLR,
+};
+
struct bnx2x_prev_path_list {
struct list_head list;
u8 bus;
@@ -1614,6 +1616,8 @@ struct bnx2x {
int mrrs;
struct delayed_work sp_task;
+ struct delayed_work iov_task;
+
atomic_t interrupt_occurred;
struct delayed_work sp_rtnl_task;
@@ -1897,6 +1901,9 @@ struct bnx2x {
/* operation indication for the sp_rtnl task */
unsigned long sp_rtnl_state;
+ /* Indication of the IOV tasks */
+ unsigned long iov_task_state;
+
/* DCBX Negotiation results */
struct dcbx_features dcbx_local_feat;
u32 dcbx_error;