From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com [209.85.213.182]) by dpdk.org (Postfix) with ESMTP id 658508E8A for ; Thu, 15 Oct 2015 04:08:35 +0200 (CEST) Received: by igbhv6 with SMTP id hv6so30981407igb.0 for ; Wed, 14 Oct 2015 19:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=r0aYAKlxy7AxjZymyyGd4oX1X7LMmHmFmYOrbkIppd0=; b=WT6AWOkY5+FDRG7XxHq5IWB22bBwm2X2Qw26NfkyroQHYvIyar0/Yp8SEj+ThbXfQS L6Uh6Wz//LQoEMZuBvPo7G9QXOUdFkh4YuMKpi0CgGibkLMq8wixChCD4hDO3tjEjMtW TM5HtRzbuv6BWaHTAvFlZ38EUs/rdOlCA6C7kNj+NBJ9B8Kinmv/IWd3fKBASkJewLBt ir1orVfDOA9uX1tTl+OExTuPXOOMbiwBhmIzLzJvKOHOjLUtpUGIu3oJFWIRYJsn6WBz R08Rbc5fAI8BtJV4wrIXFfwhuiCeU6UbnRnmC3I8FD0FXuPI4dbIgRTAtmefsVEEniTk 6pZg== MIME-Version: 1.0 X-Received: by 10.50.79.229 with SMTP id m5mr27861412igx.1.1444874914899; Wed, 14 Oct 2015 19:08:34 -0700 (PDT) Received: by 10.79.33.206 with HTTP; Wed, 14 Oct 2015 19:08:34 -0700 (PDT) Date: Thu, 15 Oct 2015 11:08:34 +0900 Message-ID: From: Moon-Sang Lee To: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [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: Thu, 15 Oct 2015 02:08:35 -0000 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. (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*