summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorNelson Escobar <neescoba@cisco.com>2016-07-13 18:09:17 -0700
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-07-15 23:37:13 +0200
commite3725e7f5571a8129d8b2068225ef2654a5ca2ef (patch)
tree14f494cec69d9963b129c860442e39a55ca0ce31 /drivers
parentd142e1ac10893b7a5b0240809325ac737237a57a (diff)
downloaddpdk-e3725e7f5571a8129d8b2068225ef2654a5ca2ef.zip
dpdk-e3725e7f5571a8129d8b2068225ef2654a5ca2ef.tar.gz
dpdk-e3725e7f5571a8129d8b2068225ef2654a5ca2ef.tar.xz
net/enic: fix crash on error interrupt
When enic's interrupt handler is called indicating an error, it scans through the receive queues (RQs) on the adapter looking for errors. But since the inclusion of rx scatter, some of the RQs may not be in use, and you shouldn't check them for errors. Fixes: 856d7ba7ed22 ("net/enic: support scattered Rx") Signed-off-by: Nelson Escobar <neescoba@cisco.com> Reviewed-by: John Daley <johndale@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/enic/enic_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 329559a..542f095 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -123,6 +123,8 @@ static void enic_log_q_error(struct enic *enic)
}
for (i = 0; i < enic_vnic_rq_count(enic); i++) {
+ if (!enic->rq[i].in_use)
+ continue;
error_status = vnic_rq_error_status(&enic->rq[i]);
if (error_status)
dev_err(enic, "RQ[%d] error_status %d\n", i,