From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) by dpdk.org (Postfix) with ESMTP id 9D8D92C55 for ; Wed, 17 May 2017 21:47:37 +0200 (CEST) Received: by mail-oi0-f54.google.com with SMTP id l18so28855801oig.2 for ; Wed, 17 May 2017 12:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=IiSC46/Ng6R0OZSWf6XYxDawotflHMu9oox2fOOTRJA=; b=tTx1CU2Krjo4Hb1RQb67mVAqi4o4ny4E1WbvLulsPUre9OhxNlXYy1qaToFEABlhz8 i+67FOqSJsPDt0EBuu9aao+oVwGlrbdRh/YOuluRonnwGJDDCSgIN9Cpalq4kxfQJOHk aXgB2RRTZRoqSEK5pzqTK8gcDksGfSea/JWjqGpwZx1HwDhtuw9LGiN/JtGf7xHAa8+u pExEemQ35787Z3MLDf2HgsQd091/mqU8FoXcBsmEmiIndHZ9S0++NVO8Sg/iQXBR5Kjw zDaPZG08NkOF3e877tG03kQwsXJ9NBKq5SiI6e7tGMzCmOVNb3Udi0+uoiUc9EvtPHq2 Z6lQ== 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=IiSC46/Ng6R0OZSWf6XYxDawotflHMu9oox2fOOTRJA=; b=GE/GrNLSw2Kw1STMggoGsl819O5zH2CoieKMWDhiFdfJv7LrhtLlaVQ0Rj7gVGgXXd a3Pr1tIhWCSx0Sv63m3/4AlSytfc3quahyJt4Mv7p9v/NbcIIip0ydPlNf/YTNaIIVqX wXRAAuwXmcD9lcP+u7UizUlcWkhDWCdMo3wr7dpaw56cgbhFkzPlw+q7NtBdpNrMmVIx E101vyIWhh+teXz4P/78Z88IdwlXjPetOE3tCKKkAqobpOpFL8XQw+gtu9HkBbrnn5g/ wElYtS5ovvzEDmr9niRM9DhH0Na2wxc1Fy9oxQ0GRL9YLXzW7U4QYODF/IP7UO3FDSn4 Ozwg== X-Gm-Message-State: AODbwcD3H+Lp7JVkU6N1BaAfN1tK99el0PpJZKRh6lqYVCeEnvUhQV7c 34f3x6RjUz4dYc+C9JS+aynPZH0udUju X-Received: by 10.157.49.89 with SMTP id v25mr260295otd.45.1495050456727; Wed, 17 May 2017 12:47:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.42.193 with HTTP; Wed, 17 May 2017 12:47:16 -0700 (PDT) In-Reply-To: References: From: Sushil Adhikari Date: Wed, 17 May 2017 14:47:16 -0500 Message-ID: To: Andriy Berestovskyy Cc: users Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 19:47:37 -0000 Thank you for the replay but I am trying to do it in the KNI application which runs before bringing the network up. I found one recent patch which seem to work http://dpdk.org/dev/patchwork/patch/24067/ I applied the patch and added mac address in configuration parameter of struct rte_kni_conf. On Wed, May 17, 2017 at 5:42 AM, Andriy Berestovskyy wrote: > 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 >