From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5a9WB9Q12I00DW4yDmsdc+fQQekdTVh8+5Lru2ByW2Q=; b=SHpkC/L45kHKFEFj2eouAc/8rDm9g1/pDZefunB/qNwWtMH1iuEr+ypzCvOQmDW8YA WM5d/iq+C4GEuAetVtiqs3ukB+1Wx2Cuvq+bXHti9iqMg9slvb3qQqy7//S+H9kUJqBy +R8cFjrWKjZSH+xN7yFS6anEwB6vC4Q/bUQxmT7G63SJlgfr1zXkOPBtl4b5+e9z9gty e/YwzmNjG0PQSQt8x6ilAa8t4VT5+iPoXhN24pqXtN32SP6QOoJCdVxk0vg66YIWSExl BmqatqDTgVxo26stBpsjnkdmRbb+wTDKWWrzf5nEbTSp19iYa+lKWZiI5pRggAnWNiZA Q0Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5a9WB9Q12I00DW4yDmsdc+fQQekdTVh8+5Lru2ByW2Q=; b=WSgd7v/RLvA/AYC5kF2433SAuGemaoKo9bRAj4e0gdbe8yvFFlBAiy71g8FxKwlhca L4S8jJ5aLJVs7KYSev7jroYZAi1s5v1Yj2il7Tn0zvf1OXshP9F8z4Sl5Cjgj/xzgV1C gf1uQ73wbrlUSvaU3DW8fQlGYjKpmyuOuy027n5vPQyOQr3voVNkaBC7Ql/9xtsaceaB 5SKd6VWcqyUHkcRVASyAJ2z0zzBOaSDBrbD6UQbCbJU20InjyfDJAiE3NmQ07AvAxx8h 7XFX28NDi1RmiSOwq56LiB5rXA339OxLLxLD84KmZkuhVO9AA4laVUKquNmm3B1wfB85 v5zw== X-Gm-Message-State: AElRT7FrTWxyNRgBVaLCmUCuyZKI0YOyG33BQliUfokJKrIQXTmwFTv8 nfakp5WS/z9MeQFacWSXxZE= X-Google-Smtp-Source: AIpwx4+s5Ak2BFYCtmzxcAijOOoveBbGMxU5FKZAfjiDibBayupo0ELgY8X9tA/o0t8dv5xTnfs8Bw== X-Received: by 10.80.232.130 with SMTP id f2mr4197214edn.156.1522256085179; Wed, 28 Mar 2018 09:54:45 -0700 (PDT) Received: from [192.168.25.159] (dsl-55-162.dsl.netsource.ie. [213.79.55.162]) by smtp.gmail.com with ESMTPSA id k51sm2920231eda.59.2018.03.28.09.54.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Mar 2018 09:54:44 -0700 (PDT) To: Ning Li , Yuanhan Liu , Maxime Coquelin , Tiwei Bie 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> Cc: dev@dpdk.org, jianfeng.tan@intel.com From: =?UTF-8?Q?Se=c3=a1n_Harte?= Message-ID: Date: Wed, 28 Mar 2018 17:54:42 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20171229094448.endx2qvwohxi7q47@debian-xvivbkq.sh.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Antivirus: AVG (VPS 180327-2, 27/03/2018), Outbound message X-Antivirus-Status: Clean Subject: Re: [dpdk-dev] [PATCH] net/virtio-user: specify the MAC of the tap X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2018 16:54:45 -0000 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