From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Se=c3=a1n_Harte?= Subject: Re: [PATCH] net/virtio-user: specify the MAC of the tap Date: Wed, 28 Mar 2018 17:54:42 +0100 Message-ID: References: <1513251494-9980-1-git-send-email-muziding001@163.com> <1514518722-27302-1-git-send-email-muziding001@163.com> <20171229094448.endx2qvwohxi7q47@debian-xvivbkq.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org, jianfeng.tan@intel.com To: Ning Li , Yuanhan Liu , Maxime Coquelin , Tiwei Bie Return-path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 715B1374 for ; Wed, 28 Mar 2018 18:54:45 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id f125so6582308wme.4 for ; Wed, 28 Mar 2018 09:54:45 -0700 (PDT) In-Reply-To: <20171229094448.endx2qvwohxi7q47@debian-xvivbkq.sh.intel.com> Content-Language: en-GB List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 29/12/2017 09:44, tiwei.bie at intel.com (Tiwei Bie) wrote: > Hi Ning, > > On Fri, Dec 29, 2017 at 11:38:42AM +0800, Ning Li wrote: >> When using virtio-user with vhost-kernel to exchange >> packet with kernel networking stack, application can >> set the MAC of the tap interface via parameter. >> >> Signed-off-by: Ning Li >> --- > > Thanks for the new version. > > Just FYI, when sending a new version, you also need to > add the version number, e.g. using -v2 when generating > the patch. You can find more details in the "Contribute > by sending patches" section in below link: > > http://dpdk.org/dev > >> drivers/net/virtio/virtio_user/vhost_kernel.c | 3 ++- >> drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 14 +++++++++++++- >> drivers/net/virtio/virtio_user/vhost_kernel_tap.h | 3 ++- >> 3 files changed, 17 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/net/virtio/virtio_user/vhost_kernel.c b/drivers/net/virtio/virtio_user/vhost_kernel.c >> index 68d28b1..dd24b6b 100644 >> --- a/drivers/net/virtio/virtio_user/vhost_kernel.c >> +++ b/drivers/net/virtio/virtio_user/vhost_kernel.c >> @@ -380,7 +380,8 @@ struct vhost_memory_kernel { >> else >> hdr_size = sizeof(struct virtio_net_hdr); >> >> - tapfd = vhost_kernel_open_tap(&dev->ifname, hdr_size, req_mq); >> + tapfd = vhost_kernel_open_tap(&dev->ifname, hdr_size, req_mq, >> + (char *)dev->mac_addr); > > I think it's better to add a new device argument for > virtio-user to specify the MAC for the corresponding > tap. But I don't have a very strong opinion on this > for now. So I'd like to hear others' opinions. No harm if it was a seperate argument, although I can't think of a scenario where you care about the MAC address and would want the tap and virtio devices to have differnet MAC addresses. > snip... > I'm not sure if this patch is still under consideration, but it looks good to me, and works. Reviewed-by: Seán Harte Tested-by: Seán Harte