From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) by dpdk.org (Postfix) with ESMTP id 7DBF158EB for ; Wed, 30 Apr 2014 15:29:53 +0200 (CEST) Received: by mail-we0-f170.google.com with SMTP id w61so1692541wes.15 for ; Wed, 30 Apr 2014 06:29:57 -0700 (PDT) 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; bh=v8sSzs/vNpD7Euf3HXaEvSuK7MX36T+CrBa885ygGpw=; b=Qq5ixQqeXClwlXh/kdxGTmpzDWJA/Q3MjQiKEvpziwZDJ285h32asKVvrrNeDsWwvK EMIjEvYdtYGZroz+QWnYrB/XyUaZ8Cv0PJo1lCl2iPtK3h1i/u0PVGUhY2wYr/jgvRnr LvlZ8tyeaelS5OJ4WpPkmRApfIN2LnQ0sXJrvbLKalOsJ9OOggiX8Q1jr8NDzwRAOpMm xz3aYxG01nUYtN3mMZqgrrss9/gA9pzUgtJkNlIkACwz+ijbh6QCauxYg08vM+VCOK3i H/yLMXI55PPpWZgdVyQpUC3OeFxipNwOZHjbvuPZsDPEHQPDEaTsafYx5h5kv+L1f/ah OmvQ== X-Gm-Message-State: ALoCoQkSFxGUVPQEdC0+IwJtyJN0kkMtffsITkobvMHdz9yqMj7HLch5gsyIYOPL1pUmQHyXkja7 X-Received: by 10.194.204.199 with SMTP id la7mr4074939wjc.4.1398864597255; Wed, 30 Apr 2014 06:29:57 -0700 (PDT) Received: from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id q2sm3677737wix.5.2014.04.30.06.29.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Apr 2014 06:29:56 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Wed, 30 Apr 2014 15:29:48 +0200 Message-Id: <1398864588-31417-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 Cc: Zijie Pan Subject: [dpdk-dev] [PATCH] app/testpmd: show mac address at initialization 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, 30 Apr 2014 13:29:53 -0000 From: Zijie Pan Display port number and MAC address at start up. It is useful when configuring a packet generator. Signed-off-by: Zijie Pan --- app/test-pmd/testpmd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 9c56914..a661d33 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1223,6 +1223,7 @@ start_port(portid_t pid) portid_t pi; queueid_t qi; struct rte_port *port; + uint8_t *mac_addr; if (test_done == 0) { printf("Please stop forwarding first\n"); @@ -1350,6 +1351,11 @@ start_port(portid_t pid) RTE_PORT_HANDLING, RTE_PORT_STARTED) == 0) printf("Port %d can not be set into started\n", pi); + mac_addr = port->eth_addr.addr_bytes; + printf("Port %d: %02X:%02X:%02X:%02X:%02X:%02X\n", pi, + mac_addr[0], mac_addr[1], mac_addr[2], + mac_addr[3], mac_addr[4], mac_addr[5]); + /* at least one port started, need checking link status */ need_check_link_status = 1; } -- 1.7.10.4