search for: control_buf

Displaying 11 results from an estimated 11 matches for "control_buf".

2023 Jun 06
0
[PATCH net] virtio_net: use control_buf for coalesce params
...ing command support for virtio_net. However, > the coalesce commands are using buffers on the stack, which is causing > the device to see DMA errors. There should also be a complaint from > check_for_stack() in debug_dma_map_xyz(). Fix this by adding and using > coalesce params from the control_buf struct, which aligns with other > commands. > > Fixes: 699b045a8e43 ("net: virtio_net: notifications coalescing support") > Reviewed-by: Shannon Nelson <shannon.nelson at amd.com> > Signed-off-by: Allen Hubbe <allen.hubbe at amd.com> > Signed-off-by: Brett C...
2018 Apr 19
1
[PATCH v2 net 3/3] virtio_net: sparse annotation fix
...rkin <mst at redhat.com> --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index f84fe04..c5b11f2 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -155,7 +155,7 @@ struct control_buf { u8 promisc; u8 allmulti; __virtio16 vid; - u64 offloads; + __virtio64 offloads; }; struct virtnet_info { -- MST
2018 Apr 19
1
[PATCH v2 net 1/3] virtio_net: split out ctrl buffer
...iff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 7b187ec..3d0eff53 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -147,6 +147,17 @@ struct receive_queue { struct xdp_rxq_info xdp_rxq; }; +/* Control VQ buffers: protected by the rtnl lock */ +struct control_buf { + struct virtio_net_ctrl_hdr hdr; + virtio_net_ctrl_ack status; + struct virtio_net_ctrl_mq mq; + u8 promisc; + u8 allmulti; + u16 vid; + u64 offloads; +}; + struct virtnet_info { struct virtio_device *vdev; struct virtqueue *cvq; @@ -192,14 +203,7 @@ struct virtnet_info { struct hlist_nod...
2018 Apr 19
3
[PATCH v2 net 2/3] virtio_net: fix adding vids on big-endian
...t;mst at redhat.com> --- drivers/net/virtio_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3d0eff53..f84fe04 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -154,7 +154,7 @@ struct control_buf { struct virtio_net_ctrl_mq mq; u8 promisc; u8 allmulti; - u16 vid; + __virtio16 vid; u64 offloads; }; @@ -1718,7 +1718,7 @@ static int virtnet_vlan_rx_add_vid(struct net_device *dev, struct virtnet_info *vi = netdev_priv(dev); struct scatterlist sg; - vi->ctrl->vid = vid; +...
2018 Apr 19
3
[PATCH v2 net 2/3] virtio_net: fix adding vids on big-endian
...t;mst at redhat.com> --- drivers/net/virtio_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3d0eff53..f84fe04 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -154,7 +154,7 @@ struct control_buf { struct virtio_net_ctrl_mq mq; u8 promisc; u8 allmulti; - u16 vid; + __virtio16 vid; u64 offloads; }; @@ -1718,7 +1718,7 @@ static int virtnet_vlan_rx_add_vid(struct net_device *dev, struct virtnet_info *vi = netdev_priv(dev); struct scatterlist sg; - vi->ctrl->vid = vid; +...
2018 Apr 19
3
[PATCH net] virtio_net: split out ctrl buffer
...diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 7b187ec..82f50e5 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -147,6 +147,17 @@ struct receive_queue { struct xdp_rxq_info xdp_rxq; }; +/* Control VQ buffers: protected by the rtnl lock */ +struct control_buf { + struct virtio_net_ctrl_hdr hdr; + virtio_net_ctrl_ack status; + struct virtio_net_ctrl_mq mq; + u8 promisc; + u8 allmulti; + u16 vid; + u64 offloads; +}; + struct virtnet_info { struct virtio_device *vdev; struct virtqueue *cvq; @@ -192,14 +203,7 @@ struct virtnet_info { struct hlist_nod...
2019 Apr 11
1
[RFC 2/3] hw/virtio-rdma: VirtIO rdma device
...ile */ +#define VIRTIO_RDMA_CTRL_OK 0 +#define VIRTIO_RDMA_CTRL_ERR 1 + +enum { + VIRTIO_CMD_QUERY_DEVICE = 10, + VIRTIO_CMD_QUERY_PORT, + VIRTIO_CMD_CREATE_CQ, + VIRTIO_CMD_DESTROY_CQ, + VIRTIO_CMD_CREATE_PD, + VIRTIO_CMD_DESTROY_PD, + VIRTIO_CMD_GET_DMA_MR, +}; + +struct control_buf { + uint8_t cmd; + uint8_t status; +}; + +struct cmd_query_port { + uint8_t port; +}; + +struct cmd_create_cq { + uint32_t cqe; +}; + +struct rsp_create_cq { + uint32_t cqn; +}; + +struct cmd_destroy_cq { + uint32_t cqn; +}; + +struct rsp_create_pd { + uint32_t pdn; +}; + +stru...
2019 Apr 11
9
[RFC 0/3] VirtIO RDMA
Data center backends use more and more RDMA or RoCE devices and more and more software runs in virtualized environment. There is a need for a standard to enable RDMA/RoCE on Virtual Machines. Virtio is the optimal solution since is the de-facto para-virtualizaton technology and also because the Virtio specification allows Hardware Vendors to support Virtio protocol natively in order to achieve
2019 Apr 11
9
[RFC 0/3] VirtIO RDMA
Data center backends use more and more RDMA or RoCE devices and more and more software runs in virtualized environment. There is a need for a standard to enable RDMA/RoCE on Virtual Machines. Virtio is the optimal solution since is the de-facto para-virtualizaton technology and also because the Virtio specification allows Hardware Vendors to support Virtio protocol natively in order to achieve
2019 Apr 13
1
[RFC 3/3] RDMA/virtio-rdma: VirtIO rdma driver
...uctures > + * > + * The control virtqueue expects a header in the first sg entry > + * and an ack/status response in the last entry. Data for the > + * command goes in between. > + */ > + > +#define VIRTIO_RDMA_CTRL_OK 0 > +#define VIRTIO_RDMA_CTRL_ERR 1 > + > +struct control_buf { > + __u8 cmd; > + __u8 status; > +}; > + > +enum { > + VIRTIO_CMD_QUERY_DEVICE = 10, > + VIRTIO_CMD_QUERY_PORT, > + VIRTIO_CMD_CREATE_CQ, > + VIRTIO_CMD_DESTROY_CQ, > + VIRTIO_CMD_CREATE_PD, > + VIRTIO_CMD_DESTROY_PD, > + VIRTIO_CMD_GET_DMA_MR, > +}; > +...
2019 Apr 11
1
[RFC 3/3] RDMA/virtio-rdma: VirtIO rdma driver
...eader file */ + +/* + * Control virtqueue data structures + * + * The control virtqueue expects a header in the first sg entry + * and an ack/status response in the last entry. Data for the + * command goes in between. + */ + +#define VIRTIO_RDMA_CTRL_OK 0 +#define VIRTIO_RDMA_CTRL_ERR 1 + +struct control_buf { + __u8 cmd; + __u8 status; +}; + +enum { + VIRTIO_CMD_QUERY_DEVICE = 10, + VIRTIO_CMD_QUERY_PORT, + VIRTIO_CMD_CREATE_CQ, + VIRTIO_CMD_DESTROY_CQ, + VIRTIO_CMD_CREATE_PD, + VIRTIO_CMD_DESTROY_PD, + VIRTIO_CMD_GET_DMA_MR, +}; + +struct cmd_query_port { + __u8 port; +}; + +struct cmd_create_cq { +...