From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 8A5F580C0 for ; Mon, 24 Nov 2014 17:05:50 +0100 (CET) Received: by mail-wg0-f49.google.com with SMTP id x12so12601869wgg.22 for ; Mon, 24 Nov 2014 08:16:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=3cLlIqoZoOzxxFW29TUA8JXExqKG1isCrlfJlMC61jM=; b=YdR7ZU4mSxkncsHhBxh/Cz0ZWYlDqVDThpKeBzxdtcnFIe2Szd1R8UktEzbr96B0aX fm/9j+F2SpiJMrdCQfpFcLnK/Nv/KXUqIlUNh9nRbaL9WBjOvoj0qwgLvwrBEqV0X/qD ziWRHQ81JumT1ILqYEPQBl97AWJ8DM7Z1kShVotFN4O6LiQkrtK5vKZhbOinQ7NX3piH tJAzFcvBGpRG8NQi78CbZLbZ/ZXYpqbcPLOyy2tduQUQ2u2WHTKXShqR1qTsQgYLNA2p R9JV4BxHa2Rgv0X1nZkLHmk/YDgKE70D7xirUjfbLoyJuSfCdS0uq4HLEvZARU5uZZxu ysQg== X-Gm-Message-State: ALoCoQlp2MSZ9ar+sDCbmf8ztJSsfX30T7AsrJoi9saU48bPKlbBbi8BA3Jy4xsJEvZSQC62w37X X-Received: by 10.194.61.115 with SMTP id o19mr36822961wjr.12.1416845799022; Mon, 24 Nov 2014 08:16:39 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id cp4sm9063428wjb.16.2014.11.24.08.16.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 08:16:38 -0800 (PST) From: Thomas Monjalon To: "John W. Linville" Date: Mon, 24 Nov 2014 17:16:15 +0100 Message-ID: <3215753.nFC6kHmbmP@xps13> Organization: 6WIND User-Agent: KMail/4.14.2 (Linux/3.17.2-1-ARCH; KDE/4.14.2; x86_64; ; ) In-Reply-To: <1416239878-3556-1-git-send-email-linville@tuxdriver.com> References: <20141114144536.GC1893@tuxdriver.com> <1416239878-3556-1-git-send-email-linville@tuxdriver.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3] librte_pmd_af_packet: add PMD for AF_PACKET-based virtual devices 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, 24 Nov 2014 16:05:50 -0000 > This is a Linux-specific virtual PMD driver backed by an AF_PACKET > socket. This implementation uses mmap'ed ring buffers to limit copying > and user/kernel transitions. The PACKET_FANOUT_HASH behavior of > AF_PACKET is used for frame reception. In the current implementation, > Tx and Rx queues are always paired, and therefore are always equal > in number -- changing this would be a Simple Matter Of Programming. > > Interfaces of this type are created with a command line option like > "--vdev=eth_af_packet0,iface=...". There are a number of options availabe > as arguments: > > - Interface is chosen by "iface" (required) > - Number of queue pairs set by "qpairs" (optional, default: 1) > - AF_PACKET MMAP block size set by "blocksz" (optional, default: 4096) > - AF_PACKET MMAP frame size set by "framesz" (optional, default: 2048) > - AF_PACKET MMAP frame count set by "framecnt" (optional, default: 512) > > Signed-off-by: John W. Linville > --- > This PMD is intended to provide a means for using DPDK on a broad > range of hardware without hardware-specific PMDs and (hopefully) > with better performance than what PCAP offers in Linux. This might > be useful as a development platform for DPDK applications when > DPDK-supported hardware is expensive or unavailable. > > New in v3: > > -- Adopt awkward renaming (pmd_packet -> pmd_af_packet) in hopes of > getting something merged... There are some remaining occurences of ETH_PACKET. % git grep -i eth_packet | wc -l 19 % sed -ri 's,ETH_PACKET,ETH_AF_PACKET,' lib/librte_pmd_af_packet/* I fixed it. It seems there is a hope of getting it merged :D > New in v2: > > -- fixup some style issues found by check patch > -- use if_index as part of fanout group ID > -- set default number of queue pairs to 1 When building on Debian, I remembered that it cannot be enabled for all kernels. As a first step, I disabled it in default configuration. I don't know how we could handle it better. Is it sufficient to test availability of flags like PACKET_FANOUT_FLAG_ROLLOVER or PACKET_QDISC_BYPASS? Applied with changes explained above. Is it possible to improve it in coming weeks? Thanks -- Thomas