From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f174.google.com (mail-ob0-f174.google.com [209.85.214.174]) by dpdk.org (Postfix) with ESMTP id 79B6130E for ; Thu, 3 Jul 2014 09:06:18 +0200 (CEST) Received: by mail-ob0-f174.google.com with SMTP id va2so13381079obc.19 for ; Thu, 03 Jul 2014 00:06:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=RiCsuTmpVjXW/7efef52yHhGObkmaAmhGjZEFgK4jEM=; b=fat27vk1MQxwq6Qf9dPl78OPyA/RP6mMAgYiJu/HfE/h6FffXRTtKFEGC4QZkwh7Pk j1n5nSQCYoVS7mdB4nHGbFCOJKZpEDrtbXjJhuTfI9s5Mk5wNa9tW8TEvqHW3d8fCdOH nWIXRN+UuTAnbrMYxC5IqnpKMRY7t3jbh/JiAYkD+OemKWUcf9PdeaEtsldtKPzHnOYP j+2AJVw0Rcgtz/X7j4ac8HXVo/RKtSC/PnsMqPn0A3e0JFIclUmndwTVqS7uxy7ouxLO cmag1Os5HW1C4c2hIS2SAyKN7mI5WgOqlxOJE7MAtoNixqZtje/BHWgtQAUNIJNQsRsZ mNcQ== X-Gm-Message-State: ALoCoQmd0sj0IOyvn8bmJl9DhQawY+y2Dwk9rcoTvE+vpyMJZjNX8tA3rIrNLmqqugnn7NfcPVzQ MIME-Version: 1.0 X-Received: by 10.60.129.161 with SMTP id nx1mr2712217oeb.28.1404371198448; Thu, 03 Jul 2014 00:06:38 -0700 (PDT) Received: by 10.202.16.9 with HTTP; Thu, 3 Jul 2014 00:06:38 -0700 (PDT) In-Reply-To: References: Date: Thu, 3 Jul 2014 10:06:38 +0300 Message-ID: From: Alex Markuze To: "Zhang, Helin" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 07:06:18 -0000 Thanks, guys. I think I will modify the alloc KNI API, as in the way things are implemented today the KNI interface can't transmit because of intc MAC spoofing (w/o hacking the data path, similar to the l2fw example). The other issue because the interface is created with initial mac address of 0's Im pretty sure DHCP is also out of a question. Thanks, for the detailed info. On Thu, Jul 3, 2014 at 9:22 AM, Zhang, Helin wrote: > > > > -----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. > > > > Zhang, Alex, > > > > Please see the patch I had submitted a few days back which allows > setting the > > MAC address using > > > > ifconfig ... hw ether MAC-ADDRESS > > > > An "ifconfig DEV up" , followed by this sets the MAC address. > > > > Thanks, > > Padam > > > > On 03-Jul-2014, at 10:26 am, Zhang, Helin wrote: > > > > > > > >> -----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 > mac 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 > as > > 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 >