search for: netdev_ops

Displaying 20 results from an estimated 182 matches for "netdev_ops".

2014 May 08
2
[PATCH] net: get rid of SET_ETHTOOL_OPS
...t/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c index 35df0b9..a968654 100644 --- a/drivers/net/ethernet/3com/3c509.c +++ b/drivers/net/ethernet/3com/3c509.c @@ -534,7 +534,7 @@ static int el3_common_init(struct net_device *dev) /* The EL3-specific entries in the device structure. */ dev->netdev_ops = &netdev_ops; dev->watchdog_timeo = TX_TIMEOUT; - SET_ETHTOOL_OPS(dev, &ethtool_ops); + dev->ethtool_ops = &ethtool_ops; err = register_netdev(dev); if (err) { diff --git a/drivers/net/ethernet/3com/3c589_cs.c b/drivers/net/ethernet/3com/3c589_cs.c index 063557e..f18647c...
2014 May 08
2
[PATCH] net: get rid of SET_ETHTOOL_OPS
...t/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c index 35df0b9..a968654 100644 --- a/drivers/net/ethernet/3com/3c509.c +++ b/drivers/net/ethernet/3com/3c509.c @@ -534,7 +534,7 @@ static int el3_common_init(struct net_device *dev) /* The EL3-specific entries in the device structure. */ dev->netdev_ops = &netdev_ops; dev->watchdog_timeo = TX_TIMEOUT; - SET_ETHTOOL_OPS(dev, &ethtool_ops); + dev->ethtool_ops = &ethtool_ops; err = register_netdev(dev); if (err) { diff --git a/drivers/net/ethernet/3com/3c589_cs.c b/drivers/net/ethernet/3com/3c589_cs.c index 063557e..f18647c...
2014 May 11
7
[PATCH] [resend] net: get rid of SET_ETHTOOL_OPS
...t/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c index 35df0b9..a968654 100644 --- a/drivers/net/ethernet/3com/3c509.c +++ b/drivers/net/ethernet/3com/3c509.c @@ -534,7 +534,7 @@ static int el3_common_init(struct net_device *dev) /* The EL3-specific entries in the device structure. */ dev->netdev_ops = &netdev_ops; dev->watchdog_timeo = TX_TIMEOUT; - SET_ETHTOOL_OPS(dev, &ethtool_ops); + dev->ethtool_ops = &ethtool_ops; err = register_netdev(dev); if (err) { diff --git a/drivers/net/ethernet/3com/3c589_cs.c b/drivers/net/ethernet/3com/3c589_cs.c index 063557e..f18647c...
2014 May 11
7
[PATCH] [resend] net: get rid of SET_ETHTOOL_OPS
...t/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c index 35df0b9..a968654 100644 --- a/drivers/net/ethernet/3com/3c509.c +++ b/drivers/net/ethernet/3com/3c509.c @@ -534,7 +534,7 @@ static int el3_common_init(struct net_device *dev) /* The EL3-specific entries in the device structure. */ dev->netdev_ops = &netdev_ops; dev->watchdog_timeo = TX_TIMEOUT; - SET_ETHTOOL_OPS(dev, &ethtool_ops); + dev->ethtool_ops = &ethtool_ops; err = register_netdev(dev); if (err) { diff --git a/drivers/net/ethernet/3com/3c589_cs.c b/drivers/net/ethernet/3com/3c589_cs.c index 063557e..f18647c...
2014 May 11
7
[PATCH] [resend] net: get rid of SET_ETHTOOL_OPS
...t/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c index 35df0b9..a968654 100644 --- a/drivers/net/ethernet/3com/3c509.c +++ b/drivers/net/ethernet/3com/3c509.c @@ -534,7 +534,7 @@ static int el3_common_init(struct net_device *dev) /* The EL3-specific entries in the device structure. */ dev->netdev_ops = &netdev_ops; dev->watchdog_timeo = TX_TIMEOUT; - SET_ETHTOOL_OPS(dev, &ethtool_ops); + dev->ethtool_ops = &ethtool_ops; err = register_netdev(dev); if (err) { diff --git a/drivers/net/ethernet/3com/3c589_cs.c b/drivers/net/ethernet/3com/3c589_cs.c index 063557e..f18647c...
2014 May 08
0
[PATCH] net: get rid of SET_ETHTOOL_OPS
.../3c509.c > index 35df0b9..a968654 100644 > --- a/drivers/net/ethernet/3com/3c509.c > +++ b/drivers/net/ethernet/3com/3c509.c > @@ -534,7 +534,7 @@ static int el3_common_init(struct net_device *dev) > /* The EL3-specific entries in the device structure. */ > dev->netdev_ops = &netdev_ops; > dev->watchdog_timeo = TX_TIMEOUT; > - SET_ETHTOOL_OPS(dev, &ethtool_ops); > + dev->ethtool_ops = &ethtool_ops; > > err = register_netdev(dev); > if (err) { > diff --git a/drivers/net/ethernet/3com/3c589_cs.c...
2014 May 11
0
[PATCH] [resend] net: get rid of SET_ETHTOOL_OPS
.../3c509.c > index 35df0b9..a968654 100644 > --- a/drivers/net/ethernet/3com/3c509.c > +++ b/drivers/net/ethernet/3com/3c509.c > @@ -534,7 +534,7 @@ static int el3_common_init(struct net_device *dev) > /* The EL3-specific entries in the device structure. */ > dev->netdev_ops = &netdev_ops; > dev->watchdog_timeo = TX_TIMEOUT; > - SET_ETHTOOL_OPS(dev, &ethtool_ops); > + dev->ethtool_ops = &ethtool_ops; > > err = register_netdev(dev); > if (err) { > diff --git a/drivers/net/ethernet/3com/3c589_cs.c...
2014 May 11
0
[PATCH] [resend] net: get rid of SET_ETHTOOL_OPS
.../3c509.c > index 35df0b9..a968654 100644 > --- a/drivers/net/ethernet/3com/3c509.c > +++ b/drivers/net/ethernet/3com/3c509.c > @@ -534,7 +534,7 @@ static int el3_common_init(struct net_device *dev) > /* The EL3-specific entries in the device structure. */ > dev->netdev_ops = &netdev_ops; > dev->watchdog_timeo = TX_TIMEOUT; > - SET_ETHTOOL_OPS(dev, &ethtool_ops); > + dev->ethtool_ops = &ethtool_ops; > > err = register_netdev(dev); > if (err) { > diff --git a/drivers/net/ethernet/3com/3c589_cs.c...
2018 Apr 06
1
[RFC PATCH net-next v5 2/4] net: Introduce generic bypass module
...sk_buff **pskb); >+}; >+ >+struct bypass_instance { >+ struct list_head list; >+ struct net_device __rcu *bypass_netdev; >+ struct bypass *bypass; >+}; >+ >+struct bypass { >+ struct list_head list; >+ const struct bypass_ops *ops; >+ const struct net_device_ops *netdev_ops; >+ struct list_head instance_list; >+ struct mutex lock; >+}; >+ >+#if IS_ENABLED(CONFIG_NET_BYPASS) >+ >+struct bypass *bypass_register_driver(const struct bypass_ops *ops, >+ const struct net_device_ops *netdev_ops); >+void bypass_unregister_driver(struct bypa...
2018 Apr 05
0
[RFC PATCH net-next v5 2/4] net: Introduce generic bypass module
...); + rx_handler_result_t (*handle_frame)(struct sk_buff **pskb); +}; + +struct bypass_instance { + struct list_head list; + struct net_device __rcu *bypass_netdev; + struct bypass *bypass; +}; + +struct bypass { + struct list_head list; + const struct bypass_ops *ops; + const struct net_device_ops *netdev_ops; + struct list_head instance_list; + struct mutex lock; +}; + +#if IS_ENABLED(CONFIG_NET_BYPASS) + +struct bypass *bypass_register_driver(const struct bypass_ops *ops, + const struct net_device_ops *netdev_ops); +void bypass_unregister_driver(struct bypass *bypass); + +int bypass_register_...
2018 Feb 17
1
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...fication, would you mind saying what the challenges/downsides were? > +static struct net_device * > +get_virtnet_bypass_bymac(struct net *net, const u8 *mac) > +{ > + struct net_device *dev; > + > + ASSERT_RTNL(); > + > + for_each_netdev(net, dev) { > + if (dev->netdev_ops != &virtnet_bypass_netdev_ops) > + continue; /* not a virtnet_bypass device */ Is there anything inherently wrong with enslaving another virtio dev now? I was expecting something like a hash map to map MAC addr -> master and then one can check if dev is already enslaved to that...
2018 Apr 05
6
[RFC PATCH net-next v5 0/4] Enable virtio_net to act as a backup for a passthru device
The main motivation for this patch is to enable cloud service providers to provide an accelerated datapath to virtio-net enabled VMs in a transparent manner with no/minimal guest userspace changes. This also enables hypervisor controlled live migration to be supported with VMs that have direct attached SR-IOV VF devices. Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be used
2018 May 22
0
[PATCH net-next v11 2/5] netvsc: refactor notifier/event handling code to use the failover framework
...#include "hyperv_net.h" @@ -1763,46 +1764,6 @@ static void netvsc_link_change(struct work_struct *w) rtnl_unlock(); } -static struct net_device *get_netvsc_bymac(const u8 *mac) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&init_net, dev) { - if (dev->netdev_ops != &device_ops) - continue; /* not a netvsc device */ - - if (ether_addr_equal(mac, dev->perm_addr)) - return dev; - } - - return NULL; -} - -static struct net_device *get_netvsc_byref(struct net_device *vf_netdev) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&amp...
2018 Apr 25
0
[PATCH net-next v8 4/4] netvsc: refactor notifier/event handling code to use the failover framework
...#include "hyperv_net.h" @@ -1763,46 +1764,6 @@ static void netvsc_link_change(struct work_struct *w) rtnl_unlock(); } -static struct net_device *get_netvsc_bymac(const u8 *mac) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&init_net, dev) { - if (dev->netdev_ops != &device_ops) - continue; /* not a netvsc device */ - - if (ether_addr_equal(mac, dev->perm_addr)) - return dev; - } - - return NULL; -} - -static struct net_device *get_netvsc_byref(struct net_device *vf_netdev) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&amp...
2018 May 07
0
[PATCH net-next v10 4/4] netvsc: refactor notifier/event handling code to use the failover framework
...#include "hyperv_net.h" @@ -1763,46 +1764,6 @@ static void netvsc_link_change(struct work_struct *w) rtnl_unlock(); } -static struct net_device *get_netvsc_bymac(const u8 *mac) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&init_net, dev) { - if (dev->netdev_ops != &device_ops) - continue; /* not a netvsc device */ - - if (ether_addr_equal(mac, dev->perm_addr)) - return dev; - } - - return NULL; -} - -static struct net_device *get_netvsc_byref(struct net_device *vf_netdev) -{ - struct net_device *dev; - - ASSERT_RTNL(); - - for_each_netdev(&amp...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...percpu(vi->stats); free: @@ -2733,19 +2872,178 @@ static void remove_vq_common(struct virtnet_info *vi) virtnet_del_vqs(vi); } +static struct net_device *get_virtio_bymac(const u8 *mac) +{ + struct net_device *dev; + + ASSERT_RTNL(); + + for_each_netdev(&init_net, dev) { + if (dev->netdev_ops != &virtnet_netdev) + continue; /* not a virtio_net device */ + + if (ether_addr_equal(mac, dev->perm_addr)) + return dev; + } + + return NULL; +} + +static struct net_device *get_virtio_byref(struct net_device *vf_netdev) +{ + struct net_device *dev; + + ASSERT_RTNL(); + + for_ea...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...percpu(vi->stats); free: @@ -2733,19 +2872,178 @@ static void remove_vq_common(struct virtnet_info *vi) virtnet_del_vqs(vi); } +static struct net_device *get_virtio_bymac(const u8 *mac) +{ + struct net_device *dev; + + ASSERT_RTNL(); + + for_each_netdev(&init_net, dev) { + if (dev->netdev_ops != &virtnet_netdev) + continue; /* not a virtio_net device */ + + if (ether_addr_equal(mac, dev->perm_addr)) + return dev; + } + + return NULL; +} + +static struct net_device *get_virtio_byref(struct net_device *vf_netdev) +{ + struct net_device *dev; + + ASSERT_RTNL(); + + for_ea...
2019 Oct 07
3
[PATCH RFC net-next 2/2] drivers: net: virtio_net: Add tx_timeout function
...t_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 to be still broken with napi_tx = false. > dev->ethtool_ops = &virtnet_ethtool_ops; > SET_NETDEV_DEV(dev, &vde...
2019 Oct 07
3
[PATCH RFC net-next 2/2] drivers: net: virtio_net: Add tx_timeout function
...t_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 to be still broken with napi_tx = false. > dev->ethtool_ops = &virtnet_ethtool_ops; > SET_NETDEV_DEV(dev, &vde...
2013 Jan 09
16
[Bridge] [PATCH net-next V5 00/14] Add basic VLAN support to bridges
This series of patches provides an ability to add VLANs to the bridge ports. This is similar to what can be found in most switches. The bridge port may have any number of VLANs added to it including vlan 0 priority tagged traffic. When vlans are added to the port, only traffic tagged with particular vlan will forwarded over this port. Additionally, vlan ids are added to FDB entries and become