search for: virtnet_init_settings

Displaying 20 results from an estimated 47 matches for "virtnet_init_settings".

2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...ed; + vi->duplex = cmd->duplex; + + return 0; +} + +static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct virtnet_info *vi = netdev_priv(dev); + + ethtool_cmd_speed_set(cmd, vi->speed); + cmd->duplex = vi->duplex; + + return 0; +} + +static void virtnet_init_settings(struct net_device *dev) +{ + struct virtnet_info *vi = netdev_priv(dev); + + vi->speed = SPEED_UNKNOWN; + vi->duplex = DUPLEX_UNKNOWN; +} + static const struct ethtool_ops virtnet_ethtool_ops = { .get_drvinfo = virtnet_get_drvinfo, .get_link = ethtool_op_get_link, @@ -1383,6 +1453,8 @@ s...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...ed; + vi->duplex = cmd->duplex; + + return 0; +} + +static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct virtnet_info *vi = netdev_priv(dev); + + ethtool_cmd_speed_set(cmd, vi->speed); + cmd->duplex = vi->duplex; + + return 0; +} + +static void virtnet_init_settings(struct net_device *dev) +{ + struct virtnet_info *vi = netdev_priv(dev); + + vi->speed = SPEED_UNKNOWN; + vi->duplex = DUPLEX_UNKNOWN; +} + static const struct ethtool_ops virtnet_ethtool_ops = { .get_drvinfo = virtnet_get_drvinfo, .get_link = ethtool_op_get_link, @@ -1383,6 +1453,8 @@ s...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...struct net_device *dev, struct ethtool_cmd *cmd) >> +{ >> + struct virtnet_info *vi = netdev_priv(dev); >> + >> + ethtool_cmd_speed_set(cmd, vi->speed); >> + cmd->duplex = vi->duplex; >> + >> + return 0; >> +} >> + >> +static void virtnet_init_settings(struct net_device *dev) >> +{ >> + struct virtnet_info *vi = netdev_priv(dev); >> + >> + vi->speed = SPEED_UNKNOWN; >> + vi->duplex = DUPLEX_UNKNOWN; >> +} >> + >> static const struct ethtool_ops virtnet_ethtool_ops = { >> .get_drvinfo...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...struct net_device *dev, struct ethtool_cmd *cmd) >> +{ >> + struct virtnet_info *vi = netdev_priv(dev); >> + >> + ethtool_cmd_speed_set(cmd, vi->speed); >> + cmd->duplex = vi->duplex; >> + >> + return 0; >> +} >> + >> +static void virtnet_init_settings(struct net_device *dev) >> +{ >> + struct virtnet_info *vi = netdev_priv(dev); >> + >> + vi->speed = SPEED_UNKNOWN; >> + vi->duplex = DUPLEX_UNKNOWN; >> +} >> + >> static const struct ethtool_ops virtnet_ethtool_ops = { >> .get_drvinfo...
2016 Feb 02
0
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...+ > +static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) > +{ > + struct virtnet_info *vi = netdev_priv(dev); > + > + ethtool_cmd_speed_set(cmd, vi->speed); > + cmd->duplex = vi->duplex; > + > + return 0; > +} > + > +static void virtnet_init_settings(struct net_device *dev) > +{ > + struct virtnet_info *vi = netdev_priv(dev); > + > + vi->speed = SPEED_UNKNOWN; > + vi->duplex = DUPLEX_UNKNOWN; > +} > + > static const struct ethtool_ops virtnet_ethtool_ops = { > .get_drvinfo = virtnet_get_drvinfo, > .get_l...
2018 Sep 13
5
[PATCH net-next V2] virtio_net: ethtool tx napi configuration
...cmd = ETHTOOL_GCOALESCE, + .rx_max_coalesced_frames = 1, + .tx_max_coalesced_frames = 0, + }; + struct virtnet_info *vi = netdev_priv(dev); + + memcpy(ec, &ec_default, sizeof(ec_default)); + + if (vi->sq[0].napi.weight) + ec->tx_max_coalesced_frames = 1; + + return 0; +} + static void virtnet_init_settings(struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -2219,6 +2279,8 @@ static const struct ethtool_ops virtnet_ethtool_ops = { .get_ts_info = ethtool_op_get_ts_info, .get_link_ksettings = virtnet_get_link_ksettings, .set_link_ksettings = virtnet_set_link_ksettings, + ....
2018 Sep 13
5
[PATCH net-next V2] virtio_net: ethtool tx napi configuration
...cmd = ETHTOOL_GCOALESCE, + .rx_max_coalesced_frames = 1, + .tx_max_coalesced_frames = 0, + }; + struct virtnet_info *vi = netdev_priv(dev); + + memcpy(ec, &ec_default, sizeof(ec_default)); + + if (vi->sq[0].napi.weight) + ec->tx_max_coalesced_frames = 1; + + return 0; +} + static void virtnet_init_settings(struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -2219,6 +2279,8 @@ static const struct ethtool_ops virtnet_ethtool_ops = { .get_ts_info = ethtool_op_get_ts_info, .get_link_ksettings = virtnet_get_link_ksettings, .set_link_ksettings = virtnet_set_link_ksettings, + ....
2019 Feb 28
2
[virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)
...bool, 0444); > module_param(napi_tx, bool, 0644); > +module_param(disable_failover, bool, 0644); > > /* FIXME: MTU in config. */ > #define GOOD_PACKET_LEN (ETH_HLEN + VLAN_HLEN + ETH_DATA_LEN) > @@ -3163,6 +3164,7 @@ static int virtnet_probe(struct virtio_device *vdev) > virtnet_init_settings(dev); > > - if (virtio_has_feature(vdev, VIRTIO_NET_F_STANDBY)) { > + if (virtio_has_feature(vdev, VIRTIO_NET_F_STANDBY) && > + !disable_failover) { > vi->failover = net_failover_create(vi->dev); > if (IS_ERR(vi->failover)) { > err = PTR_ERR(vi-&gt...
2019 Feb 28
2
[virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)
On Wed, 27 Feb 2019 20:26:02 -0500, Michael S. Tsirkin wrote: > On Wed, Feb 27, 2019 at 04:52:05PM -0800, Jakub Kicinski wrote: > > On Wed, 27 Feb 2019 19:41:32 -0500, Michael S. Tsirkin wrote: > > > > As this scheme adds much complexity to the kernel naming convention > > > > (currently it's just ethX names) that no userspace can understand. > >
2017 Dec 22
6
[PATCH 2/3] qemu: use 64-bit values for feature flags in virtio-net
In prepartion for using some of the high order feature bits, make sure that virtio-net uses 64-bit values everywhere. Signed-off-by: Jason Baron <jbaron at akamai.com> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> --- hw/net/virtio-net.c | 54 +++++++++++++++++++++--------------------- include/hw/virtio/virtio-net.h |
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
...1917 #ifdef CONFIG_SYSFS 1918 if (vi->mergeable_rx_bufs) 1919 dev->sysfs_rx_queue_group = &virtio_net_mrg_rx_group; 1920 #endif 1921 netif_set_real_num_tx_queues(dev, vi->curr_queue_pairs); 1922 netif_set_real_num_rx_queues(dev, vi->curr_queue_pairs); 1923 1924 virtnet_init_settings(dev); 1925 1926 err = register_netdev(dev); 1927 if (err) { 1928 pr_debug("virtio_net: registering device failed\n"); 1929 goto free_vqs; 1930 } 1931 1932 virtio_device_ready(vdev); 1933 1934 vi->nb.notifier_call = &virtnet_cpu_callback; 1935 err...
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
...1917 #ifdef CONFIG_SYSFS 1918 if (vi->mergeable_rx_bufs) 1919 dev->sysfs_rx_queue_group = &virtio_net_mrg_rx_group; 1920 #endif 1921 netif_set_real_num_tx_queues(dev, vi->curr_queue_pairs); 1922 netif_set_real_num_rx_queues(dev, vi->curr_queue_pairs); 1923 1924 virtnet_init_settings(dev); 1925 1926 err = register_netdev(dev); 1927 if (err) { 1928 pr_debug("virtio_net: registering device failed\n"); 1929 goto free_vqs; 1930 } 1931 1932 virtio_device_ready(vdev); 1933 1934 vi->nb.notifier_call = &virtnet_cpu_callback; 1935 err...
2017 Mar 21
0
[PATCH] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
..._info *vi = netdev_priv(dev); - ethtool_cmd_speed_set(cmd, vi->speed); - cmd->duplex = vi->duplex; - cmd->port = PORT_OTHER; + cmd->base.speed = vi->speed; + cmd->base.duplex = vi->duplex; + cmd->base.port = PORT_OTHER; return 0; } @@ -1696,8 +1706,8 @@ static void virtnet_init_settings(struct net_device *dev) .set_channels = virtnet_set_channels, .get_channels = virtnet_get_channels, .get_ts_info = ethtool_op_get_ts_info, - .get_settings = virtnet_get_settings, - .set_settings = virtnet_set_settings, + .get_link_ksettings = virtnet_get_link_ksettings, + .set_link_ksettings...
2017 Mar 21
0
[PATCH] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
..._info *vi = netdev_priv(dev); - ethtool_cmd_speed_set(cmd, vi->speed); - cmd->duplex = vi->duplex; - cmd->port = PORT_OTHER; + cmd->base.speed = vi->speed; + cmd->base.duplex = vi->duplex; + cmd->base.port = PORT_OTHER; return 0; } @@ -1696,8 +1706,8 @@ static void virtnet_init_settings(struct net_device *dev) .set_channels = virtnet_set_channels, .get_channels = virtnet_get_channels, .get_ts_info = ethtool_op_get_ts_info, - .get_settings = virtnet_get_settings, - .set_settings = virtnet_set_settings, + .get_link_ksettings = virtnet_get_link_ksettings, + .set_link_ksettings...
2018 Jan 05
0
[PATCH net-next v4 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...+++- include/uapi/linux/virtio_net.h | 13 +++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 6fb7b65..4f27508 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1894,6 +1894,24 @@ static void virtnet_init_settings(struct net_device *dev) vi->duplex = DUPLEX_UNKNOWN; } +static void virtnet_update_settings(struct virtnet_info *vi) +{ + u32 speed; + u8 duplex; + + if (!virtio_has_feature(vi->vdev, VIRTIO_NET_F_SPEED_DUPLEX)) + return; + + speed = virtio_cread32(vi->vdev, offsetof(struct virtio_ne...
2017 Mar 21
1
[PATCH 2] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
..._info *vi = netdev_priv(dev); - ethtool_cmd_speed_set(cmd, vi->speed); - cmd->duplex = vi->duplex; - cmd->port = PORT_OTHER; + cmd->base.speed = vi->speed; + cmd->base.duplex = vi->duplex; + cmd->base.port = PORT_OTHER; return 0; } @@ -1696,8 +1706,8 @@ static void virtnet_init_settings(struct net_device *dev) .set_channels = virtnet_set_channels, .get_channels = virtnet_get_channels, .get_ts_info = ethtool_op_get_ts_info, - .get_settings = virtnet_get_settings, - .set_settings = virtnet_set_settings, + .get_link_ksettings = virtnet_get_link_ksettings, + .set_link_ksettings...
2017 Mar 21
1
[PATCH 2] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
..._info *vi = netdev_priv(dev); - ethtool_cmd_speed_set(cmd, vi->speed); - cmd->duplex = vi->duplex; - cmd->port = PORT_OTHER; + cmd->base.speed = vi->speed; + cmd->base.duplex = vi->duplex; + cmd->base.port = PORT_OTHER; return 0; } @@ -1696,8 +1706,8 @@ static void virtnet_init_settings(struct net_device *dev) .set_channels = virtnet_set_channels, .get_channels = virtnet_get_channels, .get_ts_info = ethtool_op_get_ts_info, - .get_settings = virtnet_get_settings, - .set_settings = virtnet_set_settings, + .get_link_ksettings = virtnet_get_link_ksettings, + .set_link_ksettings...
2017 Dec 22
1
[PATCH net-next v2 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 511f833..4168d82 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2621,6 +2621,20 @@ static int virtnet_probe(struct virtio_device *vdev) netif_set_real_num_rx_queues(dev, vi->curr_queue_pairs); virtnet_init_settings(dev); + if (virtio_has_feature(vdev, VIRTIO_NET_F_SPEED_DUPLEX)) { + u32 speed; + u8 duplex; + + speed = virtio_cread32(vdev, offsetof(struct virtio_net_config, + speed)); + if (ethtool_validate_speed(speed)) + vi->speed = speed; + duplex = virtio_cread8(vdev, + offset...
2019 Feb 28
0
[virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)
...m, bool, 0444); module_param(gso, bool, 0444); module_param(napi_tx, bool, 0644); +module_param(disable_failover, bool, 0644); /* FIXME: MTU in config. */ #define GOOD_PACKET_LEN (ETH_HLEN + VLAN_HLEN + ETH_DATA_LEN) @@ -3163,6 +3164,7 @@ static int virtnet_probe(struct virtio_device *vdev) virtnet_init_settings(dev); - if (virtio_has_feature(vdev, VIRTIO_NET_F_STANDBY)) { + if (virtio_has_feature(vdev, VIRTIO_NET_F_STANDBY) && + !disable_failover) { vi->failover = net_failover_create(vi->dev); if (IS_ERR(vi->failover)) { err = PTR_ERR(vi->failover);
2018 Sep 13
0
[PATCH net-next V2] virtio_net: ethtool tx napi configuration
...}; > + struct virtnet_info *vi = netdev_priv(dev); > + > + memcpy(ec, &ec_default, sizeof(ec_default)); > + > + if (vi->sq[0].napi.weight) > + ec->tx_max_coalesced_frames = 1; > + > + return 0; > +} > + > static void virtnet_init_settings(struct net_device *dev) > { > struct virtnet_info *vi = netdev_priv(dev); > @@ -2219,6 +2279,8 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > .get_ts_info = ethtool_op_get_ts_info, > .get_link_ksettings = virtnet_get_link_ksettings, >...