[virtio-dev] Re: RE: [virtio-comment] RE: RE: RE: RE: [RFC] virtio-net: support access and control the member devices

Xuan Zhuo
2023-08-04T06:27:01Z

On Thu, 3 Aug 2023 13:15:59 +0000, Parav Pandit <parav@nvidia.com> wrote:
>
>
> > From: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
> > Sent: Thursday, August 3, 2023 5:11 PM
> >
> > On Thu, 3 Aug 2023 11:39:20 +0000, Parav Pandit <parav@nvidia.com> wrote:
> > >
> > > > From: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
> > > > Sent: Thursday, August 3, 2023 5:00 PM
> > >
> > >
> > > > > Admin command is what is suitable for device management, including
> > > > features and configspace fields setup.
> > > >
> > > > I agree.
> > > >
> > > > But some configuration such as mac, ip(eswitch rule) for vfs that
> > > > are suitable for the admin queue?
> > > Mac, why not.
> >
> > Mac is the concept of the virtio-net.
> > How do abstract it? Or a admin queue command
> > VIRTIO_ADMIN_CMD_NET_MAC_SET?
> >
> I don't think we should abstract it.
> A one command that can set one or multiple fields of the config space is fine.

So, you mean we will have many commands like:

VIRTIO_ADMIN_CMD_NET_MAC_SET
VIRTIO_ADMIN_CMD_NET_MTU_SET
VIRTIO_ADMIN_CMD_NET_SPEED_SET
VIRTIO_ADMIN_CMD_BLK_XXX1
VIRTIO_ADMIN_CMD_BLK_XXX2
.....

Or a generic command with the offset and size of the field of the config space?

>
> > >
> > > Eswith rules should be programmed through the flow vq, that we are working
> > with Heng, Satananda and David.
> >
> > I know you are doing for the n-tuple receive flow filters.
> >
> > Here I mean we want to limit the ip of the VF. In the cloud case, the vm is
> > untrust, we should force the vm that it just can use the specified ip.
> >
> That is fine,
> It is just that the flow filter commands may be different for ingress and egress direction of the VF.
> The command that we are adding does not have concept of switch ports, because there is no switch.
>
> For eswitch case, you would define more commands that will have switch ports...

Yes, for this requirement, I will introduce the concept of simple switch into virtio-net.
Then we can configure the ip of each port of the switch.

>
> > Then can we configure the ip of the vfs via the admin queue?
>
> It should be through the flow filter queue so that it can be performant like nic tx/rxq which has dedicated role.

Why flow filter queue? I think the cvq is ok.

In our case, the ip of the port is configured by the admin on the setup of the
device.

And that is configured to the switch. I think the flow filter is working inside
the deivce.

Thanks.

> For switch use case command formats or fields needs extension.