search for: ndo_open

Displaying 20 results from an estimated 156 matches for "ndo_open".

2012 Apr 04
2
question about napi_disable (was Re: [PATCH] virtio_net: set/cancel work on ndo_open/ndo_stop)
On Thu, Dec 29, 2011 at 09:12:38PM +1030, Rusty Russell wrote: > Michael S. Tsirkin noticed that we could run the refill work after > ndo_close, which can re-enable napi - we don't disable it until > virtnet_remove. This is clearly wrong, so move the workqueue control > to ndo_open and ndo_stop (aka. virtnet_open and virtnet_close). > > One subtle point: virtnet_probe() could simply fail if it couldn't > allocate a receive buffer, but that's less polite in virtnet_open() so > we schedule a refill as we do in the normal receive path if we run out > of m...
2012 Apr 04
2
question about napi_disable (was Re: [PATCH] virtio_net: set/cancel work on ndo_open/ndo_stop)
On Thu, Dec 29, 2011 at 09:12:38PM +1030, Rusty Russell wrote: > Michael S. Tsirkin noticed that we could run the refill work after > ndo_close, which can re-enable napi - we don't disable it until > virtnet_remove. This is clearly wrong, so move the workqueue control > to ndo_open and ndo_stop (aka. virtnet_open and virtnet_close). > > One subtle point: virtnet_probe() could simply fail if it couldn't > allocate a receive buffer, but that's less polite in virtnet_open() so > we schedule a refill as we do in the normal receive path if we run out > of m...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...idea to get stats from device here too. > > Not sure why we need to get stats from lower devs here? link down is often indication of a hardware problem. lower dev might stop responding down the road. > > > +static const struct net_device_ops failover_dev_ops = { > > > + .ndo_open = failover_open, > > > + .ndo_stop = failover_close, > > > + .ndo_start_xmit = failover_start_xmit, > > > + .ndo_select_queue = failover_select_queue, > > > + .ndo_get_stats64 = failover_get_stats, > > > + .ndo_change_mtu = failover_change_mtu, >...
2019 Oct 07
3
[PATCH RFC net-next 2/2] drivers: net: virtio_net: Add tx_timeout function
...); this seems to assume any running queue is timed out. doesn't look right. also - there's already a warning in this case in the core. do we need another one? > + dev->stats.tx_errors++; > + } > +} > + > static const struct net_device_ops virtnet_netdev = { > .ndo_open = virtnet_open, > .ndo_stop = virtnet_close, > @@ -2600,6 +2623,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...
2019 Oct 07
3
[PATCH RFC net-next 2/2] drivers: net: virtio_net: Add tx_timeout function
...); this seems to assume any running queue is timed out. doesn't look right. also - there's already a warning in this case in the core. do we need another one? > + dev->stats.tx_errors++; > + } > +} > + > static const struct net_device_ops virtnet_netdev = { > .ndo_open = virtnet_open, > .ndo_stop = virtnet_close, > @@ -2600,6 +2623,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...
2016 Oct 21
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...truct 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 virtnet_netdev = { > > .ndo_open = virtnet_open, > > .ndo_stop = virtnet_close, > > @@ -1437,7 +1426,6 @@ static const struct net_device_ops virtnet_netdev = { > > .ndo_validate_addr = eth_validate_addr, > > .ndo_set_mac_address = virtnet_set_mac_address, > > .ndo_set_rx_m...
2016 Oct 21
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...truct 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 virtnet_netdev = { > > .ndo_open = virtnet_open, > > .ndo_stop = virtnet_close, > > @@ -1437,7 +1426,6 @@ static const struct net_device_ops virtnet_netdev = { > > .ndo_validate_addr = eth_validate_addr, > > .ndo_set_mac_address = virtnet_set_mac_address, > > .ndo_set_rx_m...
2023 Feb 02
3
[PATCH 0/2] virtio-net: close() to follow mirror of open()
Hi, This two small patches improves ndo_close() callback to follow the mirror sequence of ndo_open() callback. This improves the code auditing and also ensure that xdp rxq info is not unregistered while NAPI on RXQ is ongoing. Please review. Patch summary: patch-1 ensures that xdp rq info is unregistered after rq napi is disabled patch-2 keeps the mirror sequence for close() be mirror of open(...
2016 Oct 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...truct 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 virtnet_netdev = { > > .ndo_open = virtnet_open, > > .ndo_stop = virtnet_close, > > @@ -1437,7 +1426,6 @@ static const struct net_device_ops virtnet_netdev = { > > .ndo_validate_addr = eth_validate_addr, > > .ndo_set_mac_address = virtnet_set_mac_address, > > .ndo_set_rx_m...
2016 Oct 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...truct 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 virtnet_netdev = { > > .ndo_open = virtnet_open, > > .ndo_stop = virtnet_close, > > @@ -1437,7 +1426,6 @@ static const struct net_device_ops virtnet_netdev = { > > .ndo_validate_addr = eth_validate_addr, > > .ndo_set_mac_address = virtnet_set_mac_address, > > .ndo_set_rx_m...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...tings, }; -#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 virtnet_netdev = { .ndo_open = virtnet_open, .ndo_stop = virtnet_close, @@ -1437,7 +1426,6 @@ static const struct net_device_ops virtnet_netdev = { .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = virtnet_set_mac_address, .ndo_set_rx_mode = virtnet_set_rx_mode, - .ndo_change_mtu...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...tings, }; -#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 virtnet_netdev = { .ndo_open = virtnet_open, .ndo_stop = virtnet_close, @@ -1437,7 +1426,6 @@ static const struct net_device_ops virtnet_netdev = { .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = virtnet_set_mac_address, .ndo_set_rx_mode = virtnet_set_rx_mode, - .ndo_change_mtu...
2015 Jun 24
2
[RFC] virtio_net: Adding tx_timeout function.
...priv(dev); + + dev_warn(&dev->dev, "TX Timeout exception with latency: %ld\n", + jiffies - dev_trans_start(dev)); + + schedule_work(&vi->reset_task); +} + +static void virtnet_reset_task(struct work_struct *work); + static const struct net_device_ops virtnet_netdev = { .ndo_open = virtnet_open, .ndo_stop = virtnet_close, @@ -1405,6 +1420,7 @@ static const struct net_device_ops virtnet_netdev = { .ndo_get_stats64 = virtnet_stats, .ndo_vlan_rx_add_vid = virtnet_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = virtnet_vlan_rx_kill_vid, + .ndo_tx_timeout...
2015 Jun 24
2
[RFC] virtio_net: Adding tx_timeout function.
...priv(dev); + + dev_warn(&dev->dev, "TX Timeout exception with latency: %ld\n", + jiffies - dev_trans_start(dev)); + + schedule_work(&vi->reset_task); +} + +static void virtnet_reset_task(struct work_struct *work); + static const struct net_device_ops virtnet_netdev = { .ndo_open = virtnet_open, .ndo_stop = virtnet_close, @@ -1405,6 +1420,7 @@ static const struct net_device_ops virtnet_netdev = { .ndo_get_stats64 = virtnet_stats, .ndo_vlan_rx_add_vid = virtnet_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = virtnet_vlan_rx_kill_vid, + .ndo_tx_timeout...
2015 Jun 25
3
[RFC] virtio_net: Adding tx_timeout function.
...t some point, this work must be canceled. Yes, you are right. Specially, when the driver is being removed. > > > +} > > + > > +static void virtnet_reset_task(struct work_struct *work); > > + > > static const struct net_device_ops virtnet_netdev = { > > .ndo_open = virtnet_open, > > .ndo_stop = virtnet_close, > > @@ -1405,6 +1420,7 @@ static const struct net_device_ops virtnet_netdev = { > > .ndo_get_stats64 = virtnet_stats, > > .ndo_vlan_rx_add_vid = virtnet_vlan_rx_add_vid, > >...
2015 Jun 25
3
[RFC] virtio_net: Adding tx_timeout function.
...t some point, this work must be canceled. Yes, you are right. Specially, when the driver is being removed. > > > +} > > + > > +static void virtnet_reset_task(struct work_struct *work); > > + > > static const struct net_device_ops virtnet_netdev = { > > .ndo_open = virtnet_open, > > .ndo_stop = virtnet_close, > > @@ -1405,6 +1420,7 @@ static const struct net_device_ops virtnet_netdev = { > > .ndo_get_stats64 = virtnet_stats, > > .ndo_vlan_rx_add_vid = virtnet_vlan_rx_add_vid, > >...
2023 Apr 13
1
[PATCH net-next V2 2/2] virtio-net: sleep instead of busy waiting for cvq command
...tic int virtnet_probe(struct virtio_device *vdev) > if (vi->has_rss || vi->has_rss_hash_report) > virtnet_init_default_rss(vi); > > + init_completion(&vi->completion); > enable_rx_mode_work(vi); > > /* serialize netdev register + virtio_device_ready() with ndo_open() */ > -- > 2.25.1 >
2012 Jan 12
9
Re: [PATCH] add netconsole support for xen-netfront
...ags); > + > + return IRQ_HANDLED; > +} > + > +#ifdef CONFIG_NET_POLL_CONTROLLER > +static void xennet_poll_controller(struct net_device *dev) > +{ > + xennet_interrupt(0, dev); > +} > +#endif > + > static const struct net_device_ops xennet_netdev_ops = { > .ndo_open = xennet_open, > .ndo_uninit = xennet_uninit, > @@ -1239,6 +1267,9 @@ static const struct net_device_ops xennet_netdev_ops = { > .ndo_validate_addr = eth_validate_addr, > .ndo_fix_features = xennet_fix_features, > .ndo_set_features = xennet_set_fea...
2019 Oct 06
7
[PATCH RFC net-next 0/2] drivers: net: virtio_net: Implement
From: Julio Faracco <jcfaracco at gmail.com> Driver virtio_net is not handling error events for TX provided by dev_watchdog. This event is reached when transmission queue is having problems to transmit packets. To enable it, driver should have .ndo_tx_timeout implemented. This serie has two commits: In the past, we implemented a function to recover driver state when this kind of event
2019 Oct 06
7
[PATCH RFC net-next 0/2] drivers: net: virtio_net: Implement
From: Julio Faracco <jcfaracco at gmail.com> Driver virtio_net is not handling error events for TX provided by dev_watchdog. This event is reached when transmission queue is having problems to transmit packets. To enable it, driver should have .ndo_tx_timeout implemented. This serie has two commits: In the past, we implemented a function to recover driver state when this kind of event