From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f48.google.com (mail-pb0-f48.google.com [209.85.160.48]) by dpdk.org (Postfix) with ESMTP id C9A82156 for ; Wed, 27 Nov 2013 02:46:18 +0100 (CET) Received: by mail-pb0-f48.google.com with SMTP id md12so9301069pbc.35 for ; Tue, 26 Nov 2013 17:47:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=zcYcvChzGV+STZsPgyzxUIlI+h5VjiJNuwSac7z3Uro=; b=N9aaUTnMAExHuiQBrSpw3ijsF0oFKWtkUsr/gSm8dRW6Lyk9Ez82rVDRqJt0CIx0Ri NAzjpyIBEqwI6LRWYyHdJL7m8ml7pTRuzalTF7iyYdYarG2+ztJiKTgZOrg5/csfcOfB uxlrzhgojAoW0C/m2q6NmUkMILXM5C6ja0Out0B2WH0nZXWaIF+hkHxsnke7PPlo8qWE 3brqXhhJghrIjovRa+1lABonQGDG67QO+KUn0ATlS0YDdlRJgIU8NbTKpwGD2BAyDa1+ K98G94DFgVN9Aw8v2hyCRKUqXCbG/A5d8C2g6CR7TVRX6+Ccxb0/ZpbKEfdR/2HORfLr GIzw== X-Gm-Message-State: ALoCoQkrMY0u2DOb2sqKu7SuZfd0CriH22XLO1V0UHyZveOQi5JZLDKNTQmq6OLYOmSg2JUEpJLW X-Received: by 10.66.145.40 with SMTP id sr8mr39165363pab.60.1385516838326; Tue, 26 Nov 2013 17:47:18 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id hw10sm83762120pbc.24.2013.11.26.17.47.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Nov 2013 17:47:17 -0800 (PST) Message-ID: <52954F27.3040706@igel.co.jp> Date: Wed, 27 Nov 2013 10:47:19 +0900 From: "Tetsuya.Mukawa" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: "Richardson, Bruce" , "dev@dpdk.org" References: <529474D5.80306@igel.co.jp> <59AF69C657FD0841A61C55336867B5B01A9778E3@IRSMSX103.ger.corp.intel.com> In-Reply-To: <59AF69C657FD0841A61C55336867B5B01A9778E3@IRSMSX103.ger.corp.intel.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] How to know corresponding device from port number 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: Wed, 27 Nov 2013 01:46:19 -0000 > [BR] Firstly, to identify the ring PMD's vs the ethernet device PMDs you can use the information in the rte_eth_dev structure. For each device x, (0 <= x <=5), if you check rte_eth_devices[x], the ring pmd's will have a NULL driver pointer and the pci address given in the pci_dev structure will be all-zeros. > As for distinguishing two different ring ethdevs from each other, I'm not aware of any way to do this, they will just have different eth_dev indexes. Thanks, I understand there is no way to distinguish rings. It will be a problem in following case. If someone wants to implement forwarding application that receives packets from ETH_A and send those to ETH_B. Also above application is split to 3 processes like following. [ETH_A]-->Process_A --> [Ring_A] --> Process_B --> [Ring_B] --> Process_C --> [ETH_B] (All 3 processes are implemented using PMD) At present, to implement Process_B might be difficult or tricky because ring can't be distinguished. I guess all virtual eth device like ring and pcap should have MAC address. And It should be possible to specify MAC address from command line. If so, DPDK application can distinguish all ports using MAC address even if port corresponds virtual eth device. Thanks, Tetsuya Mukawa