search for: duplex_unknown

Displaying 20 results from an estimated 38 matches for "duplex_unknown".

2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...se SPEED_10000: + case SPEED_20000: + case SPEED_25000: + case SPEED_40000: + case SPEED_50000: + case SPEED_56000: + case SPEED_100000: + case SPEED_UNKNOWN: + return true; + } + + return false; +} + +static bool virtnet_validate_duplex(u8 duplex) +{ + switch (duplex) { + case DUPLEX_FULL: + case DUPLEX_UNKNOWN: + return true; + } + + return false; +} + +static int virtnet_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct virtnet_info *vi = netdev_priv(dev); + u32 speed = ethtool_cmd_speed(cmd); + + /* don't allow custom speed and duplex */ + if (!virtnet_validate_speed(speed)...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...se SPEED_10000: + case SPEED_20000: + case SPEED_25000: + case SPEED_40000: + case SPEED_50000: + case SPEED_56000: + case SPEED_100000: + case SPEED_UNKNOWN: + return true; + } + + return false; +} + +static bool virtnet_validate_duplex(u8 duplex) +{ + switch (duplex) { + case DUPLEX_FULL: + case DUPLEX_UNKNOWN: + return true; + } + + return false; +} + +static int virtnet_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct virtnet_info *vi = netdev_priv(dev); + u32 speed = ethtool_cmd_speed(cmd); + + /* don't allow custom speed and duplex */ + if (!virtnet_validate_speed(speed)...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...gt;> + case SPEED_100000: >> + case SPEED_UNKNOWN: >> + return true; >> + } >> + >> + return false; >> +} >> + >> +static bool virtnet_validate_duplex(u8 duplex) >> +{ >> + switch (duplex) { >> + case DUPLEX_FULL: >> + case DUPLEX_UNKNOWN: >> + return true; >> + } >> + >> + return false; >> +} > > Let's put the validating functions near where the > enums are defined so people remember to extend these > when adding new speeds? > Will help e.g. tun reuse this, too. > Right, very...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...gt;> + case SPEED_100000: >> + case SPEED_UNKNOWN: >> + return true; >> + } >> + >> + return false; >> +} >> + >> +static bool virtnet_validate_duplex(u8 duplex) >> +{ >> + switch (duplex) { >> + case DUPLEX_FULL: >> + case DUPLEX_UNKNOWN: >> + return true; >> + } >> + >> + return false; >> +} > > Let's put the validating functions near where the > enums are defined so people remember to extend these > when adding new speeds? > Will help e.g. tun reuse this, too. > Right, very...
2018 Jan 05
5
[PATCH v4 0/3] virtio_net: allow hypervisor to indicate linkspeed and duplex setting
We have found it useful to be able to set the linkspeed and duplex settings from the host-side for virtio_net. This obviates the need for guest changes and settings for these fields, and does not require custom ethtool commands for virtio_net. The ability to set linkspeed and duplex is useful in various cases as described here: 16032be virtio_net: add ethtool support for set and get of settings
2016 Feb 02
0
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...> + case SPEED_50000: > + case SPEED_56000: > + case SPEED_100000: > + case SPEED_UNKNOWN: > + return true; > + } > + > + return false; > +} > + > +static bool virtnet_validate_duplex(u8 duplex) > +{ > + switch (duplex) { > + case DUPLEX_FULL: > + case DUPLEX_UNKNOWN: > + return true; > + } > + > + return false; > +} Let's put the validating functions near where the enums are defined so people remember to extend these when adding new speeds? Will help e.g. tun reuse this, too. > + > +static int virtnet_set_settings(struct net_device...
2018 Jan 05
0
[PATCH v4 3/3] qemu: add linkspeed and duplex settings to virtio-net
...b/hw/net/virtio-net.c index 54823af..cd63659 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -40,6 +40,12 @@ #define VIRTIO_NET_RX_QUEUE_MIN_SIZE VIRTIO_NET_RX_QUEUE_DEFAULT_SIZE #define VIRTIO_NET_TX_QUEUE_MIN_SIZE VIRTIO_NET_TX_QUEUE_DEFAULT_SIZE +/* duplex and speed */ +#define DUPLEX_UNKNOWN 0xff +#define DUPLEX_HALF 0x00 +#define DUPLEX_FULL 0x01 +#define SPEED_UNKNOWN -1 + /* * Calculate the number of bytes up to and including the given 'field' of * 'container'. @@ -61,6 +67,8 @@ static VirtIOFeature feature_sizes[] = {...
2018 Jan 04
5
[PATCH v3 0/3] virtio_net: allow hypervisor to indicate linkspeed and duplex setting
We have found it useful to be able to set the linkspeed and duplex settings from the host-side for virtio_net. This obviates the need for guest changes and settings for these fields, and does not require custom ethtool commands for virtio_net. The ability to set linkspeed and duplex is useful in various cases as described here: 16032be virtio_net: add ethtool support for set and get of settings
2018 Jan 05
0
[PATCH net-next v4 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...s 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_net_config, + speed)); + if (ethtool_validate_speed(...
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 |
2018 Apr 06
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...= rtnl_dereference(vbi->active_netdev); >> + if (!child_netdev || !virtnet_bypass_xmit_ready(child_netdev)) { >> + child_netdev = rtnl_dereference(vbi->backup_netdev); >> + if (!child_netdev || !virtnet_bypass_xmit_ready(child_netdev)) { >> + cmd->base.duplex = DUPLEX_UNKNOWN; >> + cmd->base.port = PORT_OTHER; >> + cmd->base.speed = SPEED_UNKNOWN; >> + >> + return 0; >> + } >> + } >> + >> + return __ethtool_get_link_ksettings(child_netdev, cmd); >> +} >> + >> +#define BYPASS_DRV_NAME "vi...
2016 Jan 29
5
bonding (IEEE 802.3ad) not working with qemu/virtio
On 01/29/2016 10:45 PM, Jay Vosburgh wrote: > Nikolay Aleksandrov <nikolay at cumulusnetworks.com> wrote: > >> On 01/25/2016 05:24 PM, Bj?rnar Ness wrote: >>> As subject says, 802.3ad bonding is not working with virtio network model. >>> >>> The only errors I see is: >>> >>> No 802.3ad response from the link partner for any adapters
2016 Jan 29
5
bonding (IEEE 802.3ad) not working with qemu/virtio
On 01/29/2016 10:45 PM, Jay Vosburgh wrote: > Nikolay Aleksandrov <nikolay at cumulusnetworks.com> wrote: > >> On 01/25/2016 05:24 PM, Bj?rnar Ness wrote: >>> As subject says, 802.3ad bonding is not working with virtio network model. >>> >>> The only errors I see is: >>> >>> No 802.3ad response from the link partner for any adapters
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...+ >+ child_netdev = rtnl_dereference(vbi->active_netdev); >+ if (!child_netdev || !virtnet_bypass_xmit_ready(child_netdev)) { >+ child_netdev = rtnl_dereference(vbi->backup_netdev); >+ if (!child_netdev || !virtnet_bypass_xmit_ready(child_netdev)) { >+ cmd->base.duplex = DUPLEX_UNKNOWN; >+ cmd->base.port = PORT_OTHER; >+ cmd->base.speed = SPEED_UNKNOWN; >+ >+ return 0; >+ } >+ } >+ >+ return __ethtool_get_link_ksettings(child_netdev, cmd); >+} >+ >+#define BYPASS_DRV_NAME "virtnet_bypass" >+#define BYPASS_DRV_VERSION &quo...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...+ >+ child_netdev = rtnl_dereference(vbi->active_netdev); >+ if (!child_netdev || !virtnet_bypass_xmit_ready(child_netdev)) { >+ child_netdev = rtnl_dereference(vbi->backup_netdev); >+ if (!child_netdev || !virtnet_bypass_xmit_ready(child_netdev)) { >+ cmd->base.duplex = DUPLEX_UNKNOWN; >+ cmd->base.port = PORT_OTHER; >+ cmd->base.speed = SPEED_UNKNOWN; >+ >+ return 0; >+ } >+ } >+ >+ return __ethtool_get_link_ksettings(child_netdev, cmd); >+} >+ >+#define BYPASS_DRV_NAME "virtnet_bypass" >+#define BYPASS_DRV_VERSION &quo...
2018 Feb 16
0
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...vice *child_netdev; + + child_netdev = rtnl_dereference(vbi->active_netdev); + if (!child_netdev || !virtnet_bypass_xmit_ready(child_netdev)) { + child_netdev = rtnl_dereference(vbi->backup_netdev); + if (!child_netdev || !virtnet_bypass_xmit_ready(child_netdev)) { + cmd->base.duplex = DUPLEX_UNKNOWN; + cmd->base.port = PORT_OTHER; + cmd->base.speed = SPEED_UNKNOWN; + + return 0; + } + } + + return __ethtool_get_link_ksettings(child_netdev, cmd); +} + +#define BYPASS_DRV_NAME "virtnet_bypass" +#define BYPASS_DRV_VERSION "0.1" + +static void +virtnet_bypass_ethto...
2018 Apr 05
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...vice *child_netdev; + + child_netdev = rtnl_dereference(vbi->active_netdev); + if (!child_netdev || !virtnet_bypass_xmit_ready(child_netdev)) { + child_netdev = rtnl_dereference(vbi->backup_netdev); + if (!child_netdev || !virtnet_bypass_xmit_ready(child_netdev)) { + cmd->base.duplex = DUPLEX_UNKNOWN; + cmd->base.port = PORT_OTHER; + cmd->base.speed = SPEED_UNKNOWN; + + return 0; + } + } + + return __ethtool_get_link_ksettings(child_netdev, cmd); +} + +#define BYPASS_DRV_NAME "virtnet_bypass" +#define BYPASS_DRV_VERSION "0.1" + +static void virtnet_bypass_ethtoo...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
..._device *slave_dev; > + > + slave_dev = rtnl_dereference(finfo->primary_dev); > + if (!slave_dev || !failover_xmit_ready(slave_dev)) { > + slave_dev = rtnl_dereference(finfo->standby_dev); > + if (!slave_dev || !failover_xmit_ready(slave_dev)) { > + cmd->base.duplex = DUPLEX_UNKNOWN; > + cmd->base.port = PORT_OTHER; > + cmd->base.speed = SPEED_UNKNOWN; > + > + return 0; > + } > + } > + > + return __ethtool_get_link_ksettings(slave_dev, cmd); > +} > +EXPORT_SYMBOL_GPL(failover_ethtool_get_link_ksettings); > + > +static const stru...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
..._device *slave_dev; > + > + slave_dev = rtnl_dereference(finfo->primary_dev); > + if (!slave_dev || !failover_xmit_ready(slave_dev)) { > + slave_dev = rtnl_dereference(finfo->standby_dev); > + if (!slave_dev || !failover_xmit_ready(slave_dev)) { > + cmd->base.duplex = DUPLEX_UNKNOWN; > + cmd->base.port = PORT_OTHER; > + cmd->base.speed = SPEED_UNKNOWN; > + > + return 0; > + } > + } > + > + return __ethtool_get_link_ksettings(slave_dev, cmd); > +} > +EXPORT_SYMBOL_GPL(failover_ethtool_get_link_ksettings); > + > +static const stru...
2018 Apr 11
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...slave_netdev; >+ >+ slave_netdev = rtnl_dereference(bi->active_netdev); >+ if (!slave_netdev || !bypass_xmit_ready(slave_netdev)) { >+ slave_netdev = rtnl_dereference(bi->backup_netdev); >+ if (!slave_netdev || !bypass_xmit_ready(slave_netdev)) { >+ cmd->base.duplex = DUPLEX_UNKNOWN; >+ cmd->base.port = PORT_OTHER; >+ cmd->base.speed = SPEED_UNKNOWN; >+ >+ return 0; >+ } >+ } >+ >+ return __ethtool_get_link_ksettings(slave_netdev, cmd); >+} >+EXPORT_SYMBOL_GPL(bypass_ethtool_get_link_ksettings); >+ >+static const struct ethtool_...