From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72]) by dpdk.org (Postfix) with ESMTP id 59B553772 for ; Thu, 14 Jul 2016 03:09:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=983; q=dns/txt; s=iport; t=1468458575; x=1469668175; h=from:to:cc:subject:date:message-id; bh=/whcY9+GUoZ9QCFw8cOTN2qb65vZXvdNS8bRskbGMBs=; b=aAmgzZuqinLarZMp0g00VxyuY/+Dkv64qkRrf3IESA8s7W11nhRFZEmG cnkZ1xv8OKxpE91KZS9+WrxLs5YlVBIV17oErbg9jhDbZeDtTk6tU44ls 68NIb0fZPNtY0yDSad3b/zu5UOPKXqM3oqRETTjTHhwyEd0HDU8TetOK1 U=; X-IronPort-AV: E=Sophos;i="5.28,360,1464652800"; d="scan'208";a="129347889" Received: from rcdn-core-6.cisco.com ([173.37.93.157]) by rcdn-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jul 2016 01:09:34 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-6.cisco.com (8.14.5/8.14.5) with ESMTP id u6E19YYd012491; Thu, 14 Jul 2016 01:09:34 GMT Received: by cisco.com (Postfix, from userid 412739) id 744FB3FAAE0E; Wed, 13 Jul 2016 18:09:34 -0700 (PDT) From: Nelson Escobar To: dev@dpdk.org Cc: bruce.richardson@intel.com, Nelson Escobar Date: Wed, 13 Jul 2016 18:09:17 -0700 Message-Id: <1468458557-17989-1-git-send-email-neescoba@cisco.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] net/enic: fix segfault after receiving error interrupt X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2016 01:09:35 -0000 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 Reviewed-by: John Daley --- drivers/net/enic/enic_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 9ec2a2d..fbd4089 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, -- 2.7.0