From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E0C3030E for ; Thu, 3 Jul 2014 08:22:37 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 02 Jul 2014 23:22:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,593,1400050800"; d="scan'208";a="564549521" Received: from fmsmsx108.amr.corp.intel.com ([10.19.9.228]) by fmsmga002.fm.intel.com with ESMTP; 02 Jul 2014 23:22:57 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX108.amr.corp.intel.com (10.19.9.228) with Microsoft SMTP Server (TLS) id 14.3.123.3; Wed, 2 Jul 2014 23:22:56 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.123.3; Wed, 2 Jul 2014 23:22:56 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.122]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.81]) with mapi id 14.03.0123.003; Thu, 3 Jul 2014 14:22:55 +0800 From: "Zhang, Helin" To: "Padam J. Singh" Thread-Topic: [dpdk-dev] KNI hw Address. Thread-Index: AQHPlg512JqjVsKYCE6iMMQWp49vbJuNyTuA//99XQCAAJsL4A== Date: Thu, 3 Jul 2014 06:22:54 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] KNI hw Address. 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, 03 Jul 2014 06:22:38 -0000 > -----Original Message----- > From: Padam J. Singh [mailto:padam.singh@inventum.net] > Sent: Thursday, July 3, 2014 1:06 PM > To: Zhang, Helin > Cc: Alex Markuze; dev@dpdk.org > Subject: Re: [dpdk-dev] KNI hw Address. >=20 > Zhang, Alex, >=20 > Please see the patch I had submitted a few days back which allows setting= the > MAC address using >=20 > ifconfig ... hw ether MAC-ADDRESS >=20 > An "ifconfig DEV up" , followed by this sets the MAC address. >=20 > Thanks, > Padam >=20 > On 03-Jul-2014, at 10:26 am, Zhang, Helin wrote: >=20 > > > >> -----Original Message----- > >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Alex Markuze > >> Sent: Wednesday, July 2, 2014 11:57 PM > >> To: dev@dpdk.org > >> Subject: [dpdk-dev] KNI hw Address. > >> > >> Hi, I'm playing with KNI on a VM (kvm), the Interface that is created > >> has no MAC address until the IP is set via ifconfig - then a random m= ac is > created. > >> The VF has a mac address that is easily retrieved with > rte_eth_macaddr_get. > >> > >> What I did not find is a way to create the KNI with that specific mac > >> address enabled. > >> What are the ways to set the KNI mac address? > >> > >> Thanks > >> Alex > > > > Hi Alex > > > > No way without modifying the code. Two ways can be taken into account a= s > below. > > > > 1. Implement ndo_set_mac in KNI kernel module to set the MAC address. > > 2. Add mac address as one more parameters in user space KNI interface, = to > tell the kernel module the mac during kni device creation. > > > > Regards, > > Helin Hi Padam Great! I think you have implemented the first way I listed. It is good for = VM environments. I remember that might be adopted by some projects based on= DPDK. Thank you! I will review your patch, and possibly add reviewed-by: to your patch. Regards, Helin