search for: other_count

Displaying 20 results from an estimated 46 matches for "other_count".

2014 Apr 18
3
[PATCH] virtio_net: zero is an invald queue_pairs number
...--git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 7b68746..8a852b5 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1285,7 +1285,7 @@ static int virtnet_set_channels(struct net_device *dev, if (channels->rx_count || channels->tx_count || channels->other_count) return -EINVAL; - if (queue_pairs > vi->max_queue_pairs) + if (queue_pairs > vi->max_queue_pairs || queue_pairs == 0) return -EINVAL; get_online_cpus(); -- 1.9.0
2014 Apr 18
3
[PATCH] virtio_net: zero is an invald queue_pairs number
...--git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 7b68746..8a852b5 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1285,7 +1285,7 @@ static int virtnet_set_channels(struct net_device *dev, if (channels->rx_count || channels->tx_count || channels->other_count) return -EINVAL; - if (queue_pairs > vi->max_queue_pairs) + if (queue_pairs > vi->max_queue_pairs || queue_pairs == 0) return -EINVAL; get_online_cpus(); -- 1.9.0
2014 Apr 21
1
[PATCH] virtio_net: zero is an invald queue_pairs number
...et/virtio_net.c >> index 7b68746..8a852b5 100644 >> --- a/drivers/net/virtio_net.c >> +++ b/drivers/net/virtio_net.c >> @@ -1285,7 +1285,7 @@ static int virtnet_set_channels(struct net_device *dev, >> if (channels->rx_count || channels->tx_count || channels->other_count) >> return -EINVAL; >> >> - if (queue_pairs > vi->max_queue_pairs) >> + if (queue_pairs > vi->max_queue_pairs || queue_pairs == 0) >> return -EINVAL; >> >> get_online_cpus(); > Acked-by: Jason Wang <jasowang at redhat.com>...
2014 Apr 21
1
[PATCH] virtio_net: zero is an invald queue_pairs number
...et/virtio_net.c >> index 7b68746..8a852b5 100644 >> --- a/drivers/net/virtio_net.c >> +++ b/drivers/net/virtio_net.c >> @@ -1285,7 +1285,7 @@ static int virtnet_set_channels(struct net_device *dev, >> if (channels->rx_count || channels->tx_count || channels->other_count) >> return -EINVAL; >> >> - if (queue_pairs > vi->max_queue_pairs) >> + if (queue_pairs > vi->max_queue_pairs || queue_pairs == 0) >> return -EINVAL; >> >> get_online_cpus(); > Acked-by: Jason Wang <jasowang at redhat.com>...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
....c @@ -146,6 +146,10 @@ struct virtnet_info { virtio_net_ctrl_ack ctrl_status; u8 ctrl_promisc; u8 ctrl_allmulti; + + /* Ethtool settings */ + u8 duplex; + u32 speed; }; struct padded_vnet_hdr { @@ -1376,6 +1380,72 @@ static void virtnet_get_channels(struct net_device *dev, channels->other_count = 0; } +static bool virtnet_validate_speed(u32 speed) +{ + switch (speed) { + case SPEED_10: + case SPEED_100: + case SPEED_1000: + case SPEED_2500: + case SPEED_5000: + case SPEED_10000: + case SPEED_20000: + case SPEED_25000: + case SPEED_40000: + case SPEED_50000: + case SPEED_56000: + case S...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
....c @@ -146,6 +146,10 @@ struct virtnet_info { virtio_net_ctrl_ack ctrl_status; u8 ctrl_promisc; u8 ctrl_allmulti; + + /* Ethtool settings */ + u8 duplex; + u32 speed; }; struct padded_vnet_hdr { @@ -1376,6 +1380,72 @@ static void virtnet_get_channels(struct net_device *dev, channels->other_count = 0; } +static bool virtnet_validate_speed(u32 speed) +{ + switch (speed) { + case SPEED_10: + case SPEED_100: + case SPEED_1000: + case SPEED_2500: + case SPEED_5000: + case SPEED_10000: + case SPEED_20000: + case SPEED_25000: + case SPEED_40000: + case SPEED_50000: + case SPEED_56000: + case S...
2015 Feb 10
4
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...> + > + __u32 rx_coalesce_usecs; > + __u32 rx_max_coalesced_frames; > + __u32 tx_coalesce_usecs; > + __u32 tx_max_coalesced_frames; > }; > > struct padded_vnet_hdr { > @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, > channels->other_count = 0; > } > > +static int virtnet_set_coalesce(struct net_device *dev, > + struct ethtool_coalesce *ec) > +{ > + struct virtnet_info *vi = netdev_priv(dev); > + struct scatterlist sg; > + struct virtio_net_ctrl_coalesce c; > + > + if (!vi->has_cvq || > +...
2015 Feb 10
4
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...> + > + __u32 rx_coalesce_usecs; > + __u32 rx_max_coalesced_frames; > + __u32 tx_coalesce_usecs; > + __u32 tx_max_coalesced_frames; > }; > > struct padded_vnet_hdr { > @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, > channels->other_count = 0; > } > > +static int virtnet_set_coalesce(struct net_device *dev, > + struct ethtool_coalesce *ec) > +{ > + struct virtnet_info *vi = netdev_priv(dev); > + struct scatterlist sg; > + struct virtio_net_ctrl_coalesce c; > + > + if (!vi->has_cvq || > +...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
..._promisc; >> u8 ctrl_allmulti; >> + >> + /* Ethtool settings */ >> + u8 duplex; >> + u32 speed; >> }; >> >> struct padded_vnet_hdr { >> @@ -1376,6 +1380,72 @@ static void virtnet_get_channels(struct net_device *dev, >> channels->other_count = 0; >> } >> >> +static bool virtnet_validate_speed(u32 speed) >> +{ >> + switch (speed) { >> + case SPEED_10: >> + case SPEED_100: >> + case SPEED_1000: >> + case SPEED_2500: >> + case SPEED_5000: >> + case SPEED_10000: >>...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
..._promisc; >> u8 ctrl_allmulti; >> + >> + /* Ethtool settings */ >> + u8 duplex; >> + u32 speed; >> }; >> >> struct padded_vnet_hdr { >> @@ -1376,6 +1380,72 @@ static void virtnet_get_channels(struct net_device *dev, >> channels->other_count = 0; >> } >> >> +static bool virtnet_validate_speed(u32 speed) >> +{ >> + switch (speed) { >> + case SPEED_10: >> + case SPEED_100: >> + case SPEED_1000: >> + case SPEED_2500: >> + case SPEED_5000: >> + case SPEED_10000: >>...
2014 Apr 21
0
[PATCH] virtio_net: zero is an invald queue_pairs number
...io_net.c b/drivers/net/virtio_net.c > index 7b68746..8a852b5 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1285,7 +1285,7 @@ static int virtnet_set_channels(struct net_device *dev, > if (channels->rx_count || channels->tx_count || channels->other_count) > return -EINVAL; > > - if (queue_pairs > vi->max_queue_pairs) > + if (queue_pairs > vi->max_queue_pairs || queue_pairs == 0) > return -EINVAL; > > get_online_cpus(); Acked-by: Jason Wang <jasowang at redhat.com>
2015 Feb 09
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...for polling tx completion */ u32 tx_work_limit; + + __u32 rx_coalesce_usecs; + __u32 rx_max_coalesced_frames; + __u32 tx_coalesce_usecs; + __u32 tx_max_coalesced_frames; }; struct padded_vnet_hdr { @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, channels->other_count = 0; } +static int virtnet_set_coalesce(struct net_device *dev, + struct ethtool_coalesce *ec) +{ + struct virtnet_info *vi = netdev_priv(dev); + struct scatterlist sg; + struct virtio_net_ctrl_coalesce c; + + if (!vi->has_cvq || + !virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_COA...
2015 Feb 09
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...for polling tx completion */ u32 tx_work_limit; + + __u32 rx_coalesce_usecs; + __u32 rx_max_coalesced_frames; + __u32 tx_coalesce_usecs; + __u32 tx_max_coalesced_frames; }; struct padded_vnet_hdr { @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, channels->other_count = 0; } +static int virtnet_set_coalesce(struct net_device *dev, + struct ethtool_coalesce *ec) +{ + struct virtnet_info *vi = netdev_priv(dev); + struct scatterlist sg; + struct virtio_net_ctrl_coalesce c; + + if (!vi->has_cvq || + !virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_COA...
2016 Feb 02
0
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...net_ctrl_ack ctrl_status; > u8 ctrl_promisc; > u8 ctrl_allmulti; > + > + /* Ethtool settings */ > + u8 duplex; > + u32 speed; > }; > > struct padded_vnet_hdr { > @@ -1376,6 +1380,72 @@ static void virtnet_get_channels(struct net_device *dev, > channels->other_count = 0; > } > > +static bool virtnet_validate_speed(u32 speed) > +{ > + switch (speed) { > + case SPEED_10: > + case SPEED_100: > + case SPEED_1000: > + case SPEED_2500: > + case SPEED_5000: > + case SPEED_10000: > + case SPEED_20000: > + case SPEED_25000: &gt...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...gt; > + __u32 rx_max_coalesced_frames; > > + __u32 tx_coalesce_usecs; > > + __u32 tx_max_coalesced_frames; > > }; > > > > struct padded_vnet_hdr { > > @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, > > channels->other_count = 0; > > } > > > > +static int virtnet_set_coalesce(struct net_device *dev, > > + struct ethtool_coalesce *ec) > > +{ > > + struct virtnet_info *vi = netdev_priv(dev); > > + struct scatterlist sg; > > + struct virtio_net_ctrl_coalesce c; > &g...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...gt; > + __u32 rx_max_coalesced_frames; > > + __u32 tx_coalesce_usecs; > > + __u32 tx_max_coalesced_frames; > > }; > > > > struct padded_vnet_hdr { > > @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, > > channels->other_count = 0; > > } > > > > +static int virtnet_set_coalesce(struct net_device *dev, > > + struct ethtool_coalesce *ec) > > +{ > > + struct virtnet_info *vi = netdev_priv(dev); > > + struct scatterlist sg; > > + struct virtio_net_ctrl_coalesce c; > &g...
2014 Aug 27
2
[PATCH 1/1] add selftest for virtio-net
...i; + /* disallow open during test */ + if (test_bit(__VIRTNET_TESTING, &vi->flags)) + return -EBUSY; for (i = 0; i < vi->max_queue_pairs; i++) { if (i < vi->curr_queue_pairs) @@ -1363,12 +1404,158 @@ static void virtnet_get_channels(struct net_device *dev, channels->other_count = 0; } +static int virtnet_reset(struct virtnet_info *vi); + +static void virtnet_create_lb_frame(struct sk_buff *skb, + unsigned int frame_size) +{ + memset(skb->data, 0xFF, frame_size); + frame_size &= ~1; + memset(&skb->data[frame_size / 2], 0xAA, frame_size / 2 - 1); + mems...
2014 Aug 27
2
[PATCH 1/1] add selftest for virtio-net
...i; + /* disallow open during test */ + if (test_bit(__VIRTNET_TESTING, &vi->flags)) + return -EBUSY; for (i = 0; i < vi->max_queue_pairs; i++) { if (i < vi->curr_queue_pairs) @@ -1363,12 +1404,158 @@ static void virtnet_get_channels(struct net_device *dev, channels->other_count = 0; } +static int virtnet_reset(struct virtnet_info *vi); + +static void virtnet_create_lb_frame(struct sk_buff *skb, + unsigned int frame_size) +{ + memset(skb->data, 0xFF, frame_size); + frame_size &= ~1; + memset(&skb->data[frame_size / 2], 0xAA, frame_size / 2 - 1); + mems...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...__u32 rx_max_coalesced_frames; >> + __u32 tx_coalesce_usecs; >> + __u32 tx_max_coalesced_frames; >> }; >> >> struct padded_vnet_hdr { >> @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct >> net_device *dev, >> channels->other_count = 0; >> } >> >> +static int virtnet_set_coalesce(struct net_device *dev, >> + struct ethtool_coalesce *ec) >> +{ >> + struct virtnet_info *vi = netdev_priv(dev); >> + struct scatterlist sg; >> + struct virtio_net_ctrl_coalesce c; >&gt...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...__u32 rx_max_coalesced_frames; >> + __u32 tx_coalesce_usecs; >> + __u32 tx_max_coalesced_frames; >> }; >> >> struct padded_vnet_hdr { >> @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct >> net_device *dev, >> channels->other_count = 0; >> } >> >> +static int virtnet_set_coalesce(struct net_device *dev, >> + struct ethtool_coalesce *ec) >> +{ >> + struct virtnet_info *vi = netdev_priv(dev); >> + struct scatterlist sg; >> + struct virtio_net_ctrl_coalesce c; >&gt...