Displaying 20 results from an estimated 152 matches for "virtnet_config_changed_work".
2018 Jan 04
1
[PATCH net-next v3 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...gt; 2 files changed, 31 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
>> index 6fb7b65..0b2d314 100644
>> --- a/drivers/net/virtio_net.c
>> +++ b/drivers/net/virtio_net.c
>> @@ -2146,6 +2146,22 @@ static void virtnet_config_changed_work(struct work_struct *work)
>>
>> vi->status = v;
>>
>> + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_SPEED_DUPLEX)) {
>> + u32 speed;
>> + u8 duplex;
>> +
>> + speed = virtio_cread32(vi->vdev,
>> + offsetof(struct vi...
2018 Jan 04
1
[PATCH net-next v3 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...gt; 2 files changed, 31 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
>> index 6fb7b65..0b2d314 100644
>> --- a/drivers/net/virtio_net.c
>> +++ b/drivers/net/virtio_net.c
>> @@ -2146,6 +2146,22 @@ static void virtnet_config_changed_work(struct work_struct *work)
>>
>> vi->status = v;
>>
>> + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_SPEED_DUPLEX)) {
>> + u32 speed;
>> + u8 duplex;
>> +
>> + speed = virtio_cread32(vi->vdev,
>> + offsetof(struct vi...
2014 Oct 05
0
[PATCH 09/16] virtio-net: drop config_mutex
...,9 +132,6 @@ struct virtnet_info {
/* Work struct for config space updates */
struct work_struct config_work;
- /* Lock for config space updates */
- struct mutex config_lock;
-
/* Does the affinity hint is set for virtqueues? */
bool affinity_hint_set;
@@ -1404,7 +1401,6 @@ static void virtnet_config_changed_work(struct work_struct *work)
container_of(work, struct virtnet_info, config_work);
u16 v;
- mutex_lock(&vi->config_lock);
if (virtio_cread_feature(vi->vdev, VIRTIO_NET_F_STATUS,
struct virtio_net_config, status, &v) < 0)
goto done;
@@ -1430,7 +1426,7 @@ static void v...
2014 Oct 05
0
[PATCH 11/16] virtio_net: minor cleanup
...at redhat.com>
---
drivers/net/virtio_net.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index d80fef4..4c8c314 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1403,7 +1403,7 @@ static void virtnet_config_changed_work(struct work_struct *work)
if (virtio_cread_feature(vi->vdev, VIRTIO_NET_F_STATUS,
struct virtio_net_config, status, &v) < 0)
- goto done;
+ return;
if (v & VIRTIO_NET_S_ANNOUNCE) {
netdev_notify_peers(vi->dev);
@@ -1414,7 +1414,7 @@ static void virtnet_config_cha...
2014 Oct 06
2
[PATCH 09/16] virtio-net: drop config_mutex
...rtio_net.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index fa17afa..d80fef4 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
[...]
> @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work)
> netif_tx_stop_all_queues(vi->dev);
> }
> done:
> - mutex_unlock(&vi->config_lock);
> + return;
There's no need for this *return*.
> }
>
> static void virtnet_config_changed(struct virtio_device *vdev)
WBR, Sergei
2014 Oct 06
2
[PATCH 09/16] virtio-net: drop config_mutex
...rtio_net.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index fa17afa..d80fef4 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
[...]
> @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work)
> netif_tx_stop_all_queues(vi->dev);
> }
> done:
> - mutex_unlock(&vi->config_lock);
> + return;
There's no need for this *return*.
> }
>
> static void virtnet_config_changed(struct virtio_device *vdev)
WBR, Sergei
2017 May 18
2
[PATCH net 3/3] virtio-net: enable TSO/checksum offloads for Q-in-Q vlans
.....341fb96 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2028,6 +2028,7 @@ static const struct net_device_ops virtnet_netdev = {
.ndo_poll_controller = virtnet_netpoll,
#endif
.ndo_xdp = virtnet_xdp,
+ .ndo_features_check = passthru_features_check,
};
static void virtnet_config_changed_work(struct work_struct *work)
--
2.7.4
2017 May 18
2
[PATCH net 3/3] virtio-net: enable TSO/checksum offloads for Q-in-Q vlans
.....341fb96 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2028,6 +2028,7 @@ static const struct net_device_ops virtnet_netdev = {
.ndo_poll_controller = virtnet_netpoll,
#endif
.ndo_xdp = virtnet_xdp,
+ .ndo_features_check = passthru_features_check,
};
static void virtnet_config_changed_work(struct work_struct *work)
--
2.7.4
2018 Jan 04
2
[PATCH net-next v3 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...+++-
include/uapi/linux/virtio_net.h | 13 +++++++++++++
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 6fb7b65..0b2d314 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2146,6 +2146,22 @@ static void virtnet_config_changed_work(struct work_struct *work)
vi->status = v;
+ if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_SPEED_DUPLEX)) {
+ u32 speed;
+ u8 duplex;
+
+ speed = virtio_cread32(vi->vdev,
+ offsetof(struct virtio_net_config,
+ speed));
+ if (ethtool_validate_speed(speed))
+ vi->...
2018 Jan 04
0
[PATCH net-next v3 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...tions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> >> index 6fb7b65..0b2d314 100644
> >> --- a/drivers/net/virtio_net.c
> >> +++ b/drivers/net/virtio_net.c
> >> @@ -2146,6 +2146,22 @@ static void virtnet_config_changed_work(struct work_struct *work)
> >>
> >> vi->status = v;
> >>
> >> + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_SPEED_DUPLEX)) {
> >> + u32 speed;
> >> + u8 duplex;
> >> +
> >> + speed = virtio_cread32(vi->vdev,...
2014 Oct 06
2
[PATCH 09/16] virtio-net: drop config_mutex
...nsertion(+), 6 deletions(-)
>>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
>>> index fa17afa..d80fef4 100644
>>> --- a/drivers/net/virtio_net.c
>>> +++ b/drivers/net/virtio_net.c
>> [...]
>>> @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work)
>>> netif_tx_stop_all_queues(vi->dev);
>>> }
>>> done:
>>> - mutex_unlock(&vi->config_lock);
>>> + return;
>> There's no need for this *return*.
> I know - it's removed by the follow-up...
2014 Oct 06
2
[PATCH 09/16] virtio-net: drop config_mutex
...nsertion(+), 6 deletions(-)
>>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
>>> index fa17afa..d80fef4 100644
>>> --- a/drivers/net/virtio_net.c
>>> +++ b/drivers/net/virtio_net.c
>> [...]
>>> @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work)
>>> netif_tx_stop_all_queues(vi->dev);
>>> }
>>> done:
>>> - mutex_unlock(&vi->config_lock);
>>> + return;
>> There's no need for this *return*.
> I know - it's removed by the follow-up...
2019 Nov 22
2
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...virtnet_close,
@@ -2593,6 +2627,7 @@ static const struct net_device_ops virtnet_netdev = {
.ndo_features_check = passthru_features_check,
.ndo_get_phys_port_name = virtnet_get_phys_port_name,
.ndo_set_features = virtnet_set_features,
+ .ndo_tx_timeout = virtnet_tx_timeout,
};
static void virtnet_config_changed_work(struct work_struct *work)
@@ -2982,6 +3017,62 @@ static int virtnet_validate(struct virtio_device *vdev)
return 0;
}
+static void _remove_vq_common(struct virtnet_info *vi)
+{
+ vi->vdev->config->reset(vi->vdev);
+
+ /* Free unused buffers in both send and recv, if any. */
+ free_u...
2019 Nov 22
2
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...virtnet_close,
@@ -2593,6 +2627,7 @@ static const struct net_device_ops virtnet_netdev = {
.ndo_features_check = passthru_features_check,
.ndo_get_phys_port_name = virtnet_get_phys_port_name,
.ndo_set_features = virtnet_set_features,
+ .ndo_tx_timeout = virtnet_tx_timeout,
};
static void virtnet_config_changed_work(struct work_struct *work)
@@ -2982,6 +3017,62 @@ static int virtnet_validate(struct virtio_device *vdev)
return 0;
}
+static void _remove_vq_common(struct virtnet_info *vi)
+{
+ vi->vdev->config->reset(vi->vdev);
+
+ /* Free unused buffers in both send and recv, if any. */
+ free_u...
2019 Oct 07
3
[PATCH RFC net-next 2/2] drivers: net: virtio_net: Add tx_timeout function
...@ static const struct net_device_ops virtnet_netdev = {
> .ndo_features_check = passthru_features_check,
> .ndo_get_phys_port_name = virtnet_get_phys_port_name,
> .ndo_set_features = virtnet_set_features,
> + .ndo_tx_timeout = virtnet_tx_timeout,
> };
>
> static void virtnet_config_changed_work(struct work_struct *work)
> @@ -3018,6 +3042,9 @@ static int virtnet_probe(struct virtio_device *vdev)
> dev->netdev_ops = &virtnet_netdev;
> dev->features = NETIF_F_HIGHDMA;
>
> + /* Set up dev_watchdog cycle. */
> + dev->watchdog_timeo = 5 * HZ;
> +
Seems...
2019 Oct 07
3
[PATCH RFC net-next 2/2] drivers: net: virtio_net: Add tx_timeout function
...@ static const struct net_device_ops virtnet_netdev = {
> .ndo_features_check = passthru_features_check,
> .ndo_get_phys_port_name = virtnet_get_phys_port_name,
> .ndo_set_features = virtnet_set_features,
> + .ndo_tx_timeout = virtnet_tx_timeout,
> };
>
> static void virtnet_config_changed_work(struct work_struct *work)
> @@ -3018,6 +3042,9 @@ static int virtnet_probe(struct virtio_device *vdev)
> dev->netdev_ops = &virtnet_netdev;
> dev->features = NETIF_F_HIGHDMA;
>
> + /* Set up dev_watchdog cycle. */
> + dev->watchdog_timeo = 5 * HZ;
> +
Seems...
2014 Oct 05
0
[PATCH 08/16] virtio_net: drop config_enable
...@ -123,9 +123,6 @@ struct virtnet_info {
/* Host can handle any s/g split between our header and packet data */
bool any_header_sg;
- /* enable config space updates */
- bool config_enable;
-
/* Active statistics */
struct virtnet_stats __percpu *stats;
@@ -1408,9 +1405,6 @@ static void virtnet_config_changed_work(struct work_struct *work)
u16 v;
mutex_lock(&vi->config_lock);
- if (!vi->config_enable)
- goto done;
-
if (virtio_cread_feature(vi->vdev, VIRTIO_NET_F_STATUS,
struct virtio_net_config, status, &v) < 0)
goto done;
@@ -1758,7 +1752,6 @@ static int virtnet_probe(...
2014 Oct 06
1
[PATCH 09/16] virtio-net: drop config_mutex
...irtio_net.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index fa17afa..d80fef4 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work)
> netif_tx_stop_all_queues(vi->dev);
> }
> done:
> - mutex_unlock(&vi->config_lock);
> + return;
> }
>
> static void virtnet_config_changed(struct virtio_device *vdev)
I'd probably return directly in the remaining 'goto d...
2014 Oct 06
0
[PATCH v2 07/15] virtio_net: drop config_enable
...@ -123,9 +123,6 @@ struct virtnet_info {
/* Host can handle any s/g split between our header and packet data */
bool any_header_sg;
- /* enable config space updates */
- bool config_enable;
-
/* Active statistics */
struct virtnet_stats __percpu *stats;
@@ -1408,9 +1405,6 @@ static void virtnet_config_changed_work(struct work_struct *work)
u16 v;
mutex_lock(&vi->config_lock);
- if (!vi->config_enable)
- goto done;
-
if (virtio_cread_feature(vi->vdev, VIRTIO_NET_F_STATUS,
struct virtio_net_config, status, &v) < 0)
goto done;
@@ -1758,7 +1752,6 @@ static int virtnet_probe(...
2014 Oct 06
1
[PATCH 09/16] virtio-net: drop config_mutex
...irtio_net.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index fa17afa..d80fef4 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work)
> netif_tx_stop_all_queues(vi->dev);
> }
> done:
> - mutex_unlock(&vi->config_lock);
> + return;
> }
>
> static void virtnet_config_changed(struct virtio_device *vdev)
I'd probably return directly in the remaining 'goto d...