From dccd54df77d2bd7f29c0d2f19802f9e23edb7244 Mon Sep 17 00:00:00 2001 From: Aastha Mehta <aasthakm@mpi-sws.org> Date: Mon, 9 Oct 2017 18:27:01 +0200 Subject: [PATCH] disable unnecessary code in core --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index b307924f2..1d448ff42 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -3723,13 +3723,11 @@ static int bnx2x_poll(struct napi_struct *napi, int budget) #ifdef CONFIG_XEN_SME #if 0 char dbg_buff[DBG_BUF_SIZE]; -#endif - int was_there_work = 0; union eth_rx_cqe *cqe = NULL; struct eth_fast_path_rx_cqe *cqe_fp = NULL; +#endif + int was_there_work = 0; int total_work_done = 0; -// u16 tmp_swi_bd_prod, tmp_swi_bd_cons, tmp_swi_comp_prod, tmp_swi_comp_cons; -// u16 tmp_hwi_bd_prod, tmp_hwi_bd_cons, tmp_hwi_comp_prod, tmp_hwi_comp_cons; #endif #ifdef BNX2X_STOP_ON_ERROR @@ -3780,13 +3778,13 @@ static int bnx2x_poll(struct napi_struct *napi, int budget) #ifdef CONFIG_XEN_SME if (lnk_intercept_rx_path) { if (!bnx2x_has_tx_work(fp)) { + napi_complete(napi); + +#if 0 // TODO: check if this should be after napi complete cqe = &fp->rx_comp_ring[RCQ_BD(fp->swi_comp_cons)]; cqe_fp = &cqe->fast_path_cqe; - napi_complete(napi); - -#if 0 tmp_swi_bd_prod = fp->swi_bd_prod; tmp_swi_bd_cons = fp->swi_bd_cons; tmp_swi_comp_prod = fp->swi_comp_prod; -- GitLab