From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] The VMXNET3 PMD can't receive packet suddenly after a lot of traffic coming in. The root cause is due to mbuf allocation fail in vmxnet3_post_rx_bufs() and there is no error handling when it is called from vmxnet3_recv_pkts(). Th... Date: Thu, 23 Jul 2015 09:45:33 -0700 Message-ID: <20150723094533.71c3dc97@urahara> References: <1437616135-5364-1-git-send-email-mac_leehk@yahoo.com.hk> <20150722222731.497b2abc@uryu.home.lan> <98DB008FA2AC6644B40AD8C766FAB271020CB2EC2B@BOREAL.arubanetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" , "mac_leehk@yahoo.com.hk" To: Vithal S Mohare Return-path: Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by dpdk.org (Postfix) with ESMTP id 40F33C3A8 for ; Thu, 23 Jul 2015 18:45:37 +0200 (CEST) Received: by padck2 with SMTP id ck2so159835281pad.0 for ; Thu, 23 Jul 2015 09:45:36 -0700 (PDT) In-Reply-To: <98DB008FA2AC6644B40AD8C766FAB271020CB2EC2B@BOREAL.arubanetworks.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 23 Jul 2015 07:31:01 +0000 Vithal S Mohare wrote: > + /* VMXNET3 > + * In the above loop, vmxnet3_post_rx_bufs would fai if all the mbufs currently allocated. > + * In such scenarios where hw device hasn't left with any of 'rx' descriptors, packets from > + * network will not be 'DMA'd to driver. While the only way to refresh 'rxd' back to hw is > + * though above i.e. when packet is received from hw. So, there is potential dead-lock. > + * > + * Now, to break the deadlock, vmxnet3_post_rx_bufs() is triggered below when the poll > + * goes empty 'rcd'. vmxnet3_post_rx_bufs() is no-op if all the descriptors are allocated > + * in hw > + */ This is the kind of thing which should be in the git change log description not the code. Comments like this are too wordy and get out of date.