From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgw.gov.kz (mgw.gov.kz [89.218.88.242]) by dpdk.org (Postfix) with ESMTP id 05B5EC534 for ; Thu, 16 Jun 2016 08:20:06 +0200 (CEST) Received: from sts.kz (mail.sts.kz [178.89.4.9]) by mgw.gov.kz with ESMTP id u5G6K5Ks017252-u5G6K5Ku017252 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 16 Jun 2016 12:20:05 +0600 Received: from [172.20.19.232] (unknown [178.89.4.11]) by sts.kz (Postfix) with ESMTPA id 0B58964CA; Thu, 16 Jun 2016 12:20:04 +0600 (ALMT) DKIM-Filter: OpenDKIM Filter v2.10.3 sts.kz 0B58964CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sts.kz; s=mail; t=1466058005; bh=fOD+VLmueaF+0cOa51OiHaWUfukgn1kXLri6jPtjtXw=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=BaxURQFPsxaTEqfs+B/Ntrl9NIM3XjNlrrsWO09pPOsndRBzJ059ON0/shxk9OMvP tACp6n29lfyRqKhCtildupYBPphwLsqCVXKUxScWrSSQx1Jcz013iCYZaG5ZLG8u/g VEriNNda5yx33CQ902JoAUUK5PN6DuhsLBauw/3k= To: Neil Horman References: <5761235C.2090906@sts.kz> <20160615130231.GB20120@hmsreliant.think-freely.org> Cc: dev@dpdk.org From: Yerden Zhumabekov Message-ID: <57624514.5020004@sts.kz> Date: Thu, 16 Jun 2016 12:20:04 +0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160615130231.GB20120@hmsreliant.think-freely.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] random pkt generator PMD 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, 16 Jun 2016 06:20:07 -0000 On 15.06.2016 19:02, Neil Horman wrote: > On Wed, Jun 15, 2016 at 03:43:56PM +0600, Yerden Zhumabekov wrote: >> Hello everybody, >> >> DPDK already got a number of PMDs for various eth devices, it even has PMD >> emulations for backends such as pcap, sw rings etc. >> >> I've been thinking about the idea of having PMD which would generate mbufs >> on the fly in some randomized fashion. This would serve goals like, for >> example: >> >> 1) running tests for applications with network processing capabilities >> without additional software packet generators; >> 2) making performance measurements with no hw inteference; >> 3) ability to run without root privileges, --no-pci, --no-huge, for CI >> build, so on. >> >> Maybe there's no such need, and these goals may be achieved by other means >> and this idea is flawed? Any thoughts? >> > I think you already have a solution to this problem. Linux/BSD have multiple > user space packet generators that can dump thier output to a pcap format file, > and dpdk has a pcap pmd that accepts a pcap file as input to send in packets. Things that I don't like about the idea of using PCAP PMD: 1) the need to create additional files with additional scripts and keep those with your test suite; 2) the need to rewind pcap once you played it (fixable); 3) reading packets one-by-one, file operations which may lead to perf impact; 4) low variability among source packets. Those are things which put me on idea of randomized packet generator PMD. Possible devargs could be: 1) id of a template, like "ipv4", "ipv6", "dot1q" etc; 2) size of mbuf payload; 3) array of tuples like (offset, size, value) with value being exact value or "rnd" keyword.