search for: event_dev

Displaying 20 results from an estimated 44 matches for "event_dev".

2018 Jan 26
1
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...t 09:58:39PM -0800, Sridhar Samudrala wrote: > @@ -2859,6 +3123,42 @@ static struct virtio_driver virtio_net_driver = { > #endif > }; > > +static int virtio_netdev_event(struct notifier_block *this, > + unsigned long event, void *ptr) > +{ > + struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); > + > + /* Skip our own events */ > + if (event_dev->netdev_ops == &virtnet_netdev) > + return NOTIFY_DONE; > + > + /* Avoid non-Ethernet type devices */ > + if (event_dev->type != ARPHRD_ETHER) > + return NOTIFY_DONE; > + &...
2018 May 22
0
[PATCH net-next v11 2/5] netvsc: refactor notifier/event handling code to use the failover framework
...face. The synthetic interface is presented first - * to the guest. When the corresponding VF instance is registered, - * we will take care of switching the data path. - */ -static int netvsc_netdev_event(struct notifier_block *this, - unsigned long event, void *ptr) -{ - struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); - - /* Skip our own events */ - if (event_dev->netdev_ops == &device_ops) - return NOTIFY_DONE; - - /* Avoid non-Ethernet type devices */ - if (event_dev->type != ARPHRD_ETHER) - return NOTIFY_DONE; - - /* Avoid Vlan dev with same MAC registering as V...
2018 Apr 25
0
[PATCH net-next v8 4/4] netvsc: refactor notifier/event handling code to use the failover framework
...face. The synthetic interface is presented first - * to the guest. When the corresponding VF instance is registered, - * we will take care of switching the data path. - */ -static int netvsc_netdev_event(struct notifier_block *this, - unsigned long event, void *ptr) -{ - struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); - - /* Skip our own events */ - if (event_dev->netdev_ops == &device_ops) - return NOTIFY_DONE; - - /* Avoid non-Ethernet type devices */ - if (event_dev->type != ARPHRD_ETHER) - return NOTIFY_DONE; - - /* Avoid Vlan dev with same MAC registering as V...
2018 May 07
0
[PATCH net-next v10 4/4] netvsc: refactor notifier/event handling code to use the failover framework
...face. The synthetic interface is presented first - * to the guest. When the corresponding VF instance is registered, - * we will take care of switching the data path. - */ -static int netvsc_netdev_event(struct notifier_block *this, - unsigned long event, void *ptr) -{ - struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); - - /* Skip our own events */ - if (event_dev->netdev_ops == &device_ops) - return NOTIFY_DONE; - - /* Avoid non-Ethernet type devices */ - if (event_dev->type != ARPHRD_ETHER) - return NOTIFY_DONE; - - /* Avoid Vlan dev with same MAC registering as V...
2018 Apr 20
0
[PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework
...face. The synthetic interface is presented first - * to the guest. When the corresponding VF instance is registered, - * we will take care of switching the data path. - */ -static int netvsc_netdev_event(struct notifier_block *this, - unsigned long event, void *ptr) -{ - struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); - - /* Skip our own events */ - if (event_dev->netdev_ops == &device_ops) - return NOTIFY_DONE; - - /* Avoid non-Ethernet type devices */ - if (event_dev->type != ARPHRD_ETHER) - return NOTIFY_DONE; - - /* Avoid Vlan dev with same MAC registering as V...
2018 Apr 10
0
[RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework
...face. The synthetic interface is presented first - * to the guest. When the corresponding VF instance is registered, - * we will take care of switching the data path. - */ -static int netvsc_netdev_event(struct notifier_block *this, - unsigned long event, void *ptr) -{ - struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); - - /* Skip our own events */ - if (event_dev->netdev_ops == &device_ops) - return NOTIFY_DONE; - - /* Avoid non-Ethernet type devices */ - if (event_dev->type != ARPHRD_ETHER) - return NOTIFY_DONE; - - /* Avoid Vlan dev with same MAC registering as V...
2018 Jan 12
7
[RFC PATCH net-next v2 0/2] Enable virtio to act as a backup for a passthru device
This patch series extends virtio_net to take over VF datapath by simulating a transparent bond without creating any additional netdev. I understand that there are some comments suggesting an alternate model that is based on 3 driver model(virtio_net, VF driver, a new driver virt_bond that acts as a master to virtio_net and VF). Would like to get some feedback on the right way to solve the live
2018 May 24
0
[PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework
...face. The synthetic interface is presented first - * to the guest. When the corresponding VF instance is registered, - * we will take care of switching the data path. - */ -static int netvsc_netdev_event(struct notifier_block *this, - unsigned long event, void *ptr) -{ - struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); - - /* Skip our own events */ - if (event_dev->netdev_ops == &device_ops) - return NOTIFY_DONE; - - /* Avoid non-Ethernet type devices */ - if (event_dev->type != ARPHRD_ETHER) - return NOTIFY_DONE; - - /* Avoid Vlan dev with same MAC registering as V...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
..._percpu(vi->vf_stats); free_percpu(vi->stats); free_netdev(vi->dev); } @@ -2823,6 +3121,42 @@ static struct virtio_driver virtio_net_driver = { #endif }; +static int virtio_netdev_event(struct notifier_block *this, + unsigned long event, void *ptr) +{ + struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); + + /* Skip our own events */ + if (event_dev->netdev_ops == &virtnet_netdev) + return NOTIFY_DONE; + + /* Avoid non-Ethernet type devices */ + if (event_dev->type != ARPHRD_ETHER) + return NOTIFY_DONE; + + /* Avoid Vlan dev with same MAC registering...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
..._percpu(vi->vf_stats); free_percpu(vi->stats); free_netdev(vi->dev); } @@ -2823,6 +3121,42 @@ static struct virtio_driver virtio_net_driver = { #endif }; +static int virtio_netdev_event(struct notifier_block *this, + unsigned long event, void *ptr) +{ + struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); + + /* Skip our own events */ + if (event_dev->netdev_ops == &virtnet_netdev) + return NOTIFY_DONE; + + /* Avoid non-Ethernet type devices */ + if (event_dev->type != ARPHRD_ETHER) + return NOTIFY_DONE; + + /* Avoid Vlan dev with same MAC registering...
2018 Jan 12
0
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
..._percpu(vi->vf_stats); free_percpu(vi->stats); free_netdev(vi->dev); } @@ -2859,6 +3123,42 @@ static struct virtio_driver virtio_net_driver = { #endif }; +static int virtio_netdev_event(struct notifier_block *this, + unsigned long event, void *ptr) +{ + struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); + + /* Skip our own events */ + if (event_dev->netdev_ops == &virtnet_netdev) + return NOTIFY_DONE; + + /* Avoid non-Ethernet type devices */ + if (event_dev->type != ARPHRD_ETHER) + return NOTIFY_DONE; + + /* Avoid Vlan dev with same MAC registering...
2017 Dec 21
0
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...ts); > free_netdev(vi->dev); > } > @@ -2823,6 +3121,42 @@ static struct virtio_driver virtio_net_driver = { > #endif > }; > > +static int virtio_netdev_event(struct notifier_block *this, > + unsigned long event, void *ptr) > +{ > + struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); > + > + /* Skip our own events */ > + if (event_dev->netdev_ops == &virtnet_netdev) > + return NOTIFY_DONE; > + > + /* Avoid non-Ethernet type devices */ > + if (event_dev->type != ARPHRD_ETHER) > + return NOTIFY_DONE; > + &...
2017 Dec 21
1
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
On Wed, Dec 20, 2017 at 02:33:34PM -0800, Jakub Kicinski wrote: > On Mon, 18 Dec 2017 16:40:36 -0800, Sridhar Samudrala wrote: > > +static int virtio_netdev_event(struct notifier_block *this, > > + unsigned long event, void *ptr) > > +{ > > + struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); > > + > > + /* Skip our own events */ > > + if (event_dev->netdev_ops == &virtnet_netdev) > > + return NOTIFY_DONE; > > I wonder how does this work WRT loop prevention. What if I have two > virtio devices with the same M...
2018 Feb 16
0
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...ckup))) { + netif_carrier_on(dev); + netif_tx_wake_all_queues(dev); + } else { + netif_carrier_off(dev); + netif_tx_stop_all_queues(dev); + } + + return NOTIFY_OK; +} + +static int +virtnet_bypass_event(struct notifier_block *this, unsigned long event, + void *ptr) +{ + struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); + + /* Skip our own events */ + if (event_dev->netdev_ops == &virtnet_bypass_netdev_ops) + return NOTIFY_DONE; + + /* Avoid non-Ethernet type devices */ + if (event_dev->type != ARPHRD_ETHER) + return NOTIFY_DONE; + + /* Avoid Vlan dev with same MAC r...
2018 Apr 06
1
[RFC PATCH net-next v5 2/4] net: Introduce generic bypass module
...ing as child dev */ >+ if ((dev->priv_flags & IFF_BONDING) && (dev->flags & IFF_MASTER)) >+ return false; >+ >+ return true; >+} >+ >+static int >+bypass_event(struct notifier_block *this, unsigned long event, void *ptr) >+{ >+ struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); >+ struct bypass *bypass; >+ >+ /* Skip Parent events */ >+ mutex_lock(&bypass_mutex); >+ list_for_each_entry(bypass, &bypass_list, list) { >+ if (event_dev->netdev_ops == bypass->netdev_ops) { >+ mutex_unlock(&bypass_mut...
2018 Apr 05
0
[RFC PATCH net-next v5 2/4] net: Introduce generic bypass module
...onding master dev with same MAC registering as child dev */ + if ((dev->priv_flags & IFF_BONDING) && (dev->flags & IFF_MASTER)) + return false; + + return true; +} + +static int +bypass_event(struct notifier_block *this, unsigned long event, void *ptr) +{ + struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); + struct bypass *bypass; + + /* Skip Parent events */ + mutex_lock(&bypass_mutex); + list_for_each_entry(bypass, &bypass_list, list) { + if (event_dev->netdev_ops == bypass->netdev_ops) { + mutex_unlock(&bypass_mutex); + return NOTIFY_DONE;...
2018 May 24
0
[PATCH net-next v12 1/5] net: Introduce generic failover module
...o done; + + if (fops && fops->slave_name_change && + !fops->slave_name_change(slave_dev, failover_dev)) + return NOTIFY_OK; + +done: + return NOTIFY_DONE; +} + +static int +failover_event(struct notifier_block *this, unsigned long event, void *ptr) +{ + struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); + + /* Skip parent events */ + if (netif_is_failover(event_dev)) + return NOTIFY_DONE; + + switch (event) { + case NETDEV_REGISTER: + return failover_slave_register(event_dev); + case NETDEV_UNREGISTER: + return failover_slave_unregister(event_dev); + case NET...
2018 Jan 03
6
[PATCH net-next 0/2] Enable virtio to act as a master for a passthru device
This patch series enables virtio to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF without the need to setup a bond/team between a VF and virtio net device in the guest. The hypervisor needs to unplug the VF device from the guest on the source host and reset the MAC filter of the VF to initiate
2018 Jan 03
6
[PATCH net-next 0/2] Enable virtio to act as a master for a passthru device
This patch series enables virtio to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF without the need to setup a bond/team between a VF and virtio net device in the guest. The hypervisor needs to unplug the VF device from the guest on the source host and reset the MAC filter of the VF to initiate
2018 Apr 25
5
[PATCH net-next v8 0/4] Enable virtio_net to act as a standby for a passthru device
This is another update based on feedback from MST and Stephen on the last patchset. Hopefully this series can be integrated and any further enhancements can be made on top of this patchset. v8: - Made the failover managment routines more robust by updating the feature bits/other fields in the failover netdev when slave netdevs are registered/unregistered. (mst) - added support for handling