From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A54892C66 for ; Tue, 22 Aug 2017 18:16:32 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Aug 2017 09:16:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,412,1498546800"; d="scan'208";a="1208968502" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.57]) ([10.237.220.57]) by fmsmga002.fm.intel.com with ESMTP; 22 Aug 2017 09:16:05 -0700 To: Alejandro Lucero , dev@dpdk.org References: <1503398486-1944-1-git-send-email-alejandro.lucero@netronome.com> From: Ferruh Yigit Message-ID: <8384d299-ecb0-de14-4c01-75d8e9b0af7b@intel.com> Date: Tue, 22 Aug 2017 17:16:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1503398486-1944-1-git-send-email-alejandro.lucero@netronome.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] nfp: handle packets with length 0 as usual ones X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Aug 2017 16:16:33 -0000 On 8/22/2017 11:41 AM, Alejandro Lucero wrote: > A DPDK app could, whatever the reason, send packets with size 0. > The PMD is not sending those packets, which does make sense, > but the problem is the mbuf is not released either. That leads > to mbufs not being available, because the app trusts the > PMD will do it. > > Although this is a problem related to app wrong behaviour, we > should harden the PMD in this regard. Not sending a packet with > size 0 could be problematic, needing special handling inside the > PMD xmit function. It could be a burst of those packets, which can > be easily handled, but it could also be a single packet in a burst, > what is harder to handle. > > It would be simpler to just send that kind of packets, which will > likely be dropped by the hw at some point. The main problem is how > the fw/hw handles the DMA, because a dma read to a hypothetical 0x0 > address could trigger an IOMMU error. It turns out, it is safe to > send a descriptor with packet size 0 to the hardware: the DMA never > happens, from the PCIe point of view. > > Signed-off-by: Alejandro Lucero Applied to dpdk-next-net/master, thanks.