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 7674E9E7 for ; Fri, 16 Oct 2015 15:43:37 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 16 Oct 2015 06:43:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,689,1437462000"; d="scan'208";a="665720027" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.62]) by orsmga003.jf.intel.com with SMTP; 16 Oct 2015 06:43:22 -0700 Received: by (sSMTP sendmail emulation); Fri, 16 Oct 2015 14:43:21 +0025 Date: Fri, 16 Oct 2015 14:43:21 +0100 From: Bruce Richardson To: Moon-Sang Lee Message-ID: <20151016134320.GE9980@bricha3-MOBL3> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [Q] l2fwd in examples directory 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: Fri, 16 Oct 2015 13:43:39 -0000 On Thu, Oct 15, 2015 at 11:08:57AM +0900, Moon-Sang Lee wrote: > There is codes as below in examples/l2fwd/main.c and I think > rte_eth_dev_socket_id(portid) > always returns -1(SOCKET_ID_ANY) since there is no association code between > port and > lcore in the example codes. Can you perhaps clarify what you mean here. On modern NUMA systems, such as those from Intel :-), the PCI slots are directly connected to the CPU sockets, so the ethernet ports do indeed have a direct NUMA affinity. It's not something that the app needs to specify. /Bruce > (i.e. I need to find a matching lcore from > lcore_queue_conf[] with portid > and call rte_lcore_to_socket_id(lcore_id).) > > /* init one RX queue */ > fflush(stdout); > ret = rte_eth_rx_queue_setup(portid, 0, nb_rxd, > rte_eth_dev_socket_id(portid), > NULL, > l2fwd_pktmbuf_pool); > if (ret < 0) > rte_exit(EXIT_FAILURE, "rte_eth_rx_queue_setup:err=%d, > port=%u\n", > ret, (unsigned) portid); > > It works fine even though memory is allocated in different NUMA node. But I > wonder there is > a DPDK API that associates inlcore to port internally thus > rte_eth_devices[portid].pci_dev->numa_node > contains proper node. > > > -- > Moon-Sang Lee, SW Engineer > Email: sang0627@gmail.com > Wisdom begins in wonder. *Socrates*