From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) by dpdk.org (Postfix) with ESMTP id 5728E292D for ; Wed, 17 May 2017 12:42:48 +0200 (CEST) Received: by mail-io0-f178.google.com with SMTP id o12so6518695iod.3 for ; Wed, 17 May 2017 03:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AvBwJWPxse0msECmbd2yGUNpqPkSvvI9W6kraZN8smM=; b=Z+tBHMWAoKMwgFZMDlD/GwtdQ/1YmYRre0B6Y6VNsk3LkiuSjS2D3f6CJyJMIkt429 UPAzDlYYGvKKYME4zNyDcRf3U8WxRFQTjFHNGzGDM9T8FrM7XS6k0OtqTG1JWWl22ecM Oe/2WB71gRy4+frogZ8WxP5OumBgJESW/f17AT0+Hixovcb/A33JgTMDiqji6MjUBXJ3 oFCLcOcKQtePNz+UHbKVBi1qZFSwT1kb7AsIhIF2hWGXEA1xBR1OoF+VwzOzneHMVijM nAJEcfjm2BqlEYP6kFjyumKbl05+0oIwMtZTFAwcfHOR9TFgfQsXewgd6dVFdpT0tdgh lyfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AvBwJWPxse0msECmbd2yGUNpqPkSvvI9W6kraZN8smM=; b=H1dLLFWQrgSfIutDh02hscFIJoh0g+BgvkPLMCLyoeiakZRPx6cisK6pDbhAj2aPCk VH+6H3AIoOo6zH7IHiS2SX49jrpsTL2vhfuJsTZZON99A7LFAhd3pRb3i9thmjAbYivx osnioYd5JcglBkXLm3nTf1hPEh6QPD8DDSjvUWvvrlOFMlCu2gP91e8zBN/R0q+ieBeY wERUETSnewBEZfhjDcR8AuRDeIonbOHexSyxhwEHu5ZrmmTEKBOA4WbFm32WW6YefmrL 0HF9Ora2Y3rUGRoZtgo6o2u4mMaTJTfBae1VeW2vrvuFDG/s0AASKf/JIIF6EnnK2Z5D fPEg== X-Gm-Message-State: AODbwcBttkQ40kIpeaQHpgfapG0bukZcgesgXWeaTihHN7GQrCqErA8b LGD+gqQBw497BE9QZX2b4Lr8NNedt0M9 X-Received: by 10.107.50.140 with SMTP id y134mr2399438ioy.102.1495017767736; Wed, 17 May 2017 03:42:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.71.135 with HTTP; Wed, 17 May 2017 03:42:27 -0700 (PDT) In-Reply-To: References: From: Andriy Berestovskyy Date: Wed, 17 May 2017 12:42:27 +0200 Message-ID: To: Sushil Adhikari Cc: users Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-users] Setting real MAC address in KNI application X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 10:42:48 -0000 Hey Suchil, Just add a MAC to your /etc/network/interfaces: iface kni0 inet static hwaddress 10:20:30:40:50:60 Regards, Andriy On Tue, May 16, 2017 at 7:10 PM, Sushil Adhikari wrote: > When I run the DPDK KNI application it gives random mac address to the > ethernet ports. How can I configure it to set up the real MAC address of > the hardware(ethernet ports)? It seems like I can get mac address by > calling rte_eth_macaddr_get but to set up I need to call kni_net_set_mac > which takes in net_device structure which again I don't have access to from > my application. Is there a way to set up the mac address of dpdk ports to > its original mac address in kni application. -- Andriy Berestovskyy