.. | .. |
---|
137 | 137 | for (i = 0; i < c->num_tc; i++) |
---|
138 | 138 | busy |= mlx5e_poll_tx_cq(&c->sq[i].cq, budget); |
---|
139 | 139 | |
---|
| 140 | + /* budget=0 means we may be in IRQ context, do as little as possible */ |
---|
| 141 | + if (unlikely(!budget)) |
---|
| 142 | + goto out; |
---|
| 143 | + |
---|
140 | 144 | busy |= mlx5e_poll_xdpsq_cq(&c->xdpsq.cq); |
---|
141 | 145 | |
---|
142 | 146 | if (c->xdp) |
---|
143 | 147 | busy |= mlx5e_poll_xdpsq_cq(&c->rq_xdpsq.cq); |
---|
144 | 148 | |
---|
145 | | - if (likely(budget)) { /* budget=0 means: don't poll rx rings */ |
---|
146 | | - if (xsk_open) |
---|
147 | | - work_done = mlx5e_poll_rx_cq(&xskrq->cq, budget); |
---|
| 149 | + if (xsk_open) |
---|
| 150 | + work_done = mlx5e_poll_rx_cq(&xskrq->cq, budget); |
---|
148 | 151 | |
---|
149 | | - if (likely(budget - work_done)) |
---|
150 | | - work_done += mlx5e_poll_rx_cq(&rq->cq, budget - work_done); |
---|
| 152 | + if (likely(budget - work_done)) |
---|
| 153 | + work_done += mlx5e_poll_rx_cq(&rq->cq, budget - work_done); |
---|
151 | 154 | |
---|
152 | | - busy |= work_done == budget; |
---|
153 | | - } |
---|
| 155 | + busy |= work_done == budget; |
---|
154 | 156 | |
---|
155 | 157 | mlx5e_poll_ico_cq(&c->icosq.cq); |
---|
156 | 158 | if (mlx5e_poll_ico_cq(&c->async_icosq.cq)) |
---|