Add structure to define the payload of control VQ messages carrying the
configured vlan ID. It will be used in subsequent patches of this
series.
Signed-off-by: Eli Cohen <[email protected]>
---
include/uapi/linux/virtio_net.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
index 3f55a4215f11..b94a405fa8d2 100644
--- a/include/uapi/linux/virtio_net.h
+++ b/include/uapi/linux/virtio_net.h
@@ -270,6 +270,9 @@ struct virtio_net_ctrl_mac {
#define VIRTIO_NET_CTRL_VLAN 2
#define VIRTIO_NET_CTRL_VLAN_ADD 0
#define VIRTIO_NET_CTRL_VLAN_DEL 1
+struct virtio_net_ctrl_vlan {
+ __virtio16 id;
+};
/*
* Control link announce acknowledgement
--
2.35.1
在 2022/4/11 20:29, Eli Cohen 写道:
> Add structure to define the payload of control VQ messages carrying the
> configured vlan ID. It will be used in subsequent patches of this
> series.
>
> Signed-off-by: Eli Cohen <[email protected]>
> ---
> include/uapi/linux/virtio_net.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
> index 3f55a4215f11..b94a405fa8d2 100644
> --- a/include/uapi/linux/virtio_net.h
> +++ b/include/uapi/linux/virtio_net.h
> @@ -270,6 +270,9 @@ struct virtio_net_ctrl_mac {
> #define VIRTIO_NET_CTRL_VLAN 2
> #define VIRTIO_NET_CTRL_VLAN_ADD 0
> #define VIRTIO_NET_CTRL_VLAN_DEL 1
> +struct virtio_net_ctrl_vlan {
> + __virtio16 id;
> +};
It looks to me there's no need to bother uAPI and we can simply use
__virtio16 in patch 3?
Thanks
>
> /*
> * Control link announce acknowledgement
> From: Jason Wang <[email protected]>
> Sent: Friday, April 15, 2022 6:01 AM
> To: Eli Cohen <[email protected]>; [email protected]
> Cc: [email protected]; [email protected]; [email protected]
> Subject: Re: [PATCH 2/3] virtio_net: Add control VQ struct to carry vlan id
>
>
> 在 2022/4/11 20:29, Eli Cohen 写道:
> > Add structure to define the payload of control VQ messages carrying the
> > configured vlan ID. It will be used in subsequent patches of this
> > series.
> >
> > Signed-off-by: Eli Cohen <[email protected]>
> > ---
> > include/uapi/linux/virtio_net.h | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
> > index 3f55a4215f11..b94a405fa8d2 100644
> > --- a/include/uapi/linux/virtio_net.h
> > +++ b/include/uapi/linux/virtio_net.h
> > @@ -270,6 +270,9 @@ struct virtio_net_ctrl_mac {
> > #define VIRTIO_NET_CTRL_VLAN 2
> > #define VIRTIO_NET_CTRL_VLAN_ADD 0
> > #define VIRTIO_NET_CTRL_VLAN_DEL 1
> > +struct virtio_net_ctrl_vlan {
> > + __virtio16 id;
> > +};
>
>
> It looks to me there's no need to bother uAPI and we can simply use
> __virtio16 in patch 3?
>
Sure
> Thanks
>
>
> >
> > /*
> > * Control link announce acknowledgement