search for: virtnet_probe

Displaying 20 results from an estimated 593 matches for "virtnet_probe".

2018 May 31
0
[PATCH net-next] virtio_net: fix error return code in virtnet_probe()
...et/virtio_net.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 8f08a3e..2d55e2a 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -2935,8 +2935,10 @@ static int virtnet_probe(struct virtio_device *vdev) > > if (virtio_has_feature(vdev, VIRTIO_NET_F_STANDBY)) { > vi->failover = net_failover_create(vi->dev); > - if (IS_ERR(vi->failover)) > + if (IS_ERR(vi->failover)) { > + err = PTR_ERR(vi->failover); > goto free_vqs;...
2018 May 31
0
[PATCH net-next] virtio_net: fix error return code in virtnet_probe()
...et/virtio_net.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 8f08a3e..2d55e2a 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -2935,8 +2935,10 @@ static int virtnet_probe(struct virtio_device *vdev) > > if (virtio_has_feature(vdev, VIRTIO_NET_F_STANDBY)) { > vi->failover = net_failover_create(vi->dev); > - if (IS_ERR(vi->failover)) > + if (IS_ERR(vi->failover)) { > + err = PTR_ERR(vi->failover); > goto free_vqs; &gt...
2016 Oct 21
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...} > > > > +#define MIN_MTU ETH_MIN_MTU > > +#define MAX_MTU ETH_MAX_MTU > > + > > Can we drop these btw? Bah. Yeah. Should have just used them directly. I didn't add ETH_MAX_MTU until after doing the virtio_net changes, so I missed that. > > static int virtnet_probe(struct virtio_device *vdev) > > { > > int i, err; > > @@ -1821,6 +1812,10 @@ static int virtnet_probe(struct virtio_device *vdev) > > > > dev->vlan_features = dev->features; > > > > + /* MTU range: 68 - 65535 */ > > + dev->min_mtu =...
2016 Oct 21
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...} > > > > +#define MIN_MTU ETH_MIN_MTU > > +#define MAX_MTU ETH_MAX_MTU > > + > > Can we drop these btw? Bah. Yeah. Should have just used them directly. I didn't add ETH_MAX_MTU until after doing the virtio_net changes, so I missed that. > > static int virtnet_probe(struct virtio_device *vdev) > > { > > int i, err; > > @@ -1821,6 +1812,10 @@ static int virtnet_probe(struct virtio_device *vdev) > > > > dev->vlan_features = dev->features; > > > > + /* MTU range: 68 - 65535 */ > > + dev->min_mtu =...
2018 Jun 01
0
[PATCH net-next] virtio_net: fix error return code in virtnet_probe()
From: Wei Yongjun <weiyongjun1 at huawei.com> Date: Thu, 31 May 2018 02:05:07 +0000 > Fix to return a negative error code from the failover create fail error > handling case instead of 0, as done elsewhere in this function. > > Fixes: ba5e4426e80e ("virtio_net: Extend virtio to use VF datapath when available") > Signed-off-by: Wei Yongjun <weiyongjun1 at
2014 Nov 19
2
[PATCH net] virtio-net: validate features during probe
...ture 0x%x was advertised but its dependency 0x%x or 0x%x was not", >> + VIRTIO_NET_F_HOST_ECN, >> + VIRTIO_NET_F_HOST_TSO4, >> + VIRTIO_NET_F_HOST_TSO6); >> + return -EINVAL; >> + } >> + >> + return 0; >> +} >> + >> static int virtnet_probe(struct virtio_device *vdev) >> { >> int i, err; >> @@ -1680,6 +1769,10 @@ static int virtnet_probe(struct virtio_device *vdev) >> struct virtnet_info *vi; >> u16 max_queue_pairs; >> >> + err = virtnet_check_features(vdev); >> + if (err) >&...
2014 Nov 19
2
[PATCH net] virtio-net: validate features during probe
...ture 0x%x was advertised but its dependency 0x%x or 0x%x was not", >> + VIRTIO_NET_F_HOST_ECN, >> + VIRTIO_NET_F_HOST_TSO4, >> + VIRTIO_NET_F_HOST_TSO6); >> + return -EINVAL; >> + } >> + >> + return 0; >> +} >> + >> static int virtnet_probe(struct virtio_device *vdev) >> { >> int i, err; >> @@ -1680,6 +1769,10 @@ static int virtnet_probe(struct virtio_device *vdev) >> struct virtnet_info *vi; >> u16 max_queue_pairs; >> >> + err = virtnet_check_features(vdev); >> + if (err) >&...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...64 = virtnet_stats, .ndo_vlan_rx_add_vid = virtnet_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = virtnet_vlan_rx_kill_vid, @@ -1748,6 +1736,9 @@ static bool virtnet_validate_features(struct virtio_device *vdev) return true; } +#define MIN_MTU ETH_MIN_MTU +#define MAX_MTU 65535 + static int virtnet_probe(struct virtio_device *vdev) { int i, err; @@ -1821,6 +1812,10 @@ static int virtnet_probe(struct virtio_device *vdev) dev->vlan_features = dev->features; + /* MTU range: 68 - 65535 */ + dev->min_mtu = MIN_MTU; + dev->max_mtu = MAX_MTU; + /* Configuration may specify what MAC...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...64 = virtnet_stats, .ndo_vlan_rx_add_vid = virtnet_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = virtnet_vlan_rx_kill_vid, @@ -1748,6 +1736,9 @@ static bool virtnet_validate_features(struct virtio_device *vdev) return true; } +#define MIN_MTU ETH_MIN_MTU +#define MAX_MTU 65535 + static int virtnet_probe(struct virtio_device *vdev) { int i, err; @@ -1821,6 +1812,10 @@ static int virtnet_probe(struct virtio_device *vdev) dev->vlan_features = dev->features; + /* MTU range: 68 - 65535 */ + dev->min_mtu = MIN_MTU; + dev->max_mtu = MAX_MTU; + /* Configuration may specify what MAC...
2015 Jun 24
2
[RFC] virtio_net: Adding tx_timeout function.
...o_get_stats64 = virtnet_stats, .ndo_vlan_rx_add_vid = virtnet_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = virtnet_vlan_rx_kill_vid, + .ndo_tx_timeout = virtnet_tx_timeout, #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = virtnet_netpoll, #endif @@ -1750,6 +1766,7 @@ static int virtnet_probe(struct virtio_device *vdev) dev->netdev_ops = &virtnet_netdev; dev->features = NETIF_F_HIGHDMA; + dev->watchdog_timeo = 5 * HZ; dev->ethtool_ops = &virtnet_ethtool_ops; SET_NETDEV_DEV(dev, &vdev->dev); @@ -1811,6 +1828,7 @@ static int virtnet_probe(struct virt...
2015 Jun 24
2
[RFC] virtio_net: Adding tx_timeout function.
...o_get_stats64 = virtnet_stats, .ndo_vlan_rx_add_vid = virtnet_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = virtnet_vlan_rx_kill_vid, + .ndo_tx_timeout = virtnet_tx_timeout, #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = virtnet_netpoll, #endif @@ -1750,6 +1766,7 @@ static int virtnet_probe(struct virtio_device *vdev) dev->netdev_ops = &virtnet_netdev; dev->features = NETIF_F_HIGHDMA; + dev->watchdog_timeo = 5 * HZ; dev->ethtool_ops = &virtnet_ethtool_ops; SET_NETDEV_DEV(dev, &vdev->dev); @@ -1811,6 +1828,7 @@ static int virtnet_probe(struct virt...
2014 Nov 19
4
[PATCH net] virtio-net: validate features during probe
..., VIRTIO_NET_F_HOST_TSO6))) { + dev_err(&dev->dev, + "buggy hyperviser: feature 0x%x was advertised but its dependency 0x%x or 0x%x was not", + VIRTIO_NET_F_HOST_ECN, + VIRTIO_NET_F_HOST_TSO4, + VIRTIO_NET_F_HOST_TSO6); + return -EINVAL; + } + + return 0; +} + static int virtnet_probe(struct virtio_device *vdev) { int i, err; @@ -1680,6 +1769,10 @@ static int virtnet_probe(struct virtio_device *vdev) struct virtnet_info *vi; u16 max_queue_pairs; + err = virtnet_check_features(vdev); + if (err) + return -EINVAL; + /* Find if host supports multiqueue virtio_net device...
2014 Nov 19
4
[PATCH net] virtio-net: validate features during probe
..., VIRTIO_NET_F_HOST_TSO6))) { + dev_err(&dev->dev, + "buggy hyperviser: feature 0x%x was advertised but its dependency 0x%x or 0x%x was not", + VIRTIO_NET_F_HOST_ECN, + VIRTIO_NET_F_HOST_TSO4, + VIRTIO_NET_F_HOST_TSO6); + return -EINVAL; + } + + return 0; +} + static int virtnet_probe(struct virtio_device *vdev) { int i, err; @@ -1680,6 +1769,10 @@ static int virtnet_probe(struct virtio_device *vdev) struct virtnet_info *vi; u16 max_queue_pairs; + err = virtnet_check_features(vdev); + if (err) + return -EINVAL; + /* Find if host supports multiqueue virtio_net device...
2011 Aug 13
2
[PATCH] virtio-net: Read MAC only after initializing MSI-X
The MAC of a virtio-net device is located at the first field of the device specific header. This header is located at offset 20 if the device doesn't support MSI-X or offset 24 if it does. Current code in virtnet_probe() used to probe the MAC before checking for MSI-X, which means that the read was always made from offset 20 regardless of whether MSI-X in enabled or not. This patch moves the MAC probe to after the detection of whether MSI-X is enabled. This way the MAC will be read from offset 24 if the device i...
2011 Aug 13
2
[PATCH] virtio-net: Read MAC only after initializing MSI-X
The MAC of a virtio-net device is located at the first field of the device specific header. This header is located at offset 20 if the device doesn't support MSI-X or offset 24 if it does. Current code in virtnet_probe() used to probe the MAC before checking for MSI-X, which means that the read was always made from offset 20 regardless of whether MSI-X in enabled or not. This patch moves the MAC probe to after the detection of whether MSI-X is enabled. This way the MAC will be read from offset 24 if the device i...
2015 Jun 25
3
[RFC] virtio_net: Adding tx_timeout function.
..._rx_add_vid, > > .ndo_vlan_rx_kill_vid = virtnet_vlan_rx_kill_vid, > > + .ndo_tx_timeout = virtnet_tx_timeout, > > #ifdef CONFIG_NET_POLL_CONTROLLER > > .ndo_poll_controller = virtnet_netpoll, > > #endif > > @@ -1750,6 +1766,7 @@ static int virtnet_probe(struct virtio_device *vdev) > > dev->netdev_ops = &virtnet_netdev; > > dev->features = NETIF_F_HIGHDMA; > > > > + dev->watchdog_timeo = 5 * HZ; > > dev->ethtool_ops = &virtnet_ethtool_ops; > > SET_NETDEV_DEV(dev, &a...
2015 Jun 25
3
[RFC] virtio_net: Adding tx_timeout function.
..._rx_add_vid, > > .ndo_vlan_rx_kill_vid = virtnet_vlan_rx_kill_vid, > > + .ndo_tx_timeout = virtnet_tx_timeout, > > #ifdef CONFIG_NET_POLL_CONTROLLER > > .ndo_poll_controller = virtnet_netpoll, > > #endif > > @@ -1750,6 +1766,7 @@ static int virtnet_probe(struct virtio_device *vdev) > > dev->netdev_ops = &virtnet_netdev; > > dev->features = NETIF_F_HIGHDMA; > > > > + dev->watchdog_timeo = 5 * HZ; > > dev->ethtool_ops = &virtnet_ethtool_ops; > > SET_NETDEV_DEV(dev, &a...
2023 Jan 23
1
[PATCH v2 0/1] virtio_net: vdpa: update MAC address when it is generated by virtio-net
...a random one without notifying the device. The consequence, in the case of mlx5_vdpa, is the internal routing tables of the device are not updated and this can block the communication between two namespaces. To fix this problem, use virtnet_send_command(VIRTIO_NET_CTRL_MAC) to set the address from virtnet_probe() when the MAC address is not provided by the device. v2: - remove vdpa_sim related fixes - check virtio_has_feature(vdev, VIRTIO_NET_F_MAC) rather than addr_assign_type Laurent Vivier (1): virtio_net: notify MAC address change on device initialization drivers/net/virtio_net.c | 14 ++...
2016 Nov 25
7
[PATCH net-next] virtio-net: enable multiqueue by default
...redhat.com> --- drivers/net/virtio_net.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index d4ac7a6..a21d93a 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1886,8 +1886,11 @@ static int virtnet_probe(struct virtio_device *vdev) if (vi->any_header_sg) dev->needed_headroom = vi->hdr_len; - /* Use single tx/rx queue pair as default */ - vi->curr_queue_pairs = 1; + /* Enable multiqueue by default */ + if (num_online_cpus() >= max_queue_pairs) + vi->curr_queue_pairs = max_q...
2016 Nov 25
7
[PATCH net-next] virtio-net: enable multiqueue by default
...redhat.com> --- drivers/net/virtio_net.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index d4ac7a6..a21d93a 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1886,8 +1886,11 @@ static int virtnet_probe(struct virtio_device *vdev) if (vi->any_header_sg) dev->needed_headroom = vi->hdr_len; - /* Use single tx/rx queue pair as default */ - vi->curr_queue_pairs = 1; + /* Enable multiqueue by default */ + if (num_online_cpus() >= max_queue_pairs) + vi->curr_queue_pairs = max_q...