Displaying 20 results from an estimated 46 matches for "virtnet_get_channels".
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.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_4000...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.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_4000...
2015 Feb 10
4
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
.../* Budget 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_coa...
2015 Feb 10
4
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
.../* Budget 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_coa...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...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:
>&g...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...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:
>&g...
2017 Mar 21
0
[PATCH] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...| 50 +++++++++++++++++++++++++++------------------
1 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index ea9890d..b0d241d 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1636,47 +1636,57 @@ static void virtnet_get_channels(struct net_device *dev,
}
/* Check if the user is trying to change anything besides speed/duplex */
-static bool virtnet_validate_ethtool_cmd(const struct ethtool_cmd *cmd)
+static bool
+virtnet_validate_ethtool_cmd(const struct ethtool_link_ksettings *cmd)
{
- struct ethtool_cmd diff1 = *cmd;...
2017 Mar 21
0
[PATCH] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...| 50 +++++++++++++++++++++++++++------------------
1 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index ea9890d..b0d241d 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1636,47 +1636,57 @@ static void virtnet_get_channels(struct net_device *dev,
}
/* Check if the user is trying to change anything besides speed/duplex */
-static bool virtnet_validate_ethtool_cmd(const struct ethtool_cmd *cmd)
+static bool
+virtnet_validate_ethtool_cmd(const struct ethtool_link_ksettings *cmd)
{
- struct ethtool_cmd diff1 = *cmd;...
2017 Mar 21
1
[PATCH 2] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...| 50 +++++++++++++++++++++++++++------------------
1 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index ea9890d..b0d241d 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1636,47 +1636,57 @@ static void virtnet_get_channels(struct net_device *dev,
}
/* Check if the user is trying to change anything besides speed/duplex */
-static bool virtnet_validate_ethtool_cmd(const struct ethtool_cmd *cmd)
+static bool
+virtnet_validate_ethtool_cmd(const struct ethtool_link_ksettings *cmd)
{
- struct ethtool_cmd diff1 = *cmd;...
2017 Mar 21
1
[PATCH 2] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...| 50 +++++++++++++++++++++++++++------------------
1 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index ea9890d..b0d241d 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1636,47 +1636,57 @@ static void virtnet_get_channels(struct net_device *dev,
}
/* Check if the user is trying to change anything besides speed/duplex */
-static bool virtnet_validate_ethtool_cmd(const struct ethtool_cmd *cmd)
+static bool
+virtnet_validate_ethtool_cmd(const struct ethtool_link_ksettings *cmd)
{
- struct ethtool_cmd diff1 = *cmd;...
2015 Feb 09
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
....c
@@ -145,6 +145,11 @@ struct virtnet_info {
/* Budget 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 ||
+ !vi...
2015 Feb 09
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
....c
@@ -145,6 +145,11 @@ struct virtnet_info {
/* Budget 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 ||
+ !vi...
2016 Feb 02
0
[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_1000...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...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 scatterli...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...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 scatterli...
2014 Aug 27
2
[PATCH 1/1] add selftest for virtio-net
...*dev)
{
struct virtnet_info *vi = netdev_priv(dev);
int 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...
2014 Aug 27
2
[PATCH 1/1] add selftest for virtio-net
...*dev)
{
struct virtnet_info *vi = netdev_priv(dev);
int 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...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...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...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...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...
2013 May 16
2
[PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool
...ats_fetch_begin_bh(&rstats->rx_syncp);
+ rpackets = rstats->rx_packets;
+ rbytes = rstats->rx_bytes;
+ } while (u64_stats_fetch_retry_bh(&rstats->rx_syncp, start));
tot->rx_packets += rpackets;
tot->tx_packets += tpackets;
@@ -1177,12 +1211,83 @@ static void virtnet_get_channels(struct net_device *dev,
channels->other_count = 0;
}
+static void virtnet_get_stat_strings(struct net_device *dev,
+ u32 stringset,
+ u8 *data)
+{
+ struct virtnet_info *vi = netdev_priv(dev);
+ int i, j;
+
+ switch (stringset) {
+ case ETH_SS_STATS:
+ for (i = 0; i < vi->max...