From: Tiwei Bie <tiwei.bie@intel.com>
To: "Tan, Jianfeng" <jianfeng.tan@intel.com>
Cc: "Seán Harte" <seanbh@gmail.com>, "Ning Li" <muziding001@163.com>,
"Yuanhan Liu" <yliu@fridaylinux.org>,
"Maxime Coquelin" <maxime.coquelin@redhat.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/virtio-user: specify the MAC of the tap
Date: Thu, 29 Mar 2018 09:15:05 +0800 [thread overview]
Message-ID: <20180329011505.2qwg5mzo4fgldd45@debian> (raw)
In-Reply-To: <ED26CBA2FAD1BF48A8719AEF02201E36514AC156@SHSMSX103.ccr.corp.intel.com>
On Thu, Mar 29, 2018 at 08:50:37AM +0800, Tan, Jianfeng wrote:
> > -----Original Message-----
> > From: Seán Harte [mailto:seanbh@gmail.com]
> > Sent: Thursday, March 29, 2018 12:55 AM
> > To: Ning Li; Yuanhan Liu; Maxime Coquelin; Bie, Tiwei
> > Cc: dev@dpdk.org; Tan, Jianfeng
> > Subject: Re: [dpdk-dev] [PATCH] net/virtio-user: specify the MAC of the tap
> >
> > 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 <muziding001 at 163.com>
> >
> > Reviewed-by: Seán Harte <seanbh@gmail.com>
> > Tested-by: Seán Harte <seanbh@gmail.com>
>
> Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
>
> > >> ---
[...]
> > >> --- 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.
>
> I would also prefer to keep it as simple as possible before we find a real use case for different mac addr.
>
Logically they're different virtual ports, so my first thought
is that they deserve different devargs and MACs. But after a
second thought, I also can't find a scenario where we would want
the tap and virtio device to have different MACs. So I'd like to
hear others' opinions. If that's the case, maybe we can take it.
Thanks
>
> >
> > >
> >
> > snip...
> >
> > >
> >
> > I'm not sure if this patch is still under consideration, but it looks
> > good to me, and works.
>
> I think yes. Maxime, would you like to consider merging this patch?
>
> Thanks,
> Jianfeng
next prev parent reply other threads:[~2018-03-29 1:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 11:38 [dpdk-dev] [PATCH] net/virtio-user: specify MAC address for tap port Ning Li
2017-12-18 6:19 ` Tiwei Bie
2017-12-19 9:27 ` Ning Li
2017-12-19 10:08 ` Ning Li
2017-12-28 8:43 ` Tiwei Bie
2017-12-29 3:04 ` Ning Li
2017-12-29 3:38 ` [dpdk-dev] [PATCH] net/virtio-user: specify the MAC of the tap Ning Li
2017-12-29 9:44 ` Tiwei Bie
2018-03-28 16:54 ` Seán Harte
2018-03-29 0:50 ` Tan, Jianfeng
2018-03-29 1:15 ` Tiwei Bie [this message]
2018-03-29 11:45 ` Maxime Coquelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180329011505.2qwg5mzo4fgldd45@debian \
--to=tiwei.bie@intel.com \
--cc=dev@dpdk.org \
--cc=jianfeng.tan@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=muziding001@163.com \
--cc=seanbh@gmail.com \
--cc=yliu@fridaylinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).