From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id BDF145958 for ; Wed, 29 Oct 2014 09:35:51 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 29 Oct 2014 01:44:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,808,1406617200"; d="scan'208";a="613292995" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by fmsmga001.fm.intel.com with ESMTP; 29 Oct 2014 01:44:39 -0700 Received: from pgsmsx108.gar.corp.intel.com (10.221.44.103) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 29 Oct 2014 16:42:06 +0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 29 Oct 2014 16:42:05 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.174]) by shsmsx102.ccr.corp.intel.com ([169.254.2.156]) with mapi id 14.03.0195.001; Wed, 29 Oct 2014 16:42:05 +0800 From: "Zhang, Helin" To: Thomas Monjalon , Ariel Rodriguez Thread-Topic: [dpdk-dev] SEGMENTATION FAULT in kni example : kni_free_kni() call Thread-Index: AQHP81NofINy5AVDZkK0+4u3JStIBJxGwW8A Date: Wed, 29 Oct 2014 08:42:05 +0000 Message-ID: References: <5223956.lFdNUbkl0D@xps13> In-Reply-To: <5223956.lFdNUbkl0D@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] SEGMENTATION FAULT in kni example : kni_free_kni() call 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: Wed, 29 Oct 2014 08:35:52 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Wednesday, October 29, 2014 4:35 PM > To: Ariel Rodriguez > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] SEGMENTATION FAULT in kni example : kni_free_kni(= ) > call >=20 > Hi, >=20 > 2014-10-28 23:07, Ariel Rodriguez: > > Hi, im trying the kni example. When i hit ctrl-c in the terminal > > stopping the example, the os signals with a segmentation fault. > [...] > > The following change fix that issue: > > > > static int kni_free_kni(uint8_t port_id) { uint8_t i; struct > > kni_port_params **p =3D kni_port_params_array; > > > > if (port_id >=3D RTE_MAX_ETHPORTS || !p[port_id]) return -1; > > > > ++ for (i =3D 0; i < p[port_id]->nb_kni; i++) { > > ++ rte_kni_release(p[port_id]->kni[i]); > > ++ p[port_id]->kni[i] =3D NULL; Great to see it! That would be a perfect fix for it. > > } > > rte_eth_dev_stop(port_id); > > > > return 0; > > } > > > > Sorry for the basic of my fix ... i dont know the correct style to > > report this kind of issues... im just a user of the dpdk library ... > > but i meet this bug ... >=20 > Thank you for reporting it. > If you want to send an applicable patch, the procedure is described here: > http://dpdk.org/dev#send >=20 > -- > Thomas Regards, Helin