search for: set_set

Displaying 20 results from an estimated 27 matches for "set_set".

Did you mean: set_seq
2016 Jan 29
5
bonding (IEEE 802.3ad) not working with qemu/virtio
...> Should virtio instead provide an arbitrary speed and full duplex > to ethtool, as veth does? > > Creating a magic whitelist of devices deep inside the 802.3ad > implementation seems less desirable. > TBH, I absolutely agree. In fact here's what we've been doing: add set_settings which allows the user to set any speed/duplex and get_settings of course to retrieve that. This is also useful for testing other stuff that requires speed and duplex, not only for the bonding case. I'll add the virtio_net maintainers to the discussion, see if it's okay with everyone a...
2016 Jan 29
5
bonding (IEEE 802.3ad) not working with qemu/virtio
...> Should virtio instead provide an arbitrary speed and full duplex > to ethtool, as veth does? > > Creating a magic whitelist of devices deep inside the 802.3ad > implementation seems less desirable. > TBH, I absolutely agree. In fact here's what we've been doing: add set_settings which allows the user to set any speed/duplex and get_settings of course to retrieve that. This is also useful for testing other stuff that requires speed and duplex, not only for the bonding case. I'll add the virtio_net maintainers to the discussion, see if it's okay with everyone a...
2016 Oct 21
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...> > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index fad84f3..720809f 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > .set_settings = virtnet_set_settings, > > }; > > > > -#define MIN_MTU 68 > > -#define MAX_MTU 65535 > > - > > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > > -{ > > - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > > - ret...
2016 Oct 21
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...> > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index fad84f3..720809f 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > .set_settings = virtnet_set_settings, > > }; > > > > -#define MIN_MTU 68 > > -#define MAX_MTU 65535 > > - > > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > > -{ > > - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > > - ret...
2016 Oct 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...> > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index fad84f3..4885a42 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > .set_settings = virtnet_set_settings, > > }; > > > > -#define MIN_MTU 68 > > -#define MAX_MTU 65535 > > - > > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > > -{ > > - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > > - ret...
2016 Oct 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...> > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index fad84f3..4885a42 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > .set_settings = virtnet_set_settings, > > }; > > > > -#define MIN_MTU 68 > > -#define MAX_MTU 65535 > > - > > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > > -{ > > - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > > - ret...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...c_init_settings(net); net_device_ctx = netdev_priv(net); diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index fad84f3..4885a42 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { .set_settings = virtnet_set_settings, }; -#define MIN_MTU 68 -#define MAX_MTU 65535 - -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) -{ - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) - return -EINVAL; - dev->mtu = new_mtu; - return 0; -} - static const struct net_device_ops...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...c_init_settings(net); net_device_ctx = netdev_priv(net); diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index fad84f3..4885a42 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { .set_settings = virtnet_set_settings, }; -#define MIN_MTU 68 -#define MAX_MTU 65535 - -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) -{ - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) - return -EINVAL; - dev->mtu = new_mtu; - return 0; -} - static const struct net_device_ops...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...ase 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) || + !virtnet_validate_duplex(cmd->duplex)) + return -EINVAL; +...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...ase 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) || + !virtnet_validate_duplex(cmd->duplex)) + return -EINVAL; +...
2016 Jan 30
1
bonding (IEEE 802.3ad) not working with qemu/virtio
...and full duplex >>> to ethtool, as veth does? >>> >>> Creating a magic whitelist of devices deep inside the 802.3ad >>> implementation seems less desirable. >>> >> TBH, I absolutely agree. In fact here's what we've been doing: >> add set_settings which allows the user to set any speed/duplex >> and get_settings of course to retrieve that. This is also useful >> for testing other stuff that requires speed and duplex, not only >> for the bonding case. > > I also agree. Having a whitelist is just rediculous. >...
2016 Jan 30
1
bonding (IEEE 802.3ad) not working with qemu/virtio
...and full duplex >>> to ethtool, as veth does? >>> >>> Creating a magic whitelist of devices deep inside the 802.3ad >>> implementation seems less desirable. >>> >> TBH, I absolutely agree. In fact here's what we've been doing: >> add set_settings which allows the user to set any speed/duplex >> and get_settings of course to retrieve that. This is also useful >> for testing other stuff that requires speed and duplex, not only >> for the bonding case. > > I also agree. Having a whitelist is just rediculous. >...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...e the > enums are defined so people remember to extend these > when adding new speeds? > Will help e.g. tun reuse this, too. > Right, very good suggestion. I'll split this patch in two and will add them for everyone to use. Thank you, Nik >> + >> +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
...e the > enums are defined so people remember to extend these > when adding new speeds? > Will help e.g. tun reuse this, too. > Right, very good suggestion. I'll split this patch in two and will add them for everyone to use. Thank you, Nik >> + >> +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 Jan 30
0
bonding (IEEE 802.3ad) not working with qemu/virtio
...rovide an arbitrary speed and full duplex >> to ethtool, as veth does? >> >> Creating a magic whitelist of devices deep inside the 802.3ad >> implementation seems less desirable. >> > TBH, I absolutely agree. In fact here's what we've been doing: > add set_settings which allows the user to set any speed/duplex > and get_settings of course to retrieve that. This is also useful > for testing other stuff that requires speed and duplex, not only > for the bonding case. I also agree. Having a whitelist is just rediculous. There should be a default...
2016 Oct 19
0
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...2PM -0400, Jarod Wilson wrote: > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index fad84f3..4885a42 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > .set_settings = virtnet_set_settings, > }; > > -#define MIN_MTU 68 > -#define MAX_MTU 65535 > - > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > -{ > - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > - return -EINVAL; > - dev->mtu = new_mtu; &g...
2016 Oct 21
0
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...rivers/net/virtio_net.c b/drivers/net/virtio_net.c > > > index fad84f3..720809f 100644 > > > --- a/drivers/net/virtio_net.c > > > +++ b/drivers/net/virtio_net.c > > > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > > .set_settings = virtnet_set_settings, > > > }; > > > > > > -#define MIN_MTU 68 > > > -#define MAX_MTU 65535 > > > - > > > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > > > -{ > > > - if (new_mtu < MIN_MTU |...
2017 Mar 21
0
[PATCH] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...empty(diff1.link_modes.supported, + __ETHTOOL_LINK_MODE_MASK_NBITS) && + bitmap_empty(diff1.link_modes.advertising, + __ETHTOOL_LINK_MODE_MASK_NBITS) && + bitmap_empty(diff1.link_modes.lp_advertising, + __ETHTOOL_LINK_MODE_MASK_NBITS); } -static int virtnet_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +static int virtnet_set_link_ksettings(struct net_device *dev, + const struct ethtool_link_ksettings *cmd) { struct virtnet_info *vi = netdev_priv(dev); u32 speed; - speed = ethtool_cmd_speed(cmd); + speed = cmd->base.speed;...
2017 Mar 21
0
[PATCH] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...empty(diff1.link_modes.supported, + __ETHTOOL_LINK_MODE_MASK_NBITS) && + bitmap_empty(diff1.link_modes.advertising, + __ETHTOOL_LINK_MODE_MASK_NBITS) && + bitmap_empty(diff1.link_modes.lp_advertising, + __ETHTOOL_LINK_MODE_MASK_NBITS); } -static int virtnet_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +static int virtnet_set_link_ksettings(struct net_device *dev, + const struct ethtool_link_ksettings *cmd) { struct virtnet_info *vi = netdev_priv(dev); u32 speed; - speed = ethtool_cmd_speed(cmd); + speed = cmd->base.speed;...
2017 Mar 21
1
[PATCH 2] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...empty(diff1.link_modes.supported, + __ETHTOOL_LINK_MODE_MASK_NBITS) && + bitmap_empty(diff1.link_modes.advertising, + __ETHTOOL_LINK_MODE_MASK_NBITS) && + bitmap_empty(diff1.link_modes.lp_advertising, + __ETHTOOL_LINK_MODE_MASK_NBITS); } -static int virtnet_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +static int virtnet_set_link_ksettings(struct net_device *dev, + const struct ethtool_link_ksettings *cmd) { struct virtnet_info *vi = netdev_priv(dev); u32 speed; - speed = ethtool_cmd_speed(cmd); + speed = cmd->base.speed;...