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 447AC68B5 for ; Mon, 13 Oct 2014 20:05:20 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 13 Oct 2014 11:12:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,712,1406617200"; d="scan'208";a="613776579" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 13 Oct 2014 11:12:43 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 13 Oct 2014 11:12:42 -0700 Received: from fmsmsx105.amr.corp.intel.com ([169.254.5.219]) by FMSMSX155.amr.corp.intel.com ([169.254.5.221]) with mapi id 14.03.0195.001; Mon, 13 Oct 2014 11:12:41 -0700 From: "Patel, Rashmin N" To: Navakanth M , "Cao, Waterman" Thread-Topic: vmxnet3 pmd dev restart Thread-Index: AQHP4ukG8tZvnTyGGE6g0M3eoyvQDpwmkVaggAEdAYCAAKRNsIAAzBOAgAS2YACAAIbdgA== Date: Mon, 13 Oct 2014 18:12:41 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.200.108] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] vmxnet3 pmd dev restart 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: Mon, 13 Oct 2014 18:05:21 -0000 Waterman/Navakanth, we've got some patches posted for the same by Yong Wang= @VMware. I haven't got the chance to look at it but if you can validate it,= it'd be great. Thanks, Rashmin -----Original Message----- From: Navakanth M [mailto:navakanthdev@gmail.com]=20 Sent: Sunday, October 12, 2014 8:07 PM To: Patel, Rashmin N; Cao, Waterman Cc: stephen@networkplumber.org; dev@dpdk.org; Jiajia, SunX Subject: Re: vmxnet3 pmd dev restart Hi Rashmin I have tried the memset change but still I am facing the problem which I po= inted out earlier. After restart, packets are not being received in vmxnet3= _recv_pkts(). I have also observed PANIC in vmxnet3_tq_tx_complete() after couple of stop= and start operations. PANIC in vmxnet3_tq_tx_complete(): EOP desc does not point to a valid mbuf15: [/lib64/libc.so.6(clone+0x6d) [0x7fd60354c52d]] 1: [/mswitch/bin/sos.shumway.elf(rte_dump_stack+0x23) [0x463313]] 2: [/mswitch/bin/sos.shumway.elf(__rte_panic+0xc1) [0x447ae8]] 3: [/mswitch/bin/sos.shumway.elf(vmxnet3_xmit_pkts+0x382) [0x4f4f22]] Thanks Navakanth On Fri, Oct 10, 2014 at 8:39 AM, Cao, Waterman wro= te: > Hi Rashmin, > > We found similar issue when we start/stop vmnet dev several time. (>=20 > 3 times) It happens kernel panic, and sometimes kernel will occur core d= ump. > Let me know if you want to submit patch to fix it. > > Thanks > Waterman > > -----Original Message----- >>From: Patel, Rashmin N >>Sent: Friday, October 10, 2014 6:07 AM >>To: Navakanth M; stephen@networkplumber.org; Cao, Waterman >>Cc: dev@dpdk.org >>Subject: RE: vmxnet3 pmd dev restart >> >>I just quickly looked into the code and instead of releasing memory or si= mply set it to NULL (patch: >> http://thread.gmane.org/gmane.comp.networking.dpdk.devel/4683), you can = zero it out and it should work perfectly, you can give it a quick try. >> >>//rte_free(ring->buf_info); >>memset(ring->buf_info, 0x0, ring->size*sizeof(vmxnet3_buf_info_t)); >> >>This will not free the memory from heap but just wipe it out to 0x0, prov= ided that we freed all the mbuf(s) pointed by each buf_info->m pointers. He= nce you won't need to reallocate it when you start device after this stop. >> >>Thanks, >>Rashmin >> >>-----Original Message----- >>From: Navakanth M [mailto:navakanthdev@gmail.com] >>Sent: Wednesday, October 08, 2014 10:11 PM >>To: stephen@networkplumber.org; Patel, Rashmin N; Cao, Waterman >>Cc: dev@dpdk.org >>Subject: Re: vmxnet3 pmd dev restart >> >>I had tried with Stephen's patch but after stop is done and when we=20 >>call start it crashed at vmxnet3_dev_start()-> >>vmxnet3_dev_rxtx_init()->vmxnet3_post_rx_bufs() as buf_info is freed=20 >>and is not allocated again. buf_info is allocated in >>vmxnet3_dev_rx_queue_setup() which would be called once at the initializa= tion only. >>I also tried not freeing buf_info in stop but then i see different=20 >>issue after start, packets are not received due to check while=20 >>(rcd->gen =3D=3D rxq->comp_ring.gen) { in vmxnet3_recv_pkts() >> >>Waterman, Have you got chance to test stop and start of vmnet dev if so d= id you notice any issue similar to this? >> >>Thanks >>Navakanth >> >>On Thu, Oct 9, 2014 at 12:46 AM, Patel, Rashmin N wrote: >>> Yes I had a local copy working with couple of lines fix. But someone el= se, I think Stephen added a fix patch for the same, and I assume if it's be= en merged, should be working, so did not follow up later. >>> >>> I don't have a VMware setup handy at moment but I think Waterman would = have more information about testing that patch if he has found any issue wi= th it. >>> >>> Thanks, >>> Rashmin >>> >>> -----Original Message----- >>> From: Navakanth M [mailto:navakanthdev@gmail.com] >>> Sent: Wednesday, October 08, 2014 4:14 AM >>> To: dev@dpdk.org; Patel, Rashmin N >>> Subject: Re: vmxnet3 pmd dev restart >>> >>> Hi Rashmin >>> >>> I have come across your reply in following post that you have worked on= this problem and would submit the patch for it. >>> Can you please share information on the changes you worked on or patch = log if you had submitted any for it? >>> http://thread.gmane.org/gmane.comp.networking.dpdk.devel/4683 >>> >>> Thanks >>> Navakanth >>> >>> On Tue, Sep 30, 2014 at 1:44 PM, Navakanth M w= rote: >>>> Hi >>>> >>>> I am using DPDKv1.7.0 running on Vmware Esxi 5.1 and am trying to=20 >>>> reset the port which uses pmd_vmnet3 library functions from below=20 >>>> function calls. >>>> rte_eth_dev_stop >>>> rte_eth_dev_start >>>> >>>> Doing this, i face panic while rte_free(ring->buf_info) in=20 >>>> Vmxnet3_cmd_ring_release(). >>>> I have gone through following thread but the patch mentioned didn't=20 >>>> help rather it crashed in start function while accessing buf_info=20 >>>> in vmxnet3_post_rx_bufs. I see this buf_info is allocated in queue=20 >>>> setup functions which are called at initialization. >>>> http://thread.gmane.org/gmane.comp.networking.dpdk.devel/4683 >>>> >>>> I tried not freeing it and then rx packets are not received due to=20 >>>> mismatch in while (rcd->gen =3D=3D rxq->comp_ring.gen) in >>>> vmxnet3_recv_pkts() >>>> >>>> To reset the device port, is this the right way what i am doing? >>>> Or do I have to call vmxnet3_dev_tx_queue_setup() >>>> vmxnet3_dev_rx_queue_setup() once stop is called? I have checked=20 >>>> recent patches and threads but did not get much information on this. >>>> >>>> Thanks >>>> Navakanth