Displaying 20 results from an estimated 53 matches for "virtio_net_ctrl_hdr".
2018 Sep 05
9
[RFC] UAPI: Check headers by compiling all together as C++
Here's a set of patches that inserts a step into the build process to make
sure that the UAPI headers can all be built together with C++ (if the
compiler being used supports C++). All but the final patch perform fixups,
including:
(1) Fix member names that conflict with C++ reserved words by providing
alternates that can be used anywhere. An anonymous union is used so
that that
2018 Sep 05
9
[RFC] UAPI: Check headers by compiling all together as C++
Here's a set of patches that inserts a step into the build process to make
sure that the UAPI headers can all be built together with C++ (if the
compiler being used supports C++). All but the final patch perform fixups,
including:
(1) Fix member names that conflict with C++ reserved words by providing
alternates that can be used anywhere. An anonymous union is used so
that that
2015 Oct 28
2
[PATCH v2 1/3] virtio_net: Stop doing DMA from the stack
...et/virtio_net.c
index d8838dedb7a4..4f10f8a58811 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -976,31 +976,43 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd,
struct scatterlist *out)
{
struct scatterlist *sgs[4], hdr, stat;
- struct virtio_net_ctrl_hdr ctrl;
- virtio_net_ctrl_ack status = ~0;
+
+ struct {
+ struct virtio_net_ctrl_hdr ctrl;
+ virtio_net_ctrl_ack status;
+ } *buf;
+
unsigned out_num = 0, tmp;
+ bool ret;
/* Caller should know better */
BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ));
- ctrl.class = class;...
2015 Oct 28
2
[PATCH v2 1/3] virtio_net: Stop doing DMA from the stack
...et/virtio_net.c
index d8838dedb7a4..4f10f8a58811 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -976,31 +976,43 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd,
struct scatterlist *out)
{
struct scatterlist *sgs[4], hdr, stat;
- struct virtio_net_ctrl_hdr ctrl;
- virtio_net_ctrl_ack status = ~0;
+
+ struct {
+ struct virtio_net_ctrl_hdr ctrl;
+ virtio_net_ctrl_ack status;
+ } *buf;
+
unsigned out_num = 0, tmp;
+ bool ret;
/* Caller should know better */
BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ));
- ctrl.class = class;...
2018 Sep 06
2
[RFC] UAPI: Check headers by compiling all together as C++
Here's a set of patches that inserts a step into the build process to make
sure that the UAPI headers can all be built together with C++ (if the
compiler being used supports C++).
Note that it's based on a commit from the sound tree to fix usage of u32
and co..
Most of the patches perform fixups, including:
(1) Fix member names that conflict with C++ reserved words by providing
2015 Oct 28
0
[PATCH v2 1/3] virtio_net: Stop doing DMA from the stack
....4f10f8a58811 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -976,31 +976,43 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd,
> struct scatterlist *out)
> {
> struct scatterlist *sgs[4], hdr, stat;
> - struct virtio_net_ctrl_hdr ctrl;
> - virtio_net_ctrl_ack status = ~0;
> +
> + struct {
> + struct virtio_net_ctrl_hdr ctrl;
> + virtio_net_ctrl_ack status;
> + } *buf;
> +
> unsigned out_num = 0, tmp;
> + bool ret;
>
> /* Caller should know better */
> BUG_ON(!virtio_has_feature(...
2018 Sep 05
0
[PATCH 03/11] UAPI: virtio_net: Fix use of C++ keywords as structural members
The virtio_net_ctrl_hdr struct uses a C++ keyword as structural members. Fix
this by inserting an anonymous union that provides an alternative name and
then hide the reserved name in C++.
Signed-off-by: David Howells <dhowells at redhat.com>
cc: "Michael S. Tsirkin" <mst at redhat.com>
cc: Jason Wa...
2018 Sep 06
0
[PATCH 03/11] UAPI: virtio_net: Fix use of C++ keywords as structural members [ver #2]
The virtio_net_ctrl_hdr struct uses a C++ keyword as structural members. Fix
this by inserting an anonymous union that provides an alternative name and
then hide the reserved name in C++.
Signed-off-by: David Howells <dhowells at redhat.com>
cc: "Michael S. Tsirkin" <mst at redhat.com>
cc: Jason Wa...
2018 Apr 19
1
[PATCH v2 net 1/3] virtio_net: split out ctrl buffer
.../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_node node;
struct hlist_node nod...
2015 Oct 28
0
[PATCH v3 1/3] virtio_net: Stop doing DMA from the stack
...et/virtio_net.c
index d8838dedb7a4..4f10f8a58811 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -976,31 +976,43 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd,
struct scatterlist *out)
{
struct scatterlist *sgs[4], hdr, stat;
- struct virtio_net_ctrl_hdr ctrl;
- virtio_net_ctrl_ack status = ~0;
+
+ struct {
+ struct virtio_net_ctrl_hdr ctrl;
+ virtio_net_ctrl_ack status;
+ } *buf;
+
unsigned out_num = 0, tmp;
+ bool ret;
/* Caller should know better */
BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ));
- ctrl.class = class;...
2015 Oct 28
0
[PATCH v3 1/3] virtio_net: Stop doing DMA from the stack
....4f10f8a58811 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -976,31 +976,43 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd,
> struct scatterlist *out)
> {
> struct scatterlist *sgs[4], hdr, stat;
> - struct virtio_net_ctrl_hdr ctrl;
> - virtio_net_ctrl_ack status = ~0;
> +
> + struct {
> + struct virtio_net_ctrl_hdr ctrl;
> + virtio_net_ctrl_ack status;
> + } *buf;
> +
> unsigned out_num = 0, tmp;
> + bool ret;
>
> /* Caller should know better */
> BUG_ON(!virtio_has_feature(...
2015 Oct 30
1
[PATCH v4 1/6] virtio-net: Stop doing DMA from the stack
...c b/drivers/net/virtio_net.c
index d8838dedb7a4..f94ab786088f 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -140,6 +140,12 @@ struct virtnet_info {
/* CPU hot plug notifier */
struct notifier_block nb;
+
+ /* Control VQ buffers: protected by the rtnl lock */
+ struct virtio_net_ctrl_hdr ctrl_hdr;
+ virtio_net_ctrl_ack ctrl_status;
+ u8 ctrl_promisc;
+ u8 ctrl_allmulti;
};
struct padded_vnet_hdr {
@@ -976,31 +982,30 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd,
struct scatterlist *out)
{
struct scatterlist *sgs[4], hdr, stat;
- struct v...
2018 Apr 19
3
[PATCH net] virtio_net: split out ctrl buffer
...t/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_node node;
struct hlist_node nod...
2015 Oct 30
0
[PATCH v4 1/6] virtio-net: Stop doing DMA from the stack
...7a4..f94ab786088f 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -140,6 +140,12 @@ struct virtnet_info {
>
> /* CPU hot plug notifier */
> struct notifier_block nb;
> +
> + /* Control VQ buffers: protected by the rtnl lock */
> + struct virtio_net_ctrl_hdr ctrl_hdr;
> + virtio_net_ctrl_ack ctrl_status;
> + u8 ctrl_promisc;
> + u8 ctrl_allmulti;
> };
>
> struct padded_vnet_hdr {
> @@ -976,31 +982,30 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd,
> struct scatterlist *out)
> {
>...
2013 Jan 10
8
[RFC PATCH 0/2] make mac programming for virtio net more robust
From: Amos Kong <akong at redhat.com>
Currenly mac is programmed byte by byte. This means that we
have an intermediate step where mac is wrong.
Second patch introduced a new vq control command to set mac
address in one time.
Amos Kong (2):
move virtnet_send_command() above virtnet_set_mac_address()
virtio-net: introduce a new control to set macaddr
drivers/net/virtio_net.c |
2013 Jan 10
8
[RFC PATCH 0/2] make mac programming for virtio net more robust
From: Amos Kong <akong at redhat.com>
Currenly mac is programmed byte by byte. This means that we
have an intermediate step where mac is wrong.
Second patch introduced a new vq control command to set mac
address in one time.
Amos Kong (2):
move virtnet_send_command() above virtnet_set_mac_address()
virtio-net: introduce a new control to set macaddr
drivers/net/virtio_net.c |
2013 Jan 17
2
[PATCH v3 0/2] make mac programming for virtio net more robust
From: Amos Kong <akong at redhat.com>
Currenly mac is programmed byte by byte. This means that we
have an intermediate step where mac is wrong.
Second patch introduced a new vq control command to set mac
address, it's atomic.
V2: check return of sending command, delay eth_mac_addr()
V3: restore software address when fail to set hardware address
Amos Kong (2):
move
2013 Jan 17
2
[PATCH v3 0/2] make mac programming for virtio net more robust
From: Amos Kong <akong at redhat.com>
Currenly mac is programmed byte by byte. This means that we
have an intermediate step where mac is wrong.
Second patch introduced a new vq control command to set mac
address, it's atomic.
V2: check return of sending command, delay eth_mac_addr()
V3: restore software address when fail to set hardware address
Amos Kong (2):
move
2013 Jan 20
3
[PATCH v4 0/3] make mac programming for virtio net more robust
From: Amos Kong <akong at redhat.com>
Currenly mac is programmed byte by byte. This means that we
have an intermediate step where mac is wrong.
Third patch introduced a new vq control command to set mac
address, it's atomic.
V2: check return of sending command, delay eth_mac_addr()
V3: restore software address when fail to set hardware address
V4: split eth_mac_addr, fix error handle
2013 Jan 20
3
[PATCH v4 0/3] make mac programming for virtio net more robust
From: Amos Kong <akong at redhat.com>
Currenly mac is programmed byte by byte. This means that we
have an intermediate step where mac is wrong.
Third patch introduced a new vq control command to set mac
address, it's atomic.
V2: check return of sending command, delay eth_mac_addr()
V3: restore software address when fail to set hardware address
V4: split eth_mac_addr, fix error handle