Displaying 20 results from an estimated 147 matches for "netif_carrier_on".
Did you mean:
netif_carrier_ok
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...gt; + if (slave_dev != primary_dev && slave_dev != standby_dev)
> > > + goto done;
> > > +
> > > + if ((primary_dev && failover_xmit_ready(primary_dev)) ||
> > > + (standby_dev && failover_xmit_ready(standby_dev))) {
> > > + netif_carrier_on(failover_dev);
> > > + netif_tx_wake_all_queues(failover_dev);
> > > + } else {
> > > + netif_carrier_off(failover_dev);
> > > + netif_tx_stop_all_queues(failover_dev);
> > And I think it's a good idea to get stats from device here too.
>
> No...
2018 Jan 05
0
[PATCH net-next v4 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...ol_ops virtnet_ethtool_ops = {
.get_drvinfo = virtnet_get_drvinfo,
.get_link = ethtool_op_get_link,
@@ -2147,6 +2165,7 @@ static void virtnet_config_changed_work(struct work_struct *work)
vi->status = v;
if (vi->status & VIRTIO_NET_S_LINK_UP) {
+ virtnet_update_settings(vi);
netif_carrier_on(vi->dev);
netif_tx_wake_all_queues(vi->dev);
} else {
@@ -2695,6 +2714,7 @@ static int virtnet_probe(struct virtio_device *vdev)
schedule_work(&vi->config_work);
} else {
vi->status = VIRTIO_NET_S_LINK_UP;
+ virtnet_update_settings(vi);
netif_carrier_on(dev);
}...
2011 Apr 05
3
[PATCH] staging: hv: Fix GARP not sent after Quick Migration
...et_device *net = dev_get_drvdata(&device_obj->device);
+ struct net_device_context *ndev_ctx;
if (!net) {
DPRINT_ERR(NETVSC_DRV, "got link status but net device "
@@ -229,7 +231,8 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj,
if (status == 1) {
netif_carrier_on(net);
netif_wake_queue(net);
- netif_notify_peers(net);
+ ndev_ctx = netdev_priv(net);
+ schedule_work(&ndev_ctx->work);
} else {
netif_carrier_off(net);
netif_stop_queue(net);
@@ -328,6 +331,17 @@ static const struct net_device_ops device_ops = {
.ndo_set_mac_address = eth_...
2011 Apr 05
3
[PATCH] staging: hv: Fix GARP not sent after Quick Migration
...et_device *net = dev_get_drvdata(&device_obj->device);
+ struct net_device_context *ndev_ctx;
if (!net) {
DPRINT_ERR(NETVSC_DRV, "got link status but net device "
@@ -229,7 +231,8 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj,
if (status == 1) {
netif_carrier_on(net);
netif_wake_queue(net);
- netif_notify_peers(net);
+ ndev_ctx = netdev_priv(net);
+ schedule_work(&ndev_ctx->work);
} else {
netif_carrier_off(net);
netif_stop_queue(net);
@@ -328,6 +331,17 @@ static const struct net_device_ops device_ops = {
.ndo_set_mac_address = eth_...
2018 Jan 04
2
[PATCH net-next v3 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...ed));
+ if (ethtool_validate_speed(speed))
+ vi->speed = speed;
+ duplex = virtio_cread8(vi->vdev,
+ offsetof(struct virtio_net_config,
+ duplex));
+ if (ethtool_validate_duplex(duplex))
+ vi->duplex = duplex;
+ }
+
if (vi->status & VIRTIO_NET_S_LINK_UP) {
netif_carrier_on(vi->dev);
netif_tx_wake_all_queues(vi->dev);
@@ -2796,7 +2812,8 @@ static struct virtio_device_id id_table[] = {
VIRTIO_NET_F_CTRL_RX, VIRTIO_NET_F_CTRL_VLAN, \
VIRTIO_NET_F_GUEST_ANNOUNCE, VIRTIO_NET_F_MQ, \
VIRTIO_NET_F_CTRL_MAC_ADDR, \
- VIRTIO_NET_F_MTU, VIRTIO_NET_F_CTRL_GUEST_O...
2015 Jun 24
2
[RFC] virtio_net: Adding tx_timeout function.
..., virtnet_config_changed_work);
+ INIT_WORK(&vi->reset_task, virtnet_reset_task);
/* If we can receive ANY GSO packets, we must allocate large ones. */
if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) ||
@@ -1891,7 +1909,7 @@ static int virtnet_probe(struct virtio_device *vdev)
netif_carrier_on(dev);
}
- pr_debug("virtnet: registered device %s with %d RX and TX vq's\n",
+ pr_debug("virtio_net: registered device %s with %d RX and TX vq's\n",
dev->name, max_queue_pairs);
return 0;
@@ -2001,6 +2019,55 @@ static int virtnet_restore(struct virtio_devi...
2015 Jun 24
2
[RFC] virtio_net: Adding tx_timeout function.
..., virtnet_config_changed_work);
+ INIT_WORK(&vi->reset_task, virtnet_reset_task);
/* If we can receive ANY GSO packets, we must allocate large ones. */
if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) ||
@@ -1891,7 +1909,7 @@ static int virtnet_probe(struct virtio_device *vdev)
netif_carrier_on(dev);
}
- pr_debug("virtnet: registered device %s with %d RX and TX vq's\n",
+ pr_debug("virtio_net: registered device %s with %d RX and TX vq's\n",
dev->name, max_queue_pairs);
return 0;
@@ -2001,6 +2019,55 @@ static int virtnet_restore(struct virtio_devi...
2018 Jan 04
3
[PATCH net-next v3 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...duplex = virtio_cread8(vi->vdev,
>> + offsetof(struct virtio_net_config,
>> + duplex));
>> + if (ethtool_validate_duplex(duplex))
>> + vi->duplex = duplex;
>> + }
>> +
>> if (vi->status & VIRTIO_NET_S_LINK_UP) {
>> netif_carrier_on(vi->dev);
>> netif_tx_wake_all_queues(vi->dev);
>
> OK so this handles the case when VIRTIO_NET_F_STATUS is set,
> but when it's clear we need to call this from virtnet_probe.
>
> I propose moving this chunk to a function and calling from two places.
>
good...
2018 Jan 04
3
[PATCH net-next v3 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...duplex = virtio_cread8(vi->vdev,
>> + offsetof(struct virtio_net_config,
>> + duplex));
>> + if (ethtool_validate_duplex(duplex))
>> + vi->duplex = duplex;
>> + }
>> +
>> if (vi->status & VIRTIO_NET_S_LINK_UP) {
>> netif_carrier_on(vi->dev);
>> netif_tx_wake_all_queues(vi->dev);
>
> OK so this handles the case when VIRTIO_NET_F_STATUS is set,
> but when it's clear we need to call this from virtnet_probe.
>
> I propose moving this chunk to a function and calling from two places.
>
good...
2015 Jun 25
3
[RFC] virtio_net: Adding tx_timeout function.
...virtnet_reset_task);
> >
> > /* If we can receive ANY GSO packets, we must allocate large ones. */
> > if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) ||
> > @@ -1891,7 +1909,7 @@ static int virtnet_probe(struct virtio_device *vdev)
> > netif_carrier_on(dev);
> > }
> >
> > - pr_debug("virtnet: registered device %s with %d RX and TX vq's\n",
> > + pr_debug("virtio_net: registered device %s with %d RX and TX vq's\n",
> > dev->name, max_queue_pairs);
> >
&...
2015 Jun 25
3
[RFC] virtio_net: Adding tx_timeout function.
...virtnet_reset_task);
> >
> > /* If we can receive ANY GSO packets, we must allocate large ones. */
> > if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) ||
> > @@ -1891,7 +1909,7 @@ static int virtnet_probe(struct virtio_device *vdev)
> > netif_carrier_on(dev);
> > }
> >
> > - pr_debug("virtnet: registered device %s with %d RX and TX vq's\n",
> > + pr_debug("virtio_net: registered device %s with %d RX and TX vq's\n",
> > dev->name, max_queue_pairs);
> >
&...
2017 Jul 18
2
[PATCH net-next 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...virtnet_clear_guest_offloads(vi);
> + if (!prog)
> + virtnet_restore_guest_offloads(vi);
> + }
> if (old_prog)
> bpf_prog_put(old_prog);
> napi_enable(&vi->rq[i].napi);
> @@ -2583,6 +2639,10 @@ static int virtnet_probe(struct virtio_device *vdev)
> netif_carrier_on(dev);
> }
>
> + for (i = 0; i < ARRAY_SIZE(guest_offloads); i++)
> + if (virtio_has_feature(vi->vdev, guest_offloads[i]))
> + set_bit(guest_offloads[i], &vi->guest_offloads);
> +
> pr_debug("virtnet: registered device %s with %d RX and TX vq's\n&q...
2017 Jul 18
2
[PATCH net-next 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...virtnet_clear_guest_offloads(vi);
> + if (!prog)
> + virtnet_restore_guest_offloads(vi);
> + }
> if (old_prog)
> bpf_prog_put(old_prog);
> napi_enable(&vi->rq[i].napi);
> @@ -2583,6 +2639,10 @@ static int virtnet_probe(struct virtio_device *vdev)
> netif_carrier_on(dev);
> }
>
> + for (i = 0; i < ARRAY_SIZE(guest_offloads); i++)
> + if (virtio_has_feature(vi->vdev, guest_offloads[i]))
> + set_bit(guest_offloads[i], &vi->guest_offloads);
> +
> pr_debug("virtnet: registered device %s with %d RX and TX vq's\n&q...
2018 Jan 04
1
[PATCH net-next v3 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...duplex = virtio_cread8(vi->vdev,
>> + offsetof(struct virtio_net_config,
>> + duplex));
>> + if (ethtool_validate_duplex(duplex))
>> + vi->duplex = duplex;
>> + }
>> +
>> if (vi->status & VIRTIO_NET_S_LINK_UP) {
>> netif_carrier_on(vi->dev);
>> netif_tx_wake_all_queues(vi->dev);
>> @@ -2796,7 +2812,8 @@ static struct virtio_device_id id_table[] = {
>> VIRTIO_NET_F_CTRL_RX, VIRTIO_NET_F_CTRL_VLAN, \
>> VIRTIO_NET_F_GUEST_ANNOUNCE, VIRTIO_NET_F_MQ, \
>> VIRTIO_NET_F_CTRL_MAC_ADDR, \...
2018 Jan 04
1
[PATCH net-next v3 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor
...duplex = virtio_cread8(vi->vdev,
>> + offsetof(struct virtio_net_config,
>> + duplex));
>> + if (ethtool_validate_duplex(duplex))
>> + vi->duplex = duplex;
>> + }
>> +
>> if (vi->status & VIRTIO_NET_S_LINK_UP) {
>> netif_carrier_on(vi->dev);
>> netif_tx_wake_all_queues(vi->dev);
>> @@ -2796,7 +2812,8 @@ static struct virtio_device_id id_table[] = {
>> VIRTIO_NET_F_CTRL_RX, VIRTIO_NET_F_CTRL_VLAN, \
>> VIRTIO_NET_F_GUEST_ANNOUNCE, VIRTIO_NET_F_MQ, \
>> VIRTIO_NET_F_CTRL_MAC_ADDR, \...
2011 May 23
5
[PATCH 1/6] staging: hv: remove unnecessary code in netvsc_probe().
...If carrier is still off ie we did not get a link status callback,
- * update it if necessary
- */
- /*
- * FIXME: We should use a atomic or test/set instead to avoid getting
- * out of sync with the device's link status
- */
- if (!netif_carrier_ok(net))
- if (!device_info.link_state)
- netif_carrier_on(net);
+ netif_carrier_on(net);
memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN);
--
1.6.3.2
2011 May 23
5
[PATCH 1/6] staging: hv: remove unnecessary code in netvsc_probe().
...If carrier is still off ie we did not get a link status callback,
- * update it if necessary
- */
- /*
- * FIXME: We should use a atomic or test/set instead to avoid getting
- * out of sync with the device's link status
- */
- if (!netif_carrier_ok(net))
- if (!device_info.link_state)
- netif_carrier_on(net);
+ netif_carrier_on(net);
memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN);
--
1.6.3.2
2017 Jul 24
1
[PATCH net-next V2 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...oads(vi);
> + if (!prog)
> + virtnet_restore_guest_offloads(vi);
> + }
> if (old_prog)
> bpf_prog_put(old_prog);
> virtnet_napi_enable(vi->rq[i].vq, &vi->rq[i].napi);
> @@ -2588,6 +2644,10 @@ static int virtnet_probe(struct virtio_device *vdev)
> netif_carrier_on(dev);
> }
>
> + for (i = 0; i < ARRAY_SIZE(guest_offloads); i++)
> + if (virtio_has_feature(vi->vdev, guest_offloads[i]))
> + set_bit(guest_offloads[i], &vi->guest_offloads);
> +
> pr_debug("virtnet: registered device %s with %d RX and TX vq's\n&q...
2017 Jul 24
1
[PATCH net-next V2 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...oads(vi);
> + if (!prog)
> + virtnet_restore_guest_offloads(vi);
> + }
> if (old_prog)
> bpf_prog_put(old_prog);
> virtnet_napi_enable(vi->rq[i].vq, &vi->rq[i].napi);
> @@ -2588,6 +2644,10 @@ static int virtnet_probe(struct virtio_device *vdev)
> netif_carrier_on(dev);
> }
>
> + for (i = 0; i < ARRAY_SIZE(guest_offloads); i++)
> + if (virtio_has_feature(vi->vdev, guest_offloads[i]))
> + set_bit(guest_offloads[i], &vi->guest_offloads);
> +
> pr_debug("virtnet: registered device %s with %d RX and TX vq's\n&q...
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