search for: virtnet_set_mac_address

Displaying 20 results from an estimated 107 matches for "virtnet_set_mac_address".

2016 Dec 06
3
[PATCH] virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address()
With CONFIG_VMAP_STACK=y, virtnet_set_mac_address() can be passed a pointer to the stack and it will OOPS. Copy the address to the heap to prevent the crash. Cc: Michael S. Tsirkin <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: Laura Abbott <labbott at redhat.com> Reported-by: zbyszek at in.waw.pl Signed-off-by...
2016 Dec 06
3
[PATCH] virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address()
With CONFIG_VMAP_STACK=y, virtnet_set_mac_address() can be passed a pointer to the stack and it will OOPS. Copy the address to the heap to prevent the crash. Cc: Michael S. Tsirkin <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: Laura Abbott <labbott at redhat.com> Reported-by: zbyszek at in.waw.pl Signed-off-by...
2014 Nov 27
2
[PATCH v6 34/46] virtio_net: disable mac write for virtio 1.0
The spec states that mac in config space is only driver-writable in the legacy case. Fence writing it in virtnet_set_mac_address() in the virtio 1.0 case. Suggested-by: Cornelia Huck <cornelia.huck at de.ibm.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/net/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_ne...
2014 Nov 27
2
[PATCH v6 34/46] virtio_net: disable mac write for virtio 1.0
The spec states that mac in config space is only driver-writable in the legacy case. Fence writing it in virtnet_set_mac_address() in the virtio 1.0 case. Suggested-by: Cornelia Huck <cornelia.huck at de.ibm.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/net/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_ne...
2023 Jan 27
1
[PATCH v2 1/1] virtio_net: notify MAC address change on device initialization
...t; > > > Here, I'm not sure we want to proceed. Is it useful sometimes? > > I think reporting an error is always useful, but I can remove that if you prefer. No the question was whether we should fail probe not whether we print the warning. > > I note that we deny with virtnet_set_mac_address. > > > > > + } > > > + } > > > + > > > return 0; > > > > > > > > Also, some code duplication with virtnet_set_mac_address here. > > > > Also: > > When using the legacy interface, \field{mac} is driver-writ...
2016 Dec 05
1
Oops with CONFIG_VMAP_STCK and bond device + virtio-net
...0000000135797000 CR4: 00000000000406e0 Stack: ffff9d50b229d000 0000000000000000 ffffb06e41043772 ffffb06e41043720 ffffffffc0051123 ffff9d50a3583240 0000000087654321 0000000000000002 0000000000000000 0000000000000000 0000000000000000 000000007b8f5301 Call Trace: [<ffffffffc0051123>] virtnet_set_mac_address+0xb3/0x140 [virtio_net] [<ffffffffbc7ae305>] dev_set_mac_address+0x55/0xc0 [<ffffffffc03f319e>] bond_enslave+0x34e/0x1180 [bonding] [<ffffffffbc7ca22f>] do_setlink+0x6cf/0xd10 [<ffffffffbc20dd6a>] ? get_page_from_freelist+0x6ba/0xca0 [<ffffffffbc037de9>] ? sc...
2016 Dec 05
1
Oops with CONFIG_VMAP_STCK and bond device + virtio-net
...0000000135797000 CR4: 00000000000406e0 Stack: ffff9d50b229d000 0000000000000000 ffffb06e41043772 ffffb06e41043720 ffffffffc0051123 ffff9d50a3583240 0000000087654321 0000000000000002 0000000000000000 0000000000000000 0000000000000000 000000007b8f5301 Call Trace: [<ffffffffc0051123>] virtnet_set_mac_address+0xb3/0x140 [virtio_net] [<ffffffffbc7ae305>] dev_set_mac_address+0x55/0xc0 [<ffffffffc03f319e>] bond_enslave+0x34e/0x1180 [bonding] [<ffffffffbc7ca22f>] do_setlink+0x6cf/0xd10 [<ffffffffbc20dd6a>] ? get_page_from_freelist+0x6ba/0xca0 [<ffffffffbc037de9>] ? sc...
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 | 105 ++++++++++++++++++++++------------------ include/uapi/linux/virtio_net.h | 8 ++- 2 files changed, 66 insertions(+), 47 deletions(-) -- 1.7.11.7
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 | 105 ++++++++++++++++++++++------------------ include/uapi/linux/virtio_net.h | 8 ++- 2 files changed, 66 insertions(+), 47 deletions(-) -- 1.7.11.7
2014 Nov 30
1
[PATCH v7 34/46] virtio_net: disable mac write for virtio 1.0
The spec states that mac in config space is only driver-writable in the legacy case. Fence writing it in virtnet_set_mac_address() in the virtio 1.0 case. Suggested-by: Cornelia Huck <cornelia.huck at de.ibm.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/net/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_ne...
2014 Nov 30
1
[PATCH v7 34/46] virtio_net: disable mac write for virtio 1.0
The spec states that mac in config space is only driver-writable in the legacy case. Fence writing it in virtnet_set_mac_address() in the virtio 1.0 case. Suggested-by: Cornelia Huck <cornelia.huck at de.ibm.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/net/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_ne...
2013 Jan 17
2
[PATCH v3 0/2] make mac programming for virtio net more robust
...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 virtnet_send_command() above virtnet_set_mac_address() virtio-net: introduce a new control to set macaddr drivers/net/virtio_net.c | 110 +++++++++++++++++++++++----------------- include/uapi/linux/virtio_net.h | 8 ++- 2 files changed, 71 insertions(+), 47 deletions(-) -- 1.7.11.7
2013 Jan 17
2
[PATCH v3 0/2] make mac programming for virtio net more robust
...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 virtnet_send_command() above virtnet_set_mac_address() virtio-net: introduce a new control to set macaddr drivers/net/virtio_net.c | 110 +++++++++++++++++++++++----------------- include/uapi/linux/virtio_net.h | 8 ++- 2 files changed, 71 insertions(+), 47 deletions(-) -- 1.7.11.7
2011 Jun 15
3
[PATCH] virtio-net: per cpu 64 bit stats
...v->stats.tx_packets++; + + u64_stats_update_begin(&stats->syncp); + stats->tx_bytes += skb->len; + stats->tx_packets++; + u64_stats_update_begin(&stats->syncp); + tot_sgs += skb_vnet_hdr(skb)->num_sg; dev_kfree_skb_any(skb); } @@ -641,6 +662,40 @@ static int virtnet_set_mac_address(struc return 0; } +static struct rtnl_link_stats64 *virtnet_stats(struct net_device *dev, + struct rtnl_link_stats64 *tot) +{ + struct virtnet_info *vi = netdev_priv(dev); + int cpu; + unsigned int start; + + for_each_possible_cpu(cpu) { + struct virtnet_stats __percpu *stats + =...
2011 Jun 15
3
[PATCH] virtio-net: per cpu 64 bit stats
...v->stats.tx_packets++; + + u64_stats_update_begin(&stats->syncp); + stats->tx_bytes += skb->len; + stats->tx_packets++; + u64_stats_update_begin(&stats->syncp); + tot_sgs += skb_vnet_hdr(skb)->num_sg; dev_kfree_skb_any(skb); } @@ -641,6 +662,40 @@ static int virtnet_set_mac_address(struc return 0; } +static struct rtnl_link_stats64 *virtnet_stats(struct net_device *dev, + struct rtnl_link_stats64 *tot) +{ + struct virtnet_info *vi = netdev_priv(dev); + int cpu; + unsigned int start; + + for_each_possible_cpu(cpu) { + struct virtnet_stats __percpu *stats + =...
2013 Jan 16
6
[PATCH v2 0/2] make mac programming for virtio net more robust
...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. V2: check return of sending command, delay eth_mac_addr() 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 | 113 ++++++++++++++++++++++------------------ include/uapi/linux/virtio_net.h | 8 ++- 2 files changed, 68 insertions(+), 53 deletions(-) -- 1.7.11.7
2013 Jan 16
6
[PATCH v2 0/2] make mac programming for virtio net more robust
...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. V2: check return of sending command, delay eth_mac_addr() 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 | 113 ++++++++++++++++++++++------------------ include/uapi/linux/virtio_net.h | 8 ++- 2 files changed, 68 insertions(+), 53 deletions(-) -- 1.7.11.7
2013 Jan 20
3
[PATCH v4 0/3] make mac programming for virtio net more robust
...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 Amos Kong (2): move virtnet_send_command() above virtnet_set_mac_address() virtio-net: introduce a new control to set macaddr Stefan Hajnoczi (1): net: split eth_mac_addr for better error handling drivers/net/virtio_net.c | 110 ++++++++++++++++++++++------------------ include/linux/etherdevice.h | 2 + include/uapi/linux/virtio_net.h | 8 ++- net/...
2013 Jan 20
3
[PATCH v4 0/3] make mac programming for virtio net more robust
...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 Amos Kong (2): move virtnet_send_command() above virtnet_set_mac_address() virtio-net: introduce a new control to set macaddr Stefan Hajnoczi (1): net: split eth_mac_addr for better error handling drivers/net/virtio_net.c | 110 ++++++++++++++++++++++------------------ include/linux/etherdevice.h | 2 + include/uapi/linux/virtio_net.h | 8 ++- net/...
2013 Jan 21
4
[PATCH v5 0/3] make mac programming for virtio net more robust
...rol 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 V5: rebase patches to net-next tree Amos Kong (2): move virtnet_send_command() above virtnet_set_mac_address() virtio-net: introduce a new control to set macaddr Stefan Hajnoczi (1): net: split eth_mac_addr for better error handling drivers/net/virtio_net.c | 110 ++++++++++++++++++++++----------------- include/linux/etherdevice.h | 2 + include/uapi/linux/virtio_net.h | 8 +++- n...